SEVEN-MENU PARITY AUDIT: R06

R06 binary f495550364366cacfc2745b1d3dbc0104ca1ed7a6cd466c2dac835282de008fd.
Original 6502 binary is the byte-identical rebuilt Oric release.

The exact original intro_and_cave_select and wait_for_keypress are executed.
Drawing is replaced with the original update_grid_animations plus SEC/RTS,
preserving all sprite-table logic and the real draw routine's final carry.
Only the title pixel draw, keyboard busy delay and already-supplied cave data
load are stubbed. IRQ audio, screen pixels, palette and wall-clock timing are
outside this audit. Original zero page starts cleared, as at a fresh collection
load; retained phases after a whole campaign are not a claim of this test.

For each of seven CaveZ maps, 256 menu iterations are compared across original
6502, native C and the exact release Z80 code. Full880-byte maps and128-byte
sprite tables are checked, including Rockford's appearance and idle animation.

ACTUAL R06 STARTUP: DIVERGENCE FOUND
The original runs34 sprite-animation steps during the removed intro dissolve,
then one preliminary map scan and sprite-animation step before the menu loop.
R06 skipped those logical state updates along with the visible dissolve.
Original initialise_variables also leaves the menu amoeba interval at13;
initialise_stage is skipped for CaveZ. R06 instead read the CaveZ parameter0.

The missing scan shifts enemy positions; the35 missing animation steps shift
sprite phase. The amoeba interval causes a substantial dynamic difference:
at tick256, BD1 and Bonus have6 amoeba cells in R06 versus32 in Oric; Arno2 has
15 versus112. Rockford appears at iteration51 in both, but idle phases differ.
The11 growing-wall cells used as a title mask remain protected.

CONTROLLED ALIGNED-STATE DIAGNOSTIC: PASS
After copying the reference state once at the first menu-loop entry, all1792
subsequent maps and1792 sprite tables match, without per-tick synchronization.
This isolates the problem to startup rather than per-tick menu rules.

PROCEDURAL STARTUP CANDIDATE: PASS
The test then applies an independent procedural preparation: set interval13,
run34 animation steps with ticks33..0, run one scan+animation at tick255, then
select tick31. It does not copy the original's RAM and displays no dissolve.
All7 initial maps/tables and all1792 subsequent map/table pairs match exactly.

Only after that proof and parent authorization was the same procedure added
to engine_init's CaveZ-only branch. Gameplay cave initialization, update rules,
renderer, palette, layout and image assets were not changed. Final compiled
R07 results are recorded separately under tests/menu_r07_parity.

Evidence:
  parity.json                     Actual R06 and aligned-state traces.
  candidate_initialization.json   Procedural candidate, no source modification.
  summary.json                    Compact findings and counts.
  ../test_menu_parity.py           Reproducible harness.

Final R07 command, after compiling engine_r07.so with GCC -Dstatic=:
ENGINE_TEST_SO=tests/menu_r06_parity/engine_r07.so python tests/test_menu_parity.py --binary build/boulderdash.bin --map build/boulderdash.map --out tests/menu_r07_parity --modes actual
