Page 1 of 1

NES Cheats

Posted: Mon Nov 02, 2009 2:42 am
by rychem
I am wondering if anyone has had issues getting cheats to load up in NES?

I have named my cheat file => cheat_nes and set up the ini file as needed, however when launching a game I have created an xml for the cheat menu does not come up.

I have verified that the CRC for the xml and rom are the same, and the cheats work in other systems just not NES?

Any ideas?

Thanks.

Re: NES Cheats

Posted: Mon Nov 02, 2009 4:21 pm
by etabeta78
you don't have to use the crc of the rom but of the "rom - 0x10 first byte (the header)". you can check such a crc in the hash file

hash/nes.hsi

in your mess folder

Re: NES Cheats

Posted: Mon Nov 02, 2009 5:28 pm
by rychem
Thanks,

For the other systems that I have used cheats on using the rom CRC seems to have worked, I guess for my NES roms this is not the case.

Rychem :D

Re: NES Cheats

Posted: Mon Nov 02, 2009 7:17 pm
by Pugsy
I did get as far as making the 16384 xml framework files for the NES so that the cheat menu appears in all games that MESS recognises. It just shows the game name and the xml filename, not much in the way of cheats.

For what it's worth:-

http://www.mediafire.com/file/gjnmcyizr ... _cheats.7z


I did think of making a proper NES cheat collection, but it would require a massive amount of work or a suitable collection of PAR cheats to convert (GG codes would be too version specific). The interest for MESS cheat files isn't really there either, yet.

Re: NES Cheats

Posted: Mon Nov 02, 2009 7:50 pm
by NotAGoodName
I've got some you can rip off from my collection if you so desire. I remember doing quite a bit of work on 3D World Runner and Section-Z.

Re: NES Cheats

Posted: Tue Nov 03, 2009 6:13 pm
by rychem
Thanks for the NES cheat file with all the xml's in it. Is there a simple way of creating all xml's for a set cheat file?

As far as the NES cheat files go I have begun taking PAR codes and implementing these into the MESS cheat format. So far I have completed Megaman 1-6, Super Mario 1-3 and Castlevania. (I have found a cheat site that carries quite the array of PAR codes).

I will populate the cheat_nes file and repost if anyone is interested.

I have a few other games that I will updating soon as well.

Re: NES Cheats

Posted: Tue Nov 03, 2009 7:12 pm
by Pugsy
rychem wrote:Thanks for the NES cheat file with all the xml's in it. Is there a simple way of creating all xml's for a set cheat file?
For MAME I create the XML files for every release by converting the cheat.dat file again. I find it much easier to have one cheat file that can be easily edited in a text editor. The bare NES XML cheat files I created in the same way, I wrote a simple tool that converts a MESS hash file into a bare cheat.dat format file like this:-

Code: Select all

## START OF MAIN CHEATS

; [ '89 Dennou Kyuusei Uranai (J) {ba58ed29} ]
:ba58ed29:60000000:0000:00000000:00000000:-= '89 Dennou Kyuusei Uranai (J) {ba58ed29.xml} =-
:ba58ed29:60000000:0000:00000000:00000000:This game currently has NO cheats (

; [ '89 Dennou Kyuusei Uranai (J) [a1] {2ffd1a46} ]
:2ffd1a46:60000000:0000:00000000:00000000:-= '89 Dennou Kyuusei Uranai (J) [a1] {2ffd1a46.xml} =-
:2ffd1a46:60000000:0000:00000000:00000000:This game currently has NO cheats

; [ '89 Dennou Kyuusei Uranai (J) [a1] {3674ffdb} ]
:3674ffdb:60000000:0000:00000000:00000000:-= '89 Dennou Kyuusei Uranai (J) [a1] {3674ffdb.xml} =-
:3674ffdb:60000000:0000:00000000:00000000:This game currently has NO cheats

; [ 10-Yard Fight (J) {836c4fa7} ]
:836c4fa7:60000000:0000:00000000:00000000:-= 10-Yard Fight (J) {836c4fa7.xml} =-
:836c4fa7:60000000:0000:00000000:00000000:This game currently has NO cheats

; [ 10-Yard Fight (J) {0b379df8} ]
:0b379df8:60000000:0000:00000000:00000000:-= 10-Yard Fight (J) {0b379df8.xml} =-
:0b379df8:60000000:0000:00000000:00000000:This game currently has NO cheats
I then run it through my MAME XML tool and the xmls pop out the other end.
As far as the NES cheat files go I have begun taking PAR codes and implementing these into the MESS cheat format. So far I have completed Megaman 1-6, Super Mario 1-3 and Castlevania. (I have found a cheat site that carries quite the array of PAR codes).
I did give a NES cheat file some consideration, I would have created a new MESS specific tool that could handle GG/PAR codes in the cheat.dat file and convert them correctly. I envisaged PAR codes being handled in cheat.dat file in this sort of format (with * defining it as a PAR code and all the fields being colon separated) :

Code: Select all

; [ 8 Eyes (J) {059fd10f} ]
:059fd10f:60000000:0000:00000000:00000000:-= 8 Eyes (J) {059fd10f.xml} =-
:059fd10f:60000000:0000:00000000:00000000:This game currently has NO cheats
*000594:4F:Infinite Health for Orin::Code by Whipon
*000596:4F:Infinite Item Ammo::Code by Whipon

; [ 8 Eyes (J) {f8d53171} ]
:f8d53171:60000000:0000:00000000:00000000:-= 8 Eyes (J) {f8d53171.xml} =-
:f8d53171:60000000:0000:00000000:00000000:This game currently has NO cheats
*000594:4F:Infinite Health for Orin::Code by Whipon
*000596:4F:Infinite Item Ammo::Code by Whipon

; [ 8 Eyes (U) {326ab3b6} ]
:326ab3b6:60000000:0000:00000000:00000000:-= 8 Eyes (U) {326ab3b6.xml} =-
:326ab3b6:60000000:0000:00000000:00000000:This game currently has NO cheats
*000594:4F:Infinite Health for Orin::Code by Whipon
*000596:4F:Infinite Item Ammo::Code by Whipon
I will populate the cheat_nes file and repost if anyone is interested.
That could be a major undertaking, I can provide the bare cheat_nes.dat file if required and do any dat->xml conversions in the short term to help you - whilst a NES specific tool could be hammered out.

Re: NES Cheats

Posted: Thu Nov 05, 2009 3:45 pm
by rychem
Thanks for the help. The shell cheat_nes.dat would be of great help. I am currently taking the long way and updating the XML's one by one. I can tell you that this takes quite a bit of time. Having one file to edit and then generating the XML's after that would be such a time saver. And since I am not computer savy enough to generate the XML's from the dat any help is appreciated.

I am wondering if it would be possible to also get the SNES, SMS and TG16 shell files? I have been slowly updating these files as well.

Rychem

Re: NES Cheats

Posted: Thu Nov 05, 2009 11:09 pm
by Pugsy
I've emailed you the snes, nes & sms shell cheat.dats.

No TG16 shell cheat file though, because there is an XML cheat collection for that system that I haven't got round to releasing yet.

Re: NES Cheats

Posted: Fri Nov 06, 2009 5:45 pm
by rychem
I got the dat files, thanks!

One question I had is what format is best to put the cheats in. I noticed that the SNES file said either the old dat version or the new xml version. What kind of syntax are you looking for?


Either an example or a link (I looked through the forum but couldn't find anything) explaining the old dat version would be great.

Most of the SNES and SMS codes I have are PAR codes. Is it best to follow the NES example you previously gave.

Re: NES Cheats

Posted: Fri Nov 06, 2009 6:47 pm
by Pugsy
This is an example entry from my MAME cheat.dat for a game which has mixed dat and xml format cheats. I generally only use XML format cheats when the dat format can't handle it:-

Code: Select all

; [ Cosmic Avenger ]
:cavenger:00000000:6004:00000099:FFFFFFFF:Infinite Credits
:cavenger:00010001:6347:00000080:00000080:Infinite Credits (2/2)
:cavenger:00000000:6354:000000AA:FFFFFFFF:Invincibility:Activate during play only!
:cavenger:00000000:60E7:00000006:FFFFFFFF:Infinite Lives PL1
:cavenger:00000000:6216:00000006:FFFFFFFF:Infinite Lives PL2
:cavenger:60000000:0000:00000000:00000000:
  <cheat desc="Sound Test">
    <parameter min="1" max="25" step="1"/>
    <script state="on">
      <action condition="maincpu.pb@6004==00|(maincpu.pb@6347=80|(maincpu.pb@6347 BAND ~80))">maincpu.pb@6004=01</action>
    </script>
    <script state="change">
      <action>maincpu.pb@(6C05+param)=F1</action>
      <action condition="(temp0 GT 6C05) AND (temp0 LT 6C20) AND temp0!=(6C05+param)">maincpu.pb@(temp0)=00</action>
      <action>temp0=(6C05+param)</action>
    </script>
  </cheat>
There is a description of the cheat.dat format in the cheat.txt that you will find in the zip with the MAME 0.126 cheat.dat file on the main page...(or check the obsolete FAQs which I think are still linked).

Basic PAR cheat would be this:-

byte 0x99 writing to address 6000 & 6008
:deadbeef:00000000:6000:00000099:FFFFFFFF:Infinite Lives PL1
:deadbeef:00010000:6000:00000099:FFFFFFFF:Infinite Lives PL1 (2/2)

set the green 1 if you have other parts

word 0x1234 writing to address 6000
:deadbeef:00100000:6000:00001234:FFFFFFFF:Infinite Lives PL1

double 0x12345678 writing to address 6000
:deadbeef:00300000:6000:12345678:FFFFFFFF:Infinite Lives PL1

Yes if the PAR cheats are all simple *address:data:description:display comment:nodisplay comment type then I see no problem, though you will need to send me some examples of how you are adding them to see if it's acceptable for conversion before you add too many, PAR cheats with selectable values will need agreeing on and then of course there's multi-PAR cheats. One system at a time though.