Skip to content

Releases

v0.3.2 - Gameplay fixes and clearer player code

Choose a tag to compare

@github-actions github-actions released this 15 Oct 22:56

Fixes a crash during alternating two-player life handoffs and makes the player movement code easier to understand.

Changes:

  • Finish the interrupt correctly after switching to player two, and report active-game state separately from two-player mode.
  • Correct startup waits, ROM-checksum handling and translated register/flag behavior.
  • Extract movement, turning, rock-probe and tunnel-contact rules into readable Rust, preserving the existing processor boundary.
  • Make routine verification distinguish failures from inconclusive checks, and add focused regressions and ROM-free CI.
  • Keep build and contributor documentation concise and describe remaining accuracy limits.

Validation: all 43 local Rust tests passed, including ROM-based gameplay and player comparisons. The headless game smoke check and a strict 2,000-frame routine comparison also passed.

Timing still approximates the original hardware, and these checks do not establish every gameplay path or complete arcade accuracy. See known limitations.

Supply your own supported Dig Dug Rev 2 ROM set to play. Release downloads contain the game executable only.

v0.3.1 — 2-Player Alternating Mode & Dual Telemetry

Choose a tag to compare

@github-actions github-actions released this 13 Oct 12:52

Changes in v0.3.1

  • 2-Player Start Support: Added \INPUT_START2\

v0.3.0 — 1:1 ROM Differential Verification Engine & Fygar Flap Timing

Choose a tag to compare

@Suspence00 Suspence00 released this 13 Oct 12:22

v0.3.0 — 1:1 ROM Differential Verification Engine & Fygar Flap Timing

A major milestone release introducing automated mathematical differential verification against original 1982 Namco arcade ROM bytes and MAME hardware microcode, alongside gameplay timing fixes uncovered by the new verification harness.


Highlights

1. Automated 1:1 ROM Differential Verification Harness

Rather than relying on subjective gameplay inspection, this release adds a reference verification system that executes original 1982 arcade ROM bytes in lockstep with the hand-decompiled Rust routines:

  • Reference Z80 Interpreter (src/z80_ref.rs): Ground-truth CPU emulator running original ROM machine code with precise Z80 flag calculation (SZ53P, DAA, 16-bit ALU, IX/IY index math, CB/ED/DD/FD opcode tables).
  • Step-by-Step State Verifier (src/verify.rs & src/bin/verify_decomp.rs): Compares post-execution CPU and shared RAM states across each routine.
    • Dead-Stack Window Filtering: Eliminates false alarms from return address residue left below SP in stack memory.
    • Onward Liveness Analysis: When scratch registers (A, F, HL) differ at function exit, simulates 20,000 onward instructions from both states to prove whether the divergence propagates into memory/branches (REG-PROPAGATES) or is benign scratch state (REG-BENIGN).
  • MAME Reference Alignment (tools/mame/): Lua tracing harness verifying Namco 51XX and 53XX custom I/O MCU commands, fire button edge detection, and bus timings against real chip microcode.

2. Bug Fix: Fygar Fire Breath Flap Animation (decomp_update_fygar_fire_2aa4)

Differential verification uncovered a real state divergence (STATE) during monster AI processing:

  • Symptom: At frame 1,119, RAM $857C (wing color) and $98A4..$98A9 (fire sprite positions) diverged between Rust and the reference ROM.
  • Root Cause: In decomp_update_fygar_fire_2aa4, the countdown timer was checked against 5 | 8 | 12 (FlapOrange) and 7 | 10 (FlapRed). In original Z80 ROM (cpu0_main.asm lines 6183–6219), the timer decrements every 2 frames: odd intervals 5 | 9 | 13 are FlapOrange ($0C) and 7 | 11 are FlapRed ($02). Even values caused frames 9, 11, and 13 to fall through to FireStep::None, skipping sprite clearances and desyncing wing colors.
  • Resolution: All 3 clearance branches now strictly follow the ROM cadence.

