Skip to content

ProjectRedDoor 0.3.1

Choose a tag to compare

@github-actions github-actions released this 01 Dec 17:20
· 2 commits to main since this release

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