can anyone point me to a doc explaining the way write-if-match cheats work in MAME (if they do)?
alternatively, is there anyone willing to spend 5 min to write here the explaination?
I tried with the search option but with no luck...
a little help
- Pugsy
- Posts: 3638
- Joined: Fri Aug 17, 2001 12:59 am
- Location: North Wales, UK.
- Has thanked: 1 time
- Been thanked: 12 times
- Contact:
It's quite straightforward, basically it PEEKs a location and if what it peeks matches a value then it pokes a new value in it's place.
In the above example it pokes C031 with 0x41 ONLY when C031 contains 0x11
pseudo code:
while (game_running && cheat_active)
{
if (peek c031=0x11)
{
poke c031,0x41;
}
else
{
//do nothing
}
}
Code: Select all
:ufosensb:00081000:C031:00000041:00000011:Start on Stage 4
pseudo code:
while (game_running && cheat_active)
{
if (peek c031=0x11)
{
poke c031,0x41;
}
else
{
//do nothing
}
}
Pugsy
Servicing your cheating needs since 1985
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)
Servicing your cheating needs since 1985
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)