Guides:Wrong Pocket TM ACE setup (JP): Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
Line 13: Line 13:
By glitching an item into a pocket that it's not supposed to be, we can use the item to achieve various glitchy effects. In particular, using TMs from the wrong pocket will confuse the game, causing it to treat the TM as a "normal" item and execute invalid item effects, some of which can lead to arbitrary code execution.
By glitching an item into a pocket that it's not supposed to be, we can use the item to achieve various glitchy effects. In particular, using TMs from the wrong pocket will confuse the game, causing it to treat the TM as a "normal" item and execute invalid item effects, some of which can lead to arbitrary code execution.


TM17, in particular, executes code starting from $FA47, a duplicate of address $DA47. This region corresponds to party pokémon #2's data. In this guide, we'll go through the process of obtaining TM15 outside the TM/HM pocket, along with how to obtain a pokémon that can redirect TM15's effect to the start of box names ($D8AD).
TM17, in particular, executes code starting from $FA47, a duplicate of address $DA47. This region corresponds to party pokémon #2's data. In this guide, we'll go through the process of obtaining TM17 outside the TM/HM pocket, along with how to obtain pokémon that can redirect TM15's effect to the start of box names ($D8D2).


In practice, the initial ACE setup will be created using the following general process:
In practice, the initial ACE setup will be created using the following general process:
Line 26: Line 26:
The method described on this page requires fairly heavy abuse of glitches that will produce a small amount of side effects. All these side effects can be fixed with later applications of ACE and are never permanently harmful for the game in any way:
The method described on this page requires fairly heavy abuse of glitches that will produce a small amount of side effects. All these side effects can be fixed with later applications of ACE and are never permanently harmful for the game in any way:


-
- Obtaining duplicate key items requires obtaining a glitch pokémon that cannot be manually released.
* Obtaining duplicate key items requires obtaining a glitch pokémon that cannot be manually released.
- Duplicate key item swap glitch removes the CANCEL button from the key item pocket.
* Duplicate key item swap glitch removes the CANCEL button from the key item pocket.


Later parts of the guide will offer methods to fix these side effects.
Later parts of the guide will offer methods to fix these side effects.
Line 35: Line 36:
'''When playing on original cartridge or on emulator, it is absolutely required to have used the Clear Save Data feature (press SELECT + UP + B on the title screen) at least once since owning the game.'''
'''When playing on original cartridge or on emulator, it is absolutely required to have used the Clear Save Data feature (press SELECT + UP + B on the title screen) at least once since owning the game.'''


* Catch a Drowzee. Can be found on route 34, 50% encounter odds at any time.
* Catch the following pokémon:
*# Wooper or Quagsire (Quagsire is preferred, but requires the use of Surf)
*# Unown (Once obtained, this Unown must never obtain experience in battle)
* Have the following items:
*# a Berry
* The guide requires having reached Goldenrod City, to access the Day Care and the GoldenRod Dept. Store.
* The guide requires having reached Goldenrod City, to access the Day Care and the GoldenRod Dept. Store.
* Some required items need to be bought, this will take at least 6000¥.
* Due to technical reasons, please ensure that the following is true for your trainer ID:
* Due to technical reasons, please ensure that the following is true for your trainer ID:
** Your trainer ID must not be equal or higher than 65280.
** Your trainer ID must not be equal or higher than 65280.
Line 56: Line 54:
* '''This method is only possible if you've never had a full party at any point since starting the game.''' Follow step 1b if you don't fulfill this requirement.
* '''This method is only possible if you've never had a full party at any point since starting the game.''' Follow step 1b if you don't fulfill this requirement.
* Catch an Abra (10% spawn rate on route 34 all day). Save and reset to save on poké balls used.
* Catch an Abra (10% spawn rate on route 34 all day). Save and reset to save on poké balls used.
* In-game time needs to be tuesday/thursday/saturday to be able to participate with the bug catching contest. Saturday is preferred for the setup, since this will allow you to also obtain a required item from an NPC that only appears on saturday.
* In-game time needs to be tuesday/thursday/saturday to be able to participate with the bug catching contest.


