Cheat Engine

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
User avatar
mightymo77
Snes9x White Belt
Posts: 7
Joined: Wed Feb 02, 2011 12:18 pm

Cheat Engine

Post by mightymo77 »

This is Mo from www.mightymo.net. I make cheat code packs for Nestopia, Kega Fusion and BSNES. I wanted to ask about a possible change to the .cht format. If you can edit it to match BSNES' engine, then that would be fantastic for your emulator, because I maintain a pretty tight cht database. The current syntax should be changed within the .cht files to "disabled/enabled","code","description". Here's an example:

"disabled","EDEA-1F6B+2DBF-4F6F","Invincibility"
"disabled","7E0A2A06","Infinite health"
"disabled","C235-C768","Infinite lives"
"disabled","7E1E5114","Infinite lives (alt)"
"disabled","7E1E6B14","Infinite time"
"disabled","7E1E6314+7E1E6514","Infinite Bombs"
"disabled","7E1E5B14+7E1E5914","Max coins"
"disabled","7E0A0909","Have throwing weapon"

So if you can match that, I can make a pack for SNES9X and it would have over 600 .cht files and counting.
User avatar
Camo_Yoshi
Snes9x Purple belt
Posts: 922
Joined: Thu Nov 08, 2007 7:59 pm

Post by Camo_Yoshi »

Why hasn't anyone payed attention to this? This is a must!
Snes9x FAQs | Forum Rules
What operating system are you using? 32 or 64bit? Version of Snes9x? Is the text at the bottom of the window white when you load the game?
These suggestions are usually the solution to your issue!
pgyrund
Snes9x White Belt
Posts: 9
Joined: Sun Jan 17, 2010 4:09 pm

Post by pgyrund »

I think this would be a good idea as well, and would like to further this suggestion. Could the format of the cht file be changed to be readable in WordPad? This would make it easier to manage the cheats outside the actual emulator.

This may be part of implementing the suggestion of this topic, but if it isn't, it is at least related.

Are there any status updates on this? Do you think we'll be able to see it in the next version?

Thank you very much.
User avatar
Camo_Yoshi
Snes9x Purple belt
Posts: 922
Joined: Thu Nov 08, 2007 7:59 pm

Post by Camo_Yoshi »

Why are you using Wordpad instead of Notepad? Notepad is far superior for this...
Snes9x FAQs | Forum Rules
What operating system are you using? 32 or 64bit? Version of Snes9x? Is the text at the bottom of the window white when you load the game?
These suggestions are usually the solution to your issue!
pgyrund
Snes9x White Belt
Posts: 9
Joined: Sun Jan 17, 2010 4:09 pm

Post by pgyrund »

Actually, I use both Notepad and Wordpad. But, either is fine. As long as the file is readable by either one of them, that would work.
User avatar
mightymo77
Snes9x White Belt
Posts: 7
Joined: Wed Feb 02, 2011 12:18 pm

Re:

Post by mightymo77 »

Camo_Yoshi wrote:Why hasn't anyone payed attention to this? This is a must!
I haven't been following the development of SNES9x, but it looks like my suggestion was never implemented? Since my original post in February my cheat pack has gotten bigger and better. If SNES9x can simply use my cheats.xml file that's included with BSNES, then everyone would have access to my cheat database. Is this possible?
User avatar
Ilya-v
Snes9x White Belt
Posts: 31
Joined: Tue Jul 29, 2008 6:44 am

Re:

Post by Ilya-v »

Camo_Yoshi wrote:Why hasn't anyone payed attention to this? This is a must!
Agreed.
It has to be done.

mightymo77, you cheat database is fantastic, I use it all the time.
User avatar
gocha
Snes9x Yellow Belt
Posts: 64
Joined: Sun Dec 30, 2007 12:14 am
Location: Japan, Nagoya

Re: Cheat Engine

Post by gocha »

Personally, I've started to working on this. Changes to core has been 90% done (remaining 10% = escapes in cht import/export), but I need to change Cheat Dialog (Windows) as well, which is too much complicated. 。・(ノ_<*)

I have a question.
- Do you need Gold Finger support? I do not know about cheat codes, but I want to remove it because it seems to require some extra parameters to decode.
User avatar
Ilya-v
Snes9x White Belt
Posts: 31
Joined: Tue Jul 29, 2008 6:44 am

Re: Cheat Engine

Post by Ilya-v »

If Goldfinger is not the same thing as Game Genie and its not using the same source code....
I think its obsolete, Game Genie & Pro Action Replay will suffice.

