Main Menu
Main Page
Forums
Recent changes
Random page
Help

Databases
GlitchDex
AttackDex
ItemDex
TrainerDex
TypeDex
UnownDex
More

Major Glitches
Trainer escape glitch
Old man trick
Celebi trick
Select glitches (Japan)
SRAM glitch
CoolTrainer♀ corruption
LOL glitch
Rival LOL glitch
Super Glitch
ZZAZZ glitch
Pomeg corruption glitch (Glitzer Popping)
Tweaking
Elite Four door glitch (Japan)
Pokémon merge glitch
Pokémon cloning
Time Capsule exploit
Arbitrary code execution
Coin Case glitch
More

Other Glitch Categories
Glitches by generation
Glitches between two generations
Japan-only/language specific glitches
Music glitches
Natural glitches
Non-core series glitches
Non-Pokémon glitches
Officially acknowledged glitches
Recurring glitches
Dead glitches

References
Pokémon GameShark codes
The Big HEX List
Glitch Pokémon cries
GB programming
Curiosities
Debugging features
Easter eggs
Error traps
Glitch areas
Glitch myths
Non-glitch exploits
Placeholder texts
Pokémon glitch terminology
Unused content and prerelease information

Useful Tools
8F Helper
GBz80 to Items
Old man trick name generator
PATH (Prama's Advanced Tweaking Heaven)
Save file editors
Special stat/Pokémon converter
Trainer escape Trainer Pokémon finder

Affiliates
Legendary Star Blob 2 (Hakuda)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Search Wiki

 

Search Forums

 

Author Topic: (G/S/C) Use items stored in the PC infinitely, anywhere  (Read 4897 times)

0 Members and 1 Guest are viewing this topic.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
(G/S/C) Use items stored in the PC infinitely, anywhere
« on: August 01, 2013, 09:45:02 am »
By filling the Key Items pocket with items obtained through the Time Capsule or Celebi glitch, the duplicate key item glitch can be used to corrupt the Balls pocket, giving it access to memory beyond where that pocket is supposed to end. This allows you to use almost any item stored in your PC an unlimited number of times in the field. In Gold/Silver, it can be used to manipulate memory beyond that, but unfortunately only the PC aspect works in Crystal.

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 you’ll 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, I’ll 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 D5E1–D5FB and D5FC–D615 in Gold/Silver. In the first swap, the pertinent memory will look like this, if you chose Machine Part:

Code: [Select]
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:

Code: [Select]
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 14–63 will be the items stored in your PC. I don’t 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 isn’t 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 they’re not any kind of Poké Ball, the quantity is never depleted. When an item is used up, and the game tries to decrement the item’s 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 won’t 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 it’s supposed to be and another pocket, using the item from either pocket will deplete the one that’s in the correct pocket—e.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 can’t 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 I’d 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. (I’m 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 doesn’t technically matter, but this stack will be deleted.)
3. Collect enough key items that your Key Items pocket is full. You’ll 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, I’ll 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 there’s 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 1–11 are the balls that were in the pocket at the start, items 12–13 are Cancel buttons, and items 14–63 are the items in your PC.

If you haven’t 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. I’m not sure, but I believe this also happens for the PC—if you’ve 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 hasn’t 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.

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #1 on: June 23, 2014, 12:28:31 pm »
*bump*

I was close to getting HM06 in the Balls pocket without cheating (see this thread) in Pokémon Crystal with this.

I got three Secret Potions, and performed your trick up to the two Secret Potions in position 25 and 26 (where end should be). From there, I swapped them and caused the bytes shift upwards glitch in the balls pocket. Then, the end (FF) byte got converted into a quantity of 255. Since all quantities become items, I wanted to toss 7 of them to get a quantity of 248 (F8), which is HM06's index number, so that when I repeated the 'swap two stacks of Secret Potions at position 25 and 26 trick' it'd give me HM06.

Unfortunately the quantities of the items in the balls pocket wouldn't get reduced (now I understand that this is what your trick is about; using items infinitely including PC items from the Balls pocket) so I couldn't get HM06.

Is there a way to work around this? Trying to go out of bounds to get HM06 is emulator dependent, and the map distortion methods have a random element to them.

Edit: I have another question too. What is the address D958 used for in Crystal? It's a Max Revive (hex:28) on my save, but I'd like it to be HM06. It's the first and only item address after the PC item addresses (which directly follow the balls addresses) that I can access without a hex:00 item freeze.
« Last Edit: June 23, 2014, 12:39:15 pm by Torchickens »
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #2 on: June 25, 2014, 11:02:30 pm »
I’ve wanted to get back to playing with this, but seeing your latest video finally convinced me to make some time for it.

$D958 is the radio station that the Pokégear is tuned to. While this is fantastically trivial to modify, the range of stations consists of even numbers between $00 and $50, which I don’t think includes anything of particular interest. (I suppose you could tune to station 8.5, hex $20, to get free Rare Candies…)

As you’ve already figured, you can access TMs/HMs from the Balls pocket simply by depositing them into the PC, but that byte-shift method to generate an item will work as long as the last item in the Balls pocket has a quantity equivalent to a ball. If, for example, the last item before Cancel has quantity 1, then byte-shifting the Balls pocket will result in Master Ball ×255. Since Master Balls belong in the Balls pocket, tossing them will work, and you can byte-shift again to turn the new quantity into an item.

Also, I’ve figured out that ? (item $00) is not quite as evil in Crystal as I thought it was. The game only freezes when it tries to display the item’s description, which means that you can scroll past it after you’ve pressed Select to swap an item so that the text box says “Where should this be moved to?” instead of showing the description for the item under the cursor. So, if you expand an empty Balls pocket to 255 items, press Select on an item in your PC with quantity 64, scroll down to the 217th item (easier said than done!), and press A to swap it, you’ll set the flag for Kurt to accept your GS Ball (and also mess up whatever else is stored in $DA88 and $DA89).

What I don’t understand is why ?’s description freezes the game in Crystal. The pointer table for item descriptions, starting at $1C8987 in the Crystal ROM, only has 255 defined entries, and the 256th should be used for the description of ?. In Crystal (and I’m guessing G/S as well, though I didn’t look), that pointer is $A793 (taken from the first two bytes of “The best BALL. It never misses.”), which lands somewhere in the middle of the mail data in SRAM. In my game, it looks like $A793 ought to be read as the properly-terminated string “road” (the end of Kenya the Spearow’s mail message); I don’t see anything there that should crash the game.

Wack0

  • Coder, reverser, beta collector [BetaArchive staff]
  • Staff
  • *****
  • Offline Offline
  • Gender: Male
  • cBRH - Doing nothing since 2k7
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #3 on: June 26, 2014, 02:12:21 am »
In my game, it looks like $A793 ought to be read as the properly-terminated string “road” (the end of Kenya the Spearow’s mail message); I don’t see anything there that should crash the game.

Set a breakpoint on read of $A793 using bgb's debugger.
C H E C K E D . B U I L D S . A R E . A W E S O M E N E S S

BetaArchiveSoftHistory Forumsirc.rol.im #galaxy,#softhistory

Also known as The Distractor.

Shane, please stop telling children that there's a Mew outside under the delivery trucks. - Management

Pokémon: arbitrary code execution 1996-2016

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #4 on: June 26, 2014, 09:30:44 am »
Thanks for your reply.

I’ve wanted to get back to playing with this, but seeing your latest video finally convinced me to make some time for it.

$D958 is the radio station that the Pokégear is tuned to. While this is fantastically trivial to modify, the range of stations consists of even numbers between $00 and $50, which I don’t think includes anything of particular interest. (I suppose you could tune to station 8.5, hex $20, to get free Rare Candies…)

Yeah, I noticed afterwards thanks to Matthew Robinson's code archive and our mirror. It slipped my mind that would be useful to get infinite Rare Candies, though. Good idea. Though my Rare Candy quantity is 1, effectively you can use it infinitely.

As you’ve already figured, you can access TMs/HMs from the Balls pocket simply by depositing them into the PC, but that byte-shift method to generate an item will work as long as the last item in the Balls pocket has a quantity equivalent to a ball. If, for example, the last item before Cancel has quantity 1, then byte-shifting the Balls pocket will result in Master Ball ×255. Since Master Balls belong in the Balls pocket, tossing them will work, and you can byte-shift again to turn the new quantity into an item.

Thanks. The first time I couldn't do it (repeating your trick didn't shift the bytes back a second time) but I found out why.

