Pre-Flight — WP-074 — 2026-11-19
Filled-in copy of docs/reference/pre-flight for WP-074. Verdict at the bottom.
Nothing on main, in the fork or in an open PR touched
ROOM_Hedge_MazeorROOM_Maze_Map.
Header
- WP:
WP-074 - Title: Phantom’s hedge maze and maze map: ride the unicycle, read the map (Gen 1)
- Pre-flight date:
2026-11-19 - Targets generation(s): 1
- Targets disc(s): Phantom (Showdown has neither room)
Pre-flight intent
Validating readiness for
WP-074. Verdict only.
Dependency check
| Prereq | Status in WORK_INDEX |
Locked on | Notes |
|---|---|---|---|
| WP-018 | ✅ Done | 2026-11-14 | Hotspots and exits: the direction buttons and the map markers are clickables. |
| WP-021 | ✅ Done | 2026-11-14 | Clickables: the buttons and markers answer a click. |
| WP-023 | ✅ Done | 2026-11-14 | The inventory: the maze map item opens the map room. |
| WP-057 | ✅ Done | 2026-11-16 | Phantom’s new game and first room. |
Repo + disc state
- Project worktree on new branch
claude/wp-074frommain(WP-073 merged), clean. - Fork on
scooby-engineat7b87bcb0b7, clean, in sync. - Phantom.
Scope lock
Allowed paths (this repo):
docs/formats/scooby-exe.md (the hedge maze and maze map)
docs/work-packets/WP-074-maze.md
docs/work-packets/WORK_INDEX.md
docs/reference/pre-flight-WP-074-2026-11-19.md
Fork: engines/scooby/**, staged by name. New files maze_rooms.{h,cpp} and the check in maze_check.cpp; a factory line, the module entries, the check’s declaration and its call; a Sound::hasClipPrefix helper for the idle voice lines.
Risk review
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| The cell tables have no independent source (they are code constants, not art or sound). | — | medium | Derived mechanically from the decompile, so the reference and the engine carry the same constants, not a hand-copy; the index formula and the bit per direction are read from the trace. |
| Ghidra’s underscored symbol labels mask the dotted clip names. | — | medium | Read the string bytes (StrAt) and the disc’s sound index, not the labels: the names are Hedge_Maze.Music, Hedge_Maze.Unicycle_*. |
| The idle lines ship with a speaker suffix. | — | low | The deterministic check tests them by prefix (Sound::hasClipPrefix); the exact-match play is a no-op live, noted. |
Verdict
- READY TO EXECUTE
- NOT READY
Prepared by: Claude (WP-074 session) Date: 2026-11-19
After execution — lessons learned
Lesson: read the string bytes, not Ghidra’s symbol labels — and confirm against the disc. The maze’s music and nine unicycle clips are Hedge_Maze.Music and Hedge_Maze.Unicycle_* with a dot; Ghidra names the symbols s_Hedge_Maze_Unicycle_*, underscoring the dot. A first pass used the underscored labels; the reference and the engine then agreed on “found 0” for every clip while both were wrong — exactly the WP-073 failure mode (a line-for-line match proves engine == reference, not that either is faithful). Reading the disc’s sound index showed the clips exist under the dotted names, and StrAt on the string bytes confirmed the dots. The fix: use the dotted names, which resolve and play. An independent read of the disc, not just the diff, is what caught it.
Lesson: a table with no independent source is derived mechanically, not hand-copied. The maze’s per-level cell masks are written in enter as a run of immediate stores — code constants, not a data table the art or sound index supplies, so there is no independent source to check a hand-transcription against. Both the reference and the engine must carry the table, which reintroduces the shared-misreading risk. The mitigation: a throwaway parser derives the tables from Ghidra’s decompile and emits both the Python and the C++, so the two carry the same constants by construction; the decompile (the disassembler’s own register-resolved output) is the single authority, and only the table’s meaning — the Y + X*10 index and the bit per direction — is read by hand, from the overlay/exit tests and the move handlers, independent of the values.
Lesson: a voice line’s id is a prefix, not a clip name. The idle Hedge_Maze.240A_ lines ship under the id plus a speaker suffix (…240A_1_SHAGGY), so an exact findClip misses them. The check tests them with a new Sound::hasClipPrefix; that also surfaced that the exe references 240A2_ (not shipped) while 240A3_ ships (not referenced). The exact-match Sound::play the tick uses is a no-op for these lines live — the original resolves the speaker; the fork does not, for this room.
Lesson: keep the pair together. ROOM_Hedge_Maze and ROOM_Maze_Map are one packet: the map is the maze map item’s close-up, reached from inside the maze, and its markers jump to the maze rooms. They are meaningless apart, so they were not split — the later group-7 rooms remain separate packets.
Scope note: one fork commit of 9 files staged by name: the two room classes and their check in new files, a factory line, the module entries, the check’s declaration and its call, and a Sound::hasClipPrefix helper.