dborth / snes9xgx

Snes9x GX - Port of Snes9x for Wii
http://wiibrew.org/wiki/Snes9x_GX
Other
435 stars 64 forks source link

Add support for newer format .cht files and OptionBrowser text scrolling #1038

Closed InfiniteBlueGX closed 1 year ago

InfiniteBlueGX commented 1 year ago

As of Snes9x 1.56, the .cht file format for Cheats was refactored to be more human readable ("BML" format), while the emulator still maintained compatibility with the old format of .cht. When a BML cheat file was loaded into Snes9xGX, the cheats were completely unreadable/unusable (see the image in issue https://github.com/dborth/snes9xgx/issues/966). GX required the old format of .cht file to work properly.

These changes add support of the newer BML cheat format into GX, and modify OptionBrowsers to support scrolling text when the text becomes too long. BML format cheat files do not have the restricted description length that the old format had. Both formats should now be supported by GX.

I was unsure if you prefer the Snes9x core to be left untouched in pursuit of GX-specific updates, so I brought the two required functions over wholesale into cheatmgr.cpp (wouldn't compile otherwise unless I added them to cheats.h). Please let me know whether you'd prefer changes to the core and I can take that avenue instead.

These changes would fix one of the issues described in https://github.com/dborth/snes9xgx/issues/966 as well as issue https://github.com/dborth/snes9xgx/issues/859.

dborth commented 1 year ago

Sorry I thought I already replied to this. Looks good to me, I think putting it in the core is probably better so we can pull over any updates easier.