Nostalgia Ninja, on 08 November 2011 - 11:21 PM, said:
According to the VDP of the Sonic sprites when the game has crashed, the locator indicates that he is not rolling, but rather crouching still. The sprite indicators still say he's offscreen, but the limiters for the sprite stop him from falling off the stage. That, and also the game would have rather killed Sonic than throwing the ILLEGAL INSTRUCTION exception then.
My guess is that the pallettes collide in Sonic 1's underwater pointers, and therefore tries to pallete switch. and then crashes
I diagnosed that crash recently while making Sonic 1 Upside Down, because the crash would happen as soon as the signpost art would load unless I'd jump, and I documented the
fix on the wiki. The problem is much more subtle than what you're describing: the game is in the middle of decompressing the signpost art when the VBlank interrupt is raised. VBlank tries to resume Nemesis decompression, but the information necessary to do so is inconsistent at that point; the original game indicates that there's a decompression in progress that should be continued in VBlank BEFORE decompressing a part of the art, but some information is only set AFTER decompressing that part. If VBlank occurs DURING the decompression, the game crashes. This situation is easier to trigger when the water surface is higher on the screen, which was the case in my hack because the water was actually at the top rather than at the bottom.
Concerning your observations, Sonic is most likely crouching instead of rolling because he hit the right level boundary (there's a boundary not too far offscreen). However, Sonic isn't falling off; if he was, you'd see the camera move to follow him.