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 e32c0673da
commit 85285a68e5
2 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ Misc:
- GB Audio: Improve initial envelope samples
- GB Audio: Initialize wave RAM to GBC values
- Debugger: Add functions for read- or write-only watchpoints
- GB Memory: Reset ROM bank when loading a ROM
0.5.1: (2016-10-05)
Bugfixes:

View File

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