Surprise! As stated in the
previous submission text there possibly exist some improvements such as
Finding another glitch (infinite tongue glitch?). By using exactly that glitch, I was able to lead the code to the controller registers and then reach ACE and the credits.
Game objectives
- Emulator used: lsnes rr2-ß21
- Arbitrary Code Execution
- Aims for fastest time
- Abuses programming errors in the game
- Achieves credits early
In Yoshi's Island, the middle ring is a really nice feature in the game. If you activated it, the game gives you the ability to restart from there in case you die before reaching the goal. When activating, it also gives you up to 10 additional stars which can be a big help when playing casually. And as if that isn't enough, it also turns all the sprites on the screen into stars!
(Note: Since this game uses the Super FX 2 chip for a bunch of stuff, I couldn't really debug what exactly happens in the code. This is what I think happens:)
When spitting out an enemy, it first goes into a semi-active state with Yoshi's mouth opened but the sprite didn't appear yet. In theory, the sprite is still in Yoshi's mouth, but if you happen to activate a middle ring so that all sprites turn to stars, that semi-active sprite also turns into a star.
The game deals with this by just sticking out Yoshi's tongue instead of spitting out a sprite, but the flag that's Yoshi's mouth is full wasn't cleared, so he now has nothing in his mouth. Now when pressing Y Yoshi just sticks out his tongue, but is unable to actually get something on it.
Infinite Tongue Glitch
Usually, when sticking out Yoshi's tongue and getting hit while it is out, the values (state, position) for the tongue are reset so that it is back in Yoshi's mouth. But apparently the state for the tongue isn't reset when Yoshi has something in his mouth. However, the position is reset!
When in this glitched state as explained above and when getting hit while the tongue is coming back to Yoshi, the position is reset, so it is back at Yoshi. Unfortunate for the game is that it first decreases the position and then checks if it already reached Yoshi.
The tongue basically missed Yoshi and is now flying around and increasing in length. The fact that the tongue is getting longer and longer means it takes up more and more space in the OAM-like memory that saves all the data about spawned sprites. First it takes up all the space that could have been used by other sprites (which is the reason all sprites disappear), then it keeps going on until it corrupts important parts of the memory that the game uses for indexing its jumps in the code.
The tongue is growing tile by tile so it only grows 8 bytes per frame. When getting back the baby, the bubble "explodes" and displaying that means writing a bunch of tiles at once to memory. Even though these tiles are quickly overwritten by the tongue (as the bubble quickly disappears) they can be used to corrupt more bytes at once at the critical memory part.
The code will eventually reach the controller registers and to get to the credits from there, I just used the same steps as in the
previous submission.
Route
I collect 2 coins in the intro to warp glitch to 1-2, which is the quickest way to a middle ring. There I glitch Yoshi into the strange state and try to get hit as fast as possible. It turned out that going back left through the gate was faster than waiting for another shy guy to come out of the pipe to the right (since the first one turns into a star). It was also important to keep your speed down a bit to avoid making the red shy guy turn into a star, too.
Thanks to
- basically the YI community again for glitch hunting this game
- flutter A.I for already being in this game so I don't have to arbitrarily inject it
Suggested Screenshots
Nach: Excellent movie, terrific feedback, accepting as improvement to existing run.
Encoders beware, this run contains a lot of interesting things that occur for exactly a single frame.