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

Fastest way to finish R/B (with glitches) - Page 1

Fastest way to finish R/B (with glitches)

Posted by: TheGatorade
Date: 2013-06-18 05:44:47
Heya people!  :)
I was wondering, what's the fastest way to beat a (not japanese) first generation game?
The best I can think of is the experience underflow glitch used for getting a level 100 Pokémon and beating the game with it.. Any ideas?

Re: Fastest way to finish R/B (with glitches)

Posted by: camper
Date: 2013-06-18 07:17:39
Save abuse.

Re: Fastest way to finish R/B (with glitches)

Posted by: Torchickens
Date: 2013-06-18 07:23:21

Heya people!  :)
I was wondering, what's the fastest way to beat a (not japanese) first generation game?
The best I can think of is the experience underflow glitch used for getting a level 100 Pokémon and beating the game with it.. Any ideas?


The save corruption glitch found by speedrunner Hanzou, opens up a number of different ways you can activate the Hall of Fame script. You have to choose save and reset the game early a moment after the Yes/No box disappears.

It changes all bytes from D163 (number of Pokémon in party) - D2F6 (nickname of the sixth Pokémon) to 255 (FF).

Pokémon past slot 6 aren't supposed to be Pokémon, and the bytes applying to those Pokémon correspond to unrelated variables in the game, some of which are bytes related to other Pokémon, many of which are bytes not related to Pokémon like the number of items in the items pack.

Consider this example:

These are the memory addresses that store the nicknames of Pokémon.

D2B5-D2BF - Nickname for 1st
D2C0-D2CA - Nickname for 2nd
D2CB-D2D5 - Nickname for 3rd
D2D6-D2E0 - Nickname for 4th
D2E1-D2EB - Nickname for 5th
D2EC-D2F6 - Nickname for 6th

(66 bytes in total)

See the Pokémon Red/Blue DataCrystal RAM Map article.

The first non-Pokémon byte is at D2F7 (own 1-8 in the Pokédex). This corresponds to the first letter of the nickname of the '7th Pokémon'.

Since all bytes relating to the first 6 Pokémon are replaced with FF, if you swap, say Pokémon 6 with Pokémon 7, you will own the first 8 Pokémon in the Pokédex and more.

There are other bytes that get corrupted when you switch post-6 Pokémon data, like the number of Pokémon in your party, depending on the general pattern of where the Pokémon bytes continue for each Pokémon (e.g. there is a difference of 2C between Pokémon 5's Pokémon byte 2 [D21B] and Pokémon 6's Pokémon byte 2 [D247] so the byte that corresponds to Pokémon 7's Pokémon byte 2 is [D273], which is actually the first letter of the Trainer name of the first Pokémon). This particular example doesn't matter though because [D273] is already in the range of the bytes that get corrupted to FF.

See DataCrystal's Red/Blue RAM Map for what other addresses for Pokémon 1-6 are.

When you swap one of the first 6 Pokémon with the 10th Pokémon (apparently when it comes to speedrunning swapping Pokémon 2 with Pokémon 10 is quickest), the number of items (byte D31D) gets corrupted to FF. This allows for more precise memory corruption as swapping post 20 items only exchanges two addresses; one address appears as the item identifier and the address after it appears as the item quantity.

To find out what address you are changing, use this equation

Item Address = D31C [D31D in Red/Blue] + ($CC35) + (($CC35) - 1)

To find out $CC35, highlight an item with select and then look up the address in memory viewer.

D365 [D364 in Yellow] stores the previous location for when you step out of an exit. At the beginning of the game, it is 00 (Pallet Town). Luckily, it appears as an item quantity; the quantity of item 36. 00 is technically 256 items, and you can toss 138 to change it to $76, placing you in the Hall of Fame when you step out of the exit.

(A list of locations by index number can be found here)

An even quicker way, which I believe was first done by gia257, is changing the level-script pointer (determines which special events appear on the map) to something that points to the Hall of Fame script, so you don't even have to leave the room.

It's complicated though, because you have to change the map first to something that has the same bank of the Hall of Fame script (3C), and you need to know the right pointer (although this can be found by tracking D36E-D36F in memory viewer at the Hall of Fame and swapping the endianness).

More information about gia's method here.

If you don't know how to find the ROM address from a pointer (useful if you want to view the code in a hex editor, although you'll need to refer to a list of opcodes), you can use this equation.

