mrehkopf / sd2snes

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

Save states don't work well in Chrono Trigger #216

Closed FoxLisk closed 1 year ago

FoxLisk commented 1 year ago

Does anyone know why this is? As far as I can tell, it doesn't use an expansion chip. Loading a save state often immediately messes up graphics, even just saving a state and then loading it without doing anything in between. I'm also getting stuck on just like a full orange screen sometimes.

redacted173 commented 1 year ago

Try the attached fpga_base.bi* files by copying them into your SD card's sd2snes/ directory over the 1.11.0 files of the same name.

Chrono Trigger uses the PPU $2134 register as a source to zero out WRAM using a DMA. The CTX state machine captures the WRAM write then immediately overwrites the shadow address with the PPU register. This means we lose the zeroing of WRAM in the save state. These locations for WRAM are used for indirect HDMA source data to PPU registers which causes graphics to mess up when the save state is loaded. I'm sure this isn't the only game which does this kind of DMA so hopefully others are working now, too. The fix blocks the PARD snoop when there is a write.

sd2snes_ctx_blockpardonwrite.zip

FoxLisk commented 1 year ago

@redacted173 heyyy it seems to work! I don't have time to test it super thoroughly now, but the very simple stuff that was crashing before no longer does. Thanks so much!

Will this make it into the official sd2snes release at some point?

mrehkopf commented 1 year ago

Within a few days; I'm working on the last issue for the v1.11.1 milestone :)

FoxLisk commented 1 year ago

ooh! awesome, that makes it much easier to share with others who run into this :D

Thanks again!