Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Official 1st Gen (Red/Blue and Yellow) Glitch Discussion - Page 30

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: Torchickens
Date: 2018-09-16 15:57:37

I was randomly watching one of Gonzy's Gen 1 Pokemon videos. I seen him try to deposit a level 0 Pokemon, but something more than a freeze happened:
https://youtu.be/QudetdmpoVE?t=14

I wonder if he actually somehow got the game to not freeze by chance, if this can also happen on a regular game?


It might be its cry, and (though speculative) there might not be a glitch Pokémon exactly like it from the randomizer on the official games. It may be worth testing all of the official version glitch Pokémon to see if a lock-up is possible on deposit in that respect. A lock-up can definitely happen on summary screens too, but I unfortunately can't remember the details other than the glitch Pokémon doesn't always play an endless cry.

Additionally Pokémon with unterminated names can freeze the game, but that's usually before deposit pops up and it looked like "PKMN 0x00" had a terminated name.

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: GlitchedPokemonStudent
Date: 2018-09-16 18:00:53
Seeing more videos of it, it turns out to act like a full fledged ROM Hack which I somehow didn't consider.

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: Torchickens
Date: 2018-09-16 21:03:09

Seeing more videos of it, it turns out to act like a full fledged ROM Hack which I somehow didn't consider.


Yes. I think a lot of these are from randomizer tools. I remember a website in which you can generate modified Pokémon ROMs. Looking again, there is something called the "Universal Pokémon Game Randomizer" on Dabomstew's website which lets you randomise Generations 1-5.

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: Sherkel
Date: 2018-09-17 07:33:03
Well shoot, this is getting quite a bit of good use. Maybe I should have left the Gen II one stickied.

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: GlitchedPokemonStudent
Date: 2018-09-18 18:26:10
I am curious on how Crystal_ managed to make this work.
https://youtu.be/oPiPOkbs50s

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: ISSOtm
Date: 2018-09-19 04:10:28
ROM hacking.

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: Torchickens
Date: 2018-09-19 10:10:21
As ISSOtm said, this can be achieved with ROM hacking (or Game Genie which work as temporary ROM patches).

Each Pokémon in index number order has a Pokédex number in the ROM which is read for the game to use a partial structure for its stats ('base data structure') as detailed here: https://hax.iimarckus.org/files/missingno_explained.html

