summaryrefslogtreecommitdiff
path: root/gba_memory.c
diff options
context:
space:
mode:
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);
}
}