==Obtaining the bad clone==
==Obtaining the bad clone==
Line 66: Line 64:
# TELEPORT to Goldenrod city. Deposit all pokémon except one. Return to the National Park.
# TELEPORT to Goldenrod city. Deposit all pokémon except one. Return to the National Park.
# You'll be asked if you want to quit the contest. This time, select "Yes".
# You'll be asked if you want to quit the contest. This time, select "Yes".
# After the results of the contest is announced, a pokémon will be added to your party that looks similar to the pokémon you previously had in the second party slot. '''This pokémon is the bad clone you need.'''
# After the results of the contest is announced, a lvl 0 pokémon will be added to your party that looks similar to the pokémon you previously had in the second party slot. This pokémon is the bad clone you need.
# '''If you ever deposit this pokémon to the PC, make sure you only withdraw this pokémon to your party using "Move pokémon w/o mail" to keep it at lvl 0.'''


Now that you have the bad clone, continue to step 3.
Now that you have the bad clone, continue to step 3.
Line 114: Line 113:
# Using the [[Pokémon cloning (Generation II)|cloning glitch]], get at least six copies of Machop (it is recommended to keep some spares just to be safe). We'll be using these Machop in the remainder of the setup.
# Using the [[Pokémon cloning (Generation II)|cloning glitch]], get at least six copies of Machop (it is recommended to keep some spares just to be safe). We'll be using these Machop in the remainder of the setup.


==Getting everything ready for the setup==
==Requirements==


# If you haven't done so yet, make sure to catch a Drowzee. Can be found on route 34, 50% encounter odds at any time.
Have the following items in the ball pocket:
# Catch any additional pokémon and nickname it "ててあリ".
* Slot 2: Poké Ball x32/x2<sup>1</sup>
# Go to the Goldenrod Dept. Store and buy one TM33 (FIRE PUNCH) and one TM41 (THUNDER PUNCH). '''TM33 (FIRE PUNCH) can be skipped if you are using the Machop method as an alternative'''
* Slot 1: Great Ball x2
# Teach Drowzee TM33 (FIRE PUNCH). Ensure that Fire Punch is in the 2nd move slot. '''This step can be skipped if you are using the Machop method as an alternative'''
* Slot 3 and beyond: empty
# Using [[Pokémon cloning (Generation II)|Pokémon cloning]], make at least the following clones:
## Clone Drowzee twice, for a total of three Drowzee.
## Clone the Bad Clone at least once, for a total of two Bad Clones. '''Ensure that the Bad Clone and all its clones are at lvl 0. You can keep it at lvl 0 by only withdrawing it using "Move pkmn w/o mail".'''


==Collecting the items and the party needed==
<sup>1</sup> If you previously caught Wooper, ensure you have 32 poké balls. Otherwise, have 2 poké balls.

Have the following items in the ball pocket:
* Slot 1: Poké Ball x1
* Slot 2 and beyond: empty


(Both can be bought in the Goldenrod Dept. Store if needed, make sure to store or sell everything else you have in the Ball pocket.)
(Both can be bought in the Goldenrod Dept. Store if needed, make sure to store or sell everything else you have in the Ball pocket.)
Line 134: Line 140:
|-
|-
|
|
1. Bad clone
1. Unwanted pokémon
2. Drowzee with Fire Punch in second move slot
2. Drowzee with Fire Punch in second move slot
3. Drowzee with Fire Punch in second move slot
3. Drowzee with Fire Punch in second move slot
4. Unwanted pokémon
4. Unwanted pokémon
5. Unwanted pokémon
5. Unwanted pokémon
6. Unwanted pokémon
6. Bad clone
||
||
1. Bad clone
1. Traded Machop
2. Traded Machop with Fire Punch in second move slot
2. Traded Machop with Fire Punch in second move slot
3. Traded Machop with Fire Punch in second move slot
3. Traded Machop with Fire Punch in second move slot
4. Traded Machop
4. Traded Machop
5. Traded Machop
5. Traded Machop
6. Traded Machop
6. Bad clone
|}
|}

(you can buy the TM for Fire Punch at the Goldenrod Dept. Store. To save on time and money, catch one Drowzee and teach it Fire Punch. Then clone it using [[Pokémon cloning (Generation II)|cloning glitch]])


Have the following pokémon in the box:
Have the following pokémon in the box:
Line 185: Line 189:
# Go to the bottom of the key item list. The bottom of the list should consist of three separate bicycles.
# Go to the bottom of the key item list. The bottom of the list should consist of three separate bicycles.
# Press select on the '''second''' bicycle and swap it with the '''third''' bicycle. The number of bicycles will decrease, the "Cancel" button will change to a "Teru-Sama" item.
# Press select on the '''second''' bicycle and swap it with the '''third''' bicycle. The number of bicycles will decrease, the "Cancel" button will change to a "Teru-Sama" item.
# Go to the ball pocket and toss 47 of the '''second''' item. The final quantity of the second item is a number ending in "8". '''If you previously had 32 poké balls in the first slot, the first item will have morphed into rare candies. Use these to level up Wooper so that it evolves into Quagsire.'''
# Go to the ball pocket and toss 47 of the first item. The final quantity of the first item is a number ending in "8".
# Return to the Key Item pocket, press select on the '''upper''' bicycle and swap it with the bottommost item. This leaves you with a single bicycle, will turn the "Teru-Sama" into a "Paralyz Heal" and change the first item of the Ball pocket into a TM17. '''It is now safe to save.'''
# Still inside the ball pocket, use SELECT to '''swap the first and second item slots.'''
# Return to the Key Item pocket, press select on the '''upper''' bicycle and swap it with the bottommost item. This leaves you with a single bicycle, will turn the "Teru-Sama" into a "Paralyz Heal" and change the second item of the Ball pocket into a TM17. '''It is now safe to save.'''


Do not worry about the glitch pokémon that's still in your party or the key item list that lacks a cancel button, we'll fix both in the last step of the guide.
Do not worry about the glitch pokémon that's still in your party or the key item list that lacks a cancel button, we'll fix both in the last step of the guide.
Line 200: Line 203:
==Preparing the party==
==Preparing the party==


* Arrange your party like this:
* Obtain the following TMs:
** TM27 RETURN: obtain on sundays from the female clerk at Goldenrod Dept. Store by showing a pokémon with high friendship.
* Teach Quagsire TM27 and have it hold a Berry. Arrange your party like this:
*# Any
*# Unown
*# Quagsire holding a berry and knowing Return as its first move
*# Any
*# Any
*# Bad Clone (Needs to be lvl 0)
*# Drowzee holding a TM41
*# Pokémon nicknamed "ててあリ"
*# Any
*# Any
*# Glitch pokémon used in part 2<sup>1</sup>
*# Glitch pokémon used in part 2<sup>1</sup>


<sup>1</sup> This pokémon is not needed for the setup, but is placed here in order to remove it from the party using the RAM writer. If you do not wish to remove it, replace with an unwanted pokémon.
<sup>1</sup> This pokémon is not needed for the setup, but is placed here in order to remove it from the party at a later point using the RAM writer. If you do not wish to remove it, replace with an unwanted pokémon.


'''In order to safely use TM17, it's required to put Unown in the second party slot and Quagsire in the third party slot.'''
'''In order to safely use TM17, it's required to put a lvl 0 Bad Clone in the second party slot, Drowzee holding TM41 in the third party slot and a pokémon nicknamed "ててあリ".'''


==Testing the setup==
==Testing the setup==


