mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-26 03:30:06 +00:00
Add 0x0E code support
This commit is contained in:
parent
fdb6c878d8
commit
dca184527e
@ -371,8 +371,34 @@ void GatewayCheat::Execute() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 0x0E: { // EXXXXXXX YYYYYYYY Copy YYYYYYYY parameter bytes to [XXXXXXXX+offset...]
|
case 0x0E: {
|
||||||
// TODO: Implement whatever this is...
|
// Patch Code (Miscellaneous Memory Manipulation Codes)
|
||||||
|
// EXXXXXXX YYYYYYYY
|
||||||
|
// Copies YYYYYYYY bytes from (current code location + 8) to [XXXXXXXX + offset].
|
||||||
|
auto x = line.address & 0x0FFFFFFF;
|
||||||
|
auto y = line.value;
|
||||||
|
addr = x + offset;
|
||||||
|
{
|
||||||
|
u32 j = 0, t = 0, b = 0;
|
||||||
|
if (y > 0)
|
||||||
|
i++; // skip over the current code
|
||||||
|
while (y >= 4) {
|
||||||
|
u32 tmp = (t == 0) ? cheat_lines[i].address : cheat_lines[i].value;
|
||||||
|
if (t == 1)
|
||||||
|
i++;
|
||||||
|
t ^= 1;
|
||||||
|
Memory::Write32(addr, tmp);
|
||||||
|
addr += 4;
|
||||||
|
y -= 4;
|
||||||
|
}
|
||||||
|
while (y > 0) {
|
||||||
|
u32 tmp = ((t == 0) ? cheat_lines[i].address : cheat_lines[i].value) >> b;
|
||||||
|
Memory::Write8(addr, tmp);
|
||||||
|
addr += 1;
|
||||||
|
y -= 1;
|
||||||
|
b += 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user