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

The type 1 of (hex:E8) in Red/Green - Page 1

The type 1 of (hex:E8) in Red/Green

Posted by: Torchickens
Date: 2013-12-19 11:11:57
Kazblox found this cool glitch in Red/Green where the type of (hex:E8) causes map corruption and lets you walk through walls, although unfortunately you're likely to get trapped. When it does work, its type 1 is 99999… (possibly causing a buffer overflow) but for some reason its type 1 isn't always that and when it isn't the corruption may not work (I say 'may' as I've only ever seen it with two or possibly three type 1s).

Unfortunately, when I got it via the fossil conversion glitch (exp modulo 232) it had the wrong type.

[img]http://i2.minus.com/i5SAdej33LJhG.png[/img]

I wonder why…

If you want to see the type yourself easily, just change D124 (Pokémon 1 'donor') to E8.

Edit: Its type is 0x20. You can verify this by looking at offset 0x39AB6 in the ROM (#245's type 1) or viewing D130 (Pokémon 1's first type). In Red/Blue, type name pointers (I presume this is a table) are from 0x27DAF-0x27DE4 but I don't know where they are in Red/Green.

Re: The type 1 of (hex:E8) in Red/Green

Posted by: kazblox
Date: 2013-12-19 15:37:03
You forgot that you need to battle a wild pokemon or fight a trainer in tall grass or a trainer route, in order to refresh the map. The battle script for 5kai will make it easier, you need to put it in the first slot of your party to avoid having to do all of this huge stuff you need for the other pokemon.

Re: The type 1 of (hex:E8) in Red/Green

Posted by: Torchickens
Date: 2013-12-20 08:58:29

You forgot that you need to battle a wild pokemon or fight a trainer in tall grass or a trainer route, in order to refresh the map


Thanks for that. I'll try it out.


The battle script for 5kai will make it easier, you need to put it in the first slot of your party to avoid having to do all of this huge stuff you need for the other pokemon.


OK. I think I misunderstood your post to begin with. Yeah. It seems like a good idea to use an instant battle code with 5 to encounter a wild Pokémon and fix the map. Shame that Sweet Scent doesn't exist in Generation I. Don't know if it worked in caves or if it would work in Pokémon Mansion, though.

For the message below it was my response when I thought you were saying it's easier to use 5 to get 0xE8:

Both are awkward to set up. 5 is probably harder because it requires more steps and high item quantities but once you have the right requirements, it's easier to manipulate your species value than the fossil conversion glitch.

For the fossil conversion glitch you need 32 PC items and possibly a fossil, and the Pokémon you get is modulo 256 of Pokémon 5's total experience. I suspect you probably do need a fossil as if I recall rightly in Red/Blue there's a flag that determines whether the fossil guy took a fossil or not.

The hard part is preparing the right total experience for your Pokémon and this is a factor that may make 5 more viable.


For 5's bootstrap code, you need three PP Ups, but they can be found here:

[img]http://i5.minus.com/j327BkQVPLeFb.jpg[/img][img]http://i5.minus.com/je7iuSTUMfNGq.jpg[/img][img]http://i5.minus.com/jk4R0jR5OaCNn.jpg[/img]


Once that's done, at first it's just a matter of getting the right Pokémon and remaining PP.

1) 06h: 6 Pokémon (0xD123)
2) xxh: Any first Pokémon (0xD124)
3) 18h: Tentacool as the second Pokémon (0xD125)
4) 4Dh: Meowth as the third Pokémon (0xD126)
5) 18h: 24 PP left on the second Pokémon's first move (0xD174)
6) 56h: 22 PP left on the second Pokémon's second move w/ 1 PP Up used (0xD175)
7) 18h: 24 PP left on the 4th Pokémon's first move (0xD1CC)
8) 56h: 22 PP left on the 4th Pokémon's second move w/ 1 PP Up used (0xD1CD)
9) 18h: 24 PP left on the 6th Pokémon's first move (0xD224)
10) 4Fh: 15 PP left on the 6th Pokémon's second move w/ 1 PP Up used (0xD225)
11) C3h, A4h, D2h: The 6th Pokémon's nickname begins with "て" (0xD275-0xD277)

Remember that this redirects the program to item 2, not item 3.

In order to modify Pokémon 1 you need certain TMs and some large item quantities. Red/Green doesn't have the Old Man glitch and normal Missingno. freeze the game, so you need to do the Ditto glitch to encounter the fossil/ghost Missingno but you may be able to get two games, one with the fossil/ghost Missingno, and do that Cable Club escape glitch with the other player's team in memory.

This cheat will change the first Pokémon's donor byte to 0xE8.

3E E8 EA 24 D1 C9

ld a, E8
ld (D124), a
ret


X Accuracy x232
TM34 x36
TM09 x201

If you want to change the recipient byte so the DayCare Center gives you back an 0xE8 (you won't see a glitched type immediately though), just change TM34's quantity to 43 (hex: 2B).


Now… I just used 5 to obtain E8 but it still has the wrong type. That's unfortunate.


Edit: I think I've got it! If you save and reset, 0xE8's type becomes the name that corrupts the map. Viewing a normal Pokémon's stats seems to be one of the things that changes its type name to the one that doesn't cause map corruption.

Edit 2: Thanks to this list, I know that E2 () and E5 (ぱ) also have the Pokédex number 245 and therefore the same types, so you can also do the glitch with them.

Here's a video of me getting a and playing around with its map corruption.