-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
WRAM2-7 seems to be incorrectly mapped for libretro.c, and addition of paged SRAM1-15 #3202
Comments
Also, SRAM banks greater than 0 should now be mapped at offset 0x16000 following a change, see RetroAchievements/rcheevos#329 |
I'm not really sure how the memory mapping subsystem works; Any idea @CasualPokePlayer? |
The idea of libretro's memory maps is you give it a ton of pointers with buffer lengths according to those pointers and tell libretro what the ""real"" address here is (so more or less creating a "System Bus" like map). However, since that isn't actually sufficient for exposing all useful memory, libretro has to go do a hack where it maps memory past the addressing limit of the console (so for GB/C that's >0xFFFF). I have no idea how this "select" thing in libretro's memory maps actually works (is it some kind of mask???) |
|
Gosh that's confusing. Can you confirm if this is fixed? I'll reopen if not. |
I think |
You're right, I forgot to change that. |
The memory map that is exposed to libretro does not seem to correctly define the zone for WRAM2-7
mgba/src/platform/libretro/libretro.c
Line 819 in 1d2b8bf
When opening RALibRetro, the following debug information appears:
[INFO] [MEM] Registered 0x0100 bytes of SYSTEM RAM at $000000 (descriptor 1, offset 0x000000)
[INFO] [MEM] Registered 0x0050 bytes of SYSTEM RAM at $000100 (descriptor 1, offset 0x000100)
[INFO] [MEM] Registered 0x3EB0 bytes of SYSTEM RAM at $000150 (descriptor 1, offset 0x000150)
[INFO] [MEM] Registered 0x4000 bytes of SYSTEM RAM at $004000 (descriptor 2, offset 0x000000)
[INFO] [MEM] Registered 0x1800 bytes of VRAM at $008000 (descriptor 3, offset 0x000000)
[INFO] [MEM] Registered 0x0400 bytes of VRAM at $009800 (descriptor 3, offset 0x001800)
[INFO] [MEM] Registered 0x0400 bytes of VRAM at $009C00 (descriptor 3, offset 0x001C00)
[INFO] [MEM] Registered 0x2000 bytes of SRAM at $00A000 (descriptor 10, offset 0x000000)
[INFO] [MEM] Registered 0x1000 bytes of SYSTEM RAM at $00C000 (descriptor 4, offset 0x000000)
[INFO] [MEM] Registered 0x1000 bytes of SYSTEM RAM at $00D000 (descriptor 5, offset 0x000000)
[INFO] [MEM] Registered 0x1000 bytes of SYSTEM RAM at $00E000 (descriptor 4, offset 0x000000)
[INFO] [MEM] Registered 0x0E00 bytes of SYSTEM RAM at $00F000 (descriptor 5, offset 0x000000)
[INFO] [MEM] Registered 0x00A0 bytes of VRAM at $00FE00 (descriptor 6, offset 0x000000)
[INFO] [MEM] Registered 0x0060 bytes of UNUSED at $00FEA0 (descriptor 10, offset 0x005EA0)
[INFO] [MEM] Registered 0x0080 bytes of SYSTEM RAM at $00FF00 (descriptor 7, offset 0x000000)
[INFO] [MEM] Registered 0x007F bytes of SYSTEM RAM at $00FF80 (descriptor 8, offset 0x000000)
[INFO] [MEM] Registered 0x0001 bytes of SYSTEM RAM at $00FFFF (descriptor 9, offset 0x000000)
[INFO] [MEM] Registered 0x2000 bytes of SYSTEM RAM at $010000 (descriptor 10, offset 0x006000)
[INFO] [MEM] Could not map region starting at $012000
[INFO] [MEM] Registered 0x4000 bytes of SYSTEM RAM at $012000 (null filler)
I think the issue could be with this line, but I'm not 100% sure
descs[i].select = 0xFFFFA000;
The text was updated successfully, but these errors were encountered: