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

Glitches
Arbitrary code execution
Pokémon cloning
Pomeg glitch
Tweaking
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)
Pokémon Speedruns wiki
PRAMA Initiative
Become an affiliate!

Technical
Site source code

Search Wiki

 

Search Forums

 

Author Topic: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion  (Read 107130 times)

0 Members and 1 Guest are viewing this topic.

Quirky Flower Chicken ❤✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • (Image thanks Sanrio + Pexels)
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #300 on: April 13, 2014, 10:31:41 am »
Ah thanks TheZZAZZGlitch, so at least we know for sure now it's prize money related.

You've found something new. de is D07A, not D079, but D079 is valid. It turns out that it D07A is unused, and by setting it you can use it to make Trainer payouts have 5 or 6 digits! Normally by default the prize money maxes out at 9999 Pokédollars, but you should be able to get +990000 Pokédollars with 8F.

Edit: Oh, I see. 00 is written to D079 as well. Sorry.
Edit2: Wait, "ld (de), a" for 00 to D079 is in 0E:5D07, so that's unrelated.
« Last Edit: April 13, 2014, 10:43:19 am by Torchickens »

(Image © Sanrio, Nintendo, HAL Laboratory)

✿ Hi! I'm Evie. I'm a transgender woman, but any pronouns are fine. She/her preferred. ✿ 🦋

Forgiveness is timeless, and moments we look back on humble the soul. Jesus said it best. You must be blind to see and must see to be blind metaphorically is said. I don't think there is one Messiah nor a definitive truth, because we find truths in relative moments. However, there may be unknowable truths and sometimes it feels we have got to embrace the mystery and what we don't know.

Thank you for this lovely artwork Nyapon! :3

TheZZAZZGlitch

  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • Unknown opcode fc at 801a
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #301 on: April 13, 2014, 11:46:29 am »
OK, I figured this out.

So, as mentioned before, every trainer has a base payout value. To calculate the trainer's winning money, the game takes the level of the last Pokemon in the trainer's roster and multiplies it by the base payout.
Glitch trainers take their base payout values from arbitrary locations, and because of that, their winning money is usually very high. For example, the glitch trainer 0xFC's winning money is 9180 Pokedollars. Next, their rosters are usually empty or very high leveled. If the last level in the roster is 0, the game is actually going to multiply the base times 256. There is no math necessary to know that 9180 multiplied by 256 is going to be way too much.

However, the programmers at Game Freak made an attempt to fix this problem: they implemented multiplication as consecutive addition (like 3*4 is 3+3+3+3). If at any point during the addition chain the payout money exceeds 9999, it gets reset back to 9999. They overlooked a very important problem though - when the subroutine resets the payout money to reasonable numbers, it moves the payout money pointer 3 bytes forward, but it is never changed back.

The procedure then basically looks as follows:

  • OK, we're adding 9180 together 255 times.
  • Please add 9180 to the number at $D079.
    • OK, the result is 9180.
  • Please add 9180 to the number at $D079.
    • OK, the result is 9999. Oops, I moved the result pointer 3 bytes forward.
  • Never mind, I have no idea what 'error checking' is. Please add 9180 to the number at $D07C.
    • OK, the result is 9180.
  • Please add 9180 to the number at $D07C.
    • OK, the result is 9999. Oops, I moved the result pointer 3 bytes forward.
  • Never mind, I have no idea what 'error checking' is. Please add 9180 to the number at $D07F.
    • (...)

This oversight causes the game to walk through many addresses and replace them with 9999. The 1st byte is never modified, and that's why all multiples of 3 are unaffected by the glitch.

...but wait a second. When fighting the high-leveled trainers at the Cinnabar Coast the payout money is also too big, but no ZZAZZ effects occur?
The coast trainers cause memory corruption too. For example, the "Blue Ultimus" with his last Pokemon being level 215 and his base payout being 50, the winning money is equal to 10750. That means that only two bytes at address $D07C will get corrupted - but it's a change so small that it doesn't make a difference. Bad things start to happen about when the total payout of a trainer exceeds 400000.

Quote
It turns out that it D07A is unused, and by setting it you can use it to make Trainer payouts have 5 or 6 digits! Normally by default the prize money maxes out at 9999 Pokédollars, but you should be able to get +990000 Pokédollars with 8F.
The byte at $D079 is not unused. The text command used to display prize money in a textbox only supports 3-byte numbers. The empty first byte is necessary for the number to display correctly.
But yes, after the battle starts, this byte can be modified with 8F to get more than 9999 Pokedollars from a single trainer.

Also, following the recent Game Genie trend, here are some codes to fix the ZZAZZ glitch:

188-2D8-192
068-2E8-80C
qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF

Kelvinv

  • Wiki Contributor
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #302 on: April 13, 2014, 12:08:25 pm »
I've always wondered about the ZZAZZ glitch. I've always thought that it was random that only one trainer class was affected. What is the pokemon species sent out when you have no Pokemon?

Quirky Flower Chicken ❤✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • (Image thanks Sanrio + Pexels)
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #303 on: April 13, 2014, 01:17:39 pm »
I've always wondered about the ZZAZZ glitch. I've always thought that it was random that only one trainer class was affected. What is the pokemon species sent out when you have no Pokemon?

Trainers with no Pokémon will send out a Charizard 'M or Q (FF), typically at a high level, with high HP over the maximum and afflicted with a status, including poison.

If you mean if you have no Pokémon, in Yellow you'll send out a 3TrainerPoké (00) and in Red/Blue, you'll send out what may be an 'M but the game just hangs with "Go! !". If you have usable Pokémon but all are fainted, you'll black out without sending one out.
« Last Edit: April 13, 2014, 01:30:31 pm by Torchickens »

(Image © Sanrio, Nintendo, HAL Laboratory)

✿ Hi! I'm Evie. I'm a transgender woman, but any pronouns are fine. She/her preferred. ✿ 🦋

Forgiveness is timeless, and moments we look back on humble the soul. Jesus said it best. You must be blind to see and must see to be blind metaphorically is said. I don't think there is one Messiah nor a definitive truth, because we find truths in relative moments. However, there may be unknowable truths and sometimes it feels we have got to embrace the mystery and what we don't know.

Thank you for this lovely artwork Nyapon! :3

SM

  • 14239
  • GCLF Member
  • Offline Offline
    • View Profile
    • Saver Mlog
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #304 on: April 14, 2014, 01:26:51 am »
Thanks for explaining about ZZAZZ glitch.
I have another question.

http://youtu.be/1zZPWEJlkpQ?t=28s

When ditto changed positions of transform and cooltrainer move(--),
ditto can use only first cooltrainer move in battle.
But when I saw other pokemon's stat(moves) in pokemon menu,
ditto can use other moves under first cooltrainer move.
And number of useable moves is depend on number of moves of other pokemon that i saw.

why does it happen?

Sorry for bad grammar. :'(
« Last Edit: April 14, 2014, 01:27:50 am by SM »

Kelvinv

  • Wiki Contributor
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #305 on: April 14, 2014, 04:14:16 am »
What causes the fact that when you use a item at a ZZAZZ trainer it ends the battle? Is it because the battle mode is overwritten with 99?

Quirky Flower Chicken ❤✿

  • Administrator
  • *****
  • Offline Offline
  • Gender: Female
  • (Image thanks Sanrio + Pexels)
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #306 on: April 14, 2014, 05:16:26 am »
What causes the fact that when you use a item at a ZZAZZ trainer it ends the battle? Is it because the battle mode is overwritten with 99?

Likely, but it's not the byte D057 (out of battle/wild Pokémon/Trainer). That byte is left at 02 and is located before the corruption begins.

Incidentally, (I'm going to mention this as I've only done so once or twice) the 'death Trainer' (Red) appears after battle because D12B is greater than 00, and when its first bit is checked, it means you're battling a custom (link battle) Trainer.

Thanks for explaining about ZZAZZ glitch.
I have another question.

http://youtu.be/1zZPWEJlkpQ?t=28s

When ditto changed positions of transform and cooltrainer move(--),
ditto can use only first cooltrainer move in battle.
But when I saw other pokemon's stat(moves) in pokemon menu,
ditto can use other moves under first cooltrainer move.
And number of useable moves is depend on number of moves of other pokemon that i saw.

why does it happen?

Sorry for bad grammar. :'(

I don't know. I wasn't aware of that though, thanks for mentioning it!

Your post is readable, don't worry. 포럼에 오신걸 환영합니다
« Last Edit: April 14, 2014, 05:28:49 am by Torchickens »

(Image © Sanrio, Nintendo, HAL Laboratory)

✿ Hi! I'm Evie. I'm a transgender woman, but any pronouns are fine. She/her preferred. ✿ 🦋

Forgiveness is timeless, and moments we look back on humble the soul. Jesus said it best. You must be blind to see and must see to be blind metaphorically is said. I don't think there is one Messiah nor a definitive truth, because we find truths in relative moments. However, there may be unknowable truths and sometimes it feels we have got to embrace the mystery and what we don't know.

Thank you for this lovely artwork Nyapon! :3

TheZZAZZGlitch

  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • Unknown opcode fc at 801a
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #307 on: April 14, 2014, 09:31:18 am »
What causes the fact that when you use a item at a ZZAZZ trainer it ends the battle? Is it because the battle mode is overwritten with 99?

This behavior is caused by the address $D11C. If it's changed to something other than 00, the game will end the battle immediately after using an item. It is used in Old Man's demonstration, to end the battle before the Pokedex entry appears.

Thanks for explaining about ZZAZZ glitch.
I have another question.

http://youtu.be/1zZPWEJlkpQ?t=28s

