Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of an article from Glitch City Laboratories wiki.

A live version of this article is available at the Glitch City Wiki here.

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

You may also download the archive of the wiki in .tar.gz or .xml.gz formats.

List of 8F bootstrap setups

The 8F item in Pokémon Red and Blue is useful for Arbitrary code execution. However, it cannot be used "raw", since it executes code based on party Pokémon data, which is hard to manipulate.

Thus, Pokémon "bootstrap" setups need to be used to "redirect" execution flow to a part of memory easier to arrange - usually, items.

For convenience reasons, bootstraps make execution jump to the third item in the player's pack (usually the first two items are 8F and an item such as Master Balls, Escape Ropes, etc.).

US versions

5 Pokémon setup

Credits to pigdevil2010 for this setup, currently the most used and recommended.

The player's party Pokémon must be in a certain order and have certain stats :
  • Exactly 5 Pokémon
  • Pidgey as the first Pokémon
  • Parasect as the second Pokémon
  • Onix as the third Pokémon
  • Tentacool as the fourth Pokémon
  • Kangaskhan as the fifth Pokémon
  • Pidgey must have 233 HP To obtain such a Pidgey, Rare Candy it up to Lv100, apply 5~6 HP Ups.

    If needed get it poisoned, use a Max Potion (not Full Restore !), walk 4*(Pidgey's max HP-233) steps and cure the poison.

    The bootstrap code translates to the following ASM :
    Initial hl = D163

    $D163 <- 05 || dec b

    $D164 <- 24 || inc h ; h = D2

    $D165 <- 2E ||

    $D166 <- 22 || ld l, 22 ; hl = D222

    $D167 <- 18 ||

    $D168 <- 02 || jr 2 ; pc = D16B

    $D169 <- FF ||

    $D16A <- FF ||

    $D16B <- 24 || inc h ; h = D3

    $D16C <- 00 || nop

    $D16D <- e9 || jp (hl) ; pc = D322





    6 Pokémon setup

    Another setup allows any Pokémon at the front of the party :
  • 6 Pokémon
  • The first Pokémon does not matter
  • Pidgey as the second Pokémon
  • Parasect as the third Pokémon
  • Onix as the fourth Pokémon
  • Tentacool as the fifth Pokémon
  • Arbok as the sixth Pokémon
  • Pidgey must have 233 HP

    The bootstrap code translates to the following ASM :



    $D163 <- 06 ||

    $D164 <- ?? || ld b, ??

    $D165 <- 24 || inc h ; h = D2

    $D166 <- 2E ||

    $D167 <- 22 || ld l, 22 ; hl = D222

    $D168 <- 18 ||

    $D169 <- 02 || jr 2D ; pc = D197

    (...)

    $D197 <- 24 || inc h ; h = D3

    $D198 <- 00 || nop

    $D199 <- E9 || jp (hl) ; pc = D322


    Legacy 6 Pokémon setup

    This setup is difficult to obtain, quite volatile (PP-sensitive) and though it's outdated, it works and was the first to be so.

    Credits goes to TheZZAZZGlitch.

  • 6 Pokémon
  • Onix as the first Pokémon
  • Pidgey as the second Pokémon
  • Tentacool as the third Pokémon
  • Meowth as the fourth Pokémon
  • The fifth and sixth Pokémon don't matter
  • 24 PP left on the second Pokémon's second move w/ 0 PP Ups used
  • 21 PP left on the second Pokémon's third move w/ 1 PP Up used
  • 36 PP left on the fourth Pokémon's first move w/ 0 PP Ups used
  • 24 PP left on the fourth Pokémon's second move w/ 0 PP Ups used
  • 20 PP left on the fourth Pokémon's third move w/ 0 PP Ups used
  • Double Team as the fifth Pokémon's first move
  • Double Kick as the fifth Pokémon's second move
  • Strength as the fifth Pokémon's third move
  • Sixth Pokémon's attack stat has to be exactly 233

    Super-compact setup

    Glitch Pokémon M p u is quite hard to obtain (it cannot be obtained via the Old man glitch nor the Trainer-Fly glitch, because a battle with a Trainer begins instead.

    Also, since it is not "hl-jump" type, some setup will [b]not[/b] work if this setup is used.
  • 3, 4 or 5 Pokémon
  • h Poké as the first Pokémon
  • Onix as the second Pokémon
  • M p u as the third Pokémon
  • Other Pokémon don't matter

    Or :
  • 6 Pokémon
  • First Pokémon doesn't matter
  • h Poké as the second Pokémon
  • Onix as the third Pokémon
  • M p u as the fourth Pokémon
  • The fifth and sixth Pokémon don't matter

    EU versions

    The general rule of thumb is to replace Onixes with Gravelers.

    5 Pokémon setup

    Credits to pigdevil2010 for this setup, currently the most used and recommended.

    The player's party Pokémon must be in a certain order and have certain stats :
  • Exactly 5 Pokémon
  • Pidgey as the first Pokémon
  • Parasect as the second Pokémon
  • Graveler as the third Pokémon
  • Tentacool as the fourth Pokémon
  • Kangaskhan as the fifth Pokémon
  • Pidgey must have 233 HP To obtain such a Pidgey, Rare Candy it up to Lv100, apply 5~6 HP Ups.

    If needed get it poisoned, use a Max Potion (not Full Restore !), walk 4*(Pidgey's max HP-233) steps and cure the poison.

    The bootstrap code translates to the following ASM :
    Initial hl = D163

    $D163 <- 05 || dec b

    $D164 <- 24 || inc h ; h = D2

    $D165 <- 2E ||

    $D166 <- 27 || ld l, 27 ; hl = D227

    $D167 <- 18 ||

    $D168 <- 02 || jr 2 ; pc = D16B

    $D169 <- FF ||

    $D16A <- FF ||

    $D16B <- 24 || inc h ; h = D3

    $D16C <- 00 || nop

    $D16D <- e9 || jp (hl) ; pc = D327





    6 Pokémon setup

    Another setup allows any Pokémon at the front of the party :
  • 6 Pokémon
  • The first Pokémon does not matter
  • Pidgey as the second Pokémon
  • Parasect as the third Pokémon
  • Graveler as the fourth Pokémon
  • Tentacool as the fifth Pokémon
  • Arbok as the sixth Pokémon
  • Pidgey must have 233 HP

    The bootstrap code translates to the following ASM :



    $D163 <- 06 ||

    $D164 <- ?? || ld b, ??

    $D165 <- 24 || inc h ; h = D2

    $D166 <- 2E ||

    $D167 <- 27 || ld l, 27 ; hl = D227

    $D168 <- 18 ||

    $D169 <- 02 || jr 2D ; pc = D197

    (...)

    $D197 <- 24 || inc h ; h = D3

    $D198 <- 00 || nop

    $D199 <- E9 || jp (hl) ; pc = D327


    Legacy 6 Pokémon setup

    This setup is difficult to obtain, quite volatile (PP-sensitive) and though it's outdated, it works and was the first to be so.

    Credits goes to TheZZAZZGlitch.

  • 6 Pokémon
  • Graveler as the first Pokémon
  • Pidgey as the second Pokémon
  • Tentacool as the third Pokémon
  • Meowth as the fourth Pokémon
  • The fifth and sixth Pokémon don't matter
  • 24 PP left on the second Pokémon's second move w/ 0 PP Ups used
  • 21 PP left on the second Pokémon's third move w/ 1 PP Up used
  • 36 PP left on the fourth Pokémon's first move w/ 0 PP Ups used
  • 24 PP left on the fourth Pokémon's second move w/ 0 PP Ups used
  • 20 PP left on the fourth Pokémon's third move w/ 0 PP Ups used
  • Double Team as the fifth Pokémon's first move
  • Double Kick as the fifth Pokémon's second move
  • Strength as the fifth Pokémon's third move
  • Sixth Pokémon's attack stat has to be exactly 233

    Super-compact setup

    Glitch Pokémon M p u is quite hard to obtain (it cannot be obtained via the Old man glitch nor the Trainer-Fly glitch, because a battle with a Trainer begins instead.

    Also, since it is not "hl-jump" type, some setup will [b]not[/b] work if this setup is used.
  • 3, 4 or 5 Pokémon
  • h Poké as the first Pokémon
  • Graveler as the second Pokémon
  • M p u as the third Pokémon
  • Other Pokémon don't matter

    Or :
  • 6 Pokémon
  • First Pokémon doesn't matter
  • h Poké as the second Pokémon
  • Graveler as the third Pokémon
  • M p u as the fourth Pokémon
  • The fifth and sixth Pokémon don't matter

    Categories