[WiP] Adding Cheat Support to more cores

Haven’t thoroughly tested Nestopia until now. So I pulled open Super Mario Bros 3 and added a few random codes from gamehacking.org. Both GG and PAR codes worked for me, but only single line codes worked out of the box. Only the first line of multiline codes worked unless I manually split them into separate codes. RAW codes did not function at all. Pull request submitted, so expect improvements to arrive in the core updater after a few days.

Just out of curiosity, what games did you test with? It’s possible the cheat files may be flawed, or based on another rom revision.

I tested with Mega Man 2, and tried both the Game Genie and Pro Action Replay NES cheats that are downloaded through the RA Online Updater. Thanks for looking into it :slight_smile:

EDIT: Tried with Super Mario Bros. 3 and the cheats did work. Maybe it was just the cheat file for Mega Man 2 that had issues? I am using a No-Intro rom set.

The official Mega Man 2 cheats are in Action Replay format, which is not supported by either Nestopia or FCEUmm. Note that on NES PAR can stand for Pro Action Rocky, which is a distinct format from Pro Action Replay. A good search didn’t get me a copy of the code format, so don’t expect those to start working anytime soon.

Edit: Nevermind, it looks stupid simple.

I found these Game Genie codes and manually entered the one for infinite lives and it seemed to work, I guess it was just a bad cheat file in the Online Updater :slight_smile:

http://www.gamegenie.com/cheats/gamegenie/nes/mega_man_2.html

Offline any chance of looking at cheats in Saturn Mednafen? I’ve tried that core on a bunch of games and it’s virtually flawless - just needs cheats!

Sinistrahd posted a support question on Github. I referred him here.

Hello ilag111111, I am trying to figure out getting the genesis PAR codes to function in Genesis_Plus_GX and have been having issues with non-functionality, I have tried, to take a single example, Sorceror’s Kingdom, in several different versions from the 3.00 Goodmerge. I have not been able to get a code to work on that game in either the retroarch clover implementation on nes classic or PC Retroarch updated to the latest version and core. I was wondering if you had any tips to get the codes working, as I know they do work for some users. Also, I found this on the forums ( Genesis Game Genie Cheats ) and was wondering if anything there looks promising to you. Just a disclaimer, I have virtually no coding background beyond assembler, and I ended up getting a degree other than EE because of the programming requirements :stuck_out_tongue:

I think I figured out your problem. The included cheats file for this game is malformed. Unfortunately I have no control over those, and my recommendation is to not bother using any of the included cheats files and looking the game up on GameHacking.org and other reliable external sources.

There is an easy solution for this problem: just rewrite the cheats replacing the “+” with a “:” between the two code parts. For Infinite Money, FF0490+FFFF becomes FF0490:FFFF. For Max Health, FF04A8+270F+FF04B6+270F becomes FF04A8:270F+FF04B6:270F. For the Slot Modifier cheats, replace the ?? with a pair of hexadecimal numbers. GameHacking.org has a list of what these values are on this game’s page, which I’m reposting here.

01 - Alt Knife 02 - Sword 03 - Broad Sword 04 - Death Sword 05 - Omega Sword 06 - Bow 07 - Fire Bow 08 - Metal Bow 09 - Bomb 0A - Power Bomb 0B - Hyper Bomb 0C - ATM Bow 0D - Red Key 0E - Blue Key 0F - Green Key 10 - Wood Key 11 - Hp Up 12 - Water ST 13 - Fire ST 14 - Shadow ST 15 - Wood ST 16 - HP Heal 17 - Booster 18 - SP Heal 19 - Special 1A - DYT Call 1B - EFR Call 1C - SHD Call 1D - BOW Call 1E - Cheese (Hp + 1/4) 1F - Fish (Hp + 1/2) 20 - Meat (Hp + 3/4) 21 - Roast (Hp + Max) 22 - Orange (Sp + 1/4) 23 - Apple (Sp + 1/2) 24 - Pappya (SP + 3/4) 25 - Grapes (Sp + Max) 26 - Small Mushroom (Hp Sp + 1/4) 27 - Lettuce (Hp Sp + 1/2) 28 - Onion (Hp Sp + 3/4) 29 - Big Mushroom (Hp Sp + Max) 2A - Elixir

Hopefully this should answer all of your questions, but if not, please post here and I’ll get back to you shortly.