Now that you have set up a party with Quagsire, we'll rename box names to form a specific bit of code which we'll execute when we use TM17.
Now that you have set up a party for TM17 ACE, we'll rename box names to form a specific bit of code which we'll execute when we use TM17.


* Rename box code 1:
* Rename box code 1:
Line 223: Line 224:
[[File:Box Japanese GS Test.png]]
[[File:Box Japanese GS Test.png]]
|}
|}
* Set box 1 as the active box.
* Use TM17 once. If executed successfully, it will add 255 copies of TM27 to the TM/HM pocket.
* Use TM17 once. If executed successfully, it will add 255 copies of TM27 to the TM/HM pocket.


If the code crashes, check the following:
If the code crashes, check the following:
* Is Unown in the second party slot, is Quagsire in the third party slot?
* Is the Bad Clone in the second party slot, is Drowzee in the third party slot, is the nicknamed Pokémon in the fourth party slot?
* Is the Bad Clone lvl 0?
* Is Quagsire holding a berry and does it have return in the first move slot?
* Is Drowzee holding TM41?
* Was the code correctly entered (make sure to pay attention to the differences between large/small versions of characters)?
* Is the nickname "ててあリ" correct?
* Was the code correctly entered?


=What to do with a TM17 ACE setup=
=What to do with a TM17 ACE setup=
Line 239: Line 241:
=Appendix: in-depth explanation of the setup=
=Appendix: in-depth explanation of the setup=


===Effect of Unown===
===Effect of the Bad Clone===


Using TM17 will trigger ACE from address $FA47 onward, an echo RAM copy of $DA47, in the middle of Unown's stat values. Lvl 5 Unown will never have stat values that can cause the game to softlock or crash, allowing execution to safely slide through this region until it encounters Quagsire's data.
Using TM17 will trigger ACE from address $FA47 onward, an echo RAM copy of $DA47, at the start of the Bad Clone's stat values. A lvl 0 Bad Clone will be guaranteed to have a value of $05 (dec b) for each of its five stats. Since register b starts with a value of $00, decrementing b five times will result in a value of $FB in register b.


===Effect of Quagsire===
===Effect of Drowzee===


Translating the species ID, held item ID and first move ID of Quagsire's data to assembly results in the following code:
Translating the species ID and held item ID of Drowzee's data to assembly results in the following code:


<pre>
<pre>
60 ld h, b ; Since b = $FB due to the Bad Clone and hl = $FA47 due to using TM17, hl is set to $FB47.
C3 AD D8 jp $D8AD ; 5 bytes before the start of wBoxNames
E9 jp hl ; Jump to $FB47, corresponding to the 2nd character of party pokémon #4's nickname.
</pre>
</pre>


This causes a redirection of execution to a region right in front of wBoxNames. This region is mostly unused and consists of $00 values, with the exception of $D8AF which describes the current active box. After safely sliding through this region, the box name code is executed.
This causes a redirection of execution to a region right in front of wBoxNames. This region is mostly unused and consists of $00 values, with the exception of $D8AF which describes the current active box. After safely sliding through this region, the box name code is executed.

===Effect of the nicknamed pokémon===

Translating the characters of the nicknamed pokémon's name results in the following:

<pre>
C3 filler
C3 B2 D8 jp wBoxNames
</pre>


===Effect of the box name===
===Effect of the box name===
Line 266: Line 278:
==Acknowledgements==
==Acknowledgements==


The setups of this page were all previously referenced in a [https://flag3833753.hatenablog.com/entry/2022/08/17/192006 blogpost written by flag3833753].
Most of the setup of this page, with the exception of the final setup with the Bad Clone, Drowzee and nicknamed pokémon, were all previously referenced in a [https://flag3833753.hatenablog.com/entry/2022/08/17/192006 blogpost written by flag3833753].


==Plain text transcripts of codes==
==Plain text transcripts of codes==