But if somehow removing the Goldfinger support will hurt the Game Genie activity, then its a no no.
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: Cheat Engine

Post by OV2 »

The problem is mainly that we do not want to lose compatibility with the old format that's very widespread. If we take that in we need some way to support both formats. Also, s9x saves the current byte values of enabled cheats (to reapply them on disable).
User avatar
gocha
Snes9x Yellow Belt
Posts: 64
Joined: Sun Dec 30, 2007 12:14 am
Location: Japan, Nagoya

Re: Cheat Engine

Post by gocha »

First attempt.

Notes:
- Gold Finger support has been gone at the moment. However, I understand that people do not want to lose any compatibility, so that I will try to recover it later.
- New Snes9x cannot read the old CHT at all. I wrote a tool that converts the old CHT to the new one. http://www.mediafire.com/?v8yb0yy1czsdyxh
- New CHT format (CSV) doesn't have a field of "saved value" at the moment. Because of that, "Load ROM (and load CHT as well) -> remove existing cheat" sequence will set 00 or something to those addresses. In some way, I will fix it later.
- win32: "Syntax" link doesn't work, because something is wrong (it doesn't throw NM_CLICK, why?). It should show a guide.
- win32: As a side effect of re-implement, you can remove multiple codes at once.
- win32: As a side effect of re-implement, you can input any characters to the editbox. They might be filtered again in future.
There might be more bugs...

Windows Testbuild
http://www.mediafire.com/?0ovyv47b9akati4
Diff (it's from snes9x-rr, but I guess it can be easily ported to snes9xgit)
http://pastebin.com/mtVN3JNK
Attachments
New Cheat Dialog Screenshot
New Cheat Dialog Screenshot
NewCheater.png (37.85 KiB) Viewed 130637 times
User avatar
Ilya-v
Snes9x White Belt
Posts: 31
Joined: Tue Jul 29, 2008 6:44 am

Re: Cheat Engine

Post by Ilya-v »

gocha,

MightyMo since changed a little his system.
I have PM'ed him (in hope he will receive an email) to join us here.

Besides that the test version is very slow compared to OV2's August 2012 1.53 build.
Your new cheat system works good.
The .cht files that snes9x saves lack the " " that supposed to be there.


Please download mightymo's cheat files to compare:
http://www.mightymo.net/downloads.html
Download latest BSNES v075-082 Cheat Code Pack.
There are two versions in there, the older one is comparable to your current test build.
User avatar
gocha
Snes9x Yellow Belt
Posts: 64
Joined: Sun Dec 30, 2007 12:14 am
Location: Japan, Nagoya

Re: Cheat Engine

Post by gocha »

Hi Ilya-v.
Ilya-v wrote:Besides that the test version is very slow compared to OV2's August 2012 1.53 build.
I made the build by using VS2008 (x86/x64 Unicode Release Build). OV2 might used different optimization option, or it's because of snes9x-rr's new GUI update mechanism (I probably will check it when I have a time). Anyways, I think it's not because of the new cheat system.
Ilya-v wrote:The .cht files that snes9x saves lack the " " that supposed to be there.
Yeah, it saves without quotes, but it can read quoted text as well. See RFC4180 to know what value will be quoted.
If the quote is important, I can modify it to always quote the value.

I will check mightymo's cheat code pack later.
Thank you for your report.
User avatar
mightymo77
Snes9x White Belt
Posts: 7
Joined: Wed Feb 02, 2011 12:18 pm

Re: Cheat Engine

Post by mightymo77 »

Wow this sounds very good and promising. Good job Gocha! Now one thing we have to figure out - there are three different versions of my cheat files. The two old BSNES versions (that come in my BSNES cheat code pack), and the current xml file that BSNES uses which automatically loads the cheats by checking the SHA256 of the ROM that's loaded. That is the best way to do this. I would need your email address so that I can email you the xml file. Can you PM that please?
User avatar
mightymo77
Snes9x White Belt
Posts: 7
Joined: Wed Feb 02, 2011 12:18 pm

Re: Cheat Engine

Post by mightymo77 »

OK so I emailed gocha my master xml file, the same file that Byuu integrates into BSNES. So HOPEFULLY he will be able to use that same exact file for SNES9x. This way, as I update my XML file, I can just simply email it, as I do now to Byuu, and now gocha, and both emulators will have my cheat database! I'm really hoping gocha can do it. It would be awesome.
User avatar
mightymo77
Snes9x White Belt
Posts: 7
Joined: Wed Feb 02, 2011 12:18 pm

Re: Cheat Engine

Post by mightymo77 »

By the way, this is the formatting that the XML uses:

<?xml version="1.0" encoding="UTF-8"?>
<database>
<cartridge sha256="8808783f789ca6413364a7abea240f6f7291b5906026f360ba8cfdd2791fc179">
<name>2020 Super Baseball (USA)</name>
<cheat enable="false">
<description>Have lots of money - P1</description>
<code>7F80CA:63</code>
<code>7F80CC:63</code>
<code>7F80CB:63</code>
</cheat>
<cheat enable="false">
<description>Have 9 points - P1</description>
<code>7FC13B:09</code>
</cheat>
<cheat enable="false">
<description>Have no outs</description>
<code>7FC138:00</code>
</cheat>
<cheat enable="false">
<description>Have no strikes</description>
<code>7FC136:00</code>
</cheat>
<cheat enable="false">
<description>Have no balls</description>
<code>7FC137:00</code>
</cheat>
</cartridge>
<cartridge sha256="2ffe8828480f943056fb1ab5c3c84d48a0bf8cbe3ed7c9960b349b59adb07f3b">
<name>3 Ninjas Kick Back (USA)</name>
<cheat enable="false">
<description>Invincibility</description>
<code>EDEA-1F6B</code>
<code>2DBF-4F6F</code>
</cheat>
<cheat enable="false">
<description>Infinite lives</description>
<code>C235-C768</code>
</cheat>
<cheat enable="false">
<description>Infinite health</description>
<code>7E0A2A:06</code>
</cheat>
<cheat enable="false">
<description>Infinite lives (alt)</description>
<code>7E1E51:14</code>
</cheat>
<cheat enable="false">
<description>Infinite time</description>
<code>7E1E6B:14</code>
</cheat>
<cheat enable="false">
<description>Infinite Bombs</description>
<code>7E1E63:14</code>
<code>7E1E65:14</code>
</cheat>
<cheat enable="false">
<description>Max coins</description>
<code>7E1E5B:14</code>
<code>7E1E59:14</code>
</cheat>
<cheat enable="false">
<description>Have throwing weapon</description>
<code>7E1E5B:14</code>
<code>7E1E59:14</code>
</cheat>
<cheat enable="false">
<description>Less enemies to pass trials (disable then enable)</description>
<code>7E1FE0:02</code>
</cheat>
</cartridge>

ect...
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: Cheat Engine

Post by OV2 »

gocha wrote:- win32: "Syntax" link doesn't work, because something is wrong (it doesn't throw NM_CLICK, why?). It should show a guide.
You need to move the NM_CLICK and NM_RETURN checks out of the IDC_CHEAT_LIST case and check for IDC_CHEAT_SYNTAX wParam, then it works. However the SysLink control requres common controls v6, so the whole cheat dialog will not work on Win2000.

