Commit Graph

310 Commits

Author SHA1 Message Date
Matthew Stanley 65fd320fe5 test: restore optimized TAS and runtime regression gates
Keep assertions active only in test executables, expose an asset-free fixture aggregate, repair isolated link seams and stale expectations, and remove the obsolete hack-positive card test. Production runtime and emitter code and flags are unchanged. Validated with GNU 16.1 Release: 161 recompiler/TAS and 118 runtime tests enabled; existing disabled tests remain disabled.
2026-09-15 12:44:01 -07:00
Pegasus 732bc3f138 Align CD-ROM and MDEC source fixtures with the upstream scheduler seams
Deferred from the integration resolve commit until the CDDA and Nymashock
drive paths it edits exist on this branch.

(cherry picked from commit 9f4712040b)
2026-09-14 17:36:03 +03:00
Pegasus 794b0a0aae Report Nymashock sub-Q ahead of queued sector delivery
(cherry picked from commit 7133a6e462)
2026-09-14 17:36:02 +03:00
Pegasus 6224a262ea Advance Bio Hazard source replay through return 3846
(cherry picked from commit 7c214b32aa)
2026-09-14 17:36:01 +03:00
Pegasus 1f49235ae8 Correct recorded-sector SubQ layout and pregap track ownership
(cherry picked from commit 26b14417b0)
2026-09-14 17:36:00 +03:00
Pegasus e924c73409 Qualify optional source CDDA seek, reports and two-sector audio pipeline
(cherry picked from commit 5c8c3e21d2)
2026-09-14 17:35:59 +03:00
Pegasus 52d4175b59 Model source MDEC FIFO work and request DMA service boundaries
(cherry picked from commit 978f248c25)
2026-09-14 17:35:58 +03:00
Pegasus 126b27f4d9 Bind lossless controller and loaded card identities in native replays
(cherry picked from commit 026182c1ea)
2026-09-14 17:35:21 +03:00
Pegasus df0c0860de Add qualified Nymashock memory-card protocol profile
Rebased after upstream #362: the source-card exemptions from the removed
SELECT-flush, I_STAT.7 requeue, defer guard and transition cap are dropped
with those paths.

(cherry picked from commit 306a266fae)
2026-09-14 17:35:20 +03:00
Pegasus bc07105828 Qualify explicit Nymashock DualShock ACK timing
(cherry picked from commit 599a536b97)
2026-09-14 17:33:56 +03:00
Pegasus f7a64c9ad4 Deliver and observe complete DualShock TAS inputs without mode overrides
(cherry picked from commit 28fb4e0f7c)
2026-09-14 17:32:50 +03:00
Pegasus 460c5681e9 Add lossless bounded DualShock TAS controller codec
(cherry picked from commit 0549d8daa8)
2026-09-14 17:32:11 +03:00
Pegasus bd885702a8 Admit raw blended source GPU sprites for Biohazard
(cherry picked from commit 0a66b134b8)
2026-09-14 17:32:10 +03:00
Pegasus c007201fcc Support shaded source GPU lines for Biohazard replay
(cherry picked from commit 7c0f867cc8)
2026-09-14 17:32:09 +03:00
Pegasus 41db3dd60d Support source GPU flat lines for Biohazard replay
(cherry picked from commit adb633e071)
2026-09-14 17:32:08 +03:00
Pegasus 2bf27fe2c1 Qualify remaining shaded polygon command variants
(cherry picked from commit 086a513fb1)
2026-09-14 17:32:07 +03:00
Pegasus 942ad0a210 Admit source-qualified shaded quad command aliases
(cherry picked from commit 70877b4910)
2026-09-14 17:32:06 +03:00
Pegasus de16ac599e Match source polygon coordinate wrapping and interpolation
(cherry picked from commit 8d359b75f4)
2026-09-14 17:32:05 +03:00
Pegasus 1a4545d088 Preserve source triangle-half traversal for texture-cache and feedback correctness
(cherry picked from commit 1b59dc7478)
2026-09-14 17:32:04 +03:00
Pegasus 1ea410e19e Admit tested raw and semitransparent source textured triangles
(cherry picked from commit 46ca602b9e)
2026-09-14 17:32:02 +03:00
Pegasus 7a2fa4c348 Qualify flat polygon blend flags in source GPU comparison
(cherry picked from commit fe694e323f)
2026-09-14 17:32:01 +03:00
Pegasus 9b129cd245 Admit blended textured rectangles in source GPU comparison
(cherry picked from commit 82e9f6d52a)
2026-09-14 17:32:00 +03:00
Pegasus 51e63d0130 Retain Biohazard progress snapshots through full route
(cherry picked from commit 9e801ee16f)
2026-09-14 17:31:59 +03:00
Pegasus c414fb40d2 Keep complete CPU and RAM returns for declared long TAS routes
(cherry picked from commit 021b65cf2d)
2026-09-14 17:31:56 +03:00
Pegasus 0f3a34f403 Bind full RAM diagnostics to the declared TAS return count
(cherry picked from commit 800f90507a)
2026-09-14 17:31:50 +03:00
Pegasus 9b70c21b1e Remove trailing blank lines from TAS integration files
(cherry picked from commit bc6cdfebbd)
2026-09-14 17:30:46 +03:00
Pegasus 0f4c92175b Resolve upstream TAS integration and document qualification boundaries
Runtime and recompiler portion only. The campaign documents, workflow
triggers and the CD-ROM/MDEC fixture alignment follow in later branches.

(cherry picked from commit 9f4712040b)
2026-09-14 17:30:45 +03:00
Pegasus 3bd62b3099 Integrate qualified TAS timing and execution profile
Rebased onto upstream after #362: the Ape Escape card-repair hunks are
dropped with the removed block, and the pace walk keeps upstream's uncapped
deadline consumption plus the source ACK-pulse edge.

(cherry picked from commit 8235a7700f)
2026-09-14 17:29:38 +03:00
Pegasus 5968162fe9 fix: publish deferred CPU work before GTE deadline checks
(cherry picked from commit 43abd4a5c8)
2026-09-14 17:26:34 +03:00
Pegasus 77a8480363 Read disc region from the actual SYSTEM.CNF directory entry
Prefer the ISO9660 boot file over the bounded raw-image scan. Biohazard stores SYSTEM.CNF outside that scan, leaving fresh builds at the default SCEA response. Add raw and cooked late-file regressions with an early decoy serial. The full-profile prefix again matches the retained native baseline through 5999 returns; the independent-source frontier remains return 464.

(cherry picked from commit 82c3de13ef)
2026-09-14 17:26:33 +03:00
Pegasus 5e23de8393 feat: add PS1 conformance harness and fix GTE fidelity
(cherry picked from commit 98d617b5f3)
2026-09-14 17:26:31 +03:00
Alexandros Mandravillis d4abc2f05d Fix non-RA JALR interpreter handoff
(cherry picked from commit 2f8f627b24)
2026-09-14 17:26:30 +03:00
Matthew Stanley 8b689140dd Add opt-in world scene classification and immutable terrain batching 2026-09-13 21:06:58 -07:00
Matthew Stanley b4d41b173c Merge current master and preserve both runtime regression test groups 2026-09-13 19:40:33 -07:00
Matthew Stanley f2352e3d32 Keep retained scene aspect until the next displayed buffer flip 2026-09-13 19:27:03 -07:00
Matthew Stanley e3beb365ba Add opt-in native-wide presentation hold for retained loading scenes 2026-09-13 19:11:21 -07:00
Alexandros Mandravillis 693c7be0fc Fix GPU upload history overflow after retention fills (#360)
Co-authored-by: Pegasus <pegasus@psxrecomp.local>
2026-09-13 17:01:55 -07:00
Matthew Stanley 9037e7bd23 Add opt-in retained texture banks and enhancement memory snapshots 2026-09-13 16:50:26 -07:00
Matt Stanley d4c45adf62 fix(sio): remove title-specific card IRQ repair and opt-in (#362) 2026-09-13 16:33:46 -07:00
Matthew Stanley 847c2baf37 docs: stage FMV IRQ batching RFC and cache-state counterexample 2026-09-12 23:30:41 -07:00
Matthew Stanley 9576c6323f Refresh combined BIOS and dispatch validation against latest master 2026-09-11 23:39:47 -07:00
Matthew Stanley fae85cc886 Repair Windows and stale regression test harness assumptions 2026-09-11 23:39:47 -07:00
Matthew Stanley ac0e40628a Match BIOS setup detection to configured linkable backends 2026-09-11 23:39:11 -07:00
Matthew Stanley b4ea4c37e9 Expand opt-in DMA arenas without aliasing CPU BIOS addresses 2026-09-11 23:05:07 -07:00
Matthew Stanley c5390e4265 Merge kernel patch ranges PR #346 for combined validation 2026-09-11 22:53:07 -07:00
Matthew Stanley 9550b3e579 Merge BIOS setup-host PR #343 for combined validation 2026-09-11 22:53:05 -07:00
Matthew Stanley 06a93dc8aa Forward widescreen hooks in native overlays and verify fallback intervals 2026-09-11 22:28:03 -07:00
Kevin 3cbe6c1cde kernel-bless: publish install-slot ranges so patched BIOS bodies run native
The BIOS exception handler ran interpreted for the life of every process,
1.22 billion instructions and 44.6% of all interpreted work in Breath of
Fire III, even though it is compiled and even though the stub that
unblessed it sat at exactly the address bios/SCPH1001.toml already
declared as an install slot. Two mechanisms existed and did not compose:
the emitter hooked the declared slot PC, while the runtime's bless
verifier memcmp'd the whole body including that slot, so the body was
MISMATCH forever and native code never reached the hook.

Three parts, none of which pays off alone:

1. Publish the declared ranges to the runtime. The emitter emits a
   PsxKernelPatchRange table next to the kernel body table and routes it
   through the backend descriptor; the bless verifier compares a body in
   segments that skip them. CLEAN now means "every byte outside every
   declared range still matches ROM", which is the claim the native code
   actually depends on.

2. Generalise the slot model to what the patches are. The old model
   assumed a 4-word lui/addiu/jalr/nop stub written over ROM zeros and
   fired on `word != 0`. Measured against both images, only one of five
   observed shapes fits: patchers also plant a `jr` over real ROM
   instructions, rewrite an 11-word prologue and insert an `mfc0 Cause`,
   and NOP out a driver routine. A slot is now a range with a length and
   an explicit `resume` (jalr / fallthrough / none), detected by
   comparing every word against its ROM-baked value.

3. Hand back from the interpreter at the range end. Kernel page 0 is
   permanently dirty, because the handler saves registers there on every
   exception, so straight-line interpretation would run the whole
   function after the patch. The emitter registers the resume PC as a
   continuation key and dirty_ram_interp surfaces there.

A PC inside a declared range must never be a native dispatch key: the
compiled bytes there are not what executes. Seven pre-existing
jal-return continuations violated that and wedged the boot at frame 0 in
an infinite dispatch loop (OpenBIOS RAM 0x357C). The emitter now drops
continuation keys inside a range so dispatch misses through to the
interpreter, and refuses to emit if a range covers a function entry,
which would silently remove a callable function instead.

Both profiles declare their measured ranges, and SCPH1001.toml finally
pins [program.image] sha256 to v2.2 (CRC32 37157331) so a v2.0 dump
refuses to generate rather than producing phantom discovery gaps.

Measured on Breath of Fire III (SLPS-00990, Psy-Q SDK 3.70), headless,
matched frames, PSX_KERNEL_PATCH_RANGES=0 for the OFF side:

                      OpenBIOS            SCPH-1001 v2.2
  bless mismatch      21 -> 0             74 -> 0
  kernel bodies       -87.7%/frame        -97.8%/frame
  all interp insns    -42.6%/frame        -94.2%/frame

The residual kernel-body work is exactly declared-words x entries on
every range, so nothing leaks past the hook. The A0/B0/C0 vector
trampolines are unchanged (+0.2%, noise): the profile excludes them by
design and they are a separate job. Card read traces are byte-identical
across the A/B on both images, all 32 entries, which exercises the two
ranges that replace the kernel's card handler.

Rule 18 holds throughout: the guest's patched instructions still execute
as written on the dirty-RAM interpreter. Only the code around them
changes backend. Nothing is synthesised.

Tests: runtime/tests/test_kernel_patch_ranges.c (new, the verifier's
accept/reject behaviour and the hand-back predicate) and the install-slot
range invariants in recompiler/tests/bios_address_model_test.cpp.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 16:38:34 -04:00
Alexandros Mandravillis c2f9c3d59a setup: detect any recompiled BIOS stem and stop the first-run setup loop
Focused port of the fork's fix/setup-host-bios-deadlock feature (10 commits) onto current upstream master, per the 2026-09-10 decision to port rather than rebase (the fork line and upstream share no merge base).

Content: the codegen host accepts any recompiled BIOS stem instead of only OpenBIOS/SCPH1001 (psx_bios_known_images.h); the runtime checks the setup host before validating a chosen BIOS and the first-run loop breaker reports a cause-specific reason; the CLI decodes subprocess output as UTF-8; --setup-selfcheck verifies a headless setup; the rbengine preflight names the recursive init. Two port conflicts resolved: the new CTest registrations in recompiler/CMakeLists.txt are kept (the names exist only in this change), and runtime.cmake takes the new recomp-ui guidance text. Cubic P3 finding fixed: the sibling PSX_NETPLAY FATAL_ERROR now also names --recursive.

Evidence: python syntax checks pass for psxrecomp_cli.py and the new tests; runtime/tests/test_codegen_host_bios_stems.py runs or skips only on a missing RECOMP_UI_ROOT. No full runtime build or retail route is claimed here. Developed with AI assistance (Cline, 2026-09-10).
2026-09-11 01:26:22 +03:00
Matthew Stanley 93a93c8e07 Fix game runtime wrapper setup gating 2026-09-08 13:36:54 -07:00