Cheat menu for all cores that have cheat devices.

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

deltax5
Atarian
Atarian
Posts: 6
Joined: Tue Oct 02, 2018 1:42 am

Cheat menu for all cores that have cheat devices.

Postby deltax5 » Wed Mar 20, 2019 12:00 am

Would be awesome if they started putting cheat menu for the cores that had cheat device.
My guess it would need to be per core.
Having it real time like the super nt would be sweet. but whatever works i guess.
Sometimes i like putting cheats in the games. It makes some games more enjoyable for me. sometimes.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Cheat menu for all cores that have cheat devices.

Postby Sorgelig » Wed Mar 20, 2019 6:11 am

Yeah, that would be awesome. You can start to implement it.

User avatar
Newsdee
Atari God
Atari God
Posts: 1399
Joined: Fri Sep 19, 2014 8:40 am

Re: Cheat menu for all cores that have cheat devices.

Postby Newsdee » Wed Mar 20, 2019 7:28 am

Here's a cool idea for Atari consoles:
https://hackaday.com/2018/12/11/fpga-ha ... ame-genie/

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 152
Joined: Wed Sep 26, 2018 6:03 am

Re: Cheat menu for all cores that have cheat devices.

Postby kitrinx » Fri Mar 22, 2019 6:52 pm

To have this be a good experience, it needs to be done with care. I've been thinking about the best way to go about it.

My thoughts so far lean towards storing the codes persistently in JSON format, by game name, and then by code title, each system in a core-named file of its own. JSON is easy to lint, and has lots of tools to work with it, much better than XML or proprietary. cJSON is a good lightweight library for this, and easy to work with. The C side menu is what is probably the most tricky, given the way the OSD works, but a menu string parameter could help it select hard-coded correct code formats. Decoding the codes and turning them into addresses would be done c side, and the final result would be 24 bit address, 16 bit check value, 16 bit replacement value, 4 bit (maybe 8 for convenience?) code index. Then these are sent to the core via HPS. Where the core can choose to use them in a LUT module that sits between the rom storage output and the bus and simply swaps out the data if the address and check word match.

Coding the menu up is almost certainly the hardest part of this though, but at least it's mostly system-wide code. If i'm ever feeling ambitious one day maybe i'll try to tackle that.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Cheat menu for all cores that have cheat devices.

Postby Sorgelig » Fri Mar 22, 2019 8:46 pm

ROM data manipulation is not the only part of cheat engine. This is easy to make by just pre-patching the ROM.
Cheat engine usually includes RAM monitoring with data manipulation at run-time like keeping some values or change by some rule.
And no, it cannot be done directly from HPS as data rate will be too high. So some part of cheat engine must be implemented in the core. And of course it's core specific.

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 152
Joined: Wed Sep 26, 2018 6:03 am

Re: Cheat menu for all cores that have cheat devices.

Postby kitrinx » Fri Mar 22, 2019 10:37 pm

Sorgelig wrote:ROM data manipulation is not the only part of cheat engine. This is easy to make by just pre-patching the ROM.
Cheat engine usually includes RAM monitoring with data manipulation at run-time like keeping some values or change by some rule.
And no, it cannot be done directly from HPS as data rate will be too high. So some part of cheat engine must be implemented in the core. And of course it's core specific.


I think some of them touched other parts of the bus, but the method was always more or less the same AFAIK. To handle banking they'd have a check value as part of the code which was compared to the rom or ram value, and only applied the replacement value if the check bit matched. If there was no check bit they'd just always return the assigned value for the hijacked address. Maybe it's not as simple as I understand. Anyway the first challenge is getting a menu. The core side is the easier part, imho.

I know the actual address hijacking can't be done via HPS, but the de-coded codes can easily be sent to the core to populate a table for bus insertion.

JamesF
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 104
Joined: Sat Dec 15, 2018 6:46 am

Re: Cheat menu for all cores that have cheat devices.

Postby JamesF » Wed Apr 24, 2019 7:55 am

Since it is very easy editing files on the mister via network, the following might be a good temporary solution for all cores.
Maybe at this time it will be a good idea to have cheats/nes/rom_name.cht and in this .cht file have the GameGenie codes that will be applied to the game when it loads, similar to saves.
The sd2snes and everdrives work in this way.

I know kitrinx doesn't like this idea, but it may be more universal and easier to apply to all cores.

Note that cheat formatting is important when the .cht file is read.
GameGenie : 62C0-AFA1
RAW/Action Replay: 7E1F29:01 or 03F870:4E75

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Cheat menu for all cores that have cheat devices.

Postby Sorgelig » Wed Apr 24, 2019 8:21 am

JamesF wrote:Since it is very easy editing files on the mister via network, the following might be a good temporary solution for all cores.
Maybe at this time it will be a good idea to have cheats/nes/rom_name.cht and in this .cht file have the GameGenie codes that will be applied to the game when it loads, similar to saves.

Many codes applied to RAM, not ROM. I would say 90% of codes.
So it's pretty much useless.

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 152
Joined: Wed Sep 26, 2018 6:03 am

Re: Cheat menu for all cores that have cheat devices.

Postby kitrinx » Wed Apr 24, 2019 1:46 pm

I don't mind adding the correct code to cores to make it work, I just don't want to mess with making a menu, and I think dumping .txt files is worse than just using a game genie rom.

