GBA Cheats: Let VBA-style codes patch ROM (fixes #3423)
This commit is contained in:
parent
f108dd801d
commit
5fd0ba0d67
1
CHANGES
1
CHANGES
@ -30,6 +30,7 @@ Other fixes:
|
|||||||
- FFmpeg: Fix failing to record videos with CRF video (fixes mgba.io/i/3368)
|
- FFmpeg: Fix failing to record videos with CRF video (fixes mgba.io/i/3368)
|
||||||
- GB Core: Fix cloning savedata when backing file is outdated (fixes mgba.io/i/3388)
|
- GB Core: Fix cloning savedata when backing file is outdated (fixes mgba.io/i/3388)
|
||||||
- GBA: Fix getting game info for multiboot ROMs
|
- GBA: Fix getting game info for multiboot ROMs
|
||||||
|
- GBA Cheats: Let VBA-style codes patch ROM (fixes mgba.io/i/3423)
|
||||||
- GBA Core: Fix booting into BIOS when skip BIOS is enabled
|
- GBA Core: Fix booting into BIOS when skip BIOS is enabled
|
||||||
- GBA Hardware: Fix loading states unconditionally overwriting GPIO memory
|
- GBA Hardware: Fix loading states unconditionally overwriting GPIO memory
|
||||||
- mGUI: Load parent directory if last used directory is missing (fixes mgba.io/i/3379)
|
- mGUI: Load parent directory if last used directory is missing (fixes mgba.io/i/3379)
|
||||||
|
@ -180,14 +180,25 @@ bool GBACheatAddVBALine(struct GBACheatSet* cheats, const char* line) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct mCheat* cheat = mCheatListAppend(&cheats->d.list);
|
if (address < GBA_BASE_ROM0 || address >= GBA_BASE_SRAM) {
|
||||||
cheat->address = address;
|
struct mCheat* cheat = mCheatListAppend(&cheats->d.list);
|
||||||
cheat->operandOffset = 0;
|
memset(cheat, 0, sizeof(*cheat));
|
||||||
cheat->addressOffset = 0;
|
cheat->address = address;
|
||||||
cheat->repeat = 1;
|
cheat->operandOffset = 0;
|
||||||
cheat->type = CHEAT_ASSIGN;
|
cheat->addressOffset = 0;
|
||||||
cheat->width = width;
|
cheat->repeat = 1;
|
||||||
cheat->operand = value;
|
cheat->type = CHEAT_ASSIGN;
|
||||||
|
cheat->width = width;
|
||||||
|
cheat->operand = value;
|
||||||
|
} else {
|
||||||
|
struct mCheatPatch* patch = mCheatPatchListAppend(&cheats->d.romPatches);
|
||||||
|
memset(patch, 0, sizeof(*patch));
|
||||||
|
patch->width = width;
|
||||||
|
patch->address = address;
|
||||||
|
patch->segment = 0;
|
||||||
|
patch->value = value;
|
||||||
|
patch->check = false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user