romAddress = (bankNumber * 0x4000) + (twoBytePointer - 0x4000);
romAddress = (7 * 0x4000) + (65BA - 0x4000)
romAddress = 1C000 + 25BA
romAddress = 1E5BA

You can also use Super Glitch to corrupt your number of Pokémon, see TheZZAZZGlitch's Red/Blue method, then use the aforementioned D365 method to change the exit warp into the Hall of Fame. I'm not sure which species byte changes the number of items when swapped into Pokémon 10 though.

You can also use the ZZAZZ glitch to corrupt your items, though I can't remember how.

Re: Fastest way to finish R/B (with glitches)

Posted by: camper
Date: 2013-06-18 08:03:14
This is the current record of non-save corrupting speedrun.

Re: Fastest way to finish R/B (with glitches)

Posted by: Stackout
Date: 2013-06-18 15:37:15

This is the current record of non-save corrupting speedrun.


interesting that here, ZZAZZ is used to explode the bag.

Re: Fastest way to finish R/B (with glitches)

Posted by: camper
Date: 2013-06-19 01:12:54
I wonder if it could be done faster with Super Glitch. Perhaps not, since you have to get a Pokemon with specific skillset to achieve the effect.

Re: Fastest way to finish R/B (with glitches)

Posted by: tachi
Date: 2013-06-19 13:01:53

Heya people!  :)
I was wondering, what's the fastest way to beat a (not japanese) first generation game?
The best I can think of is the experience underflow glitch used for getting a level 100 Pokémon and beating the game with it.. Any ideas?


You're making a speed run let's play on youtube aren't you…
And I think Torchickens method would be the fastest if you can pull it off.
Or you can do it my way :D

List of materials
A Microcontroller
Wire
Solder
Breadboard
A book of electrical currents
A pokemon game
Resistors
A Gameboy
De Soldering tool
Screwdriver
Computer
Battery
Another Gameboy
Rom hacking software
Google
Rom patching software
Soldering iron or gun

Steps:
1) unscrew the back of the gameboy and open it up
2) De solder the PIN connector for the cartridges CAREFULLY
3) Read the book of electrical currents and find out how many K's you need so you don't blow things up, get the correct resistors.
4) Using the wires and solder, connect each PIN on the connector to the breadboard.
5) With more wires, connect the microcontroller to the breadboards (do NOT turn on yet)
6) Insert the resistors in the correct locations, to have it connected to the microcontroller
7) Insert the battery and connect the Microcontroller to your computer.
8 ) Program your Microcontroller to extract all the data to your computer as a ROM file
9) Using ROM hacking tools, reprogram the game to take you to the credits screen when you hit New Game (keep in mind to not change the file size or you'll ruin everything)
10) Using software, patch the game with the changes you made
11) Place your game in a gameboy and choose New Game. VOILA

:D Hardware projects for the win!

Re: Fastest way to finish R/B (with glitches)