This offset (value 'table' for index numbers starting from 1) begins at $41024 in Red/Blue,  0x410B1 in Yellow, with the first ID (Rhydon) being hex:70, Kangaskhan being hex:73, and so on. Other offsets can be found using a hex editor and its find feature (by searching for "70 73 20" (the first three bytes or how many you want to search for).

Here are two Game Genie codes to do it in Red/Blue without ROM hacking.

Change Pidgey's Pokédex number:

XX0-47A-A2A

Change Rattata's Pokédex number:

XX0-C8A-A26

For Yellow,

Change Pidgey's Pokédex number:
XX0-D4A-A2A

Change Rattata's Pokédex number:
XX1-55A-A26

However while this would work on emulator, a physical Game Genie may glitch out the palette for English/French/German/Italian/Spanish Yellow, unless theoretically more Game Genie codes or another method could fix it. I haven't tested this on a monochrome (DMG) Game Boy. In that case I haven't confirmed whether Game Genie can be reliably used for this purpose (however I confirmed once you can use it to reset the clock in Gold/Silver by listening to the music and possibly other clues instead of looking at the screen).

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: Sherkel
Date: 2018-09-19 13:29:17
The main point is that there are two numbers associated with a Pokémon species that make it what it is based on the data grabbed from tables in the ROM: the index number, and the Pokédex number. Trying to plug in an index number that wasn't intended to work is what gave this site its running start. What happens when you plug in a different Pokédex number, though? That's what the video goes into. It's nothing too interesting considering it's basically just making artificial glitch hybrids (he had to take species with working index numbers and then just changed the Dex number,) but it's definitely notable.

Everything besides the changing of names (e.g. 152, 156) can be done with the Gameshark codes Torchickens provided.

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: GlitchedPokemonStudent
Date: 2018-09-19 17:24:07
So, in other words, I can't experiment those on my own with BGB, can I.

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: ISSOtm
Date: 2018-09-20 02:33:28
BGB allows you to modify the loaded ROM, and save it. So you can.
To seek the address Torchickens gave ($410B1), you have to first press Ctrl+G after having clicked anywhere in the debugger's data viewer (bottom-left panel), then type the address in Game Boy format (10:50B1).
Your cursor should be pointing at a "70" byte; if not, the address is wrong. You can type any character on your keyboard to open an Edit bow, which will ask you for the hex values you want to edit. Validate by pressing Enter. (Note that writing multiple bytes will modify multiple bytes, not just the one your cursor was pointing at.)
You can save the ROM you modified by doing File -> Save ROM as… or discard the modifications with Reload ROM.
Easy as pie!

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: GlitchedPokemonStudent
Date: 2018-09-21 19:36:00

BGB allows you to modify the loaded ROM, and save it. So you can.
To seek the address Torchickens gave ($410B1), you have to first press Ctrl+G after having clicked anywhere in the debugger's data viewer (bottom-left panel), then type the address in Game Boy format (10:50B1).
Your cursor should be pointing at a "70" byte; if not, the address is wrong. You can type any character on your keyboard to open an Edit bow, which will ask you for the hex values you want to edit. Validate by pressing Enter. (Note that writing multiple bytes will modify multiple bytes, not just the one your cursor was pointing at.)
You can save the ROM you modified by doing File -> Save ROM as… or discard the modifications with Reload ROM.
Easy as pie!

:D That's it! I just realized. I think I found the way to make it so glitch Pokemon outside of the Obtainable Mew Glitch Range (191-199) show their effects when encountered in the wild!

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: GlitchedPokemonStudent
Date: 2018-09-25 20:04:05
I wonder how the game loads the Red sprite during trainer battles while Super Glitch or ZZAZZ Glitch is active?

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: Torchickens
Date: 2018-09-26 09:43:26

I wonder how the game loads the Red sprite during trainer battles while Super Glitch or ZZAZZ Glitch is active?


The Red sprite can be flipped or unflipped. Any value in address $D0AA greater than 0 will cause this sprite (and Pokémon sprites) to be flipped. It's possible that Super Glitch and ZZAZZ Glitch may corrupt it (depending on contents of screen data for Super Glitch or 0x99 for ZZAZZ glitch), but there could be other reasons I don't know as well (other than the well-known sprite corruption caused by MissingNo. etc.).

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: ISSOtm
Date: 2018-09-26 12:08:13
The way the sprite visual corruption works is, the game has a global flag that tells the decompression routine to decompress tiles (8x8 pixel squares, the unit of Game Boy graphics) in a flipped manner. It's also passed a destination parameter, which tells into which of the Game Boy tiles it must put the result. But, the tiles are always drawn in the same order, just individually flipped.
Usually the flag is set during Pokédex drawing, and cleared afterwards. However, glitches may st this flag to a non-zero value outside of the normal context, and the game isn't programmed to put it back to zero. Therefore sprites are drawn flipped when the game isn't expecting them to.

The way the sprites are drawn on the battle screen is like so:
1. Call sprite draw for opponent Pokémon (this function is also used for the Dex, so it expects either flip or not flip)
  a) Call sprite decompression into area designated for opponent Pokémon
  b) Is it flipped?
  c) Yes, draw tiles in a flipped arrangement (to be consistent with the tiles' pixels being flipped)
  d) No, draw tiles in an unflipped arrangement
2. Call sprite draw for player Pokémon (Red's sprite is just a special Pokémon sprite, actually!)
  a) Call sprite decompression into area designated for player Pokémon
  b) Draw tiles in an unflipped manner (the devs knew this function would never be called with flipped sprites, so they spared some code)

Things fall apart when sprites are flipped during battle - the player Pokémon (and by extension, Red) appear corrupted because of a half-done job: the tiles have been flipped, but their arrangement wasn't.

As for why any animation causes the opponent to break, it's for the exact same reason! Battle animations expect an unflipped tile arrangement, and enforce it for the same reason that the player Pokémon routine does. Therefore it break, woopsies.

And it makes sense why viewing a Dex entry fixes everything: it sets the flag (already set, so no problem) to draw the Dex Pokémon, then unsets the flag, and everything's right again!

Re: Official 1st Gen (Red/Blue and Yellow) Glitch Discussion

Posted by: GlitchedPokemonStudent
Date: 2018-09-26 18:28:59
I'm afraid I was quite vague because I didn't have much time last night, I apologize. What I meant is the one you see only twice throughout the entire game. The front facing Red sprite.

The only other occasion for the game to load the Red sprite, is through a link battle, but here's the question.

Where does Super Glitch or ZZAZZ Glitch grab the front facing Red sprite when you battle a trainer with those effects active. There is no accessible trainer class that have this sprite. I started wondering about this after re-watching MissingnoXpert's Super Glitch Redux video. I can't find any RAM addresses that point to this particular situation.

Once again, I'm sorry if I wasted your time. That was my fault.