What I did the first time:

1) Swapped Machine Part (position 24) with Machine Part (position 25).
2) Put SecretPotion in position 25 and position 26.
3) Went to the balls pocket and put Ultra Ball x 1 in the last position.
4) Swapped SecretPotion (position 25) with Secretpotion (position 26). Number of Key Items becomes 24.
5) As expected Cancel turns into a quantity of 255 for Ball 12 and quantity 1 becomes Master Ball (Master Ball x255).
6) I took another key item to get 25 again.
7) Put a Blk Apricorn at the top of the balls pocket to try and get 99 items, then tossed 30 Master Balls to get x225 following it.
8) Repeated steps 1) to 2)
9) The bytes did not shift again.

After looking into why, I found having more than the max amount of items in the balls pocket was responsible.

So I thought of having a Poké Ball in the first position, which gives you the max valid number possible; 5.

My new balls pocket:

Poké Ball x99
Poké Ball x99
Fast Ball x1
Poké Ball x99
Master Ball x1
Cancel

Then after the first iteration of your glitch:

5 items:

Blk Apricorn x5
Blk Apricorn x161
Master Ball x5
Blk Apricorn x1
Master Ball x255

Then I tossed 30 Master Balls again to get 225, took another key item and repeated your trick. It successfully gave me TM33 x 255.

