summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2017-06-30 12:51:54 -0500
committer cracyc <cracyc@users.noreply.github.com>2017-06-30 12:51:54 -0500
commit0ae673779b010045f651baa0e3a7da58b1f012b1 (patch)
treedc7fce0c3b60d8a2bbf1caf9e71862b7714601a7
parentc2b333bdd8f05e2332749d34c91e0f3ac5e05e0e (diff)
plugins/cheat: fix nes gg decoder (nw)
-rw-r--r--plugins/cheat/cheat_simple.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/cheat/cheat_simple.lua b/plugins/cheat/cheat_simple.lua
index 316a3b8e9d4..104798416bc 100644
--- a/plugins/cheat/cheat_simple.lua
+++ b/plugins/cheat/cheat_simple.lua
@@ -75,7 +75,7 @@ function codefuncs.nes_gg(desc, code)
elseif #code == 8 then
addr = ((value >> 12) & 7) | ((value >> 16) & 0x78) | ((value >> 20) & 0x80) | (value & 0x700) | ((value >> 4) & 0x7800)
newval = ((value >> 28) & 7) | (value & 8) | ((value >> 20) & 0x70) | ((value >> 24) & 0x80)
- comp = ((value >> 4) & 7) | ((value >> 8) & 8) | ((value << 4) & 0x70) | ((value << 1) & 0x80)
+ comp = ((value >> 4) & 7) | ((value >> 8) & 8) | ((value << 4) & 0x70) | (value & 0x80)
-- assume 8K banks, 32K also common but is an easy multiple of 8K
return prepare_rom_cheat(desc, ":nes_slot:cart:prg_rom", addr, newval, 8, 8192, comp)
else