Skip to content

Releases

ProjectRedDoor 0.3.2

Choose a tag to compare

@github-actions github-actions released this 01 Dec 17:53

ProjectRedDoor 0.3.2 — fix turbo/stuttering forward & backward movement (0C273C, 0C2750, 0C2776, 0C2872, 0C2ECC)

Fixed at the source in Taitof3Decomp:

  • 0x0C273C, 0x0C2750, 0x0C2776, 0x0C2872, and 0x0C2ECC (called by the 0x0BFB50 state-transition
    dispatcher while moving left/right) now update r->sr CCR flags on return so beq $bfb46 sees the callee's Z
    flag instead of stale SR.
  • Verified 2,870 calls with RD_VERIFY=1 RD_VERIFY_ALL=1 RD_VERIFY_SR=1: 0 mismatches.

ProjectRedDoor 0.3.1 — fix continuous auto-fire on stage entry (0x0BFF1A and state predicates)

Fixed at the source in Taitof3Decomp:

  • Ea_0BFF1A had spl.b inverted ((v & 0x8000u) ? 0xFFFFu : 0x0000u instead of 0x0000u : 0xFFFFu), returning
    "fire held" when the fire button (A4+0x38) was released (0xFFFF).
  • The 0x0BFB50 state-transition dispatcher calls predicate handlers via jsr ([A3]) and branches directly on Z
    (beq $bfb46). 0BFF10, 0BFF1A, 0BFF6C, 0BFF74, 0BFF7E, 0BFF86, 0C0080 (and 0C2948, 0C296C,
    0C29D8) now update r->sr CCR flags on return.
  • Ea_0C29AE now scales D0.w by 2 (tst.w $36(A4,D0.w*2)).
  • Verified 11,528 calls across all 11 predicates with RD_VERIFY=1 RD_VERIFY_ALL=1 RD_VERIFY_SR=1: 0 mismatches.

ProjectRedDoor 0.3.0 — root-cause CCR fix for 0x0BF4B6, 0x0BD516 and 9 helpers

Fixed at the source in Taitof3Decomp: 0x0BF4B6 (object gate) and 0x0BD516 (map probe) no longer need to be
pinned dirty in the native profile. Both routines — along with 9 other flag-returning helpers in the shipped profile
(0x0C20D6, 0x0C216E, 0x0C2904, 0x0C2922, 0x0C29AE, 0x0C29C0, 0x0C2A0C, 0x0C5572, 0x14EE18) — are
called by ROM code that branches directly on the 68020 CCR flags (bne/beq/bmi) immediately after bsr/jsr
without a tst/cmp. The C translations left r->sr untouched, so callers branched on stale flags:

  • 0x0BF4B6: caller 0x0BE492 saw stale Z=0 after moveq #0, d0, rejecting the player object on stage entry.
  • 0x0BD516: caller 0x0BD546 (movem.w (a7)+,d0-d1 ; bne $bd59c) saw stale CCR after ext.w/moveq #0, causing
    misrouted map probes and the exception-storm reboot. Ea_0BD516 also now stores r->d[1] on the out-of-bounds
    zero exit.

Verifier and profile updates:

  • verify_finish() in src/machine/f3_native.c now checks all 16 general registers (D0-D7, A0-A7) by default
    (previously skipped when check_mask was zero) and supports RD_VERIFY_SR=1 to verify CCR flags (N/Z/V/C).
  • All 11 fixed routines verified bit-exact across 41,872 calls in a 9200-frame Stage 1 playthrough with 0 mismatches.
  • 0x0BD516 and 0x0BF4B6 are re-enabled as clean in src/native/native_profile.tsv.

ProjectRedDoor 0.2.1 — no more reboot during play

Fixed: the board rebooted about 1600 frames into the first stage. The map probe 0x0BD516 ran as recompiled code
and, on one particular position, returned a continuation that sent the CPU to 0x00070010 — a data address inside
the program ROM. From there every instruction raised an exception, the address-error handler at 0x000400 pushed
another frame, and the stack walked down over 0x401EF0-0x401F06, where the game keeps its mode and event flags.
The result was the reboot to the attract sequence.

ProjectRedDoor 0.2.0 — the stage plays

ProjectRedDoor 0.3.1

Choose a tag to compare

@github-actions github-actions released this 01 Dec 17:20

ProjectRedDoor 0.3.1 — fix continuous auto-fire on stage entry (0x0BFF1A and state predicates)

Fixed at the source in Taitof3Decomp:

  • Ea_0BFF1A had spl.b inverted ((v & 0x8000u) ? 0xFFFFu : 0x0000u instead of 0x0000u : 0xFFFFu), returning
    "fire held" when the fire button (A4+0x38) was released (0xFFFF).
  • The 0x0BFB50 state-transition dispatcher calls predicate handlers via jsr ([A3]) and branches directly on Z
    (beq $bfb46). 0BFF10, 0BFF1A, 0BFF6C, 0BFF74, 0BFF7E, 0BFF86, 0C0080 (and 0C2948, 0C296C,
    0C29D8) now update r->sr CCR flags on return.
  • Ea_0C29AE now scales D0.w by 2 (tst.w $36(A4,D0.w*2)).
  • Verified 11,528 calls across all 11 predicates with RD_VERIFY=1 RD_VERIFY_ALL=1 RD_VERIFY_SR=1: 0 mismatches.

ProjectRedDoor 0.3.0 — root-cause CCR fix for 0x0BF4B6, 0x0BD516 and 9 helpers

Fixed at the source in Taitof3Decomp: 0x0BF4B6 (object gate) and 0x0BD516 (map probe) no longer need to be
pinned dirty in the native profile. Both routines — along with 9 other flag-returning helpers in the shipped profile
(0x0C20D6, 0x0C216E, 0x0C2904, 0x0C2922, 0x0C29AE, 0x0C29C0, 0x0C2A0C, 0x0C5572, 0x14EE18) — are
called by ROM code that branches directly on the 68020 CCR flags (bne/beq/bmi) immediately after bsr/jsr
without a tst/cmp. The C translations left r->sr untouched, so callers branched on stale flags:

  • 0x0BF4B6: caller 0x0BE492 saw stale Z=0 after moveq #0, d0, rejecting the player object on stage entry.
  • 0x0BD516: caller 0x0BD546 (movem.w (a7)+,d0-d1 ; bne $bd59c) saw stale CCR after ext.w/moveq #0, causing
    misrouted map probes and the exception-storm reboot. Ea_0BD516 also now stores r->d[1] on the out-of-bounds
    zero exit.

Verifier and profile updates:

  • verify_finish() in src/machine/f3_native.c now checks all 16 general registers (D0-D7, A0-A7) by default
    (previously skipped when check_mask was zero) and supports RD_VERIFY_SR=1 to verify CCR flags (N/Z/V/C).
  • All 11 fixed routines verified bit-exact across 41,872 calls in a 9200-frame Stage 1 playthrough with 0 mismatches.
  • 0x0BD516 and 0x0BF4B6 are re-enabled as clean in src/native/native_profile.tsv.

ProjectRedDoor 0.2.1 — no more reboot during play

Fixed: the board rebooted about 1600 frames into the first stage. The map probe 0x0BD516 ran as recompiled code
and, on one particular position, returned a continuation that sent the CPU to 0x00070010 — a data address inside
the program ROM. From there every instruction raised an exception, the address-error handler at 0x000400 pushed
another frame, and the stack walked down over 0x401EF0-0x401F06, where the game keeps its mode and event flags.
The result was the reboot to the attract sequence.

ProjectRedDoor 0.2.0 — the stage plays

ProjectRedDoor 0.3.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 12:18

ProjectRedDoor 0.3.0 — root-cause CCR fix for 0x0BF4B6, 0x0BD516 and 9 helpers

Fixed at the source in Taitof3Decomp: 0x0BF4B6 (object gate) and 0x0BD516 (map probe) no longer need to be
pinned dirty in the native profile. Both routines — along with 9 other flag-returning helpers in the shipped profile
(0x0C20D6, 0x0C216E, 0x0C2904, 0x0C2922, 0x0C29AE, 0x0C29C0, 0x0C2A0C, 0x0C5572, 0x14EE18) — are
called by ROM code that branches directly on the 68020 CCR flags (bne/beq/bmi) immediately after bsr/jsr
without a tst/cmp. The C translations left r->sr untouched, so callers branched on stale flags:

  • 0x0BF4B6: caller 0x0BE492 saw stale Z=0 after moveq #0, d0, rejecting the player object on stage entry.
  • 0x0BD516: caller 0x0BD546 (movem.w (a7)+,d0-d1 ; bne $bd59c) saw stale CCR after ext.w/moveq #0, causing
    misrouted map probes and the exception-storm reboot. Ea_0BD516 also now stores r->d[1] on the out-of-bounds
    zero exit.

Verifier and profile updates:

  • verify_finish() in src/machine/f3_native.c now checks all 16 general registers (D0-D7, A0-A7) by default
    (previously skipped when check_mask was zero) and supports RD_VERIFY_SR=1 to verify CCR flags (N/Z/V/C).
  • All 11 fixed routines verified bit-exact across 41,872 calls in a 9200-frame Stage 1 playthrough with 0 mismatches.
  • 0x0BD516 and 0x0BF4B6 are re-enabled as clean in src/native/native_profile.tsv.

ProjectRedDoor 0.2.1 — no more reboot during play

Fixed: the board rebooted about 1600 frames into the first stage. The map probe 0x0BD516 ran as recompiled code
and, on one particular position, returned a continuation that sent the CPU to 0x00070010 — a data address inside
the program ROM. From there every instruction raised an exception, the address-error handler at 0x000400 pushed
another frame, and the stack walked down over 0x401EF0-0x401F06, where the game keeps its mode and event flags.
The result was the reboot to the attract sequence.

ProjectRedDoor 0.2.0 — the stage plays

ProjectRedDoor 0.2.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 19:09

ProjectRedDoor 0.2.0 — the stage plays

Fixed: entering the first stage ended it instantly. The object gate 0x0BF4B6, running as recompiled code,
rejected the player object: the actor was installed with the delayed handler 0x0BE43C instead of 0x0BE400, its
one-frame countdown expired and the game showed INSERT COIN TO CONTINUE with a 20 s timer. The gate now runs in the
interpreter. Coin, start, character select, the mission-1 cutscene and the stage all work, the player walks and shoots,
and the mission timer runs.

Why it took so long, and what changed because of it. --native-verify compares only the calls that run natively
and treated a translation's return -1 as "nothing to compare". 0x0BF4B6 is reached four times in a thousand
frames, always with a different object state, so the one call that mattered was never compared and the routine was
admitted as clean. Now:

  • the verifier and tools/merge_profiles.py mark a routine dirty when its translation bails on more than 2 % of its
    calls, and profiles carry calls/bails so the merge applies the same rule;
  • debug aids added along the way: RD_WTRACE (every Work RAM write with its game clock and writer), RD_PCTRACE_FRAME
    (ordered entry trace inside one frame), RD_CALLTRACE, RD_PRESS_GAME (press windows on the game's own frame
    counter), RD_TRACE_IRQ, RD_TRACE_ENTRY, RD_MMIO_TRACE, RD_VERIFY_ALL / RD_VERIFY_FROM.

Known open defect: about 1600 frames into the first stage the CPU stops kicking the watchdog and the board
reboots (native only; the interpreter does not). The attract sequence then restarts. Next on the list.

ProjectRedDoor 0.1.0 — first release: Elevator Action Returns

ProjectRedDoor starts as a separate project, built on ReplicantGaiden's host/machine layer and on the Elevator Action
Returns decompilation in Taitof3Decomp.

Recompiled game code

  • The game's own program, translated to C, is hooked at 1540 ROM entry points: 1507 plain routines and 33 segments
    (task resumptions that stop at a TRAP, a tail jump or an RTE and report their exit PC).
  • A routine runs as native C only if --native-verify matched it against the Musashi interpreter on every recorded call
    (registers, all eight RAM regions and the MMIO write stream). Everything else — undecompiled paths, routines that
    differ, routines whose continuation cannot be reconstructed — rolls back its writes and runs in the interpreter.
  • New continuation rule for this game: a translation resumes through the stack (RTS) or at the PC it reports in r->pc;
    neither means "revert and interpret", instead of guessing a PC. Segments and IRQ prologues that only the ROM's own
    control flow knows how to continue no longer corrupt the CPU state.

