mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-02-17 03:15:39 +00:00
Cheats: Implement C0 command (activate codes iff equal)
This commit is contained in:
parent
3eaf28675a
commit
c406f0708f
|
@ -921,6 +921,16 @@ void CheatCode::Apply() const
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case InstructionCode::ExitIfNotEqual16:
|
||||||
|
{
|
||||||
|
u16 value = DoMemoryRead<u16>(inst.address);
|
||||||
|
if (value == inst.value16)
|
||||||
|
index++;
|
||||||
|
else
|
||||||
|
index = count;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case InstructionCode::Slide:
|
case InstructionCode::Slide:
|
||||||
{
|
{
|
||||||
if ((index + 1) >= instructions.size())
|
if ((index + 1) >= instructions.size())
|
||||||
|
|
|
@ -30,6 +30,7 @@ struct CheatCode
|
||||||
Decrement16 = 0x11,
|
Decrement16 = 0x11,
|
||||||
Increment8 = 0x20,
|
Increment8 = 0x20,
|
||||||
Decrement8 = 0x21,
|
Decrement8 = 0x21,
|
||||||
|
ExitIfNotEqual16 = 0xC0,
|
||||||
CompareEqual16 = 0xD0,
|
CompareEqual16 = 0xD0,
|
||||||
CompareNotEqual16 = 0xD1,
|
CompareNotEqual16 = 0xD1,
|
||||||
CompareLess16 = 0xD2,
|
CompareLess16 = 0xD2,
|
||||||
|
|
Loading…
Reference in a new issue