mirror of https://github.com/mgba-emu/mgba.git
GB: MBC cleanup
This commit is contained in:
parent
6f697744d1
commit
fcd2664761
|
@ -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) {
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue