Main Menu
Main Page
Forums
New pages
Recent changes
Random page
Help

Glitches
Arbitrary code execution
Pokémon cloning
Pomeg glitch and Glitzer Popping
Tweaking and voiding
Glitches by generation
Glitch categories

References/Resources
Databases
Disassembly projects
The Big HEX List
Pokémon cheat codes
Pokémon glitch terminology
Useful tools
More

Affiliates
Legendary Star Blob 2 (Hakuda) (日本語/Japanese)
Pokémon Speedruns wiki (English)
PRAMA Initiative (Français/French)
MissingNo. Glitch City (Italiano/Italian)
Become an affiliate!

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: "Buy any item from shop" cheat gym badge man glitch textbox  (Read 901 times)

0 Members and 1 Guest are viewing this topic.

TheSixthItem

  • Game breaker
  • GCLF Member
  • *
  • Offline Offline
  • Gender: Male
  • ZZAZZDZZGZZUZZKZZ#ZZXZZUZZ7ZZ#ZZ
    • View Profile

An interesting glitch, when you use a "buy any item from shop" cheat and ask the gym badge man to review it, you get a glitch text box
I do things

Caveat

  • The Metropolitan Mutant of Ark
  • GCLF Member
  • *
  • Offline Offline
  • Wrrrooooooaaaar! Peeko!
    • View Profile
Re: "Buy any item from shop" cheat gym badge man glitch textbox
« Reply #1 on: June 22, 2017, 05:28:05 am »
Fascinating...

I wonder if it changes based on the item code you have activated?
dr dr pepper is back

TheSixthItem

  • Game breaker
  • GCLF Member
  • *
  • Offline Offline
  • Gender: Male
  • ZZAZZDZZGZZUZZKZZ#ZZXZZUZZ7ZZ#ZZ
    • View Profile
Re: "Buy any item from shop" cheat gym badge man glitch textbox
« Reply #2 on: June 22, 2017, 06:07:10 am »
Fascinating...

I wonder if it changes based on the item code you have activated?
With rare candy I got 9999999999Poké94 ERROR so it probably changes
I do things

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. 🦋 ✿
    • View Profile
Re: "Buy any item from shop" cheat gym badge man glitch textbox
« Reply #3 on: June 22, 2017, 08:04:43 pm »
I decided to research this subject and made some really interesting finds.

When displaying items in a list, the game first has to decide what type of list it is, like is it an item and quantity list or are we just displaying items in sequence?

This is controlled by memory address CF94 (CF93 in Yellow) and these are the menu type IDs:

00: Your Pokémon in the current box with levels. If forced in the inventory the Pokémon will still act like the items you have.
01: Move IDs in sequence. If you had Master Ball x97 this would appear as Pound (dec:01), Agility (dec:97). If forced in the inventory they will act as the items as if entry 1 was item 1 and entry 2 was item 1's quantity but as an item and so on. Curiously entries may act as unterminated name glitch items and thus require that you use them where a 0x50 sub-tile is on the screen.
02: Items in sequence, no quantities. We can thus convert quantities into items you can use if you replace the items pack with it. Used by Poké Marts.
03: Regular items pack. Key items have their quantities hidden. Used by the inventory and item PC.
04(+?): Items in sequence, no quantities (again).

When you talk to the badge man or use a lift (Celadon Department Store, Rocket Hideout, Silph Co.) the game uses list type 04, although these may be interpreted as key items hence not have quantities even if the list type was 03.

List types do not apply to the fossil list if you talk to the scientist in Cinnabar Lab with more than one fossil, so seem to be handled differently.

CF8B (CF8A in Yellow) also controls the pointer to the entries in the list. For inventory items CF8B is 1D D3 (D31D) because that is where our items begin. For stored PC items CF8B is 3A D5 (D53A). For box entries it's 80 DA (DA80), which likewise is where stored Pokémon in the current box begin.

For Poké Marts, the badge man and lifts the pointer is 7B CF (CF7B), and the data here gets written to beforehand depending on which list you opened. Notice that the Poké Mart first item code is 01xx7CCF. This is why using the code will change the badge man's list entries and lift list entries as well.

If you use an invalid entry in a lift list it doesn't matter as only the position counts, so if you replaced entry 2 and it was 2F with a Master Ball it would still take you to the second floor.

However, it turns out invalid badge man entries can bring up glitch text boxes, and this is actually the subject of a glitch in Japanese Red/Green/Blue. In that glitch the badge items are represented in the code as such:

Code: [Select]
15 16 17 18 19 1A 1B 1C FF

グレーバッジ [0x15]
ブルーバッジ [0x16]
オレンジバッジ [0x17]
レインボーバッジ [0x18]
ピンクバッジ [0x19]
ゴールドバッジ [0x1A]
クリムゾンバッジ [0x1B]
グリーンバッジ [0x1C]
[0xFF]

What happens when you swap one of these entries with another is similar to how the duplicate key items glitch works in Generation II. The game will 'pretend' that the list was an item+quantity list, like this:

