Newbie Cheat Conversion XML to DAT

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
editing101
Posts: 37
Joined: Mon Mar 16, 2015 2:12 am

Newbie Cheat Conversion XML to DAT

Post by editing101 »

Hi guys,

I'm currently using MAME 073 in Retroarch on my Nintendo Switch for portable MAME emulation. MAME 0.73 is supposedly the only up to date core available. I've previously used more up to date versions of MAME on my Android, but Android requires the use of touch screen controls and my switch controllers are more intuitive and user friendly in using MAME.

As MAME 0.73 only supports the "cheat.dat" file, I've tried converting some of the "XML" cheats to use in this older version, but have had no success in getting them to work.

I'm a relative newbie to MAME cheat creation, but I am aware that in the old "cheat.dat" file:

The :39900000: prefix refers to ROM cheats that interact with the RAM addresses in the game code and can activate modes or functions withini the game. (These can be toggled ON or OFF on the MAME cheat menu).

The :00000000: prefix refers to RAM cheats that poke RAM directly and can change lives, health, ammo e.g. elements that changing constantly. (These can operate upon choosing the SET option on the MAME cheat menu).

With this in mind, I've tried converting some of the more recent cheats for NBA JAM into the old cheat.dat format and had no success. Here's a few examples:

Activate Shot % Display (Learning Mode 2)

Code: Select all

<action>maincpu.pw@10F1290=0001</action>

Code: Select all

:nbajam:39900000:0F1290:00000001:FFFFFFFF:Shot % Display (Learning Mode 2)
P1 Powerup Defense

Code: Select all

<action>maincpu.pw@10F1250=0008</action>

Code: Select all

:nbajam:39900000:0F1250:00000008:FFFFFFFF:Power Up Defense
P1 Big Head

Code: Select all

<action>maincpu.pw@1600000=8F8F</action>
<action>maincpu.pw@10E59C0=0001|(maincpu.pw@10E59C0 BAND ~0001)</action>

Code: Select all

:nbajam:39900000:600000:00008F8F:00008F8F:P1 Big Head
:nbajam:39900000:0E59C0:00000001:00000001:P1 Big Head (2/2)
Player 1 Always on Fire

Code: Select all

<action>maincpu.pw@10E9A=0000> 

Code: Select all

:nbajam:39900000:0E9A30:00000000:FFFFFFFF:P1 Always On Fire
Never Miss A Shot ON

Code: Select all

<action>maincpu.mw@000FE56=CB76</action>
<action>maincpu.mw@00102D6=C400</action>

Code: Select all

:nbajam:39900000:00FE56:0000CB76:FFFFFFFF:Never Miss A Shot ON
:nbajam:39900000:0102D6:0000C400:FFFFFFFF:Never Miss A Shot ON
Can anyone (hopefully Pugsy?) offer some advice on the correct method of converting these or refer me to a tool that can do so? (None of my 'converted' cheats seem to work at present! :roll: )

I would greatly appreciate anything anyone can tell me.

Thank you. :P
User avatar
Pugsy
Posts: 3677
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 17 times
Contact:

Re: Newbie Cheat Conversion XML to DAT

Post by Pugsy »

Basically you are trying to convert cheats for the latest MAME to work with a MAME version from 21 years ago!

Normal games are doable to a degree, BUT versions of roms change over the years as newer versions of the roms are dumped and become the new parent set.

With nbajam you also and the issue that the driver used to have a very different memory addressing system as well.

You've over simplified what ":39900000:" is - definition of how the old types worked is at the top of cheat.dat. There where no ROM cheats for nbajam at the time - and I don't have a version (and dont want one) from that era with a debugger to check.

I shall however give you one final tip for nbajam you will likely need to divide any new 'RAM cheat' address by 8.
Pugsy

Servicing your cheating needs since 1985 8)

Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
editing101
Posts: 37
Joined: Mon Mar 16, 2015 2:12 am

Re: Newbie Cheat Conversion XML to DAT

Post by editing101 »

I see, thanks for explaining then :P !

Yeah, I know it's an unusual request - Nintendo Switch owners are stuck using an ancient version of MAME that has limited romset support. The roms that do work however, work really well.

Thanks for that, I'm going to get to work on dividing the RAM cheats and experimenting accordingly. I'm assuming that many of the 'normal' games (romsets that haven't had many changes over the years) do not require such divisions.

Much appreciated Pugsy, and thanks again :P !
Post Reply