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: 3686
Joined: Fri Aug 17, 2001 12:59 am
Location: North Wales, UK.
Has thanked: 1 time
Been thanked: 19 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 !
User avatar
Heihachi_73
Posts: 273
Joined: Thu Jan 26, 2006 8:10 am
Location: Melbourne, Australia
Been thanked: 2 times
Contact:

Re: Newbie Cheat Conversion XML to DAT

Post by Heihachi_73 »

It's even worse, Nintendo Switch owners are stuck with a Nintendo Switch. That said, sure it can't at least run mame2010 aka 0.139? 2003/0.78 (I'm guessing it isn't 0.73) is just too old to even be considered "MAME" as it doesn't have any of the fundamental things even remotely comparable to modern MAME, it's the equivalent of running 32-bit Windows XP in 2024.
acem77
Posts: 2
Joined: Sat Jan 18, 2025 4:21 pm

Re: Newbie Cheat Conversion XML to DAT

Post by acem77 »

Hello,
I am looking for the same thing but different reason.
This is related to Neosd Pro, a NeoGeo flashcart and its supported cheat format tje dat.

What is the format used for the old Dat cheats? I cannot find a way to open other than a hex editor. Tried an old mame Dat tool it can't open them.

The cheat .dat files provide for the device are all split out per game(i believe one large dat your standard).i have been told the neosd pros cheats origin was mame. I read the dat file is obsolete but that probably does not mater to the hardware i am using.

I have made some cheats in mame64 with the plugin for home brew / aftermarket games not in the last neogeo unibios. It would be nice to use them on the NeoSD pro. As of now I can only poke the values manually in the Unibios..

If could generate or copy and modify existing dat files that would be great.

I can provide examples if needed.

Any help would be great

Thanks
acem77
Posts: 2
Joined: Sat Jan 18, 2025 4:21 pm

Re: Newbie Cheat Conversion XML to DAT

Post by acem77 »

Oddly enough i created a cheat an older ver of mame thats uses a dat cheat file and i can see it in notd pad no issues...

This is the info for the device and its cheats.
https://wiki.terraonion.com/index.php/N ... eats_Guide

This is what i get if i open one cheat dat file. There is one for each game.

CHETX@
_
K3
k��No more Level GainOffOnP1 Always have Quota=200P2 Always have Quota=200
Post Reply