So through this method you can get glitch items HM08-HM12 (FA-FE). The method I used:

1) Have Poké Ball at the top of the balls pocket. Have 5 total items, with a Poké Ball x5 at the bottom.
2) Perform your byte shift glitch.
3) You'll get Poké Ball x255. Toss 1-5 for the glitch item of your choice. Put it at the top.
4) Take another Key Item then repeat the byte shift trick.
5) You will get the glitch item. Now you can do the trick a third time to get 250-254 items.

As you mention in your original post, you can also use an empty balls pocket to get 255 items.

Also, I’ve figured out that ? (item $00) is not quite as evil in Crystal as I thought it was. The game only freezes when it tries to display the item’s description, which means that you can scroll past it after you’ve pressed Select to swap an item so that the text box says “Where should this be moved to?” instead of showing the description for the item under the cursor. So, if you expand an empty Balls pocket to 255 items, press Select on an item in your PC with quantity 64, scroll down to the 217th item (easier said than done!), and press A to swap it, you’ll set the flag for Kurt to accept your GS Ball (and also mess up whatever else is stored in $DA88 and $DA89).

Cool, that's great to know, then!
« Last Edit: June 26, 2014, 09:35:16 am by Torchickens »
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #5 on: June 26, 2014, 01:38:17 pm »
bgb
When I was moving emulation stuff to my new computer, I had a feeling I was forgetting something…  ;D

When the breakpoint triggers on $A793, the SRAM has bank $C loaded, which doesn’t actually exist. (R/B/Y/G/S/C all use a 32 KiB save, which is four banks. The mail data I was looking at before is in bank 0.) BGB shows this bank as filled with $FF.

I tried using a GameShark to give myself a ? on cartridge, and the results were more interesting. One time I got the same freezing effect that happens on emulators. One time the game reset to “This Game Pak is designed only for use on the Game Boy Color.” One time I got a description that started with “ PC PC PC PC PC PC PC PC PC PC PC PC PC”, and had a blinking scroll arrow, but the game wouldn’t respond to any buttons. But the effect that happened most of the time, and the only one I saw more than once, is a description that contains a lot of repeating ???, CCC, MMM, interspersed with the occasional 5, text box border, and such. That description doesn’t freeze the game—I could scroll through it, but I never reached the end (if there is one).

Wack0

  • Coder, reverser, beta collector [BetaArchive staff]
  • Staff
  • *****
  • Offline Offline
  • Gender: Male
  • cBRH - Doing nothing since 2k7
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #6 on: June 26, 2014, 05:52:05 pm »
I tried using a GameShark to give myself a ? on cartridge, and the results were more interesting. One time I got the same freezing effect that happens on emulators. One time the game reset to “This Game Pak is designed only for use on the Game Boy Color.” One time I got a description that started with “ PC PC PC PC PC PC PC PC PC PC PC PC PC”, and had a blinking scroll arrow, but the game wouldn’t respond to any buttons. But the effect that happened most of the time, and the only one I saw more than once, is a description that contains a lot of repeating ???, CCC, MMM, interspersed with the occasional 5, text box border, and such. That description doesn’t freeze the game—I could scroll through it, but I never reached the end (if there is one).

Interesting. I wonder if we'll ever know where this data is being loaded from.
C H E C K E D . B U I L D S . A R E . A W E S O M E N E S S

BetaArchiveSoftHistory Forumsirc.rol.im #galaxy,#softhistory

Also known as The Distractor.

Shane, please stop telling children that there's a Mew outside under the delivery trucks. - Management

Pokémon: arbitrary code execution 1996-2016

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #7 on: June 26, 2014, 09:51:09 pm »
I went looking for some information on how the Game Boy handles memory banks, and found some—it turns out that banks $8–C are actually used to access the real-time clock. Each of those banks represents a single byte of the RTC data, and that single byte can be read or written at any address in the SRAM space ($A000–BFFF).

When the game needs to access the RTC or save data, it has to turn on SRAM access before reading/writing anything, then turn it off when it’s done. When the game is trying to read the description of ?, SRAM access is disabled. I don’t think anyone has documented what the MBC actually does if a game tries to read from SRAM when it’s disabled. The real hardware clearly does something different than the emulators.

One theory I had was that the data being read is somehow related to the RTC value, which would explain the long strings of repeating values that change periodically. I tried reducing the text speed, thinking that might increase the length of repetition, but there wasn’t any noticeable effect.

With further experimentation, it seems like the description of ? is somehow hardware-dependent—on my GBA SP, I normally get that ?????CCCCC stuff, but on my GBC, with the same cartridge, the game crashes to a blank screen when it shows the description. Having my GameShark plugged into my GBA SP tends to cause descriptions that won’t scroll like that PC PC PC one. Having my GameShark plugged into my GBC gave me something similar to the ?????CCCCC description. In one instance, with the GBC+GS, I got a description that scrolled for several lines, then filled the entire screen with left parentheses and other scattered symbols, cut the music, and started playing the low-health alarm sound! After a while, the screen went blank and the sound stopped. This all sort of reminds me of Super Glitch, and makes me want to believe there’s some set of circumstances in which this item will do something aside from just breaking the game.

As for Gold and Silver, my guess was wrong: the reason those versions have no problem with this item is that the pointer table for item descriptions (at $1B8000) has 256 entries.

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #8 on: July 05, 2014, 07:02:17 pm »
Get Celebi without TM33 arbitrary code execution, with GS Ball, Machine Parts and Secretpotions, thanks to Háčky's ball item position.

https://www.youtube.com/watch?v=gpNHgU1ocyg

It actually wasn't 217, it was 216, but due to the value in DA8B shifting up two bytes, you can use position 217 too and you don't need a GS Ball, provided that you have:

1) Got coins from a Gambler at Celadon Game Corner
2) Met Copycat and found out about the Lost Item (to do this you need to restore power to Kanto)

Doing these tasks adds bit 7 and bit 8 of DA8B, and these bits need to be set in DA89 for Kurt to give you back a GS Ball even if you don't have one.

What would make this glitch more ideal is if a quick way of getting duplicate key items is found.
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #9 on: July 05, 2014, 10:35:42 pm »
Get Celebi without TM33 arbitrary code execution, with GS Ball, Machine Parts and Secretpotions, thanks to Háčky's ball item position.

https://www.youtube.com/watch?v=gpNHgU1ocyg
Aha, I thought there was a way to get out of item-swap mode while keeping the cursor in place, but I couldn’t remember how to do it. (Pressing B instead of Select sends you back to the top of the list.)

Also, it’s funny that Mom is giving you the Pokégear tutorial in the kitchen instead of at the table.

It actually wasn't 217, it was 216,
It is the 217th item, but setting the number of items to 216 is a clever way to get there without losing your place. If there are 216 items in the pocket, then the 217th item is where the Cancel button should be.

but due to the value in DA8B shifting up two bytes,
I…don’t think I even noticed that happening. ;D

What would make this glitch more ideal is if a quick way of getting duplicate key items is found.
I don’t know about that, but I did have another idea…

1. Deposit all key items into the PC except the Good Rod. Make sure you still have room in your PC for two more items.
2. Get another Good Rod through the Time Capsule.
3. Swap the two Good Rods.

You should now have a Good Rod and an Old Rod. However, your Key Items pocket technically only has 1 item. You can scroll down to the Old Rod, because it’s where the Cancel button should be. An actual Cancel button will appear in the third slot, but you can’t scroll down that far.

4. Deposit the Old Rod into your PC. Your Key Items pocket now has 0 items.
5. Deposit the Good Rod into your PC. Your Key Items pocket now has 255 items.

From here, you can wreak further havoc. The 27th key item represents the number of items in the Balls pocket.

This only works if the key item you use has an index number less than 100, so that the game tries to merge two stacks of the same item when you swap them. The “quantity” of the first item is the index number of the second item, and the “quantity” of the second item is 255 (the Cancel button). Adding the two values reduces the second item’s index number by one. You won’t be able to deposit the new item (and have it actually disappear from the pocket) unless it’s something that belongs in the Key Items pocket. Fortunately, there are several key items with consecutive index numbers. You can do this with Itemfinder, Good Rod, SecretPotion, S.S. Ticket, Mystery Egg, or, in Crystal only, Clear Bell or Silver Wing. Even though Silver Wing exists in Gold/Silver, you can’t use it for this because the item directly before it was not a key item until Crystal.

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #10 on: July 06, 2014, 06:23:26 am »
I broke my Pokédex with the $40 method and I don't know why. I sort of fixed it by pressing up on the options (dex mode selection) and exiting, letting me view Wooper, Quagsire, Ho-Oh, Slowking, Gligar and Octillery but I could only select Wooper and I wasn't able to move the cursor.

