I'm currently working on trying to track down a bug that occurs on at least BizHawk 1.4.1 with the SNES core for the game Dragon View. About halfway through the game it loads a certain dragon sprite with some wavy effects. This crashes on all versions of snes9x that I've tried as well as BizHawk. It works on zsnes, oddly enough.
I've made a post about it in
the thread, but I think it has to do with how a STY is interpreted.
In the game:
-$7EA98B is not set in any observable way, and is initially 0. $7E00E7 is preloaded with 0x0125, but only the 0x25 is important.
-At the start of a graphics routine, the processor is set to 8-bit mode, and $7EA98B is loaded into Y as 00 00. Y is then stored to $7E00E6.
-Since the store is from Y, it overwrites $E6 and $E7 with 0s.
-The game then blindly proceeds to decrement $E6 in 16-bit mode. Since it's now 0, this underflows it and the game can crash or warp to the credits depending on prior inputs and some other factors.
My main question from this is: is this the expected behavior for a STY in 8-bit mode? Does it always store 16 bits regardless of the processor mode? I don't have a way to verify what is *correct* since I don't know of an emulator that actually completes this and has a trace logger. If the STY is only intended to store one byte then the sequence makes sense, but as it is it creates a semi-infinite loop that corrupts a lot of addresses. I have the traces but no movies/save states for BizHawk. The scene works without issue* on console.
*It has been observed on console before, but we can't be sure if it's the same activity. It works 99% of the time.