Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mGBA system bus: I/O registers, VRAM, OAM, GamePak SRAM cannot be written manually through system bus #3537

Open
getCursorsExe opened this issue Jan 24, 2023 · 5 comments
Labels
Core: mGBA Game Boy Advance (GBA) core

Comments

@getCursorsExe
Copy link

getCursorsExe commented Jan 24, 2023

At http://problemkaputt.de/gbatek-gba-memory-map.htm these mentioned memory locations are suppossed to be read/write, but in mGBA you cannot poke them manually, just as if these memory locations were completely read-only.

@getCursorsExe getCursorsExe changed the title mGBA system bus: I/O registers, VRAM, OAM, mGBA system bus: I/O registers, VRAM, OAM, GamePak SRAM cannot be written maually through system bus Jan 24, 2023
@YoshiRulz YoshiRulz added the Core: mGBA Game Boy Advance (GBA) core label Jan 25, 2023
@YoshiRulz
Copy link
Member

YoshiRulz commented Jan 25, 2023

See also #3524.

I'm guessing this is unintentional; the system bus is implemented separately from the other domains.

@getCursorsExe getCursorsExe changed the title mGBA system bus: I/O registers, VRAM, OAM, GamePak SRAM cannot be written maually through system bus mGBA system bus: I/O registers, VRAM, OAM, GamePak SRAM cannot be written manually through system bus Jan 25, 2023
@CasualPokePlayer
Copy link
Member

It's an "issue" upstream.
IO/PALRAM/VRAM/OAM are unimplemented
https://github.com/mgba-emu/mgba/blob/dbffb46c4e7d2e7a2cbed7c3488cece4c2176d4c/src/gba/memory.c#L1362-L1373
SRAM is partially implemented (only works when it's actually SRAM and not Flash/EEPROM/etc)
https://github.com/mgba-emu/mgba/blob/dbffb46c4e7d2e7a2cbed7c3488cece4c2176d4c/src/gba/memory.c#L1388-L1396

@getCursorsExe

This comment was marked as off-topic.

@getCursorsExe

This comment was marked as off-topic.

@nattthebear
Copy link
Contributor

Since GBAPatch16 and GBAPatch32 do implement those things, we could fix it in the memory domain by adding separate writeshort and writelong implementations. This would probably be good enough, as in real usage you'd have little reason to write only 8 bits at a time to most of these locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core: mGBA Game Boy Advance (GBA) core
Projects
None yet
Development

No branches or pull requests

4 participants