Exiting caused map corruption and didn't fix the Pokédex. One time after exiting I broke it even more so I couldn't even exit it again.

« Last Edit: July 06, 2014, 06:23:59 am by Torchickens »
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

camper

  • aka GlitcherRed, azum4roll
  • Member+
  • *
  • Offline Offline
  • Gender: Male
  • 975642dx║'r DExsfoF▓1 error.
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #11 on: July 06, 2014, 07:06:41 am »
RIP Pokedex.

Is that a glitch mode?
Youtube
 

Guess where this is?

Torchickens

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #12 on: July 06, 2014, 08:04:53 am »
RIP Pokedex.

Is that a glitch mode?

Seems like it. C7D4 is 81 and C7D8 is 00 (but C7D8 changes to 81 too when you go on the mode selection screen). Normal values in these addresses are 00 (new Pokédex mode), 01 (old Pokédex mode) and 02 (A-Z mode).

There is an 81 00 at DA82/DA83 on my save which gets shifted back two bytes after the switch, but changing DA80/DA81 back to what it was (BF 1F) apparently has no effect on the Pokédex. Plus going into the mode selection screen doesn't change the 00 in DA83 to 81.

There's probably another address that got shifted back that made the Pokédex load a glitch mode. I may have to try trial and error.

Edit: Yes, it is. D959 got changed from 01 to 81 because D95B was originally 81. D959 is responsible for the Pokédex mode, and I couldn't change it because that also makes the option cursor (C7D8) 81 (even though the cursor may suggest otherwise if it's located on something like 'old Pokédex mode'), and I can't scroll up enough without the game freezing. Scrolling down doesn't work.

So I wonder what D95B is for?

Edit 2: Well I don't know what D95B is for, but I came up with a solution.

Swap a ball in the second to last position to get new Pokédex mode back. This doesn't manually replace the affected address, but rather causes another +2 byte shift to the left. Address D95D is 00 if you're not on a Bicycle, or 01 if you're on a Bicycle. When you activate the Celebi event the 00 or 01 gets moved to D95B, so the extra byte shift we do puts 00 or 01 into D959; the Pokédex mode, where 00 is new Pokédex and 01 is old Pokédex.

But I lost the Pokégear's contact and radio tab after doing this and Mom won't give it back, oops. I can get the radio back by taking the quiz in Goldenrod City again, but there are no channels and the tunage is no longer capped at 50, the orange line can go off the screen. No side effects with that, but it's a shame there are no channels.
« Last Edit: July 06, 2014, 11:28:11 am by Torchickens »
Hello. I actually identify as gender questioning, but nowadays feel more firmly that I identify as female. My sex is male but I like to express myself as female.  She/her pronouns, please.


Thank you Aeriixion for the cute sprite above! :) Roelof also made different variations of the sprite (which I animated).

Contact:

Email Youtube Twitter
Skype: Torchickens
Bulbapedia Starfy Wiki

Beyond all philosophies are the things that go best for you; what makes you feel content. It's important to always follow your heart, so unless you feel perfectly happy about it don't just follow something because it is popular, fits a style or is conventional. Sometimes you may reach a point you're not sure who you are, but as things settle I'm convinced things do work out in time.

Háčky

  • Distinguished Member
  • *
  • Offline Offline
  • Pick which packet as an error?
    • View Profile
Re: (G/S/C) Use items stored in the PC infinitely, anywhere
« Reply #13 on: July 06, 2014, 05:33:27 pm »
$D95B is the location of the item registered for use with the Select button (not the item’s index number, which is in $D95C). The lower six bits are the position of the item in its pocket, and the upper two bits are the pocket ($00 = Items, $40 = Balls, $80 = Key Items, $C0 = TM/HM). This seems a bit pointless, since in the final game, only key items and Teru-sama can be registered, but you can set that byte to $00 by depositing the registered item in the PC.

Being able to scroll past $50 on the radio tuner opens up more possibilities for obtaining items, though…

After two item shifts, the value of $D95C (index number of the registered item) should be in $D958 (Pokégear radio tuning). Was your registered item one with an odd-numbered index, like the Bicycle? That would explain why you couldn’t tune to a channel, since they’re all on even numbers, and why you could go past the end, since it would skip from $4F to $51.