mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 14:25:37 +00:00
Cheats: Fix 10/11/20/21 commands
This commit is contained in:
parent
9714a999bb
commit
58e24585c1
|
@ -410,7 +410,7 @@ void CheatCode::Apply() const
|
||||||
{
|
{
|
||||||
u16 value = 0;
|
u16 value = 0;
|
||||||
CPU::SafeReadMemoryHalfWord(inst.address, &value);
|
CPU::SafeReadMemoryHalfWord(inst.address, &value);
|
||||||
CPU::SafeWriteMemoryHalfWord(inst.address, value + 1u);
|
CPU::SafeWriteMemoryHalfWord(inst.address, value + inst.value16);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -419,7 +419,7 @@ void CheatCode::Apply() const
|
||||||
{
|
{
|
||||||
u16 value = 0;
|
u16 value = 0;
|
||||||
CPU::SafeReadMemoryHalfWord(inst.address, &value);
|
CPU::SafeReadMemoryHalfWord(inst.address, &value);
|
||||||
CPU::SafeWriteMemoryHalfWord(inst.address, value - 1u);
|
CPU::SafeWriteMemoryHalfWord(inst.address, value - inst.value16);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -428,7 +428,7 @@ void CheatCode::Apply() const
|
||||||
{
|
{
|
||||||
u8 value = 0;
|
u8 value = 0;
|
||||||
CPU::SafeReadMemoryByte(inst.address, &value);
|
CPU::SafeReadMemoryByte(inst.address, &value);
|
||||||
CPU::SafeWriteMemoryByte(inst.address, value + 1u);
|
CPU::SafeWriteMemoryByte(inst.address, value + inst.value8);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -437,7 +437,7 @@ void CheatCode::Apply() const
|
||||||
{
|
{
|
||||||
u8 value = 0;
|
u8 value = 0;
|
||||||
CPU::SafeReadMemoryByte(inst.address, &value);
|
CPU::SafeReadMemoryByte(inst.address, &value);
|
||||||
CPU::SafeWriteMemoryByte(inst.address, value - 1u);
|
CPU::SafeWriteMemoryByte(inst.address, value - inst.value8);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue