mirror of https://github.com/bsnes-emu/bsnes.git
Allow more GameShark cheats
This commit is contained in:
parent
157123e118
commit
933b622886
|
@ -133,9 +133,6 @@ bool GB_import_cheat(GB_gameboy_t *gb, const char *cheat, const char *descriptio
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
uint16_t address;
|
uint16_t address;
|
||||||
if (sscanf(cheat, "%02hhx%02hhx%04hx%c", &bank, &value, &address, &dummy) == 3) {
|
if (sscanf(cheat, "%02hhx%02hhx%04hx%c", &bank, &value, &address, &dummy) == 3) {
|
||||||
if (address > 0x7FFF) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (bank >= 0x80) {
|
if (bank >= 0x80) {
|
||||||
bank &= 0xF;
|
bank &= 0xF;
|
||||||
}
|
}
|
||||||
|
@ -144,7 +141,7 @@ bool GB_import_cheat(GB_gameboy_t *gb, const char *cheat, const char *descriptio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GameGnie */
|
/* GameGenie */
|
||||||
{
|
{
|
||||||
char stripped_cheat[10] = {0,};
|
char stripped_cheat[10] = {0,};
|
||||||
for (unsigned i = 0; i < 9 && *cheat; i++) {
|
for (unsigned i = 0; i < 9 && *cheat; i++) {
|
||||||
|
|
Loading…
Reference in New Issue