Verification Benchmarks

Metric Result
Total Frames Run 2,000
CPU Steps Verified 119,999,998 (~120M)
Real State Divergences (STATE) 0
Register Propagations (REG-PROPAGATES) 0
Benign Dead Scratch Registers (REG-BENIGN) 25 (proven dead over 20,000 onward steps)
Standard Unit Tests (cargo test) Passed
Headless Verification (--headless-test) Passed

Reproducing Verification

To verify the decompiled Rust routines against your own extracted ROM set:

cargo run --release --bin verify_decomp -- --frames 2000 --script tools/mame/inputscript.txt

Full Changelog: v0.2.1...v0.3.0

Full Changelog: v0.2.1...v0.3.0

Full Changelog: v0.2.1...v0.3.0

v0.2.1 — High-Score Banner & Initial Entry Fixes

Choose a tag to compare

@Suspence00 Suspence00 released this 12 Oct 22:58

What's Fixed in v0.2.1

  • High-Score 4x4 Celebration Banner Flash-Clear (sub_35C9): Fixed the big 4x4 tile high-score celebration banner ("CONGRATULATIONS ! HIGHEST SCORE") only flashing the top 3 rows of each digit ($836D..$836F) while leaving the bottom 4th row ($8370) permanently visible. In the original Z80 ROM ($35C9), three CALL $35D5 instructions are followed immediately by a fall-through into sub_35D5 ($35D5) for the 4th row.
  • Namco 51XX Rising-Edge Fire Button Pulse (keymask_p): Fixed pressing Fire once during high-score initial entry ("ENTER YOUR INITIALS !") skipping over the 2nd (middle) initial straight to the 3rd initial. The Namco 51XX custom I/O processor now computes a true 1-frame rising-edge pulse ((keymask_d[0] ^ keymask_d[1]) & keymask_d[0]) instead of stretching the edge bit (0x10 active-low) across two consecutive VBlank $71 reads.
  • Automated High-Score & Initial Entry Regression Test: Added test_highscore_big_score_flash_and_initial_entry to verify all 4 tile rows flash on/off in lockstep and all 3 initials (1st, 2nd, 3rd) lock in individually on single button presses.

Full Changelog: v0.2.0...v0.2.1

Full Changelog: v0.2.0...v0.2.1

Full Changelog: v0.2.0...v0.2.1

Full Changelog: v0.2.0...v0.2.1

v0.2.0 — Live Gameplay Inspector Overhaul

Choose a tag to compare

@Suspence00 Suspence00 released this 12 Oct 17:10

What's New in v0.2.0

  • Larger, High-Contrast 8x12 Bold Bitmap Font: Replaced the tiny 5x7 sidebar text with a crisp, mixed-case 8x12 bold bitmap font and generous row spacing.
  • All 8 Hardware Enemy Slots (#0-#3 Pooka, #4-#7 Fygar): Fixed missing Fygars in slots #6 and #7 by decoding all 8 16-byte monster slots ($8525..) with visual 4-segment PUMP (0-4) meters, deflation timers, and live AI statuses (WALKING, GHOSTING THROUGH DIRT, BREATHING FIRE!, ESCAPING TO TOP-LEFT!).
  • Dedicated Stage Boulders Card: Added real-time tracking of stage boulders (INTACT, WOBBLING!, FALLING DOWN TUNNEL!, CRUMBLING, DROPPED & SHATTERED) alongside crush point multipliers.
  • Player Depth Stratum, Bonus Veggie & Stage Map Tracking: Replaced raw hex dumps and cumulative call counters with scannable live gameplay state (dirt layer pop points, enemy speed bar, rocks dropped toward bonus veggie spawn, and accurate Stage Map #1-#15 calculation).

Full Changelog: v0.1.0...v0.2.0

Full Changelog: v0.1.0...v0.2.0

Full Changelog: v0.1.0...v0.2.0

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 12 Oct 14:26