Pokémon Yellow
The Generation I Pokémon game built around Pikachu, read through the pret/pokeyellow disassembly.
On this page
Pokémon Yellow is a Generation I game for the Game Boy. The code read here is pret’s pokeyellow disassembly, diffed routine by routine against Red and Blue.
Its battle rules are Red and Blue’s. Critical hits still come from base Speed1, a 100% move still misses 1 time in 2562, and the type chart is the same file3. The one change found in these routines is in wild encounters: Yellow reads a different tile of the player’s square, so the “left shore” squares on Cinnabar Island’s east coast no longer load grass Pokémon4.
Mechanics
| Mechanic | Kind | How |
|---|---|---|
| Critical hit | From a stat | Red and Blue's base-Speed rule, Focus Energy bug included |
| Hit chance | Move accuracy | Red and Blue's accuracy byte, so a 100% move still misses 1 time in 256 |
| Type effectiveness | 15 types | Red and Blue's 15-type chart, unchanged |
| Same-type attack bonus | Half again | Red and Blue's damage plus half, unchanged |
| Damage formula | Attack over defense | Red and Blue's formula and 217–255 roll, unchanged |
| Multi-hit attack | Repeat the first hit | Red and Blue's 2–5 hits, each copying the first |
| Random encounter | By area | Red and Blue's per-step roll, now reading a different tile so Cinnabar's coast gives no grass encounters |
| Fleeing | Speed ratio | Red and Blue's escape formula, unchanged |
| Turn order | Priority, then Speed | Red and Blue's Quick Attack, Counter, and Speed rule, unchanged |
| Sampled sound | Wave channel | Pikachu's 1-bit voice clips, played by switching the wave channel between full volume and mute |
| Capture | Two rolls | Red and Blue's capture code line for line, plus a Pikachu battle that catches outright |
Every claim about this game, by concept (11)
References
- ^Yellow keeps Red and Blue's
CriticalHitTestline for line, so the attacker's base Speed still sets the chance, in 256 for most moves and 8 times that for the high-critical ones, and Focus Energy still cuts it to a quarter.Codepret/pokeyellow · pret/pokeredHow we know
4649CriticalHitTest: ⋮ 4660 ld a, [wMonHBaseSpeed] 4661 ld b, a 4662 srl b ; (effective (base speed/2)) ⋮ 4685 srl b ⋮ 4701 sla b ; *4 for high critical move (effective (base speed/2)*8)) 4702 jr nc, .SkipHighCritical 4703 ld b, $ff 4704.SkipHighCritical
engine/battle/core.asm lines 4649–4717 at b6696f2 · upstream ↗ engine/battle/core.asm#L4478-L4546 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^Yellow keeps Red and Blue's
MoveHitTestandCalcHitChanceunchanged, so a move still hits when a random byte is below its scaled accuracy byte, and even a 100% move misses 1 time in 256.Codepret/pokeyellow · pret/pokeredHow we know
5506 call BattleRandom 5507 cp b 5508 jr nc, .moveMissed
engine/battle/core.asm lines 5506–5508 at b6696f2 · upstream ↗ engine/battle/core.asm#L5228-L5419 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^Yellow's type chart file is byte-for-byte Red and Blue's, the same 82 rows over 15 types, with Ghost still no effect on Psychic.Codepret/pokeyellow · pret/pokered
How we know
1TypeEffects: ⋮ 85 db -1 ; end
data/types/type_matchups.asm lines 1–85 at b6696f2 · upstream ↗ data/types/type_matchups.asm#L1-L85 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-21.
Checked by a second AI model, 2026-10-21.
- ^Yellow's
TryDoWildEncountertests the bottom-left tile of the player's half-block where Red and Blue test the bottom-right, so “left shore” half-blocks, such as Cinnabar Island's east coast, no longer load grass encounters; the rest of the routine is unchanged.Codepret/pokeyellow · pret/pokeredHow we know
27; is the bottom left tile (8,9) of the half-block we're standing in a grass/water tile? 28; note that by using the bottom left tile, this prevents the "left-shore" tiles from generating grass encounters 29 hlcoord 8, 9
engine/battle/wild_encounters.asm lines 27–29 at b6696f2 · upstream ↗ 27; is the bottom right tile (9,9) of the half-block we're standing in a grass/water tile? 28 hlcoord 9, 9 29 ld c, [hl] 30 ld a, [wGrassTile] 31 cp c 32 ld a, [wGrassRate] 33 jr z, .CanEncounter 34 ld a, $14 ; in all tilesets with a water tile, this is its id 35 cp c 36 ld a, [wWaterRate] 37 jr z, .CanEncounter
engine/battle/wild_encounters.asm lines 27–37 at af51989 · upstream ↗ 66 ld hl, wGrassMons 67 lda_coord 8, 9 68 cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile? 69 jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default 70 ld hl, wWaterMons 71; since the bottom right tile of a "left shore" half-block is $14 but the bottom left tile is not, 72; "left shore" half-blocks (such as the one in the east coast of Cinnabar) load grass encounters.
engine/battle/wild_encounters.asm lines 64–72 at af51989 · upstream ↗ Checked against the evidence by its author, an AI model, 2026-10-25.
Checked by a second AI model, 2026-10-21.
Checked by a second AI model, 2026-10-25.
Sources
Code
- pret contributors. 2026. “pokeyellow: disassembly of Pokémon Yellow.” pret. Commit b6696f2. pret/pokeyellow @ b6696f2 · licence, all uses
- pret contributors. 2026. “pokered: disassembly of Pokémon Red and Blue.” pret. Commit af51989. pret/pokered @ af51989 · licence, all uses