On this page
  1. Related
  2. Mechanics
  3. References
  4. Sources

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

MechanicKindHow
Critical hitFrom a statRed and Blue's base-Speed rule, Focus Energy bug included
Hit chanceMove accuracyRed and Blue's accuracy byte, so a 100% move still misses 1 time in 256
Type effectiveness15 typesRed and Blue's 15-type chart, unchanged
Same-type attack bonusHalf againRed and Blue's damage plus half, unchanged
Damage formulaAttack over defenseRed and Blue's formula and 217–255 roll, unchanged
Multi-hit attackRepeat the first hitRed and Blue's 2–5 hits, each copying the first
Random encounterBy areaRed and Blue's per-step roll, now reading a different tile so Cinnabar's coast gives no grass encounters
FleeingSpeed ratioRed and Blue's escape formula, unchanged
Turn orderPriority, then SpeedRed and Blue's Quick Attack, Counter, and Speed rule, unchanged
Sampled soundWave channelPikachu's 1-bit voice clips, played by switching the wave channel between full volume and mute
CaptureTwo rollsRed and Blue's capture code line for line, plus a Pikachu battle that catches outright
Every claim about this game, by concept (11)
CaptureYellow runs the same capture code as Red and Blue from the first roll to the shake count: the ranges, the status values, the ball factors, and the shake thresholds match line for line. Before the rolls it adds a Pikachu battle (BATTLE_TYPE_PIKACHU), which takes the old man's branch and catches outright.Code
Critical hitYellow keeps Red and Blue's CriticalHitTest line for line, so the attacker's base Speed still sets the chance, ⌊S/2⌋ in 256 for most moves and 8 times that for the high-critical ones, and Focus Energy still cuts it to a quarter.Code
Damage formulaYellow keeps Red and Blue's CalculateDamage and RandomizeDamage unchanged, so base damage is still capped at 997 plus 2 and scaled by a random 217–255 over 255.Code
FleeingYellow keeps Red and Blue's escape formula, ⌊32P/(⌊E/4⌋mod256)⌋ plus 30 for each earlier attempt against a random byte, and adds one battle type, BATTLE_TYPE_RUN, that always escapes.Code
Hit chanceYellow keeps Red and Blue's MoveHitTest and CalcHitChance unchanged, 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.Code
Multi-hit attackYellow keeps Red and Blue's TwoToFiveAttacksEffect, 2 or 3 hits at 3/8 each and 4 or 5 at 1/8, and its damage loop, in which every hit after the first repeats it without a new damage calculation or accuracy test.Code
Random encounterYellow's TryDoWildEncounter tests 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.Code
Sampled soundPikachu's voice clips are 1-bit recordings played through the wave channel. The routine disables interrupts, fills wave RAM with $FF so the channel outputs a constant high level, and then for each bit sets channel 3's output level to 100% ($20) or mute ($00), with counted delay loops setting the rate.Code
Same-type attack bonusYellow keeps Red and Blue's AdjustDamageForMoveType, so STAB is still damage+⌊damage/2⌋ before the type rows.Code
Turn orderYellow keeps Red and Blue's turn order, Quick Attack first and Counter last unless both chose it, then the higher Speed, with a tie split evenly.Code
Type effectivenessYellow'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.Code

References

  1. ^Yellow keeps Red and Blue's CriticalHitTest line for line, so the attacker's base Speed still sets the chance, ⌊S/2⌋ 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/pokered
    How 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.

    In the claim ledger

  2. ^Yellow keeps Red and Blue's MoveHitTest and CalcHitChance unchanged, 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/pokered
    How 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.

    In the claim ledger

  3. ^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.

    In the claim ledger

  4. ^Yellow's TryDoWildEncounter tests 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/pokered
    How 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.

    In the claim ledger

Sources

Code