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 Egg 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 glitches
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!

Technical
Site Source Code

Search Wiki

 

Search Forums

 

Author Topic: "Buy any item from shop" cheat gym badge man glitch textbox  (Read 393 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?
HOLD ME, I'M A PALE MACHINE
LIFE IS JUST OKAY OUT HERE, ANYONE CAN SEE
I'M LONELY, WITH MY PALE MACHINE
EYES WILL RUN WITH TIRED TEARS, LIVING LIKE A DREAM


Japanese Glitchdex
Petscop Thread

Twitter
(warning: contains bad grammar and copious rambling)

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 ✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • 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 »
Hi! I identify as transgender female.  She/her pronouns, please.

Online I most often use the username Torchickens or Chickasaurus.



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

I like to collect interesting video games.
https://www.vgcollect.com/Torchickens

The psychology of birth (including spiritual birth): pain>acceptance/courage in face of pain>embracement>unconditional love and strength

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.

Parzival

  • The Betrayed, The Cleansed, The Reborn
  • GCLF Member
  • *
  • Offline Offline
  • It begins.
    • View Profile
    • YT Channel
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 ✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
    • 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.
Hi! I identify as transgender female.  She/her pronouns, please.

Online I most often use the username Torchickens or Chickasaurus.



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

I like to collect interesting video games.
https://www.vgcollect.com/Torchickens

The psychology of birth (including spiritual birth): pain>acceptance/courage in face of pain>embracement>unconditional love and strength

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.

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