Decode GBC GameShark cheats prefixed with 91xxxxxx

Apparently these should mean a "WRAM Write with Bank Change" (Changes to ram bank 1, then writes 0xHH to 0xHHHH), but Gambatte decodes and applies these fine. Fixes many GBC cheats out in the wild that are prefixed as 91xxxxxx
This commit is contained in:
clobber
2014-07-26 21:14:29 -05:00
parent a1ddfd0d2f
commit 9fbc420dfb
+1 -1
View File
@@ -63,7 +63,7 @@ void Interrupter::setGameShark(const std::string &codes) {
void Interrupter::applyVblankCheats(const unsigned long cycleCounter, Memory &memory) {
for (std::size_t i = 0, size = gsCodes.size(); i < size; ++i) {
if (gsCodes[i].type == 0x01)
if (gsCodes[i].type == 0x01 || gsCodes[i].type == 0x91)
memory.write(gsCodes[i].address, gsCodes[i].value, cycleCounter);
}
}