Text move abuse: Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
Line 4: Line 4:
*Specific items (see steps)
*Specific items (see steps)
==Steps==
==Steps==

The following is an example to copy 0x15 (21 in decimal) to D059 (D058 in Yellow), resulting in a battle with Mew.

*On the current map, redirect wMapTextPtr (item 40 quantity and item 41) (D36C-D in Red/Blue and D36B-C in Yellow) to another location. For this example, we will be using (any item) x29 and TM11 (x any) (1ED3 (1DD3 in Yellow); the first inventory item) and Route 1.
*On the current map, redirect wMapTextPtr (item 40 quantity and item 41) (D36C-D in Red/Blue and D36B-C in Yellow) to another location. For this example, we will be using (any item) x29 and TM11 (x any) (1ED3 (1DD3 in Yellow); the first inventory item) and Route 1.
*At the new location, NPC 1 will be the first two-byte pointer (i.e. the item and quantity at 1ED3 (1DD3 in Yellow)), NPC 2 will be the second two-byte pointer (i.e. the item and quantity at 1FD3 (1ED3 in Yellow)), and so on. In this case, the NPC who gives the Potion is NPC 1; so 1ED3/1DD3 (item 1 and item 1 quantity) will represent the text <u>source</u> of NPC 1. For this example, have item 1 as Thunder Stone x 211 (22 D3 (Red/Blue) or 21 D3 (Yellow).
*At the new location, NPC 1 will be the first two-byte pointer (i.e. the item and quantity at 1ED3 (1DD3 in Yellow)), NPC 2 will be the second two-byte pointer (i.e. the item and quantity at 1FD3 (1ED3 in Yellow)), and so on. In this case, the NPC who gives the Potion is NPC 1; so 1ED3/1DD3 (item 1 and item 1 quantity) will represent the text <u>source</u> of NPC 1. For this example, have item 1 as Thunder Stone x 211 (22 D3 (Red/Blue) or 21 D3 (Yellow).
*At the text source for the given NPC; represent text which uses text command 03. (Great Ball at item 3 in this case). Follow this the desired destination pointer with 00, desired bytes (other than text control characters) and 57. The bytes repesenting the text will be moved to the destination pointer. As an example, 03 59 (58 in Yellow) D0 00 15 57 (Great Ball x88, TM08 x 0 and BoulderBadge x 87) will move a single 15 to D059 (D058 in Red/Blue) (instant encounter with a Pokémon); resulting in a battle with Mew. Add more data before the 57 to copy more bytes (e.g. 03 59 (58 in Yellow) D0 00 15 16 57 writes 15 to D059/8 and 16 to D05A/9. Text [[control character#in-text|control characters (in-text)]] cannot be copied, but for control characters that print text, the derived text will (e.g. control character 4A will copy E1 (Pk) and E2 (Mn). 03 59 (58 in Yellow) D0 00 15 57 is Great Ball x 89 (88 in Yellow), TM08 x 0, BoulderBadge x 87.
*At the text source for the given NPC; represent text which uses text command 03. (Great Ball at item 3 in this case). Follow this the desired destination pointer with 00, desired bytes (other than text control characters) and 57. The bytes repesenting the text will be moved to the destination pointer. As an example, 03 59 (58 in Yellow) D0 00 15 57 (Great Ball x88, TM08 x 0 and BoulderBadge x 87) will move a single 15 to D059 (D058 in Red/Blue) (instant encounter with a Pokémon); resulting in a battle with Mew. Add more data before the 57 to copy more bytes (e.g. 03 59 (58 in Yellow) D0 00 15 16 57 writes 15 to D059/8 and 16 to D05A/9. Text [[control character#in-text|control characters (in-text)]] cannot be copied, but for control characters that print text, the derived text will (e.g. control character 4A will copy E1 (Pk) and E2 (Mn). 03 59 (58 in Yellow) D0 00 15 57 is Great Ball x 89 (88 in Yellow), TM08 x 0, BoulderBadge x 87.
**Since in this example BoulderBadge x 87 is difficult to obtain (BoulderBadge is a key item and cannot be tossed), it can be replaced with Master Ball x 33 [33 is 15 in hexadecimal] followed by glitch item [[2F (disambiguation)|2F]] (the hex:57), and the x89/x88 can be replaced with x88/x87.
**Since in this example BoulderBadge x 87 is difficult to obtain (BoulderBadge is a key item and cannot be tossed), it can be replaced with Master Ball x 33 [33 is 15 in hexadecimal] followed by glitch item [[2F (disambiguation)|2F]] (the hex:57), and the x89/x88 can be replaced with x88/x87.

==See also==
==See also==
*[[Connection copier]]
*[[Connection copier]]

Revision as of 18:16, 28 September 2022

Text move abuse is an arbitrary RAM modification glitch in Generation I. It exploits text command 03 to print text to any specified destination, serving as a memory copier (similar to connection copier).

Requirements

Steps

The following is an example to copy 0x15 (21 in decimal) to D059 (D058 in Yellow), resulting in a battle with Mew.

  • On the current map, redirect wMapTextPtr (item 40 quantity and item 41) (D36C-D in Red/Blue and D36B-C in Yellow) to another location. For this example, we will be using (any item) x29 and TM11 (x any) (1ED3 (1DD3 in Yellow); the first inventory item) and Route 1.
  • At the new location, NPC 1 will be the first two-byte pointer (i.e. the item and quantity at 1ED3 (1DD3 in Yellow)), NPC 2 will be the second two-byte pointer (i.e. the item and quantity at 1FD3 (1ED3 in Yellow)), and so on. In this case, the NPC who gives the Potion is NPC 1; so 1ED3/1DD3 (item 1 and item 1 quantity) will represent the text source of NPC 1. For this example, have item 1 as Thunder Stone x 211 (22 D3 (Red/Blue) or 21 D3 (Yellow).
  • At the text source for the given NPC; represent text which uses text command 03. (Great Ball at item 3 in this case). Follow this the desired destination pointer with 00, desired bytes (other than text control characters) and 57. The bytes repesenting the text will be moved to the destination pointer. As an example, 03 59 (58 in Yellow) D0 00 15 57 (Great Ball x88, TM08 x 0 and BoulderBadge x 87) will move a single 15 to D059 (D058 in Red/Blue) (instant encounter with a Pokémon); resulting in a battle with Mew. Add more data before the 57 to copy more bytes (e.g. 03 59 (58 in Yellow) D0 00 15 16 57 writes 15 to D059/8 and 16 to D05A/9. Text control characters (in-text) cannot be copied, but for control characters that print text, the derived text will (e.g. control character 4A will copy E1 (Pk) and E2 (Mn). 03 59 (58 in Yellow) D0 00 15 57 is Great Ball x 89 (88 in Yellow), TM08 x 0, BoulderBadge x 87.
    • Since in this example BoulderBadge x 87 is difficult to obtain (BoulderBadge is a key item and cannot be tossed), it can be replaced with Master Ball x 33 [33 is 15 in hexadecimal] followed by glitch item 2F (the hex:57), and the x89/x88 can be replaced with x88/x87.

See also

Credits

  • Text move abuse was mentioned by luckytyphlosion in this TASVideos submission. The instructions in this article on how to use it were provided by Evie.
This article or section is a stub. You can help Glitch City Wiki by expanding it.