Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
ce5baf4
Merge commit 'b84099b26' into frlg/stage16b-silph
dayfine Nov 13, 2026
18a37e0
FRLG AutoStory: Silph Co. 5F to Giovanni, Lapras gift, Master Ball, b…
dayfine Nov 13, 2026
36644ec
Merge autostory/rng-handoff into frlg/stage16b-silph
dayfine Nov 13, 2026
8169680
FRLG AutoStory: Starter RNG and Gift RNG run through the shared RNG h…
dayfine Nov 13, 2026
231142e
Merge remote-tracking branch 'origin/autostory/rng-handoff' into frlg…
dayfine Nov 13, 2026
c975585
FRLG AutoStory RNG handoff: one rng_handoff_result(), gift run keeps …
dayfine Nov 13, 2026
991987f
Merge branch 'frlg/gates' into frlg/stage16b-silph
dayfine Nov 13, 2026
d0b14c1
FRLG Silph tests: read the Card Key from the sim's state
dayfine Nov 13, 2026
1a7e1f4
FRLG gates merge: keep stage16b's card_key_held() accessor on the sim
dayfine Nov 13, 2026
ad5016d
Merge frlg/gates into frlg/stage16b-silph (real maps, pin 4b886bb)
dayfine Nov 13, 2026
730044f
FRLG: drop the synthetic Silph GateMaps (real pinned maps carry the d…
dayfine Nov 13, 2026
6261723
FRLG: code-health fixes (approach list lines, namespace closes)
dayfine Nov 13, 2026
8cac3e6
Merge remote-tracking branch 'origin/frlg/gates' into frlg/stage16b-s…
dayfine Nov 13, 2026
f38edb8
FRLG: the walk tests' maps carry the run's flags (silph_cleared); 16.…
dayfine Nov 13, 2026
f8177cf
FRLG: 16.06's golden plan walks the maps without Giovanni's Rockets
dayfine Nov 13, 2026
e858326
Merge frlg/gates into frlg/stage16b-silph
dayfine Nov 13, 2026
edecbd8
Merge frlg/stage17-viridian (14.02 split) into frlg/stage17a-saffron-gym
dayfine Nov 13, 2026
4aec856
FRLG 17a: 12.02b is in STORY_ORDER and the run plans (the 12.02 split…
dayfine Nov 13, 2026
2faecd4
Merge frlg/gates (14.02 split) into frlg/stage16b-silph
dayfine Nov 13, 2026
a1f4e36
Merge frlg/stage17-viridian (14.04 split) into frlg/stage17a-saffron-gym
dayfine Nov 13, 2026
4708d97
Merge frlg/gates (14.04 split) into frlg/stage16b-silph
dayfine Nov 13, 2026
636de5c
FRLG AutoStory: the chain test expects 72 checkpoints (the split's me…
dayfine Nov 13, 2026
5b39bf0
FRLG AutoStory: the chain test expects 71 checkpoints (the split's me…
dayfine Nov 13, 2026
6f9ec5f
FRLG 16.03: the rival alone; the walk to the employee is 16.03b
dayfine Nov 13, 2026
839eb1d
Merge frlg/stage17-viridian (17.04 split) into frlg/stage17a-saffron-gym
dayfine Nov 13, 2026
5c846aa
Merge remote-tracking branch 'origin/frlg/gates' into HEAD
dayfine Nov 13, 2026
3b1d095
Merge remote-tracking branch 'origin/frlg/stage17-viridian' into HEAD
dayfine Nov 13, 2026
e823cba
Merge frlg/gates into frlg/stage16b-silph
dayfine Nov 13, 2026
6bbffba
Merge frlg/stage17-viridian into frlg/stage17a-saffron-gym
dayfine Nov 13, 2026
2eee644
Merge origin/frlg/gates into frlg/stage16b-silph
dayfine Nov 13, 2026
04a9c63
Merge origin/frlg/stage17-viridian into frlg/stage17a-saffron-gym
dayfine Nov 13, 2026
47e0779
AutoStory: breakpoints, pause before each step and each leg (hook, op…
dayfine Nov 13, 2026
d8f6848
AutoStory breakpoints: code health fixes
dayfine Nov 13, 2026
6268f4f
AutoStory breakpoints: executors pause before each step of their chec…
dayfine Nov 13, 2026
9499c3f
FRLG walker: [Leg] records from run_route, and a replay of console fa…
dayfine Nov 13, 2026
2cb35d5
Merge autostory/story-breakpoints (#448) into frlg/story-breakpoints
dayfine Nov 13, 2026
d81ad7a
FRLG AutoStory: breakpoints pause before each step and each leg of a …
dayfine Nov 13, 2026
28c7a30
FRLG replay test: qualify ALL_DIRECTIONS
dayfine Nov 13, 2026
3a1a4d3
AutoStory breakpoints: the pause wrapper holds a move-only act
dayfine Nov 13, 2026
0bebe26
Merge remote-tracking branch 'origin/autostory/story-breakpoints' int…
dayfine Nov 13, 2026
4ddd204
FRLG recovery test: check [Leg] records apart; replay test names the …
dayfine Nov 13, 2026
30cba84
FRLG 12.03 fault: legs clear of the fat man's wander zone
dayfine Nov 13, 2026
ca7557f
FRLG AutoStory: the panel hands the run's pause points to its executor
dayfine Nov 13, 2026
7352452
Leg trace python test skips without the BDSP golden; replay test uses…
dayfine Nov 13, 2026
ebbef21
FRLG walker: a hold that moved the screen not at all is not trusted
dayfine Nov 13, 2026
2dc43fa
FRLG walker: judge a hold's movement only from a known tile; sim STAR…
dayfine Nov 13, 2026
185a6ad
FRLG walker: split the hold out of walk_step()
dayfine Nov 13, 2026
0ac33f9
FRLG AutoStory: screenshot at each route leg end and Fly landing; 12.…
dayfine Nov 13, 2026
e090658
FRLG AutoStory: Fly by species opens the party once, party read cached
dayfine Nov 13, 2026
ceb666c
FRLG AutoStory: 12.03 golden for the shore at (10, 16)
dayfine Nov 13, 2026
5236be9
FRLG AutoStory: 12.03 golden, drop the duplicated tail
dayfine Nov 13, 2026
a22ca77
FRLG AutoStory: Fly lands on a fade, then the player on screen
dayfine Nov 13, 2026
d3e6fea
FRLG AutoStory: remember who uses each field move, Fly goes to that slot
dayfine Nov 13, 2026
a88d8f6
FRLG AutoStory: Fly landing header includes the direction type's real…
dayfine Nov 13, 2026
780c8e2
FRLG AutoStory: Fly landing frames test reads the boy sprite sheet
dayfine Nov 13, 2026
2a66fc0
FRLG AutoStory: document FieldMoveUsers
dayfine Nov 13, 2026
2b469db
FRLG AutoStory: Fly landing frames test uses the Pallet standing frame
dayfine Nov 13, 2026
8377384
FRLG AutoStory: Fly landing frames test reads either player sheet
dayfine Nov 13, 2026
8b81149
Merge commit '0877430cf' into frlg/rng-handoff-work
dayfine Nov 13, 2026
c98d66c
FRLG AutoStory: the handoff stop reports through the shared report; o…
dayfine Nov 13, 2026
b05eec5
Merge branch 'frlg/gates' into frlg/stage16b-silph
dayfine Nov 13, 2026
a106f1a
FRLG AutoStory: 12.03 walks straight out of Fuchsia's Center; a turn …
dayfine Nov 13, 2026
c5a9646
FRLG AutoStory: step_once() and face_wall() pass turn_to()'s sprite a…
dayfine Nov 13, 2026
de9c24c
FRLG AutoStory: a step's facing and tile go together as StepStart; ma…
dayfine Nov 13, 2026
89ee006
FRLG AutoStory: the map-edge check reads the planner's maps, which co…
dayfine Nov 13, 2026
ae6cf4a
FRLG 20.01a to 20.05: Indigo Plateau's Mart, the Elite Four and the C…
dayfine Nov 13, 2026
3477a98
FRLG 20.01 to 20.05: route to each Elite Four member after the room's…
dayfine Nov 13, 2026
87f85f2
FRLG 20.0N tests: League foe rows in their own table; inputs before t…
dayfine Nov 13, 2026
973d92d
FRLG 20.04/20.05: PokeGuy's Full Restore after Agatha and Elixir afte…
dayfine Nov 13, 2026
995cf83
FRLG AutoStory: tests for the field move users' settings text (red)
dayfine Nov 13, 2026
ce033cb
FRLG AutoStory: keep the field move users in the settings, as the SID
dayfine Nov 13, 2026
1ce9a85
FRLG AutoStory: the saved field move users keep themselves (SavedFiel…
dayfine Nov 13, 2026
1cb9663
Merge frlg/party-menu-once (#453) into frlg/stage20-league
dayfine Nov 13, 2026
af42d6d
FRLG AutoStory: Fly landing test with the 02:46 fly-off frame (red)
dayfine Nov 13, 2026
8469910
FRLG AutoStory: Fly lands only once the screen has left the departure…
dayfine Nov 13, 2026
f710f66
FRLG AutoStory: Fly landing's departure bar from the measured frames
dayfine Nov 13, 2026
546a19b
FRLG AutoStory: Fly landing frames test split under the function limit
dayfine Nov 13, 2026
ca952fb
FRLG walker: hold_scroll_change() measures a hold's movement; banner …
dayfine Nov 13, 2026
d7f4d4c
FRLG walker: a hold moved only if the top and the bottom of the map b…
dayfine Nov 13, 2026
469e771
FRLG walker: include <algorithm> for std::min
dayfine Nov 13, 2026
d772b38
FRLG AutoStory: save only where the checkpoint ends, by the save card
dayfine Nov 13, 2026
f8962c1
FRLG walker: a door north without a fade must show the black below th…
dayfine Nov 13, 2026
c6b77c0
FRLG route: test that a surfing open leg before another open leg is c…
dayfine Nov 13, 2026
b0ca001
FRLG route: check a surfing open leg before another open leg, or stop
dayfine Nov 13, 2026
03067de
FRLG AutoStory: count a heal only where a Pokemon Center's floor shows
dayfine Nov 13, 2026
f19787b
FRLG Center floor reader: namespace closing comments
dayfine Nov 13, 2026
446ad9b
FRLG route: check only long open water legs before another open leg
dayfine Nov 13, 2026
abc0002
FRLG AutoStory: heal_in_center() to the healing steps, save end check…
dayfine Nov 13, 2026
3194347
FRLG AutoStory 12.03: Route 21's water legs end at walls; test that n…
dayfine Nov 13, 2026
d3f53ab
FRLG AutoStory: code health: heal_in_center() in its own header; bike…
dayfine Nov 13, 2026
d03218e
Merge frlg/stage16b-silph (#444) into frlg/stage20-league: Silph 16.0…
dayfine Nov 13, 2026
9290d87
Merge frlg/stage17a-saffron-gym (#443) into frlg/stage20-league: Sabr…
dayfine Nov 13, 2026
b99dc99
Merge frlg/story-breakpoints (#450) into frlg/stage20-league
dayfine Nov 13, 2026
1733624
Merge frlg/save-postcondition (#463) into frlg/stage20-league
dayfine Nov 13, 2026
e3eb4b6
Merge origin/frlg/checkpoint-replay into frlg/leg-records
dayfine Nov 13, 2026
089d49e
FRLG AutoStory: 18.02's golden after Silph (16.02-16.06) comes first
dayfine Nov 13, 2026
2d7cc64
Merge frlg/stage19-victory-road into frlg/party-menu-once: upstream #…
dayfine Nov 13, 2026
39e9927
Merge frlg/stage19-victory-road into frlg/save-postcondition: upstrea…
dayfine Nov 13, 2026
0299d40
Merge frlg/stage19b-victory-cave into frlg/stage20-league: upstream #…
dayfine Nov 13, 2026
f34c9c0
FRLG: PartyMemberMenuReader reads a party member's menu and its blue …
dayfine Nov 13, 2026
bb61c0e
FRLG AutoStory: tests for a Fly user found by its party menu (red)
dayfine Nov 13, 2026
c478d80
FRLG AutoStory: Fly finds its user by the FLY row in the party menu, …
dayfine Nov 13, 2026
7b072e3
FRLG AutoStory: keep the abilities tests' LF line endings
dayfine Nov 13, 2026
553cd6a
Merge remote-tracking branch 'origin/frlg/party-menu-once' into frlg/…
dayfine Nov 13, 2026
b0fea24
FRLG AutoStory: surf legs land on sand bars and are held to the bank
dayfine Nov 13, 2026
cd6a5b3
FRLG AutoStory: Surf code health: landed_on(tile), take_steps to SimT…
dayfine Nov 13, 2026
19d0228
FRLG AutoStory: close the Surf tests header's namespaces by name
dayfine Nov 13, 2026
b8ad833
Merge frlg/party-menu-once (#453) into frlg/stage20-league: Fly scans…
dayfine Nov 13, 2026
3bf733e
Merge frlg/save-postcondition (#463) into frlg/stage20-league: surf l…
dayfine Nov 13, 2026
0ccd02b
FRLG AutoStory: golden for 12.03's Pallet shore at (8, 16), as #463 p…
dayfine Nov 13, 2026
c36a0df
FRLG AutoStory: wanders_past_known() holds the wandering-sight exempt…
dayfine Nov 13, 2026
98edba0
FRLG AutoStory: red tests for a member menu with two field moves and …
dayfine Nov 13, 2026
01e23c2
FRLG AutoStory: read a member menu with long field move names; the Fl…
dayfine Nov 13, 2026
0f824fe
Merge remote-tracking branch 'origin/frlg/party-menu-once' into frlg/…
dayfine Nov 13, 2026
bab3c4e
Merge #451 (frlg/leg-records) into frlg/stage20-league
dayfine Nov 13, 2026
69f9722
FRLG walker test: a one-tile route to a wall that moved nothing (red)
dayfine Nov 13, 2026
40d1103
FRLG walker: a one-tile route onto a tile before a wall may already b…
dayfine Nov 13, 2026
191d5f3
FRLG walker test: the leg walked again may come back as a hold to the…
dayfine Nov 13, 2026
fd0c93d
FRLG 19.04b: below_ladder steps off the switch's boulder first
dayfine Nov 13, 2026
5b42d5f
FRLG 12.03: pin PokemonSimulation eaf1588 (Route 21 rocks, shallow wa…
dayfine Nov 13, 2026
e8c7181
FRLG walker: 12.03 fixes for walk-on checks, failure and interrupt fr…
dayfine Nov 13, 2026
92ef812
FRLG 12.03: fight a trainer that follows a wild battle; route past Sw…
dayfine Nov 13, 2026
96b03c7
FRLG 12.03: a turn hidden by a roof is taken as turned; renew a Repel…
dayfine Nov 13, 2026
5d62f2e
FRLG 12.03: down column 16 to the Center's wall; golden plans regener…
dayfine Nov 13, 2026
ae8b36e
FRLG walker: unread_turn_taken() takes an UnreadTurn, not two bools
dayfine Nov 13, 2026
57c1f35
FRLG battle: no Water move on a Water foe; read an unplanned trainer'…
dayfine Nov 13, 2026
1349ecd
FRLG AutoStory tests: no route over Cinnabar's locked Gym door trigge…
dayfine Nov 13, 2026
17d532b
FRLG 12.03 ends at Cinnabar's Center wall (16, 7); 13.01 walks from t…
dayfine Nov 13, 2026
470cb9e
FRLG AutoStory tests: the routes' trigger checks in one helper
dayfine Nov 13, 2026
9b62f60
FRLG AutoStory tests: 12.03's routes walk back no more than a tile
dayfine Nov 13, 2026
9411b93
FRLG 12.03: a tile off a wall on the water; ends below the Mansion door
dayfine Nov 13, 2026
b0f28bc
Merge origin/autostory/engine into autostory/story-breakpoints
dayfine Nov 13, 2026
f016531
Merge origin/autostory/story-breakpoints into frlg/stage20-league
dayfine Nov 13, 2026
78d0bd5
Merge origin/autostory/engine into autostory/story-breakpoints
dayfine Nov 13, 2026
87c0a13
Merge origin/frlg/stage19b-victory-cave into frlg/stage20-league
dayfine Nov 13, 2026
274c663
Merge origin/autostory/story-breakpoints into frlg/stage20-league
dayfine Nov 13, 2026
21b8a73
Story breakpoints: step_label(), the label of the step under way
dayfine Nov 13, 2026
c444b28
Merge origin/frlg/stage19b-victory-cave into frlg/stage20-league
dayfine Nov 13, 2026
ad8af53
Merge origin/autostory/story-breakpoints into frlg/stage20-league
dayfine Nov 13, 2026
0e0af12
Pokemon Navigation: leg trace and replay of console failures
dayfine Nov 13, 2026
4fa6239
Merge origin/nav/leg-trace (#464) into frlg/leg-records: the shared l…
dayfine Nov 13, 2026
8f20bf8
Merge origin/frlg/leg-records (#451) into frlg/stage20-league: the sh…
dayfine Nov 13, 2026
b36bb16
Merge origin/frlg/stage19b-victory-cave into frlg/stage20-league: sha…
dayfine Nov 13, 2026
1effff7
Merge remote-tracking branch 'origin/autostory/engine' into HEAD
dayfine Nov 14, 2026
d46c9ac
Use the shared ScreenEvent names after merging autostory/engine
dayfine Nov 14, 2026
c752413
FRLG walker: start_surf presses A up to three times for the Surf prompt
dayfine Nov 14, 2026
4e8f129
Merge origin/autostory/story-breakpoints into frlg/stage20-league: sh…
dayfine Nov 14, 2026
defb6d3
Merge remote-tracking branch 'origin/frlg/stage20-league' into HEAD
dayfine Nov 14, 2026
7891ef8
FRLG AutoStory: steps that press A first clear an open box before the A
dayfine Nov 14, 2026
4c57033
FRLG walker: no watch for beaten trainers; first look shortened by th…
dayfine Nov 14, 2026
5c3369b
Merge frlg/stage19b-victory-cave into frlg/stage20-league
dayfine Nov 14, 2026
334736d
FRLG AutoStory: place the player by a sign, hold-again bumps, tap ont…
dayfine Nov 14, 2026
4ae3b9b
FRLG AutoStory: plan golden: legs onto Mansion statue tiles are tapped
dayfine Nov 14, 2026
4b1b6fa
FRLG AutoStory: PokeGuy's Super Repels before the Fly to Pallet and o…
dayfine Nov 14, 2026
1e9f0fa
Merge frlg/stage19b-victory-cave into frlg/stage20-league
dayfine Nov 14, 2026
d3522d6
Merge autostory/engine into frlg/stage20-league: add_checkpoint_prefi…
dayfine Nov 14, 2026
b4cfc35
Merge frlg/stage19b-victory-cave into frlg/stage20-league
dayfine Nov 14, 2026
6dd4b09
AutoStory: shared story files, dev-folder override and execution keys
dayfine Nov 14, 2026
a365d3c
AutoStory: story files: code health fixes
dayfine Nov 14, 2026
1472244
AutoStory: story files: check reloads in the game's row order; StoryD…
dayfine Nov 14, 2026
0deacd4
Merge autostory/engine into autostory/shared-story-data
dayfine Nov 14, 2026
a7b26fa
Merge frlg/stage19b-victory-cave into frlg/stage20-league
dayfine Nov 14, 2026
503f1cc
Merge autostory/shared-story-data into frlg/stage20-league
dayfine Nov 14, 2026
c0ecd2a
FRLG AutoStory: load the story through the shared checkpoint-file loader
dayfine Nov 14, 2026
dcdf8a9
AutoStory: shared launch from HOME to the overworld on a save
dayfine Nov 14, 2026
3c3bd58
AutoStory: one shared list of story failure classes
dayfine Nov 14, 2026
16cd404
AutoStory launch: a prompt's lead-in presses; game screens read only …
dayfine Nov 14, 2026
33e7141
FRLG AutoStory: a failed walk tried again plans from where it left th…
dayfine Nov 14, 2026
76bae9e
FRLG AutoStory: turn the statue's first page before its YES/NO prompt
dayfine Nov 14, 2026
dc661be
FRLG AutoStory: route pose helpers in their own file; gate step handler
dayfine Nov 14, 2026
3e4aba4
Merge remote-tracking branch 'origin/autostory/launch-from-home' into…
dayfine Nov 14, 2026
c9e21e0
Merge remote-tracking branch 'origin/autostory/fault-classes' into fr…
dayfine Nov 14, 2026
92ec0b1
Sim faults: MOUNT_LOST, a riding leg started off the mount
dayfine Nov 14, 2026
a2049a7
Merge remote-tracking branch 'origin/autostory/fault-classes' into fr…
dayfine Nov 14, 2026
f40746d
AutoStory launch: read which HOME tile is selected
dayfine Nov 14, 2026
2e5f442
HomeTileReader: start the name crop right of the game card icon
dayfine Nov 14, 2026
8750b6f
AutoStory story files: refuse a checkpoint id missing from the story …
dayfine Nov 14, 2026
d917810
FRLG AutoStory: launch from HOME and the shared failure classes
dayfine Nov 14, 2026
f90c44a
AutoStory launch: move the Switch launch prompts here from PLZA
dayfine Nov 14, 2026
3720e50
Merge remote-tracking branch 'origin/autostory/shared-story-data' int…
dayfine Nov 14, 2026
cb2c290
FRLG AutoStory: refuse an id missing from STORY_ORDER through in_stor…
dayfine Nov 14, 2026
0a8b7ab
FRLG 13.01: sim test, 3F's stairs land a tile east of the warp (red)
dayfine Nov 14, 2026
5b073b5
FRLG 13.01: reach the Mansion 3F statue from a wall
dayfine Nov 14, 2026
fc7c81c
FRLG AutoStory tests: Route 10 tile-off test owns its map copy (GCC d…
dayfine Nov 14, 2026
1da94dd
Merge remote-tracking branch 'origin/autostory/launch-from-home' into…
dayfine Nov 14, 2026
244426f
FRLG AutoStory launch: the shared Switch prompts and FireRed's HOME tile
dayfine Nov 14, 2026
5fe1ccd
FRLG tests: case names outside the inputs; code health
dayfine Nov 14, 2026
9452b7c
AutoStory launch: HOME after the A on the tile waits, not A again
dayfine Nov 14, 2026
86efa1c
Merge branch 'autostory/launch-from-home' into frlg/stage20-league
dayfine Nov 14, 2026
216f867
FRLG AutoStory launch: a black frame is the boot, not HOME; HOME afte…
dayfine Nov 14, 2026
4b9951a
FRLG AutoStory: story_maps() without run flags is its own overload
dayfine Nov 14, 2026
b14de64
FRLG fault sweep: 18.02's late fade and slow fade-in pass now; off KN…
dayfine Nov 14, 2026
9235af1
FRLG walker: a hold along a map's edge reads as moved; a tile's drift…
dayfine Nov 14, 2026
4eeb74d
FRLG walker: a band that looks the same one tile over can't veto a move
dayfine Nov 14, 2026
f091ea2
FRLG sim tests: Mansion B1F's one-tile leg and an unread turn before …
dayfine Nov 14, 2026
5fc7689
FRLG walker: a one-tile open leg that scrolled is on its tile; an unr…
dayfine Nov 14, 2026
c16553d
FRLG 14.01: quiz machine approaches end on their tile
dayfine Nov 14, 2026
6510835
FRLG console failure 14.01 quiz_2: an open leg that ends the walk sto…
dayfine Nov 14, 2026
f5d2425
FRLG walker: an open leg that ends the walk is checked like one befor…
dayfine Nov 14, 2026
540f363
FRLG 14.01/14.02b: quiz-door approaches end a tile short of the door
dayfine Nov 14, 2026
02029fe
FRLG 14.01/14.02b: reach quiz door 4 by taps; gym sim opens the doors
dayfine Nov 14, 2026
0e425fc
Merge origin/frlg/stage19b-victory-cave into frlg/stage20-league
dayfine Nov 14, 2026
9413946
FRLG 14.01/14.02b: reach doors 1, 5, 6 and 3 by taps beside trainers
dayfine Nov 14, 2026
07260e5
FRLG 14.01: replay below_door_5's hold into Burglar Dusty (red)
dayfine Nov 14, 2026
08772f5
FRLG walker: a re-check hold that moves nothing under a person finds …
dayfine Nov 14, 2026
799df3a
FRLG 14.01/14.02b: stop a tap short of door 4; quiz 5's west leg ends…
dayfine Nov 14, 2026
0d6773e
FRLG 14.01/14.02b: every gym walk ends at a wall or goes a tap a tile
dayfine Nov 14, 2026
1fd9907
FRLG AutoStory test: no ANSWER step follows a walk
dayfine Nov 14, 2026
5f44a25
FRLG 14.02b: leave the gym by a step, so Bill's question waits for de…
dayfine Nov 14, 2026
cabd439
FRLG 14.02b: press off Cinnabar Gym's exit mat with no turn tap first
dayfine Nov 14, 2026
af2e0f2
FRLG 14.03: read the whole bag pocket before using an item
dayfine Nov 14, 2026
776b625
FRLG 14.03: walk to the gym door from the yard's tree wall; a stalled…
dayfine Nov 14, 2026
e61cb48
FRLG walker: a quarter whose pattern repeats every two tiles can't sh…
dayfine Nov 14, 2026
994c680
FRLG 14.01 gym sim test: open_door() doesn't read the sim it replaces
dayfine Nov 14, 2026
34c03ca
FRLG 14.01: to_quiz_2_machine runs
dayfine Nov 14, 2026
8d9c29e
FRLG AutoStory: the run flags' story maps are run_story_maps()
dayfine Nov 14, 2026
6217be0
FRLG walker: no open-leg check after a bump, or through a trainer's s…
dayfine Nov 14, 2026
b8157d8
FRLG rows' sim: a taps leg is tapped, as on the console
dayfine Nov 14, 2026
2de07b2
FRLG walker: a taps leg from facing another way turns first
dayfine Nov 14, 2026
d4378b0
FRLG maps: cut trees and Cinnabar's quiz doors are gates
dayfine Nov 14, 2026
f2d2a2c
CI: map resource action at PokemonSimulation c1962ff, the lock's revi…
dayfine Nov 14, 2026
1697411
FRLG replay: pin PokemonSimulation bb8e884, whose Parcel binding pins…
dayfine Nov 14, 2026
1d72478
FRLG 05.06 sim: Youngster Chad is fought, from his map wander box
dayfine Nov 14, 2026
aebfdda
FRLG 14.01: walk out of the Cinnabar Center from a wall corner; a tap…
dayfine Nov 14, 2026
4b1e8ee
FRLG walker: a blocked tap is held to its wall where wild battles sta…
dayfine Nov 15, 2026
fa6e021
CI: pin CommandLineTests to f68c0b0 (Tower 5F start frames, Moon Ston…
dayfine Nov 15, 2026
2d7229a
FRLG fault sweep: 09.01 unseen step is known-failing (arrow maze star…
dayfine Nov 15, 2026
f96c761
FRLG sim: a Fly from a map whose warps are dead doesn't take off
dayfine Nov 15, 2026
416ae5c
FRLG walker: a step tap that showed no step may have stepped unseen
dayfine Nov 15, 2026
5a9b653
FRLG fault sweep: a row that fails clean fails its clean run test
dayfine Nov 15, 2026
1e47371
FRLG row sim: a step's warp waits for its fade to end
dayfine Nov 15, 2026
58113f1
FRLG sim: a cut tree whose gate starts open is cut
dayfine Nov 15, 2026
cb83018
FRLG 16.03: the save has beaten the Rocket by 5F's corridor
dayfine Nov 15, 2026
31c425f
FRLG 10.05: no tap up to (16, 7) below Jennifer's line
dayfine Nov 15, 2026
7c95b4d
FRLG 16.02: fight 5F's corridor Rocket by a wait on the edge of his s…
dayfine Nov 15, 2026
0361fc6
FRLG 15.01: Route 7's gate by legs to walls; a still screen is no war…
dayfine Nov 15, 2026
162f087
FRLG 15.01 CI: ledge hop as two walk tiles; golden, trainer count, 18…
dayfine Nov 15, 2026
1211a18
Merge pull request #510 from dayfine/frlg/fix-1501-gate
dayfine Nov 15, 2026
ac0bcf0
FRLG sim: a tap off an exit mat its way takes the warp from any facing
dayfine Nov 15, 2026
b9d9ad5
FRLG walker: no turn tap on a warp leg off an exit mat
dayfine Nov 15, 2026
d1b2c8b
FRLG 09.01: arrive on B3F's stairs from B4F facing east, no turn west
dayfine Nov 15, 2026
a3a5c65
FRLG 16.03: a beaten trainer stands where he walked up, not on his sp…
dayfine Nov 15, 2026
880ab2f
FRLG AutoStory tests: name the flag set before keeping run_story_maps…
dayfine Nov 15, 2026
c84718c
Merge pull request #514 from dayfine/frlg/fix-1501-warp
dayfine Nov 15, 2026
1b1da4f
FRLG AutoStory 16.03: sim test, the walk to the rival's trigger ends …
dayfine Nov 15, 2026
9b8142f
FRLG overworld: a re-anchor of a route's last leg ends facing the way…
dayfine Nov 15, 2026
d067b94
FRLG AutoStory 16.03 test: std::format for the failure message
dayfine Nov 15, 2026
83f6536
Merge pull request #548 from dayfine/frlg/fix-1603-rival
dayfine Nov 15, 2026
06371c2
FRLG CI: 16.03 golden, Silph-cleared row maps, no re-anchor turn on t…
dayfine Nov 15, 2026
78a0edc
CI: pin CommandLineTests to 47763e7 (Pidgey known-moves frame)
dayfine Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/cpp-ci-serial-programs-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ jobs:

# Fork only, until upstream Packages has them: the FRLG player sprite sheets
# AutoStory reads (PokemonFRLG_PlayerFacingReader.cpp; red is the boy, green
# the girl) are on dayfine/Packages branch lab/autostory-resources. Without
# them the AutoStoryResources test fails.
# the girl) and the Pokemon sprite sheets (PokemonFRLG_PokemonSprites.cpp)
# are on dayfine/Packages branch lab/autostory-resources. Without them the
# AutoStoryResources test fails.
- name: Fetch fork-only AutoStory resources
if: github.repository == 'dayfine/Arduino-Source'
shell: bash
run: |
for FILE in Resources/PokemonFRLG/PlayerSprites/red_normal.png Resources/PokemonFRLG/PlayerSprites/green_normal.png; do
for FILE in Resources/PokemonFRLG/PlayerSprites/red_normal.png Resources/PokemonFRLG/PlayerSprites/green_normal.png \
Resources/PokemonFRLG/PokemonSprites.png Resources/PokemonFRLG/PokemonSpritesFlipped.png Resources/PokemonFRLG/PokemonSprites.json; do
mkdir -p "Arduino-Source/Packages/$(dirname "$FILE")"
curl -fsSL --retry 3 -o "Arduino-Source/Packages/$FILE" \
"https://raw.githubusercontent.com/dayfine/Packages/lab/autostory-resources/$FILE"
Expand All @@ -109,7 +111,7 @@ jobs:

- name: Prepare approved FRLG map resources
id: map-resources
uses: dayfine/PokemonSimulation/integrations/arduino-source/verify-map-packs@1cacf81b2377ec1413317d905ad5415f6fe8dad5
uses: dayfine/PokemonSimulation/integrations/arduino-source/verify-map-packs@c1962ffb18adf8a29ac4c7ba906372bae1c0b1d1
with:
layout: resources
operation: prepare
Expand All @@ -120,7 +122,7 @@ jobs:
uses: actions/checkout@v7
with:
repository: dayfine/PokemonSimulation
ref: d3eea1b5c04180f8b60eb98b0d65f70aca6b1abb
ref: bb8e884c3c2c15885e0a7651b02e472c9a583754
path: StoryReplaySource

- name: Verify replay preview bytes and independently regenerate its route input
Expand Down Expand Up @@ -383,9 +385,9 @@ jobs:
uses: actions/checkout@v7
if: inputs.run-tests
with:
# The fork's fixtures: upstream's, the SystemKeyboardDetector screenshots and pending FRLG image submissions.
# The fork's fixtures: upstream's, the SystemKeyboardDetector and HomeTileReader screenshots and pending FRLG image submissions (Fly landing, party menu, Route 21 battle, Pokemon Mansion 1F and B1F hold frames, and the Pidgey known-moves frame).
repository: 'dayfine/CommandLineTests'
ref: '3a6708327b225e71a329d77d8d067305ea4058d2'
ref: '47763e72e1de0489bfd91433a78f40e80f3cedf8'
path: 'CommandLineTests'

# The unit tests assume the downloadable resources they need are already downloaded
Expand Down
2 changes: 2 additions & 0 deletions SerialPrograms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ pa_embed_text_files(SerialProgramsLib Source/VideoGames/PokemonFRLG/Programs/Aut
VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryBattleData.h PokemonAutomation::NintendoSwitch::PokemonFRLG autostory_battle_json)
pa_embed_text_files(SerialProgramsLib Source/VideoGames/PokemonFRLG/Programs/AutoStory/StoryData
VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryTable.h PokemonAutomation::NintendoSwitch::PokemonFRLG autostory_checkpoint_json)
pa_embed_text_files(SerialProgramsLib Source/VideoGames/PokemonFRLG/Programs/AutoStory/ConsoleFailures
VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_AutoStoryConsoleFailureData.h PokemonAutomation::NintendoSwitch::PokemonFRLG console_failure_json)
pa_embed_text_files(SerialProgramsLib Source/VideoGames/PokemonFRLG/Programs/AutoStory/ReplayData
VideoGames/PokemonFRLG/Programs/AutoStory/PokemonFRLG_StoryReplay.h PokemonAutomation::NintendoSwitch::PokemonFRLG story_replay_fixture_json)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "NintendoSwitch/Inference/NintendoSwitch_CheckOnlineDetector.h"
#include "NintendoSwitch/Inference/NintendoSwitch_FailedToConnectDetector.h"
#include "NintendoSwitch/Inference/NintendoSwitch_HomeTileReader.h"
#include "NintendoSwitch/Inference/NintendoSwitch_SystemKeyboardDetector.h"
#include "NintendoSwitch/Inference/NintendoSwitch_UpdatePopupDetector.h"
#include "NintendoSwitch/Programs/Typewriter/NintendoSwitch_Typewriter_Tests.h"
Expand Down Expand Up @@ -69,7 +70,6 @@ namespace ComputerPrograms{

UnitTestDatabase make_UNIT_TESTS_ALL(){
UnitTestDatabase ret;

add_tests_QtEventThreadPool(ret, GlobalThreadPools::computation_normal());
add_tests_Sockets(ret, GlobalThreadPools::unlimited_normal());
add_tests_HttpServer(ret, GlobalThreadPools::unlimited_normal());
Expand Down Expand Up @@ -103,6 +103,7 @@ UnitTestDatabase make_UNIT_TESTS_ALL(){
Pokemon::add_tests_AutoStory(ret);
NintendoSwitch::add_tests_CheckOnlineDetector(ret);
NintendoSwitch::add_tests_FailedToConnectDetector(ret);
NintendoSwitch::add_tests_HomeTileReader(ret);
NintendoSwitch::add_tests_SystemKeyboardDetector(ret);
NintendoSwitch::add_tests_UpdatePopupDetector(ret);
NintendoSwitch::Typewriter::add_tests_TypewriterTextMapping(ret);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
/* Home Tile Reader
*
* From: https://github.com/PokemonAutomation/
*
*/

#include <algorithm>
#include <cmath>
#include <cstdint>
#include <format>
#include <utility>
#include <vector>
#include "CommonFramework/ImageTypes/ImageRGB32.h"
#include "CommonTools/Images/ImageFilter.h"
#include "CommonTools/OCR/OCR_Routines.h"
#include "CommonTools/OCR/OCR_StringNormalization.h"
#include "Tests/ImageUnitTest.h"
#include "NintendoSwitch_HomeTileReader.h"

namespace PokemonAutomation{
namespace NintendoSwitch{


namespace{

// The selected tile's frame lines, about 0.008 of the screen tall, just
// outside the tile art: strips across the screen that the art of the
// other tiles stays out of.
const ImageFloatBox FRAME_TOP_STRIP{0.0, 0.252, 1.0, 0.014};
const ImageFloatBox FRAME_BOTTOM_STRIP{0.0, 0.627, 1.0, 0.014};
constexpr double FRAME_TOP = 0.256;
constexpr double FRAME_BOTTOM = 0.637;
// A column crosses a frame line when this many of its pixels in the strip
// are the frame's cyan.
constexpr size_t MIN_LINE_PIXELS = 3;
// A tile frame is 0.214 of the screen wide.
constexpr double MIN_FRAME_WIDTH = 0.18;
constexpr double MAX_FRAME_WIDTH = 0.25;

// The band above the row where HOME writes the selected game's name. The
// name starts 0.005 to 0.01 left of the frame, right of a game card icon
// that ends 0.017 or more left of it.
constexpr double NAME_TOP = 0.19;
constexpr double NAME_HEIGHT = 0.06;
constexpr double NAME_LEAD = 0.015;
constexpr double NAME_RIGHT = 0.98;
// The name's cyan (ARGB), dark text on HOME's light background once
// filtered: red low, green and blue high.
constexpr uint32_t NAME_MINS = 0xff000096;
constexpr uint32_t NAME_MAXS = 0xff96ffff;

// The frame's cyan, which pulses between about (0, 187, 229) and
// (52, 249, 229), with lighter anti-aliased edges.
bool is_frame_cyan(uint32_t pixel){
const int red = (pixel >> 16) & 0xff;
const int green = (pixel >> 8) & 0xff;
const int blue = pixel & 0xff;
return green >= 160 && blue >= 160 && green - red >= 60 && blue - red >= 60;
}

// Per column of `strip`, whether it crosses a frame line.
std::vector<bool> frame_line_columns(const ImageViewRGB32& strip){
std::vector<bool> columns(strip.width(), false);
for (size_t x = 0; x < strip.width(); x++){
size_t cyan = 0;
for (size_t y = 0; y < strip.height(); y++){
cyan += is_frame_cyan(strip.pixel(x, y)) ? 1 : 0;
}
columns[x] = cyan >= MIN_LINE_PIXELS;
}
return columns;
}

// The longest run of columns that cross both frame lines, as [begin, end).
std::pair<size_t, size_t> longest_framed_run(const std::vector<bool>& top, const std::vector<bool>& bottom){
std::pair<size_t, size_t> best{0, 0};
size_t begin = 0;
for (size_t x = 0; x <= top.size(); x++){
const bool framed = x < top.size() && x < bottom.size() && top[x] && bottom[x];
if (framed){
continue;
}
if (x - begin > best.second - best.first){
best = {begin, x};
}
begin = x + 1;
}
return best;
}

} // namespace


std::optional<ImageFloatBox> find_selected_home_tile(const ImageViewRGB32& screen){
if (screen.width() == 0 || screen.height() == 0){
return std::nullopt;
}
const std::pair<size_t, size_t> run = longest_framed_run(
frame_line_columns(extract_box_reference(screen, FRAME_TOP_STRIP)),
frame_line_columns(extract_box_reference(screen, FRAME_BOTTOM_STRIP))
);
const double width = (double)screen.width();
const double frame_width = (double)(run.second - run.first) / width;
if (frame_width < MIN_FRAME_WIDTH || frame_width > MAX_FRAME_WIDTH){
return std::nullopt;
}
return ImageFloatBox((double)run.first / width, FRAME_TOP, frame_width, FRAME_BOTTOM - FRAME_TOP);
}

std::optional<std::string> read_selected_home_tile_name(Language language, const ImageViewRGB32& screen){
const std::optional<ImageFloatBox> frame = find_selected_home_tile(screen);
if (!frame){
return std::nullopt;
}
const double left = std::max(0.0, frame->x - NAME_LEAD);
const ImageViewRGB32 band = extract_box_reference(screen, ImageFloatBox(left, NAME_TOP, NAME_RIGHT - left, NAME_HEIGHT));
const ImageRGB32 text = to_blackwhite_rgb32_range(band, true, NAME_MINS, NAME_MAXS);
return OCR::ocr_read(language, text);
}

bool selected_home_tile_is(Language language, const ImageViewRGB32& screen, std::string_view name){
const std::optional<std::string> read = read_selected_home_tile_name(language, screen);
if (!read){
return false;
}
const std::u32string wanted = OCR::normalize_utf32(std::string(name));
return !wanted.empty() && OCR::normalize_utf32(*read).find(wanted) != std::u32string::npos;
}



namespace{

// The names HOME shows for the two games on console B's frames.
constexpr std::string_view FIRERED = "Pokémon FireRed Version";
constexpr std::string_view LEGENDS_ZA = "Pokémon Legends: Z-A";

// Where the first tile's frame starts, and the step to the next tile, as
// parts of the screen's width, before the row scrolls.
constexpr double FIRST_TILE_LEFT = 0.076;
constexpr double TILE_STEP = 0.211;
constexpr double TILE_TOLERANCE = 0.02;

struct HomeTileCase{
struct Input{
std::string_view image;
};
struct Expectation{
// The selected tile's place in the row, from 0; nothing: no tile
// is selected.
std::optional<size_t> tile = std::nullopt;
// The name the selected tile shows: FIRERED or LEGENDS_ZA.
std::string_view game = {};
};
std::string_view name;
Input input;
Expectation expectation;
};

// Console B, 2026-11-14: HOME after the order changed (the game played
// last moves to the first tile), and the user select over HOME.
const std::vector<HomeTileCase> HOME_TILE_CASES = {
{.name = "FireRed on the first tile 1",
.input = {.image = "NintendoSwitch/HomeTileReader/FireRedFirstTile_1.png"},
.expectation = {.tile = 0, .game = FIRERED}},
{.name = "FireRed on the first tile 2",
.input = {.image = "NintendoSwitch/HomeTileReader/FireRedFirstTile_2.png"},
.expectation = {.tile = 0, .game = FIRERED}},
{.name = "FireRed on the first tile 3",
.input = {.image = "NintendoSwitch/HomeTileReader/FireRedFirstTile_3.png"},
.expectation = {.tile = 0, .game = FIRERED}},
{.name = "Legends Z-A on the first tile",
.input = {.image = "NintendoSwitch/HomeTileReader/LegendsZAFirstTile.png"},
.expectation = {.tile = 0, .game = LEGENDS_ZA}},
{.name = "Legends Z-A on the second tile",
.input = {.image = "NintendoSwitch/HomeTileReader/LegendsZASecondTile.png"},
.expectation = {.tile = 1, .game = LEGENDS_ZA}},
{.name = "user select over HOME",
.input = {.image = "NintendoSwitch/HomeTileReader/UserSelectOverHome.png"},
.expectation = {}},
};

// What went wrong with the frame on `screen`; empty when it is where `test` expects.
std::string check_frame(const HomeTileCase& test, const ImageViewRGB32& screen){
const std::optional<ImageFloatBox> frame = find_selected_home_tile(screen);
if (!test.expectation.tile){
return frame ? std::format("Expected no selected tile, found a frame at x={:.3f}.", frame->x) : "";
}
if (!frame){
return std::format("Expected a frame on tile {}, found none.", *test.expectation.tile);
}
const double expected_left = FIRST_TILE_LEFT + TILE_STEP * (double)*test.expectation.tile;
if (std::abs(frame->x - expected_left) > TILE_TOLERANCE){
return std::format("Expected the frame on tile {} (x={:.3f}), found it at x={:.3f}.", *test.expectation.tile, expected_left, frame->x);
}
return "";
}

// What went wrong with the names on `screen`: it must be the game `test`
// expects and not the other one.
std::string check_names(const HomeTileCase& test, const ImageViewRGB32& screen){
const std::string read = read_selected_home_tile_name(Language::English, screen).value_or("<no tile>");
for (std::string_view game : {FIRERED, LEGENDS_ZA}){
const bool expected = game == test.expectation.game;
if (selected_home_tile_is(Language::English, screen, game) != expected){
return std::format("Expected the tile {} \"{}\", read \"{}\".", expected ? "to be" : "not to be", game, read);
}
}
return "";
}

class Test_HomeTileReader : public ImageUnitTest{
public:
explicit Test_HomeTileReader(const HomeTileCase& test)
: ImageUnitTest(std::format("NintendoSwitch::HomeTileReader - {}", test.name), {std::string(test.input.image)})
, m_case(test)
{
// Plus the PaddleOCR (ONNX) recognition session and its working set.
m_memory += PADDLE_OCR_SINGLE_LINE_MEMORY_ESTIMATE;
}

virtual UnitTestResult run_on_images(
Logger&, CancellableScope&,
const std::vector<ImageRGB32>& images
) const override{
std::string error = check_frame(m_case, images[0]);
if (error.empty()){
error = check_names(m_case, images[0]);
}
return error.empty() ? UnitTestResult(true) : UnitTestResult(error);
}

private:
HomeTileCase m_case;
};

} // namespace


void add_tests_HomeTileReader(UnitTestDatabase& database){
for (const HomeTileCase& test : HOME_TILE_CASES){
database.add<Test_HomeTileReader>(test);
}
}



} // namespace NintendoSwitch
} // namespace PokemonAutomation
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* Home Tile Reader
*
* From: https://github.com/PokemonAutomation/
*
* Which game tile the HOME menu's cursor is on. HOME draws a cyan frame
* around the selected tile of the game row and writes that game's name
* above the row, also in cyan. The frame says that a tile is selected and
* where; the name says which game it is. Neither depends on the order of
* the row, which changes as games are played (the last one played moves
* to the first tile).
*
* Measured on the Switch 1 HOME menu at 1920x1080; positions are parts of
* the screen, so other capture sizes read the same.
*
*/

#ifndef PokemonAutomation_NintendoSwitch_HomeTileReader_H
#define PokemonAutomation_NintendoSwitch_HomeTileReader_H

#include <optional>
#include <string>
#include <string_view>
#include "Common/Cpp/TestRunners/UnitTestDatabase.h"
#include "CommonFramework/Language.h"
#include "CommonFramework/ImageTools/ImageBoxes.h"
#include "CommonFramework/ImageTypes/ImageViewRGB32.h"

namespace PokemonAutomation{
namespace NintendoSwitch{


// The selected tile's cyan frame on `screen`; nothing when no tile of the
// game row is selected (the cursor on the icons below it, a dialog or the
// user select over HOME).
std::optional<ImageFloatBox> find_selected_home_tile(const ImageViewRGB32& screen);

// The name HOME writes above the selected tile, as OCR reads it in
// `language` (the console's, not the game's); nothing when no tile is
// selected.
std::optional<std::string> read_selected_home_tile_name(Language language, const ImageViewRGB32& screen);

// Whether a tile is selected and its name contains `name` ("Pokémon
// Legends: Z-A", or a distinctive part of it), compared as OCR text:
// case, accents, spaces and punctuation ignored.
bool selected_home_tile_is(Language language, const ImageViewRGB32& screen, std::string_view name);


// The screenshot tests in CommandLineTests/NintendoSwitch/HomeTileReader/.
void add_tests_HomeTileReader(UnitTestDatabase& database);



} // namespace NintendoSwitch
} // namespace PokemonAutomation
#endif
Loading
Loading