(cheat_simple.lua
![:D](./images/smilies/icon_biggrin.gif)
-- 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
![;)](./images/smilies/icon_wink.gif)
![:D](./images/smilies/icon_biggrin.gif)
![:)](./images/smilies/icon_smile.gif)
: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...
![:cry:](./images/smilies/icon_cry.gif)
"[{
"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"
}]"