GBA: Clean up previous commit
Vicki Pfau vi@endrift.com
Sat, 18 Jan 2020 19:19:42 -0800
1 files changed,
6 insertions(+),
7 deletions(-)
jump to
M
src/gba/gba.c
→
src/gba/gba.c
@@ -384,20 +384,19 @@ gba->pristineRomSize = vf->size(vf);
vf->seek(vf, 0, SEEK_SET); if (gba->pristineRomSize > SIZE_CART0) { gba->isPristine = false; -#ifdef FIXED_ROM_BUFFER - gba->memory.rom = romBuffer; -#else - gba->memory.rom = anonymousMemoryMap(SIZE_CART0); -#endif char ident; vf->seek(vf, 0xAC, SEEK_SET); vf->read(vf, &ident, 1); - vf->seek(vf, 0, SEEK_SET); if (ident == 'M') { gba->memory.romSize = 0x01000000; +#ifdef FIXED_ROM_BUFFER + gba->memory.rom = romBuffer; +#else + gba->memory.rom = anonymousMemoryMap(SIZE_CART0); +#endif } else { + gba->memory.rom = vf->map(vf, SIZE_CART0, MAP_READ); gba->memory.romSize = SIZE_CART0; - vf->read(vf, gba->memory.rom, SIZE_CART0); } } else { gba->isPristine = true;