diff --git a/src/gb/gb.c b/src/gb/gb.c index a49b641af..0da504c61 100644 --- a/src/gb/gb.c +++ b/src/gb/gb.c @@ -117,7 +117,6 @@ bool GBLoadROM(struct GB* gb, struct VFile* vf) { gb->yankedRomSize = 0; gb->memory.romSize = gb->pristineRomSize; gb->romCrc32 = doCrc32(gb->memory.rom, gb->memory.romSize); - memset(&gb->memory.mbcState, 0, sizeof(gb->memory.mbcState)); GBMBCReset(gb); if (gb->cpu) { diff --git a/src/gb/mbc.c b/src/gb/mbc.c index ffc4054e6..20ab20322 100644 --- a/src/gb/mbc.c +++ b/src/gb/mbc.c @@ -339,6 +339,10 @@ void GBMBCInit(struct GB* gb) { } gb->memory.mbcRead = NULL; gb->memory.directSramAccess = true; + gb->memory.mbcReadBank0 = false; + gb->memory.mbcReadBank1 = false; + gb->memory.mbcReadHigh = false; + gb->memory.mbcWriteHigh = false; gb->memory.cartBusDecay = 4; switch (gb->memory.mbcType) { case GB_MBC_NONE: