GB Memory: Reset ROM bank when loading a ROM

This commit is contained in:
Jeffrey Pfau 2016-12-24 21:22:29 -08:00
parent e76671e767
commit 1988a49e92
2 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@ Misc:
- PSP2: Improved controller rumble - PSP2: Improved controller rumble
- GB, GBA: Prevent loading null ROMs - GB, GBA: Prevent loading null ROMs
- GB Audio: Initialize wave RAM to GBC values - GB Audio: Initialize wave RAM to GBC values
- GB Memory: Reset ROM bank when loading a ROM
0.5.1: (2016-10-05) 0.5.1: (2016-10-05)
Bugfixes: Bugfixes:

View File

@ -105,6 +105,7 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) {
gb->memory.romBase = gb->memory.rom; gb->memory.romBase = gb->memory.rom;
gb->memory.romSize = gb->pristineRomSize; gb->memory.romSize = gb->pristineRomSize;
gb->romCrc32 = doCrc32(gb->memory.rom, gb->memory.romSize); gb->romCrc32 = doCrc32(gb->memory.rom, gb->memory.romSize);
GBMBCSwitchBank(&gb->memory, gb->memory.currentBank);
if (gb->cpu) { if (gb->cpu) {
struct LR35902Core* cpu = gb->cpu; struct LR35902Core* cpu = gb->cpu;