summaryrefslogtreecommitdiff
path: root/gba_memory.c
diff options
context:
space:
mode:
authorneonloop2021-08-01 17:39:51 +0000
committerneonloop2021-08-01 17:39:51 +0000
commitbaeeaca5858dfae6e63cf79994b8ff2aeb830283 (patch)
treed0fe1081185ec73bedb2e741e221793bc8155068 /gba_memory.c
parent8c8484e55fffa79c903c95c41a6794fca40a723b (diff)
downloadpicogpsp-pico-fe.tar.gz
picogpsp-pico-fe.tar.bz2
picogpsp-pico-fe.zip
Revert "Add ROM mirroring and fix mult. cycle count"HEADpico-fe
This reverts commit aafde6de7b2a28c1684c0e9fa62fee9a2a5398dd. This was causing trimmed roms to fail to load.
Diffstat (limited to 'gba_memory.c')
-rw-r--r--gba_memory.c12
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);
}
}