グレーバッジ x 22
オレンジバッジ x 24
ピンクバッジ x 26
クリムゾンバッジ x 28
CANCEL

It's hard to picture how this will affect the actual list, but let's say we pretend the items list has quantities and we swapped グレーバッジ x 22 with オレンジバッジ x 24, we would get

オレンジバッジ x 24
グレーバッジ x 22
ピンクバッジ x 26
クリムゾンバッジ x 28

Back into a list of entries only this would be:

オレンジバッジ [0x17]
レインボーバッジ [0x18]
グレーバッジ [0x15]
ブルーバッジ [0x16]
ピンクバッジ [0x19]
ゴールドバッジ [0x1A]
クリムゾンバッジ [0x1B]
グリーンバッジ [0x1C]

And this is what actually happens in game, explaining why the グレーバッジ [0x15] and ブルーバッジ [0x16] were shifted down two slots instead of just swapping places.

But you can get glitch entries like this too:



The reason why seems to be because the game is pretending that the entries we're swapping have quantities then there are only a limited number of 'item+quantity' pairs until we go past the end of the buffer and corrupt unrelated data. We can bring up glitch entries this way or even corrupt the lower byte of the list pointer, which could bring a lot more glitch entries to select and allow us to access more than eight entries.

This could even theoretically result in the corruption of CFBF, so if you escaped from battle using a partial escape glitch item beforehand then maybe you could catch any(!) Pokémon and glitch Pokémon (except maybe for FF; you can't anything the game would interpret as Cancel and bad/division by 0 growth rate glitch Pokémon) without CoolTrainer/unterminated glitch item with specific screen data, and this could probably be more convenient than Fossil conversion glitch.

Maybe you could corrupt D036 (instant encounter) as well just by swapping entries around.





Something that still stands though is this; what happens when non-badge entries are selected? I'll be researching this as it could allow for arbitrary code execution if it allows for text code, and the text code is in WRAM and you can place an 08 at the beginning of the text code, marking that bytes after it are executed as assembly.

Edit: I put together a way to get Mew but it's ridiculously difficult in practise. Will upload a video soon.
« Last Edit: June 23, 2017, 03:45:33 am by Torchickens »

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman/I'm a 'girly' nerd who discovered herself. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

Parzival

  • Buyer beware: House comes with 3 free skeletons in a closet of your choice.
  • GCLF Member
  • *
  • Offline Offline
  • Gender: Male
  • This box intentionally left blank. ...wait...
    • View Profile
    • (null)
Re: "Buy any item from shop" cheat gym badge man glitch textbox
« Reply #4 on: June 23, 2017, 08:25:36 am »
I find this funny since when I was 5 or 6 I still had Pokemon Red, a Gameshark and my GBC, and I found these while cheating my young ass off. These are what got me into corruptions.

God, the nostalgia...


Ask me about betrayal.
Ask me about depression.
Ask me about death.
Ask me about destruction.
Ask me about hardship.
I've been through s**t.
If you need to talk to someone, my PM inbox is always open.

Evie the Mother Hen ☽ ❤

  • Head Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • I love My Melody. 🦋 ✿
    • View Profile
Re: "Buy any item from shop" cheat gym badge man glitch textbox
« Reply #5 on: July 07, 2017, 08:13:23 am »
I find this funny since when I was 5 or 6 I still had Pokemon Red, a Gameshark and my GBC, and I found these while cheating my young ass off. These are what got me into corruptions.

God, the nostalgia...

I relate to this too, I used to love playing around with my Xploder (which works just like a GameShark).

Good times can't beat them. :)

By the way, we now have yet another arbitrary code method:
https://www.youtube.com/watch?v=mGbeJnwR32Y

Possibly what we can do next is manipulate an arbitrary Trainer victory script.

✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿
Here have some free flowers on every post :)
✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿✿



(Images © Sanrio, Nintendo, Pokémon, HAL Laboratory)

✿ Hi, I'm Evie. Transgender woman but spiritually doesn't believe 'male'/'female' needs to be defined; lives more stereotypically like a woman/I'm a 'girly' nerd who discovered herself. Call me whichever pronouns you like. :)

Feel free to contact me here about anything regarding the site.

Forgiveness. I feel that the more people pray to our greatest source/God/mathematical equality for world peace, the more and more it manifests into reality (until our next spiritual death).

Thank you Nyapon for this lovely artwork. :3

TheSixthItem

  • Game breaker
  • GCLF Member
  • *
  • Offline Offline
  • Gender: Male
  • ZZAZZDZZGZZUZZKZZ#ZZXZZUZZ7ZZ#ZZ
    • View Profile
Re: "Buy any item from shop" cheat gym badge man glitch textbox
« Reply #6 on: July 07, 2017, 08:18:59 am »
I now feel like finally downloading a ROM of pokemon green
O and are you a magician or something? <3ing my comment while being on gcl
« Last Edit: July 07, 2017, 11:06:43 am by TheSixthItem »
I do things