List of 8F bootstrap setups: Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
>ISSOtm
(Created this to avoid browsing the ACE thread. I mean, 35 pages !)
 
m (Text replacement - "jp (hl)" to "jp hl")
 
(4 intermediate revisions by 3 users not shown)
Line 18: Line 18:
# Kangaskhan as the fifth Pokémon
# Kangaskhan as the fifth Pokémon
# Pidgey must have 233 HP
# Pidgey must have 233 HP
To obtain such a Pidgey, Rare Candy it up to Lv100, apply 5~6 HP Ups.
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.
If needed get it poisoned, use a Max Potion (not Full Restore !), walk 4*(Pidgey's max HP-233) steps and cure the poison.
Line 35: Line 35:
$D16B <- 24 || inc h ; h = D3<br/>
$D16B <- 24 || inc h ; h = D3<br/>
$D16C <- 00 || nop<br/>
$D16C <- 00 || nop<br/>
$D16D <- e9 || jp (hl) ; pc = D322<br/>
$D16D <- e9 || jp hl ; pc = D322<br/>
<br/>
<br/>
</code>
</code>
Line 64: Line 64:
$D197 <- 24 || inc h ; h = D3<br/>
$D197 <- 24 || inc h ; h = D3<br/>
$D198 <- 00 || nop<br/>
$D198 <- 00 || nop<br/>
$D199 <- E9 || jp (hl) ; pc = D322
$D199 <- E9 || jp hl ; pc = D322
</code>
</code>


Line 78: Line 78:
# Tentacool as the third Pokémon
# Tentacool as the third Pokémon
# Meowth as the fourth Pokémon
# Meowth as the fourth Pokémon
# The fifth ad sixth Pokémon don't matter
# 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
# 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
# 21 PP left on the second Pokémon's third move w/ 1 PP Up used
Line 88: Line 88:
# Strength as the fifth Pokémon's third move
# Strength as the fifth Pokémon's third move
# Sixth Pokémon's attack stat has to be exactly 233
# Sixth Pokémon's attack stat has to be exactly 233



=== Super-compact setup ===
=== Super-compact setup ===
Line 123: Line 122:
# Kangaskhan as the fifth Pokémon
# Kangaskhan as the fifth Pokémon
# Pidgey must have 233 HP
# Pidgey must have 233 HP
To obtain such a Pidgey, Rare Candy it up to Lv100, apply 5~6 HP Ups.
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.
If needed get it poisoned, use a Max Potion (not Full Restore !), walk 4*(Pidgey's max HP-233) steps and cure the poison.
Line 140: Line 139:
$D16B <- 24 || inc h ; h = D3<br/>
$D16B <- 24 || inc h ; h = D3<br/>
$D16C <- 00 || nop<br/>
$D16C <- 00 || nop<br/>
$D16D <- e9 || jp (hl) ; pc = D327<br/>
$D16D <- e9 || jp hl ; pc = D327<br/>
<br/>
<br/>
</code>
</code>
Line 169: Line 168:
$D197 <- 24 || inc h ; h = D3<br/>
$D197 <- 24 || inc h ; h = D3<br/>
$D198 <- 00 || nop<br/>
$D198 <- 00 || nop<br/>
$D199 <- E9 || jp (hl) ; pc = D327
$D199 <- E9 || jp hl ; pc = D327
</code>
</code>


Line 183: Line 182:
# Tentacool as the third Pokémon
# Tentacool as the third Pokémon
# Meowth as the fourth Pokémon
# Meowth as the fourth Pokémon
# The fifth ad sixth Pokémon don't matter
# 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
# 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
# 21 PP left on the second Pokémon's third move w/ 1 PP Up used
Line 193: Line 192:
# Strength as the fifth Pokémon's third move
# Strength as the fifth Pokémon's third move
# Sixth Pokémon's attack stat has to be exactly 233
# Sixth Pokémon's attack stat has to be exactly 233



=== Super-compact setup ===
=== Super-compact setup ===
Line 212: Line 210:
# M p u as the fourth Pokémon
# M p u as the fourth Pokémon
# The fifth and sixth Pokémon don't matter
# The fifth and sixth Pokémon don't matter


[[Category:Arbitrary code execution]]

Latest revision as of 21:04, 19 January 2021

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 :

  1. Exactly 5 Pokémon
  2. Pidgey as the first Pokémon
  3. Parasect as the second Pokémon
  4. Onix as the third Pokémon
  5. Tentacool as the fourth Pokémon
  6. Kangaskhan as the fifth Pokémon
  7. 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 :

  1. 6 Pokémon
  2. The first Pokémon does not matter
  3. Pidgey as the second Pokémon
  4. Parasect as the third Pokémon
  5. Onix as the fourth Pokémon
  6. Tentacool as the fifth Pokémon
  7. Arbok as the sixth Pokémon
  8. 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.

  1. 6 Pokémon
  2. Onix as the first Pokémon
  3. Pidgey as the second Pokémon
  4. Tentacool as the third Pokémon
  5. Meowth as the fourth Pokémon
  6. The fifth and sixth Pokémon don't matter
  7. 24 PP left on the second Pokémon's second move w/ 0 PP Ups used
  8. 21 PP left on the second Pokémon's third move w/ 1 PP Up used
  9. 36 PP left on the fourth Pokémon's first move w/ 0 PP Ups used
  10. 24 PP left on the fourth Pokémon's second move w/ 0 PP Ups used
  11. 20 PP left on the fourth Pokémon's third move w/ 0 PP Ups used
  12. Double Team as the fifth Pokémon's first move
  13. Double Kick as the fifth Pokémon's second move
  14. Strength as the fifth Pokémon's third move
  15. 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.

  1. 3, 4 or 5 Pokémon
  2. h Poké as the first Pokémon
  3. Onix as the second Pokémon
  4. M p u as the third Pokémon
  5. Other Pokémon don't matter

Or :

  1. 6 Pokémon
  2. First Pokémon doesn't matter
  3. h Poké as the second Pokémon
  4. Onix as the third Pokémon
  5. M p u as the fourth Pokémon
  6. 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 :

  1. Exactly 5 Pokémon
  2. Pidgey as the first Pokémon
  3. Parasect as the second Pokémon
  4. Graveler as the third Pokémon
  5. Tentacool as the fourth Pokémon
  6. Kangaskhan as the fifth Pokémon
  7. 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 :

  1. 6 Pokémon
  2. The first Pokémon does not matter
  3. Pidgey as the second Pokémon
  4. Parasect as the third Pokémon
  5. Graveler as the fourth Pokémon
  6. Tentacool as the fifth Pokémon
  7. Arbok as the sixth Pokémon
  8. 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.

  1. 6 Pokémon
  2. Graveler as the first Pokémon
  3. Pidgey as the second Pokémon
  4. Tentacool as the third Pokémon
  5. Meowth as the fourth Pokémon
  6. The fifth and sixth Pokémon don't matter
  7. 24 PP left on the second Pokémon's second move w/ 0 PP Ups used
  8. 21 PP left on the second Pokémon's third move w/ 1 PP Up used
  9. 36 PP left on the fourth Pokémon's first move w/ 0 PP Ups used
  10. 24 PP left on the fourth Pokémon's second move w/ 0 PP Ups used
  11. 20 PP left on the fourth Pokémon's third move w/ 0 PP Ups used
  12. Double Team as the fifth Pokémon's first move
  13. Double Kick as the fifth Pokémon's second move
  14. Strength as the fifth Pokémon's third move
  15. 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.

  1. 3, 4 or 5 Pokémon
  2. h Poké as the first Pokémon
  3. Graveler as the second Pokémon
  4. M p u as the third Pokémon
  5. Other Pokémon don't matter

Or :

  1. 6 Pokémon
  2. First Pokémon doesn't matter
  3. h Poké as the second Pokémon
  4. Graveler as the third Pokémon
  5. M p u as the fourth Pokémon
  6. The fifth and sixth Pokémon don't matter