Tuesday, September 5, 2017

Act transitions, part 7: putting it together

Anonymous commented on my post about the Marble Garden Zone act transition crash in standalone Sonic 3.
Though this kind of horizontal underflow is not Sonic 3 exclusive - it can be also done with Hyper Sonic in ICZ1. After glitching through Knuckles' path to his boss, nothing prevents you to trigger the transition and immediately double jump back to spawn outside of the level.

This doesn't freeze the game, but it does reset it.
Actually, the game only resets because that's the default handler for most errors in Sonic 3 & Knuckles. If you try doing it in standalone Sonic 3, you'll get a freeze as usual.

To elaborate on the glitch: if you go to the exact point where the Icecap Zone act transition occurs, get the camera just barely inside the transition area and then quickly double back, you can trigger the initial part of the transition but return to the act 1 layout before the level data finishes loading and the game switches over to act 2.


Hyper Sonic's double jump ability makes this exceedingly easy, but it can still be done otherwise. This glitch cannot be performed in Sonic and Tails' path, because a one-way barrier appears to prevent any backtracking. In Knuckles' path, the barrier only appears beyond the point where the transition takes place, in the act 2 layout.

When the act transition occurs under these circumstances, once again the camera's position is set to a negative value, causing the ring and object loading routines to go berserk and swiftly destroy the entire game. This time, however, not before treating us to some nice computer-generated art.


TASVideos forum user Chrezm recently posted about this glitch, having triggered it by zipping along the floor and then saving the game from death by entering debug mode. When he did this, he managed to spawn the Launch Base Zone act 1 boss in the Icecap Zone 2 layout, which is a pretty exciting prospect should speedrunners ever manage to abuse this to their advantage.

2 comments:

  1. Speaking of spawning the wrong objects, why does the game behave very erratically when you die near the beginning of the zone, enter debug mode while dead and then move to the end of the level? Upon exiting debug, the game can crash very easily, and sometimes it can even spawn the wrong objects.

    This is shown in Sonic8000's old Debug glitches series, starting from the 88th video ( watch?v=D1sYJCWQYEo )

    ReplyDelete
  2. It's interesting that the exception handler in the game was actually changed from Sonic 3 to Sonic 3 & Knuckles.

    S3's handler locks the game in an infinite loop, which is why it freezes. Sonic 3 & Knuckles actually has its exception handler actually throw execution into the init routines of the game, causing it to do a reset of the game, which is honestly a lot better than a freeze because an error condition would let you play the game. Since it's a soft reset, a lot of flags are still set, so you should still have things like level select/debug enabled for more fun.

    I think the reason why a freeze causes the sound to hold its note as long as it can is probably tied to this infinite loop. The m68k is not releasing any buses it is holding at that point and I suspect it's also masked all the interrupts it can so it can't even be yanked out of the loop. As a result, the co-processor on the Genesis/Mega Drive, a z80, which still has a fully functional AND RUNNING sound driver, is no longer getting resources it needs (I think. Arguably the sound driver has all music data in its own memory?) and so it's busy waiting for the m68k to basically shut up, which never happens, so the Yamaha and TI chips are left to fend for themselves without any change in signals from the z80, so they just... hold.

    ReplyDelete