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->yankedRomSize = 0;
|
||||||
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);
|
||||||
memset(&gb->memory.mbcState, 0, sizeof(gb->memory.mbcState));
|
|
||||||
GBMBCReset(gb);
|
GBMBCReset(gb);
|
||||||
|
|
||||||
if (gb->cpu) {
|
if (gb->cpu) {
|
||||||
|
@ -339,6 +339,10 @@ void GBMBCInit(struct GB* gb) {
|
|||||||
}
|
}
|
||||||
gb->memory.mbcRead = NULL;
|
gb->memory.mbcRead = NULL;
|
||||||
gb->memory.directSramAccess = true;
|
gb->memory.directSramAccess = true;
|
||||||
|
gb->memory.mbcReadBank0 = false;
|
||||||
|
gb->memory.mbcReadBank1 = false;
|
||||||
|
gb->memory.mbcReadHigh = false;
|
||||||
|
gb->memory.mbcWriteHigh = false;
|
||||||
gb->memory.cartBusDecay = 4;
|
gb->memory.cartBusDecay = 4;
|
||||||
switch (gb->memory.mbcType) {
|
switch (gb->memory.mbcType) {
|
||||||
case GB_MBC_NONE:
|
case GB_MBC_NONE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user