HELP!! CHEATS NOT WORKING----NO OFF/OFF SWITCH, JUST CODE'S DESCRIPTION!!!!!!!!!!!

If you are having problems finding or using cheats for an Emulator (particularly MAME/MESS) or have found a trick that you wish to share this is the place to do it. But please read the Cheat FAQ first.
Post Reply
jmon
Posts: 4
Joined: Sun Oct 04, 2020 1:38 pm

HELP!! CHEATS NOT WORKING----NO OFF/OFF SWITCH, JUST CODE'S DESCRIPTION!!!!!!!!!!!

Post by jmon »

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 :D : "
-- 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 ;) :D :) 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... :cry: 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"
}]"
crazyc
Posts: 31
Joined: Sat Apr 30, 2016 4:49 pm

Re: HELP!! CHEATS NOT WORKING----NO OFF/OFF SWITCH, JUST CODE'S DESCRIPTION!!!!!!!!!!!

Post by crazyc »

Sega cd rom cheats don't make sense. I don't know the old cheat format but I suspect the two latter ones are ram cheats in the sega cd address space, maybe use segacd:segacd_68k
User avatar
Pugsy
Posts: 3638
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 12 times
Contact:

Re: HELP!! CHEATS NOT WORKING----NO OFF/OFF SWITCH, JUST CODE'S DESCRIPTION!!!!!!!!!!!

Post by Pugsy »

You don't need to worry about any of the old dat format lines like this:-

:segacd:40000000:5E2A8:0000002D:FFFFFFFF:-----HOOK----- Infinite Time

cheat.simple parsing just ignores it, it's there for when people post cheats to the forums - it makes adding the cheats to the XML easier at my end and will serve zero use to anyone else - you can just treat the line as a comment.

Like crazyc just said (he posted when I was typing all this in) the problem is the "segacd,:segacd:prgram" memory region, use the ":segacd:segacd_68k" memory instead
I'd also recommend you use the software list for segacd/megacd as it will mean that you can load cheats for that specific game, without loading cheats for all the other games for the system so for instance.

Without software list:
segacd,:segacd:segacd_68k,5E2A8,b,2D,-----HOOK----- Infinite Time
With software list:
segacd/hook,:segacd:segacd_68k,5E2A8,b,2D,Infinite Time
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.259 XML cheat collection (6 OCTOBER 2023) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/q4dHGZ6K#i-EUiqIjH ... KMz7hnbTfw (ZIP Archive 3.76MB)
Post Reply