Also fix 0x8 type /same as 0x4, just for 8/16 bit

This commit is contained in:
LunaMoo 2015-02-05 16:29:23 +01:00
parent 2e1681cba6
commit 082cc8eff9

View File

@ -554,10 +554,10 @@ void CWCheatEngine::Run() {
int dataAdd = code[1];
bool is8Bit = (data >> 16) == 0x0000;
int maxAddr = (arg >> 16) & 0xFFFF;
int count = (arg >> 16) & 0xFFFF;
int stepAddr = (arg & 0xFFFF) * (is8Bit ? 1 : 2);
InvalidateICache(addr, maxAddr - addr);
for (int a = 0; a < maxAddr; a++) {
InvalidateICache(addr, count * stepAddr);
for (int a = 0; a < count; a++) {
if (Memory::IsValidAddress(addr)) {
if (is8Bit) {
Memory::Write_U8((u8) (data & 0xFF), addr);