Mightymo: the chances of getting xml parsing into s9x is minimal, since getting that cross-platform without too much baggage would require writing a new parser. There is also currently no sha256 calculation logic in s9x.
User avatar
mightymo77
Snes9x White Belt
Posts: 7
Joined: Wed Feb 02, 2011 12:18 pm

Re: Cheat Engine

Post by mightymo77 »

OV2 wrote:Mightymo: the chances of getting xml parsing into s9x is minimal, since getting that cross-platform without too much baggage would require writing a new parser. There is also currently no sha256 calculation logic in s9x.
OK, well then we can continue to use my BSNES v0.51-0.74 .CHT files, which are in this format:

"disabled","EDEA-1F6B+2DBF-4F6F","Invincibility"
"disabled","7E0A2A06","Infinite health"
"disabled","C235-C768","Infinite lives"
"disabled","7E1E5114","Infinite lives (alt)"
"disabled","7E1E6B14","Infinite time"
"disabled","7E1E6314+7E1E6514","Infinite Bombs"
"disabled","7E1E5B14+7E1E5914","Max coins"
"disabled","7E0A0909","Have throwing weapon"
User avatar
King Of Chaos
Snes9x White Belt
Posts: 6
Joined: Mon Feb 20, 2006 2:01 am

Re: Cheat Engine

Post by King Of Chaos »

Awesome progress! What's the chances of gocha's modifications being added officially?
User avatar
mightymo77
Snes9x White Belt
Posts: 7
Joined: Wed Feb 02, 2011 12:18 pm

Re: Cheat Engine

Post by mightymo77 »

King Of Chaos wrote:Awesome progress! What's the chances of gocha's modifications being added officially?
King Of Chaos what's up man. Good thing I not only kept my packs of the two old BSNES cheat formats, but also kept them up to date, huh?
Post Reply