Jump to content

AreaDex/RB:231: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 35:
==How the item swap effects work==
Items beyond slot 20 represent unrelated memory addresses, which are really just extrapolated beyond the end of the list. Setting 0xD35E to 0xE7 with the TM31 x1 in item 33 sets W_CURMAP (D35E) to this glitch map, but this alone only changes the map number partially loading data such as the Town Map name and map bank. Therefore, the TM41 x 79 in item 41 sets W_MAPSCRIPTPTR (D36E-D36F) to pointer 41 12 (1241). This pointer was chosen because at 1241 is the routine LoadMapData, which is documented [https://github.com/pret/pokered/blob/bbb0e7e82deb6741f75a12b48f81076d92f5d9dc/home/overworld.asm here] in the Pokémon Red disassembly project.
 
When the new map script for this glitch map (EAF1 (Echo RAM for CAF1)) runs, typically the player is fortunate not to have the game freeze up to EC2B (Echo RAM for CC2B) where having the cursor on the 202th Pokémon beforehand writes 0xC9 to CC2B (EC2B). This is relevant because 0xC9 is the ret opcode; since the player hasn't adjusted the stack this will terminate the code.
==External links==
*[https://archives.glitchcity.info/forums/board-115/thread-7559/page-1.html#msg204675 Post on Glitch City Laboratories Forums].
Cookies help us deliver our services. By using our services, you agree to our use of cookies.