diff options
author | neonloop | 2021-08-01 17:39:51 +0000 |
---|---|---|
committer | neonloop | 2021-08-01 17:39:51 +0000 |
commit | baeeaca5858dfae6e63cf79994b8ff2aeb830283 (patch) | |
tree | d0fe1081185ec73bedb2e741e221793bc8155068 /gba_memory.c | |
parent | 8c8484e55fffa79c903c95c41a6794fca40a723b (diff) | |
download | picogpsp-pico-fe.tar.gz picogpsp-pico-fe.tar.bz2 picogpsp-pico-fe.zip |
This reverts commit aafde6de7b2a28c1684c0e9fa62fee9a2a5398dd.
This was causing trimmed roms to fail to load.
Diffstat (limited to 'gba_memory.c')
-rw-r--r-- | gba_memory.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gba_memory.c b/gba_memory.c index f397797..b550d4a 100644 --- a/gba_memory.c +++ b/gba_memory.c @@ -3157,12 +3157,12 @@ static void init_memory_gamepak(void) } else { - /* Map the ROM using mirroring, not many games use it */ - unsigned numblocks = gamepak_size >> 15; - map_region(read, 0x8000000, 0xA000000, numblocks, gamepak_rom); - map_region(read, 0xA000000, 0xC000000, numblocks, gamepak_rom); - map_region(read, 0xC000000, 0xD000000, numblocks, gamepak_rom); - /* Do not map D-E regions since they are also used for FLASH */ + map_region(read, 0x8000000, 0x8000000 + gamepak_size, 1024, gamepak_rom); + map_null(read, 0x8000000 + gamepak_size, 0xA000000); + map_region(read, 0xA000000, 0xA000000 + gamepak_size, 1024, gamepak_rom); + map_null(read, 0xA000000 + gamepak_size, 0xC000000); + map_region(read, 0xC000000, 0xC000000 + gamepak_size, 1024, gamepak_rom); + map_null(read, 0xC000000 + gamepak_size, 0xE000000); } } |