Jump to content

The Hooked Dragonite: Difference between revisions

m
Changed the capitalization from "Brock Through Walls" to "Brock through walls"
>Bbbbbbbbba
(Now for something silly and lighthearted... or so I thought. Turns out that there are still many things we don't fully understand about the "Pewter guys", and the related pages also could be organized better (I actually forgot that Walk through walls glitch (museum guy method) is a page...).)
 
m (Changed the capitalization from "Brock Through Walls" to "Brock through walls")
Line 19:
 
==Explanation==
The above procedure works similar to [[Pewter Gym skip glitch#Safari_Zone_method|the Safari Zone method of the Pewter Gym skip glitch]] followed by [[Brock Throughthrough Wallswalls]]:
* Running out of Safari Zone steps while being guided breaks the [[meta-map script]] of Pewter City, causing a series of race conditions.
* Talking to the Pewter Museum guide NPC from an unexpected coordinate causes the game to look for a nonexistent entry in a lookup table.
Line 39:
 
===Path buffer overflow===
When the player talks to the NPC without being in one of the four tiles next to his normal position, similar to [[Brock Throughthrough Wallswalls]], the game looks for the player's coordinates in a lookup table that does not contain them, and tries to find them beyond the lookup table.
 
To encounter the hooked Dragonite, the player needs to talk to the NPC at the coordinates (0x1A, 0x0C). The byte sequence "0x1A 0x0C" happens to exist in the ROM at 0D:608A (which is the same bank as the lookup table), and it is followed by a pointer to $73B4. Therefore the game will try to copy a 0xFF-terminated movement path from 0D:73B4 to $CCE9<ref>Player's movement paths are stored in the memory in the reverse order, and $CCE9 is just beyond end of the player's "main path" (which is stored as an [https://github.com/pret/pokered/blob/725b86ebbec23bd1f53fd60bf0201c904fee951d/engine/overworld/npc_movement.asm#L192 RLE list], and [https://github.com/pret/pokered/blob/6ba3765c5932996f5da6417ae703794ff10bb1cb/engine/overworld/pewter_guys.asm#L4 the last instance of D_UP is actually overwritten]). Normally the game will first copy the "main path", then put the path found in [https://github.com/pret/pokered/blob/6ba3765c5932996f5da6417ae703794ff10bb1cb/engine/overworld/pewter_guys.asm#L55 the lookup table] thereafter, so that it is executed first, bringing the player to the same position, from which the "main path" can always be executed in the same way.</ref>, but the first 0xFF byte in the "path" is 898 bytes away. Therefore, the game ends up overwriting all the WRAM from $CCE9 to $D06B.
Line 58:
*[[The Hooked MissingNo.]]
*[[Pewter Gym skip glitch]]
*[[Brock Throughthrough Wallswalls]]
 
==References==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.