Posted by: Bent`
Date: 2013-06-23 16:30:56


Heya people!  :)
I was wondering, what's the fastest way to beat a (not japanese) first generation game?
The best I can think of is the experience underflow glitch used for getting a level 100 Pokémon and beating the game with it.. Any ideas?


You're making a speed run let's play on youtube aren't you…
And I think Torchickens method would be the fastest if you can pull it off.
Or you can do it my way :D

List of materials
A Microcontroller
Wire
Solder
Breadboard
A book of electrical currents
A pokemon game
Resistors
A Gameboy
De Soldering tool
Screwdriver
Computer
Battery
Another Gameboy
Rom hacking software
Google
Rom patching software
Soldering iron or gun

Steps:
1) unscrew the back of the gameboy and open it up
2) De solder the PIN connector for the cartridges CAREFULLY
3) Read the book of electrical currents and find out how many K's you need so you don't blow things up, get the correct resistors.
4) Using the wires and solder, connect each PIN on the connector to the breadboard.
5) With more wires, connect the microcontroller to the breadboards (do NOT turn on yet)
6) Insert the resistors in the correct locations, to have it connected to the microcontroller
7) Insert the battery and connect the Microcontroller to your computer.
8 ) Program your Microcontroller to extract all the data to your computer as a ROM file
9) Using ROM hacking tools, reprogram the game to take you to the credits screen when you hit New Game (keep in mind to not change the file size or you'll ruin everything)
10) Using software, patch the game with the changes you made
11) Place your game in a gameboy and choose New Game. VOILA

:D Hardware projects for the win!


That is way overcomplicated. Just desolder the ROM and replace it with your own. No need to take apart the Game Boy at all.

Re: Fastest way to finish R/B (with glitches)

Posted by: tachi
Date: 2013-06-23 17:22:45

That is way overcomplicated. Just desolder the ROM and replace it with your own. No need to take apart the Game Boy at all.


I guess you could desolder the ROM, replace that component (your best bet is a 32 PIN EPROM so it's re-writable), which would still require you to be able to connect the ROM or EPROM to the computer. There's multiple ways to do this, but finding a broken or cheap gameboy to connect the cartridge, rather than trying to replace a component in a pricey pokemon cartridge just seems more cost effective… just saying. (so if you mess up, your probably wasting 5 to 10 bucks on each used gameboy rather than 20-40 on a pokemon cartridge) The only thing that's not cost effective is the microcontroller, but I think it's worth an investment, because you can re purpose it for pretty much anything.

The 'best' hardware solution would be to purchase a flash cartridge starter set, because it's easy to learn, and no soldering needed. The only problems with that is that it's extremely hard to find, and they are illegal in some countries (looking at you UK)

Re: Fastest way to finish R/B (with glitches)

Posted by: Bent`
Date: 2013-06-26 22:15:56


That is way overcomplicated. Just desolder the ROM and replace it with your own. No need to take apart the Game Boy at all.


I guess you could desolder the ROM, replace that component (your best bet is a 32 PIN EPROM so it's re-writable), which would still require you to be able to connect the ROM or EPROM to the computer. There's multiple ways to do this, but finding a broken or cheap gameboy to connect the cartridge, rather than trying to replace a component in a pricey pokemon cartridge just seems more cost effective… just saying. (so if you mess up, your probably wasting 5 to 10 bucks on each used gameboy rather than 20-40 on a pokemon cartridge)


You dont need a Pokémon game. All you need is any cartridge thats wired the same. Heck, you could make your own cartridge on a breadboard and not have to desolder anything. Carts are dead simple.

Re: Fastest way to finish R/B (with glitches)

Posted by: tachi
Date: 2013-06-27 10:11:22
IImarkus, I wouldn't directly advise him using a ROM that wasn't extracted by him since that is technically illegal. That's why I said he should have a Pokemon cartridge, so he can directly extract the file he needs to perform the hack. And sure he could use other cartridges to shove the memory on, but who wouldn't want that sweet charizard sticker on a hacked pokemon game? I sure would.

Re: Fastest way to finish R/B (with glitches)

Posted by: Bent`
Date: 2013-07-01 20:44:00

IImarkus, I wouldn't directly advise him using a ROM that wasn't extracted by him since that is technically illegal. That's why I said he should have a Pokemon cartridge, so he can directly extract the file he needs to perform the hack.


Well, who doesnt already have one? I assumed the question was just about having spare ones to dissect.

And sure he could use other cartridges to shove the memory on, but who wouldn't want that sweet charizard sticker on a hacked pokemon game? I sure would.


So swap out the plastic!

Re: Fastest way to finish R/B (with glitches)

Posted by: tachi
Date: 2013-07-01 20:51:14

So swap out the plastic!

Either way you would have to have a pokemon cart….