[WiP] Adding Cheat Support to more cores

Awesome! So do cheats work in the bsnes-accuracy core now aswell?

I just retested everything. Works in bsnes-libretro and bsnes-mercury, performance, balanced, and accuracy. Won’t yet work in bsnes-libretro-cplusplus98. Also, will take a day or two to appear in the core updater.

2 Likes

That’s fantastic, thanks so much for working on this, it’s much appreciated :grinning:

That’s awesome - thanks Offline. I’ve been using Snes9X instead of BSNES for ages because of cheats.

Having said that, there’s nothing wrong with Snes9x.

So does Mednafen have no support at all, currently? Tried codes from the built-in database, and some I got off the web and none worked.

EDIT: Single codes like this work 8009D7D8C350, just no spaces or plus signs allowed.

Any chance of adding multiline codes?

If you are referring to Mednaen-PSX then yes, multi-line codes do work. You need to split them into multiple entries. Take a look here.

It would be nice if you could put them all under one entry though like other emulators.

Contrary to what many people would think, adding multiline cheats to the PS1, N64, possibly Saturn, and definitely any console newer than those is much harder than simply putting the codes on separate lines. This is because the GameShark introduced more advanced code types than simple memory writing. If statements, repeat codes, and more are all possible, and a single one of these codes takes up multiple code lines. Depending on how the emulator the libretro core is based on, these codes are all handled differently. In Mupen64Plus, you could get away with splitting the lines up and putting them as separate codes. In Mednafen PSX, not so much. Instead, you have to decode a codeline over the top of previously decoded code lines to get them to function, which is not something that can be done outside of source code editing. To make matters worse, Beetle PSX is based on such an outdated version of Mednafen that I had to backport a good amount of the code to get anything to work.

Anyway, after much toiling and pulling of hair, Beetle PSX should shortly work with multiline codes.

1 Like

Amazing! Can’t wait to grab it through Core Updater and test it out.

Just thought I’d throw this out there - I just tested and the Yabause core does support cheats. Even multiline codes worked absolutely fine. Can’t test the Saturn Mednafen core right now as I guess I need to find a BIOS file.

I downloaded the latest nightly of the bsnes Accuracy core and cheats are working perfectly :slight_smile:

This is awesome! thank you. And it would be nice if Mednafen-PSX was updated much like the saturn core was.

EDIT: Tested the new cheat updates on Mednafen-PSX and multi-line codes work flawlessly on my end. Once again than you for all your work Offline!

I got around to testing the Saturn Mednafen core and unsurprisingly cheats don’t work.

As I said before, the Yabause core has fully working cheats (inc. multiline) so I dunno if that helps at all (could the code be ported from one core to the other?)

Hi There.

Bit of a noob here, but I’m really wanting to add this cheat support to Mega Drive in my Retropie.

I see the mention of “Pull requests” but not being that up to speed on things, I don’t know how to use this to add/update my retropie/Retroarch.

Any help to point me in the right direction in setting up or installing the above work would be greatly appreciated.

For reference I have updated Retropie/ES/Retroarch to thier latest versions in the last 24 hours.

All you should need to do is get updates in RetroArch’s built-in core updater. However, it looks like RetroPie handles things differently, and since I don’t have a Pi of my own, I’m not familiar at all with what exactly these differences are. The latest update of RetroPie was released moments before I got initial cheat support for MegaDrive games. If you can wait, the next big update should have these changes implemented, given that they’re now a part of RetroArch’s source code.

The only alternative to waiting I can come up with is compiling from source, but that’s a very complicated affair I can’t help you with because I don’t have a Pi of my own and don’t know the ins and outs of compiling code for it.

I realise you tried to explain the many different GBA code formats above, but could you ELI5 which formats should now work in VBA-M? As I’m encountering a lot of codes that don’t work, and I don’t know whether that’s the format, or just that the codes don’t work (a common problem with all cheat codes, as I’m sure you’re aware!), whether I can reformat the codes myself, for instance.

To take an example, Golden Sun https://gamehacking.org/game/4741/?game=4741

This code worked:

Max XP after battle: 961D4170 91008AFE

These codes don’t work:

Infinite HP: 9C9590DA CE28 Infinite HP: 42000538 07CF+00000004 014C Infinite Money: B2EA2111 EDD2+90E82929 79F3 Infinite Money: 79D6FD8C 6BC07A36

Finding working codes can be frustrating at the best of times, but it would help if I understood what I should look out for, and what definitely won’t work in VBA-M with the current cheat support. I notice the code types on that page I linked above are either AR34 or CB (Codebusters, I guess?). I don’t know what codes I can use, what codes I could use if I reformatted them, and what codes I just plain can’t use (oh, and what codes just don’t work!).

Any help would be appreciated :innocent:

EDIT: okay, am having some success converting CB codes to Action Replay MAX codes here: http://gamehacking.org/system/gba

EDIT 2: Hopefully adding full cheat support to mGBA is on the list, as it seems to be the most in-favour GBA emulator these days.

I can’t seem to get cheats to work in the Nestopia core. Downloaded latest nightly and updated cheats. Any ideas?

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