mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 10:11:00 +00:00
GBA Cheats: Fix key-activated CodeBreaker cheats
This commit is contained in:
parent
1f0f943526
commit
78af66c9d5
1
CHANGES
1
CHANGES
@ -9,6 +9,7 @@ Bugfixes:
|
||||
- GB Video: Fix video frames getting missed when LCDC is off
|
||||
- LR35902: Fix events running with the wrong cycle active
|
||||
- GB Video: Clear screen when LCDC is off
|
||||
- GBA Cheats: Fix key-activated CodeBreaker cheats
|
||||
Misc:
|
||||
- All: Only update version info if needed
|
||||
- FFmpeg: Encoding cleanup
|
||||
|
@ -349,6 +349,11 @@ void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) {
|
||||
conditionRemaining = cheat->repeat;
|
||||
negativeConditionRemaining = cheat->negativeRepeat;
|
||||
break;
|
||||
case CHEAT_IF_NAND:
|
||||
condition = !(_readMem(device->p, address, cheat->width) & operand);
|
||||
conditionRemaining = cheat->repeat;
|
||||
negativeConditionRemaining = cheat->negativeRepeat;
|
||||
break;
|
||||
}
|
||||
|
||||
if (performAssignment) {
|
||||
|
@ -27,7 +27,8 @@ enum mCheatType {
|
||||
CHEAT_IF_ULT,
|
||||
CHEAT_IF_UGT,
|
||||
CHEAT_IF_AND,
|
||||
CHEAT_IF_LAND
|
||||
CHEAT_IF_LAND,
|
||||
CHEAT_IF_NAND
|
||||
};
|
||||
|
||||
struct mCheat {
|
||||
|
@ -276,9 +276,9 @@ bool GBACheatAddCodeBreaker(struct GBACheatSet* cheats, uint32_t op1, uint16_t o
|
||||
switch (op1 & 0x0FFFFFFF) {
|
||||
case 0x20:
|
||||
cheat = mCheatListAppend(&cheats->d.list);
|
||||
cheat->type = CHEAT_IF_AND;
|
||||
cheat->type = CHEAT_IF_NAND;
|
||||
cheat->width = 2;
|
||||
cheat->address = BASE_IO | REG_JOYSTAT;
|
||||
cheat->address = BASE_IO | REG_KEYINPUT;
|
||||
cheat->operand = op2;
|
||||
cheat->repeat = 1;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user