When ditto changed positions of transform and cooltrainer move(--),
ditto can use only first cooltrainer move in battle.
But when I saw other pokemon's stat(moves) in pokemon menu,
ditto can use other moves under first cooltrainer move.
And number of useable moves is depend on number of moves of other pokemon that i saw.

why does it happen?

Sorry for bad grammar. :'(

In the exact moment where you open your fight menu, the Cooltrainer move corrupts your in-battle data, and together with that, the current Pokemon's moveset.
So after opening the move list the memory gets corrupted. Then, from the game's point of view, the Cooltrainer move is no longer the first move in the list (it was replaced with arbitrary data), so you're allowed to move the cursor freely.
qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF

luckytyphlosion

  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • JACK-flys are OP
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #308 on: April 14, 2014, 02:47:48 pm »
What do the glitch items "JACK/JOHN, GARY/ASH, RIVAL's, NICKNAME?, NAME?, etc." actually do to allow you to clip through 1 space walls and remove trainer sprites (so you can trainer-fly off of any trainer)?

TheZZAZZGlitch

  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • Unknown opcode fc at 801a
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #309 on: April 14, 2014, 11:01:41 pm »
The game has an internal list of all items that open the Pokemon menu when used:

Moon Stone, Antidote, Burn Heal, Ice Heal, Awakening, Parlyz Heal, Full Restore, Max Potion, Hyper Potion, Super Potion, Potion, Fire Stone, Thunder Stone, Water Stone, Hp Up, Protein, Iron, Carbos, Calcium, Rare Candy, Leaf Stone, Full Heal, Revive, Max Revive, Fresh Water, Soda Pop, Lemonade, X Attack, X Defend, X Speed, X Special, Pp Up, Ether, Max Ether, Elixer, Max Elixer.

(X Attack/Defend/Speed/Special are on this list even though they don't open the party screen directly - maybe they were intended to at some point?)

Items like RIVAL's or NICKNAME? open the Pokemon menu when used, but they are not included in the list. After using such item, the game does not know that the party screen was opened, so it does not close it after using the item.

After using RIVAL's/NICKNAME?/etc. and exiting back to overworld, 'half of the game' is thinking that you're in the Pokemon menu, while the other half thinks you're in the overworld. It can be compared to the surfing glitch, where some parts of the game think you're facing left, and other parts think you're facing down.
One of the side-effects is that in this state the game will not update the direction you're facing - so it's possible to move around, but the player is still facing the same direction.

This will essentially allow the player to go up while facing down. When the game checks if the block is passable or not, it just checks the block in front of the player. In the scenario presented before, the player will go up, but the collision check is done for the block below the player, thus allowing to go through the barrier.

Disappearing sprites are also the result of the game thinking you're in the Pokemon screen.
qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF qÁF

luckytyphlosion

  • Distinguished Member
  • *
  • Offline Offline
  • Gender: Male
  • JACK-flys are OP
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #310 on: April 15, 2014, 05:23:08 pm »
Thanks for telling me. I really wanted to know what it does so I could explain in the http://www.pokemonspeedruns.com/index.php/Pok%C3%A9mon_Red/Blue/151_Pokémon [Pokemon Catch 'Em All Info Page] I also want to thank you for discovering how to use cooltrainer♀ to catch Pokémon, which helped a lot with saving time. :D

There are 3 minor glitches I still don't understand:
  • Why is it that sometimes trainers have a [ ! ] when you talk to them?
  • Why is it that when you do a Trainer Fly without leaving any space between (using RIVAL's), it makes the trainer beaten?
  • Why is it that when using RIVAL's, sometimes the [ ! ] pops up when in sight of a trainer (and then the game softlocks)?

camper

  • aka GlitcherRed, azum4roll
  • Member+
  • *
  • Offline Offline
  • Gender: Male
  • 975642dx║'r DExsfoF▓1 error.
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #311 on: May 17, 2014, 09:27:43 am »
I just learned this the hard way:

A Pokeball is deducted from the inventory AFTER the Pokemon is caught and is registered in the Pokedex.
=> It's not applicable to get 255 Pokeballs for the Items Underflow Glitch. I should've used Potions instead...
Youtube
 

Guess where this is?

snuggles08

  • GCLF Member
  • Offline Offline
  • RNG abuse FTW!
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #312 on: May 24, 2014, 08:23:19 pm »
What memory address can I check to see if I captured a Pokemon in battle mode?

Kelvinv

  • Wiki Contributor
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #313 on: May 30, 2014, 05:34:19 am »
What causes the pokemon opponent names to not appear when having no Pokemon?

Lum

  • GCLF Member
  • Offline Offline
  • CHARIZRAD 'M ROXORX or is it.
    • View Profile
Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion
« Reply #314 on: May 30, 2014, 08:49:47 am »
In the Japanese version, why are there zero wild Pokemon encounters on the eastern Cinnabar Island coast?
I know our page on the Old Man Trick hasn't covered that yet.