Brock Through Walls
Posted by: Sanqui
Date: 2014-08-19 04:04:56
You can see it in action in this WR run: https://www.youtube.com/watch?v=LqbsGKH5mQE
How this works is as follows. When the guy's script activates, the game searches through a table of coordinates and pointers to figure out your initial movement. However, the developers didn't account for you standing to the right of him, so there's no path defined. Usually, if you try to speak to him without any preparation, the game will softlock, since it can't find your coordinates anywhere in memory. However, with a little setup, you can prop the game to find your position and read an invalid path.
The method used in this run requires having a Lv. 8 Bulbasaur with 16 Tackle PP and 36 Growl PP, having the moves in the 2nd and 3rd slot. You also need to look at its stats screen. This results in the game finding the player coordinates in memory as the PP (the coords need to be at xxx2, xxx6, xxxA, or xxxE), and reading the next two bytes (4rd PP and level) as a pointer to the path. $800 happens to be an useful glitch path, which overflows and overwrites the "disallowed buttons" variable, letting you walk through walls.
Cheers to 0xwas for demonstrating this on the Japanese version (where the setup is more trivial), MrWint for explaining how the glitch works, myself for figuring out the details again (Kappa), Dabomstew for figuring out the Bulbasaur setup, and Shenanagans other routing and doing the run. Great job all around!