mrehkopf / sd2snes

SD card based multi-purpose cartridge for the SNES
http://sd2snes.de
GNU General Public License v2.0
590 stars 115 forks source link

Added support for multi-line (list) savestate fixes. #146

Closed RedGuyyyy closed 3 years ago

RedGuyyyy commented 3 years ago

Added support for multi-line (list) savestate fixes. See savestate_fixes.yml for format and other details. ASM also needs support to allow patching controller input address.

RedGuyyyy commented 3 years ago

This was added to support games that need multi-byte ROM patches and, more generally, patches to anything in the 16MB address range.

The YAML parser seems to have some quirks (e.g. tokens for string items show up as type YAML_UNKNOWN) so the format was restricted to make it work.

It would also be useful to overwrite the controller input address as part of a fix since not all games support the hook's way of reading it. Several commented out games in savestate_fixes.yml can use a WRAM address instead of the address in the SNESCMD range.

RedGuyyyy commented 3 years ago

Also, if there is a better way to support this feel free to make changes or close the commit.

mrehkopf commented 3 years ago

As far as I can see I don't need to merge this - I've added IRQ support for the save state handler which makes FFMQ and Claymates work fine, per-game controller query hacks are already removed. Multi-line YAML support is already merged from FURiOUS's code (and YAML parser fixed by me to support a comment sign on the same line as the CKSUM entry)