Machine and video

  • ROM set retargeted to elvactr (Ver 2.2O 1995/02/20), matched by CRC32, so renamed files and merged sets load.
  • F3 playfield configuration for this game (f3_config: extend 1, 232 lines from line 24, sprite lag 2): four 64×32
    playfields of 0x2000 bytes, no alternate-tilemap select. The renderer takes the layout as an input
    (playfield_extend), so the Darius Gaiden 8×32×32 layout still works unchanged.
  • Boots through the board's own start-up: 128 KiB RAM test, settings rebuild, 93C46 settings check, video init.

Verification

  • The 93C46 is the emulated board's device for both paths: routines that carry their own EEPROM model see the board's
    pins and ready line, which is what makes the settings check pass natively as it does interpreted.
  • Trial runs apply the memory the game reads back inside one call (sound DPRAM, video control words, EEPROM pins) and
    restore it afterwards, so a native trial takes the same branches as the interpreter.
  • --native-report now reports the share of emulated cycles that ran as recompiled code.

Packaging

  • Same four targets as ReplicantGaiden: Linux x86_64, Linux arm64, Windows x64 (static MinGW runtime), macOS universal,
    plus a PortMaster zip built against glibc 2.17.
  • src/native/native_profile.tsv (addresses, status and cycle costs; no ROM content) ships so the first run already
    uses the verified subset.

Known limits

  • No frame-exact comparison against MAME for this game yet (the renderer's raster path was validated on ReplicantGaiden).
  • No handheld testing on real devices yet.
  • See docs/NATIVE_TABLE.md for the routines that stay interpreted, and why.

ProjectRedDoor 0.1.0

Choose a tag to compare

@github-actions github-actions released this 30 Nov 12:14

ProjectRedDoor 0.1.0 — first release: Elevator Action Returns

ProjectRedDoor starts as a separate project, built on ReplicantGaiden's host/machine layer and on the Elevator Action
Returns decompilation in Taitof3Decomp.

Recompiled game code

  • The game's own program, translated to C, is hooked at 1540 ROM entry points: 1507 plain routines and 33 segments
    (task resumptions that stop at a TRAP, a tail jump or an RTE and report their exit PC).
  • A routine runs as native C only if --native-verify matched it against the Musashi interpreter on every recorded call
    (registers, all eight RAM regions and the MMIO write stream). Everything else — undecompiled paths, routines that
    differ, routines whose continuation cannot be reconstructed — rolls back its writes and runs in the interpreter.
  • New continuation rule for this game: a translation resumes through the stack (RTS) or at the PC it reports in r->pc;
    neither means "revert and interpret", instead of guessing a PC. Segments and IRQ prologues that only the ROM's own
    control flow knows how to continue no longer corrupt the CPU state.

Machine and video

  • ROM set retargeted to elvactr (Ver 2.2O 1995/02/20), matched by CRC32, so renamed files and merged sets load.
  • F3 playfield configuration for this game (f3_config: extend 1, 232 lines from line 24, sprite lag 2): four 64×32
    playfields of 0x2000 bytes, no alternate-tilemap select. The renderer takes the layout as an input
    (playfield_extend), so the Darius Gaiden 8×32×32 layout still works unchanged.
  • Boots through the board's own start-up: 128 KiB RAM test, settings rebuild, 93C46 settings check, video init.

Verification

  • The 93C46 is the emulated board's device for both paths: routines that carry their own EEPROM model see the board's
    pins and ready line, which is what makes the settings check pass natively as it does interpreted.
  • Trial runs apply the memory the game reads back inside one call (sound DPRAM, video control words, EEPROM pins) and
    restore it afterwards, so a native trial takes the same branches as the interpreter.
  • --native-report now reports the share of emulated cycles that ran as recompiled code.

Packaging

  • Same four targets as ReplicantGaiden: Linux x86_64, Linux arm64, Windows x64 (static MinGW runtime), macOS universal,
    plus a PortMaster zip built against glibc 2.17.
  • src/native/native_profile.tsv (addresses, status and cycle costs; no ROM content) ships so the first run already
    uses the verified subset.

Known limits

  • No frame-exact comparison against MAME for this game yet (the renderer's raster path was validated on ReplicantGaiden).
  • No handheld testing on real devices yet.
  • See docs/NATIVE_TABLE.md for the routines that stay interpreted, and why.