(G/S/C) Use items stored in the PC infinitely, anywhere
Posted by: Háčky
Date: 2013-08-01 10:45:02
1. Deposit all of your balls into the PC, so that the Balls pocket is empty.
2. Collect enough key items that your Key Items pocket is full. If you try to take another key item from a Pokémon, it should say Item storage space full. The pocket holds 25 items, and in it youll need to have two of a key item with an index number greater than 100, and two of a key item with an index less than 100. For illustration, Ill use two Machine Parts and two SecretPotions.
3. Move the two Machine Parts to the bottom two slots in the list, then swap them. The second item and the Cancel button will be replaced by a Blk Apricorn and Iron. (The Iron will be something else if you use a different item with index > 100. I like the idea that the remnant of a Machine Part is Iron, though. :P )
4. Swap the two SecretPotions into the bottom two slots in the list (including the slot that used to be the Cancel button), then swap them. The second SecretPotion should disappear.
5. Switch to the Balls pocket and scroll down.
Key items > 100: Card Key, Machine Part, Lost Item, Basement Key, Pass, SquirtBottle, Rainbow Wing (Crystal only: GS Ball, Blue Card, Egg Ticket)
Key items < 100: Bicycle, Coin Case, Itemfinder, Old Rod, Good Rod, Super Rod, Red Scale, SecretPotion, S.S. Ticket, Mystery Egg, Silver Wing (Crystal only: Clear Bell)
The last two item pockets in RAM are the Key Items and Balls pockets, at D5E1D5FB and D5FCD615 in Gold/Silver. In the first swap, the pertinent memory will look like this, if you chose Machine Part:
D5E1: $19 25 key items
(the SecretPotions are up here somewhere)
D5F9: $80 Machine Part
D5FA: $80 Machine Part $1C Iron (99)
D5FB: $FF Cancel $63 Blk Apricorn (0)
D5FC: $00 0 balls
D5FD: $FF Cancel
In the second swap:
D5E1: $19 25 key items $18 24 key items
(the Iron and Blk Apricorn are up here somewhere)
D5F9: $80 Machine Part
D5FA: $43 SecretPotion
D5FB: $43 SecretPotion $43 (hidden)
D5FC: $00 0 balls $FF 255 balls
D5FD: $FF Cancel
The game tries to merge what it sees as a stack of 67 SecretPotions and a stack of 0 SecretPotions into a single stack of 67 SecretPotions, which decrements the Key Items count (hiding the second SecretPotion, because the Cancel button is supposed to be where the first SecretPotion is now) and shifts the rest of the list back one byte until an $FF is found, which is actually the Cancel button for the Balls pocket. Now the Balls pocket is thought to have 255 items in it, which gives it access to 485 bytes of memory past where the pocket is supposed to end. The first 12 items are the Cancel buttons which fill the empty spaces in your Balls pocket; as long as a Cancel button appears on the screen, any item below it will be invisible, but once you scroll far enough that the Cancel button is off-screen, the items will appear. Items 1463 will be the items stored in your PC. I dont know what all lies beyond item 63, but event flags start at item 222 (D7B7). The quantity of item 13 is the number of items in the PC; if you take an item with quantity 255 somewhere in the list (you should be able to find one from an event flag) and swap it into the 13th slot (making sure that the item in the 13th slot isnt the same item), you can corrupt the PC items list in the same way, which opens up access to another 26 bytes: the list ends with the quantity of the 255th item at D7FC for the Balls pocket, and D816 for the PC.
Since all of your PC items are now accessible from the Balls pocket, you can use them anywhere you want without having to withdraw them. You can also use these items as many times as you want because, as long as theyre not any kind of Poké Ball, the quantity is never depleted. When an item is used up, and the game tries to decrement the items quantity, it only looks in the pocket that the item is supposed to be in; if the item is in the wrong pocket, the game wont be able to find it and the quantity will stay the same. This is the same reason that the duplicate key item glitch allows you to use an infinite number of a regular item from the Key Items pocket. (With either glitch, if an item is in both the pocket its supposed to be and another pocket, using the item from either pocket will deplete the one thats in the correct pockete.g., throwing a Master Ball from the Key Items pocket will use up the Master Ball in the Balls pocket if there is one; using a Rare Candy stored in your PC through the Balls pocket will use up a Rare Candy in your Items pocket if you have one there.)
In Crystal, this glitch cant be used to its full potential because the item menu will freeze when it tries to display the item ? (index $00). Since there are lots of $00 bytes in the space after the PC item data, this makes it impossible to use this glitch to mess with event flags, which is disappointing, because Id hoped to use it to enable the GS Ball event. With special preparation, though, it can still be used to access the PC items. This should be a safe method in Crystal:
1. Fill the 50 item slots in your PC. (Im not 100% sure if this is a necessary precaution, since my PC was already full when I tried it, but I think it is.)
2. Fill the 12 slots of the Balls pocket, which can be done by buying multiple stacks of 99 Poké Balls, or by obtaining every type of ball in the game, including the Park Ball. Put a stack of exactly 63 Poké Balls in the first slot. (The type of ball doesnt technically matter, but this stack will be deleted.)
3. Collect enough key items that your Key Items pocket is full. Youll need to have three of a key item with an index number greater than 100, and three of a key item with an index less than 88 (use the same list as above; there are no key items between 88 and 100). Again, Ill use Machine Part and SecretPotion.
4. Move the two Machine Parts to the bottom two slots in the list, then swap them. The second item and the Cancel button will be replaced by a Blk Apricorn and Iron.
5. Swap the two SecretPotions into the bottom two slots in the list (including the slot that used to be the Cancel button), then swap them. The second SecretPotion should disappear, and the contents of the Balls pocket will shift by one byte. That pocket will now appear to have 6 items (because the Poké Ball at the top had index $05, and theres an item where the Cancel button should be). The specific items correspond to the quantities of the first 6 items that were there before; the first item should be Ether ($3F = decimal 63).
6. Take a key item from a Pokémon. Your Key Items pocket will be full again, and the Cancel button in the Key Items pocket will be restored in its proper position.
7. Repeat steps 4 and 5. This will shift the contents of the Balls pocket by one more byte. The pocket will now have 63 items: items 111 are the balls that were in the pocket at the start, items 1213 are Cancel buttons, and items 1463 are the items in your PC.
If you havent ever filled the Balls pocket, the last byte of the pocket (D8F0) is set to $00. Since this value becomes the 13th item when the pocket is expanded, this would normally cause a freeze if you try to scroll past it to reach the PC items. But when the pocket is filled, that byte is changed to $FF to terminate the list, and it retains that value even if you later remove items from the pocket. Im not sure, but I believe this also happens for the PCif youve never filled it, the unused bytes will be $00, but after it has been filled once, any unused item slots will be $FF. If so, this glitch would still work even if the PC hasnt been filled, but the game would freeze if you tried to scroll down past the Cancel button at the end of the PC items in the Balls pocket.