HELP!! CHEATS NOT WORKING----NO OFF/OFF SWITCH, JUST CODE'S DESCRIPTION!!!!!!!!!!!
Posted: Sun Oct 04, 2020 1:48 pm
I'm using negaMAME (0.244.0-1, based on MAME 0.224.0) with Negatron EXTERNAL frontend (it was made in mind for that variant) and I managed to figure out through intuitive guessing...and filling in dots from other sources other guesses about syntax of cheat.simple
(cheat_simple.lua : "
-- ram/rom cheat format: <set name>,<cputag|regiontag>,<hex offset>,<b|w|d|q - size>,<hex value>,<desc>
-- only program address space is supported, comments are prepended with ;
-- size is b - u8, w - u16, d - u32, q - u64
--")
and output.json. Even though I could decipher the first of two lines for Sonic CD, I could not entirely decipher the ":segacd:40000000:FF1516:00000000:FFFFFFFF:-----SONIC CD----- Infinite Time" - what does "40000000" and "FFFFFFFF" mean in those "fields-or-whatever"? I got luck with THAT game as far as getting those "fields" right, but apparently not on Hook (for Sega CD also BTW): "segacd,:segacd:prgram,5E2A8,b,2D,-----HOOK----- Infinite Time
:segacd:40000000:5E2A8:0000002D:FFFFFFFF:-----HOOK----- Infinite Time
segacd,:segacd:prgram,5E29D,b,80,-----HOOK----- Infinite Fly Meter
:segacd:40000000:5E29D:00000080:FFFFFFFF:-----HOOK----- Infinite Fly Meter"
Specifically I got error after closing negaMAME (cheat script error: missing region :segacd:prgram) because I could see description under tab-called main menu-->plugins-->cheat... but could not turn it on or off...like it was only parsing description not toggle switch! Is it because the "40000000" and "FFFFFFFF"? :idea: At least tell me what those mean. :| Sonic CD code has on/off toggle switch still (hint from output.json):
"[{
"space":{
"cpup":{
"tag":":maincpu",
"type":"program"
}
},
"script":{
"run":" cpup:write_u8(16717078,0, true)"
},
"desc":"-----SONIC CD----- Infinite Time\r"
},{
"region":{
"rom":":segacd:prgram"
},
"script":{
"on":"\t\t\taddrs = {\n\t\t\t{addr = 385704, val = 45},\n--flag\n\t\t\t}\n\t\t\ton = true\n\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\tv.save = rom:read_u8(v.addr)\n\t\t\t\trom:write_u8(v.addr, v.val)\n\t\t\tend",
"off":"\t\t\tif on then\n\t\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\t\trom:write_u8(v.addr, v.save)\n\t\t\t\tend\n\t\t\tend"
},
"desc":"-----HOOK----- Infinite Time\r"
},{
"region":{
"rom":":segacd:prgram"
},
"script":{
"on":"\t\t\taddrs = {\n\t\t\t{addr = 385693, val = 128},\n--flag\n\t\t\t}\n\t\t\ton = true\n\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\tv.save = rom:read_u8(v.addr)\n\t\t\t\trom:write_u8(v.addr, v.val)\n\t\t\tend",
"off":"\t\t\tif on then\n\t\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\t\trom:write_u8(v.addr, v.save)\n\t\t\t\tend\n\t\t\tend"
},
"desc":"-----HOOK----- Infinite Fly Meter\r"
}]"
(cheat_simple.lua : "
-- ram/rom cheat format: <set name>,<cputag|regiontag>,<hex offset>,<b|w|d|q - size>,<hex value>,<desc>
-- only program address space is supported, comments are prepended with ;
-- size is b - u8, w - u16, d - u32, q - u64
--")
and output.json. Even though I could decipher the first of two lines for Sonic CD, I could not entirely decipher the ":segacd:40000000:FF1516:00000000:FFFFFFFF:-----SONIC CD----- Infinite Time" - what does "40000000" and "FFFFFFFF" mean in those "fields-or-whatever"? I got luck with THAT game as far as getting those "fields" right, but apparently not on Hook (for Sega CD also BTW): "segacd,:segacd:prgram,5E2A8,b,2D,-----HOOK----- Infinite Time
:segacd:40000000:5E2A8:0000002D:FFFFFFFF:-----HOOK----- Infinite Time
segacd,:segacd:prgram,5E29D,b,80,-----HOOK----- Infinite Fly Meter
:segacd:40000000:5E29D:00000080:FFFFFFFF:-----HOOK----- Infinite Fly Meter"
Specifically I got error after closing negaMAME (cheat script error: missing region :segacd:prgram) because I could see description under tab-called main menu-->plugins-->cheat... but could not turn it on or off...like it was only parsing description not toggle switch! Is it because the "40000000" and "FFFFFFFF"? :idea: At least tell me what those mean. :| Sonic CD code has on/off toggle switch still (hint from output.json):
"[{
"space":{
"cpup":{
"tag":":maincpu",
"type":"program"
}
},
"script":{
"run":" cpup:write_u8(16717078,0, true)"
},
"desc":"-----SONIC CD----- Infinite Time\r"
},{
"region":{
"rom":":segacd:prgram"
},
"script":{
"on":"\t\t\taddrs = {\n\t\t\t{addr = 385704, val = 45},\n--flag\n\t\t\t}\n\t\t\ton = true\n\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\tv.save = rom:read_u8(v.addr)\n\t\t\t\trom:write_u8(v.addr, v.val)\n\t\t\tend",
"off":"\t\t\tif on then\n\t\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\t\trom:write_u8(v.addr, v.save)\n\t\t\t\tend\n\t\t\tend"
},
"desc":"-----HOOK----- Infinite Time\r"
},{
"region":{
"rom":":segacd:prgram"
},
"script":{
"on":"\t\t\taddrs = {\n\t\t\t{addr = 385693, val = 128},\n--flag\n\t\t\t}\n\t\t\ton = true\n\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\tv.save = rom:read_u8(v.addr)\n\t\t\t\trom:write_u8(v.addr, v.val)\n\t\t\tend",
"off":"\t\t\tif on then\n\t\t\t\tfor k, v in pairs(addrs) do\n\t\t\t\t\trom:write_u8(v.addr, v.save)\n\t\t\t\tend\n\t\t\tend"
},
"desc":"-----HOOK----- Infinite Fly Meter\r"
}]"