In response to Dan, I’m still without any Saturn games, so I can’t add cheats to Mednafen Saturn just yet. When I do get a hold of some, I’ll be sure to do so.

Thank you so much! I guess this isn’t a very popular title, is it? By the way, I tend to attract overlooked bugs that hardly ever affect anyone else, so if you are ever looking for them in something, just have me use it.

I commented on this earlier but is there any way to simplify the process of adding cheats to Retroarch? When you are working with 1 or 2 codes it is not a big deal, but when you are adding 5-10 codes at a time the system really becomes a hassle.

For stand alone emulators all all you generally have to do is simply add the code and you are good to go.

My focus is on the cores rather than Retroarch’s UI. I’ll add it to the suggestion list, because it annoys me too.

Enhancements to the cheat UI may be a good candidate for a Bounty: https://forums.libretro.com/c/bounty-discussion

1 Like

No problem Offline, keep up the great work.

And yeah it could work as a bounty.

If you would write up the use case as an issue in the RetroArch github – or it sounds like maybe you could even provide some screenshots of other emulators – I’d toss in $5. In some cases that’s all it takes to get the ball rolling.

One enhancement I’m requesting is the ability to explicitly set cheat types in the UI. This will solve headaches in certain systems, such as GBA, where GSv1 and GSv3 cheats can not be differentiated by string analysis, and it’s entirely possible a cheat may be simultaneously parsed as valid GSv1 and GSv3. However, this crosses over with extensions to the Libretro API, as the core would have to provide RA with a list of cheat types, and the cheat function would have to become aware of the cheat type set by the UI.

1 Like

Here is an example of mGBA. All you have to do is paste the code in the box and click “Add”. Nothing else needed. It be great if you can toggle an option in-game that brings up a window of sorts that lets you copy-paste code and be done with it. As it is now, you have to open the cheat file directly and then reload the file itself, which is just a pain. This is on top of everything else you have to do just to get RA to read them.

PPSPP: This one is a bit more involved. You can hit the “edit” cheat file" option on the top left and it will directly open the cheat file associated with the game you have opened. Hitting “Refresh rate” will reload the file after you have updated it.

I’m new so please don’t get upset at my questions they’re valid. I updated my Raspberry Pi and all the emulators and a lot of these issues are now working for me. The question that I have is is there a possibility for cheat support with turbo Graphics 16 PC engine PC engine CD and turbo Graphics 16 CD games? The last question that I have I didn’t see anything really stable or confirming if you can cheat with PlayStation Portable games or if that’s going to be added at a later date. I mainly reread this a couple times and it seems that mainly it’s Nintendo and Sega consoles but I didn’t see anything mentioned about NEC consoles. I do however have a way of patching the ROMs on PC engine and turbo Graphics 16 but I would like to have a way to turn codes on and off and add the codes through the emulator in the future if it’s possible along with the PlayStation Portable cheat inputs for the future. I want to thank everybody for their hard work and I’m cheating at just about every Consul right now except for those. If there is no future plans for these that’s okay too maybe someone can give me some advice on how to patch these permantly for example turbo CD games and PlayStation Portable if in putting the codes isn’t an option

As far as I know the TurboGraphix/PCE emulators have no upstream cheat support. The only hope is for Mednafen, which has to be tested upstream and support potentially backported if it exists. I don’t have any CD games to test on myself

For PSP, an updated PPSSPP should be arriving very soon. Upstream has cheat support, so if it doesn’t work I’ll fix it as soon as I have time.

I want to thank you for that information at least they’ll be PlayStation Portable support soon great new!! I know that patches do work on PC engine and turbo Graphics 16 ROMs for the Raspberry Pi. I know there’s a lot of codes on game hackers. Org I just wish there was a way to support those emulators on here eventually or add support for those code types to convert them to the retroarch maybe in the future :wink:

I get emails updating new topics here please let me know when the new PlayStation Portable core with cheat support is available so I can update the emulator or do what I have to do to get it on my Raspberry Pi thanks again

I just updated the Raspberry Pi and I got cheats to work with mame Liberatore 2003. I followed the directions and downloaded the file that I needed to have and now cheats don’t work at all. When the cheats did work I use tab on my wireless keyboard and it had a section where I can pull up cheats and scroll down to the file that they suggested that I download and use the cheats now that’s not possible any suggestions? It says that cheats are supported so why is it not supporting cheats now?

I am using a Raspberry Pi 3 version4.2 20 I believe is the latest version and now cheats aren’t working