mirror of https://github.com/mgba-emu/mgba.git
GBA Savedata: Fix erroneously setting the error bit
This commit is contained in:
parent
4d6fb5b3c5
commit
cfd30b7a95
|
@ -376,9 +376,10 @@ uint8_t GBASavedataReadFlash(struct GBASavedata* savedata, uint16_t address) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mTimingIsScheduled(savedata->timing, &savedata->dust) && (address >> 12) == savedata->settling) {
|
if (mTimingIsScheduled(savedata->timing, &savedata->dust) && (address >> 12) == savedata->settling) {
|
||||||
// This should read /Q7 ("data# polling") and Q6 flipping ("toggle bit") every read,
|
// This should read /Q7 ("data# polling"), Q6 flipping ("toggle bit")
|
||||||
// but just data# polling is sufficient for games to figure it out
|
// every read, and /Q5 ("error bit" cleared), but just data# polling
|
||||||
return savedata->currentBank[address] ^ 0x80;
|
// is sufficient for games to figure it out
|
||||||
|
return (savedata->currentBank[address] ^ 0x80) & 0x80;
|
||||||
}
|
}
|
||||||
return savedata->currentBank[address];
|
return savedata->currentBank[address];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue