mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +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;
|
||||
|
||||
case InstructionCode::ExitIfNotEqual16:
|
||||
{
|
||||
u16 value = DoMemoryRead<u16>(inst.address);
|
||||
if (value == inst.value16)
|
||||
index++;
|
||||
else
|
||||
index = count;
|
||||
}
|
||||
break;
|
||||
|
||||
case InstructionCode::Slide:
|
||||
{
|
||||
if ((index + 1) >= instructions.size())
|
||||
|
|
|
@ -30,6 +30,7 @@ struct CheatCode
|
|||
Decrement16 = 0x11,
|
||||
Increment8 = 0x20,
|
||||
Decrement8 = 0x21,
|
||||
ExitIfNotEqual16 = 0xC0,
|
||||
CompareEqual16 = 0xD0,
|
||||
CompareNotEqual16 = 0xD1,
|
||||
CompareLess16 = 0xD2,
|
||||
|
|
Loading…
Reference in a new issue