libretro / libretro-database

Repository containing cheatcode files, content data files, etc.
Creative Commons Attribution Share Alike 4.0 International
915 stars 789 forks source link

Convert native cheat codes to the RetroArch format #1360

Open eadmaster opened 1 year ago

eadmaster commented 1 year ago

There a lot of cores currently that only support cheats in the RetroArch format, while this repo only provides codes in Native format (e.g. GameShark):

This creates confusion among users, who assume cheat support is missing in these cores, while it is not the case actually: https://github.com/libretro/beetle-pce-fast-libretro/issues/93 https://github.com/libretro/beetle-saturn-libretro/issues/5

So i've made this quick and dirty script to convert the cheat tables format: https://github.com/eadmaster/dotfiles/blob/main/bin/chtnative2retroarch.py

It's still missing support for encrypted/conditional/increment/activator codes, but i've found it's already working well in most cases.

Possibly it can be merged into the scraper script, to have the cheat tables converted automatically after download.

chelnov5 commented 1 month ago

Sir it's just a simple python script file. Most of us don't know how to use it. It would have been better if you had made a guide or tutorial instead of leaving it to us how to figure it out.

eadmaster commented 1 month ago

https://www.almabetter.com/bytes/articles/how-to-run-python-script

example usage:

python chtnative2retroarch.py "18 Wheeler (Japanese).cht" "18 Wheeler (Japanese) (converted).cht" dc

RobLoach commented 1 month ago

Nice work, @eadmaster. Do you think it would be worth having the duplicate scripts hosted in this repository? Suffixed by "(RetroArch)" or something?

chelnov5 commented 1 month ago

Sorry butI'm getting this error, and do original file have to be in .cht format as gamehacking has no download option for download sadly. I've attached snaps for both error and original cheat file

cheats

Code

eadmaster commented 1 month ago

@chelnov5 : Download the script in raw mode, you saved the html page.

@RobLoach : it would make sense for the supported systems: sat, n64, dc, ps1, pce(cd)

chelnov5 commented 1 month ago

@chelnov5 : Download the script in raw mode, you saved the html page.

@RobLoach : it would make sense for the supported systems: sat, n64, dc, ps1, pce(cd)

Thanks now it worked. Now I'll check the codes in game.