This is quite mind-boggling, but as it involves 65816 machine code I thought it might be of interest.
Glitching is the art of exploiting bugs in game programs to cause specific unarchitected actions - in this case, to skip direct to the end game credits after just under two minutes of extraordinary play. In this example, specific sprites have to be caused to spawn and despawn at very specific screen coordinates, such that the low bytes of a data table in RAM contain a short 65816 program.
To get this code to run, the game is manoeuvred into an unanticipated configuration, and it jumps into the void. The databus capacitance is now abused, such that fetches from unpopulated memory will read a series of specific useful values according to what was previously on the bus (data, stack values) and lead to jumping to the code placed in the data table. The code tweaks a vital game state variable, and must then return - but there are extra values on the stack - so it jumps to the tail end of a game loop which conveniently removes two values before (eventually) returning.
Here's the explanation:
and
here's the demonstration, in live play, without any machine assistance (a lot of pixel-perfect actions required)
(via
https://news.ycombinator.com/item?id=9792649)