xyproto / zsnes

A maintained fork of ZSNES, a Super Nintendo emulator. The original project needs patches to build and is not maintained anymore: https://sourceforge.net/projects/zsnes/
https://zsnes.com
GNU General Public License v2.0
131 stars 16 forks source link

[Testing needed] Fix issues with games that store to 420C twice. #22

Closed TrashRaccoonSnuffy closed 1 year ago

TrashRaccoonSnuffy commented 1 year ago

Solves #18 - Weird behaviour with multiple 420C writes not emulated properly. Fixes Yoshi's Island, Makes Star Fox and Star Fox 2 start, but they will freeze during the title screen unless per2exec is set to 50 in zsnesl.cfg.

Needs testing to make sure it doesn't break other games, but most games I've tested don't rely on this at all, only writing to 420C once on V-Blank. This only affected games that used IRQ to shrink down the screen resolution and needed to start HDMA processing on a scanline other than 0, so mostly Super FX games.

TrashRaccoonSnuffy commented 1 year ago

Confirmed that this doesn't affect other games. I have no idea why that check was there either way since writing 00 once to HDMA would invalidate all next writes when that's not supposed to be the exact behaviour, 420C should be always writable except in the initialization HIRQ and other conditions which are implemented properly. This should be good to merge hopefully. If any HDMA issues arise in any game or there's compatibility then I'll have to debug these.

TrashRaccoonSnuffy commented 1 year ago

Merging this, hopefully should be good enough. This modifcation shouldn't be that intrusive and at most this error only could cause graphical issues at it's worst. If any issues arise from this, I'll look into it.

xyproto commented 1 year ago

Good stuff!