What would be useful is the HPS_IO code being established. In NES core I break it up into {1'b clock, 4'b index, 1'b enable, 1'b compare_en, 15'b address, 8b compare_, 8'b replace} so maybe breaking it up into code_clock, code_index, and code, with the address, compare, and replace having extra room for 16 bit systems. As just an addition will help things take a step forward. If Sorg or anyone else is interested in implementing this I can explain more.

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 152
Joined: Wed Sep 26, 2018 6:03 am

Re: Cheat menu for all cores that have cheat devices.

Postby kitrinx » Wed Apr 24, 2019 2:08 pm

Also, what I would not object to is a menu that only shows game titles and code titles, even if the codes are already translated into address:compare:replace format. The actual code entry is not needed, just some way to select, enable and disable. It's easy to make a JSON or YAML file and distribute it with all the games and codes already made, could write a little app to do that no problem.

deltax5
Atarian
Atarian
Posts: 6
Joined: Tue Oct 02, 2018 1:42 am

Re: Cheat menu for all cores that have cheat devices.

Postby deltax5 » Sat May 11, 2019 6:08 pm

For those who not on the discord. i uploaded the cheats. just unzip them in the core name folders.
V In this format V https://github.com/MiSTer-devel/Main_Mi ... eat-Engine
cheats/system/rom_filename.zip
For fds, gg and gbc you gotta mix them with the core it's loaded from. some games may collide and this is a issue for now. Hope they fix it so those have there own folder or something.

https://drive.google.com/file/d/1p7F6S0 ... sp=sharing

deltax5
Atarian
Atarian
Posts: 6
Joined: Tue Oct 02, 2018 1:42 am

Re: Cheat menu for all cores that have cheat devices.

Postby deltax5 » Sat May 11, 2019 6:11 pm

I was starting to make my own packs from gamehacking.org. But Someone from that site was nice enough to make the packs fast as he has access to all the codes. It is very time consuming downloading downloading the game cheats one by one. in my pack it was all unziped as you just loaded the roms from the folder. Now they check the cheats folder and checks for the zip.
Thanks to rimsky82 on discord for uploading his packs.
I hear something that there going to be a updater that just downloads all the cheats all at once from the internet.
Wonder if they can do atari 2600 since it's on that site, idk if it even had a cheat device. maybe from the emulator or something.. hope to see cheats in other cores that the future has to bring us.

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 152
Joined: Wed Sep 26, 2018 6:03 am

Re: Cheat menu for all cores that have cheat devices.

Postby kitrinx » Sat May 11, 2019 7:02 pm

deltax5 wrote:I was starting to make my own packs from gamehacking.org. But Someone from that site was nice enough to make the packs fast as he has access to all the codes. It is very time consuming downloading downloading the game cheats one by one. in my pack it was all unziped as you just loaded the roms from the folder. Now they check the cheats folder and checks for the zip.
Thanks to rimsky82 on discord for uploading his packs.
I hear something that there going to be a updater that just downloads all the cheats all at once from the internet.
Wonder if they can do atari 2600 since it's on that site, idk if it even had a cheat device. maybe from the emulator or something.. hope to see cheats in other cores that the future has to bring us.


Codes will be set up by the updater script after the next update to MiSTer main. Right now sorg is attempting to make the rom <-> code matching more robust and to use CRC to prevent filename collisions. It should make the setup as easy as running the update script. Hang in there.

Sorgelig
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4638
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Cheat menu for all cores that have cheat devices.

Postby Sorgelig » Mon May 13, 2019 1:01 pm

I've copied all cheats from Gamehacking site from all supported (by MiSTer) platforms into one folder and removed from name everything besides the CRC32 part.
Found collided pairs of ROMs:

Baby T-Rex (Beta) [9B5D585D].zip
Radical Rex (USA) (Beta) [9B5D585D].zip

Blockbuster Competition II- NBA Jam TE & Judge Dredd [4385E366].zip
Blockbuster World Video Game Championship II (USA) [4385E366].zip

Ganso!! Yancha Maru (Japan) [004443E6].zip
Kid Niki (J) [004443E6].zip

Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (GBC,SGB Enhanced) [7D527D62].zip
Pokemon - Yellow Version (UE) [C][!] [7D527D62].zip

Super Tetris (Kor, SMS Mode_) [BD1CC7DF].zip
Super Tetris (Korea) (Pirate) [BD1CC7DF].zip

So they are obviously pairs of same ROMs. Actually it should be reported to Gamehacking admin to fix these collisions. They either should be renamed to a common name or at least hacks should be copied inside the pairs because currently hacks inside are different which is the bug.

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 152
Joined: Wed Sep 26, 2018 6:03 am

Re: Cheat menu for all cores that have cheat devices.

Postby kitrinx » Tue May 14, 2019 2:04 am

Rimsky fixed the duplicates you suggested earlier today and rebuilt the packs. Should be all good now. Many different users submit codes there so sometimes things like that happen.

gojira54
Atariator
Atariator
Posts: 23
Joined: Mon Oct 29, 2018 5:40 pm

Re: Cheat menu for all cores that have cheat devices.

Postby gojira54 » Wed May 15, 2019 8:00 pm

Cheat system is great - many many thanks =]
Finally saw end of SGX GnG!!!


Return to “MiSTer”

Who is online

Users browsing this forum: Dercheforp and 5 guests