Skip to content

Settle a Generation 1 script branch on a byte with a closed set - #600

Merged
Decryptu merged 1 commit into
mainfrom
gen1-script-domains
Sep 8, 2026
Merged

Settle a Generation 1 script branch on a byte with a closed set#600
Decryptu merged 1 commit into
mainfrom
gen1-script-domains

Conversation

@Decryptu

@Decryptu Decryptu commented Sep 8, 2026

Copy link
Copy Markdown
Owner

wSpritePlayerStateData1FacingDirection holds one of four values and wRivalStarter and wPlayerStarter one of three. A cp against a value the walk has already excluded cannot match, and one the set has nothing else left beside always does, so both unknown arms of the text_asm corpus on Red and Blue are gone.

Fixed

  • GateUpstairsScript_PrintIfFacingUp re-tests a facing its caller's jp nz has already refused, so Route 11 Gate 2F's left binoculars row no longer carries an unreachable arm.
  • Route22GetRivalTrainerNoByStarterScript's cp b loop walks a three-row table with no terminator and unrolled into the code behind it. 12 starter nodes and 8 trainer_battle rows of the map state census were bytes rather than table rows.
  • The hidden event census doc in tools/checks/gen1_maps.gd sat above _elevators.

Removed

  • Gen1WorldImporter.decode_script's refused parameter, which no caller passed, and the six sites that appended to its list.

tools/validate.gd -- all passes 94 topics on all six cartridges; the unit tier's 1293 gen1 and world tests pass and two new cases in tests/unit/test_gen1_script.gd cover both settled shapes.

`wSpritePlayerStateData1FacingDirection` holds one of four values and
`wRivalStarter` and `wPlayerStarter` one of three, so a `cp` against a
value the walk has already excluded cannot match and one the set has
nothing else left beside always does. That closes both unknown arms of
the `text_asm` corpus on Red and Blue.

`GateUpstairsScript_PrintIfFacingUp` re-tests a facing its caller's
`jp nz` has already refused, and `Route22GetRivalTrainerNoByStarterScript`
walks a three-row table with no terminator, which used to unroll into
the code behind it: 12 starter nodes and 8 trainer battles of the map
state census were bytes rather than rows.

`Gen1WorldImporter.decode_script`'s `refused` parameter had no caller;
its list and the six sites that appended to it are gone. The hidden
event census doc in `tools/checks/gen1_maps.gd` sat above `_elevators`.
@Decryptu
Decryptu merged commit 6881c62 into main Sep 8, 2026
1 check passed
@Decryptu
Decryptu deleted the gen1-script-domains branch September 8, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant