Commit Graph

60 Commits

Author SHA1 Message Date
Alex Vanderveen 3da61df355 Revert "ok"
This reverts commit b836f2198c.
2026-07-29 03:18:10 -04:00
Alex Vanderveen b836f2198c ok 2026-07-29 03:15:42 -04:00
Alex Vanderveen 070fc805c4 Merge origin/master into feat/ui-5p.
Keep 5p/ICE netplay host + lobby client; take master's cycle batching,
SDL3 defaults, and dropped vendored lib/recomp-ui.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 20:17:14 -04:00
Matthew Stanley 9aa5466da7 Add per-game audio buffer target 2026-07-28 12:23:06 -07:00
Alex Vanderveen 227d395823 ICE optimizations, connectivity, latency polling, save/loadstate performance 2026-07-28 00:16:30 -04:00
Matthew Stanley 5ec343ab4f fix(bios): make the boot-skip flag mean the same thing on every BIOS
`bios_hle` (default on) is the player-facing "skip the BIOS and go
straight to the game" flag, and it did nothing under the bundled
OpenBIOS: choosing OpenBIOS sat the player in the boot animation while
the identical build on retail SCPH-1001 went straight to the game.

Root cause was ordering, not policy. The tier has two axes with
different per-image requirements:

  * boot-skip     needs only `shell_entry_phys`, works under pure LLE
                  (nothing is synthesized — the shell call just returns
                  immediately), so any image exporting it can skip
  * kernel-call    needs `deliver_event_ret`, the kernel's own
                  DeliverEvent `$ra`, or a delivered callback returns to
                  the wrong PC

main.cpp correctly refused the call axis on an image without
`deliver_event_ret` by assigning `bios_hle = false` — and then derived
`boot_skip` from that already-mutated flag. OpenBIOS omits
`deliver_event_ret` (B0 semantics unvalidated) but DOES export
`shell_entry_phys`, so an available skip was cancelled by an unrelated
refusal, and one flag meant two things depending on a BIOS detail no
player can see.

Both axes are now decided by one pure, dependency-free function,
`psx_bios_hle_plan()` (runtime/src/bios_hle_plan.c): the boot decision
reads the REQUESTED `bios_hle`, each axis is gated on only the anchor it
needs, and refusals are reported at startup instead of downgrading
silently. `psx_bios_hle_configure()` clamps `boot_skip` to
`shell_entry_phys != 0` as a backstop so the banner and `hle_dump`
cannot overstate what can fire. The main.cpp local is renamed
`bios_hle_requested` and is no longer written back from the plan — the
`session_reboot` path re-enters that block, so folding a refusal into
the request would have made a netplay rematch differ from first launch.

Also in this pass:

* A BIOS profile's `[runtime]` block was parsed into
  `BiosConfig::runtime` and read by NOTHING, and bios/OpenBIOS.toml
  carried an inert `bios_hle = false` there that read as the reason HLE
  was off on OpenBIOS. It was not. `load_bios_config` now REJECTS
  `[runtime]` in a BIOS profile: a profile states facts about an image,
  never preferences.
* `psx_icache_fastpath_test` had been unbuildable ("redefinition of
  `psx_advance_cycles`" — the test's counting stub vs the header's
  `static inline`), which blocked every runtime test registered after
  it. It now builds with `PSX_OVERLAY_DLL_BUILD=1`, the seam
  psx_cycles.h already provides for a TU supplying its own advance.

Tests: new `bios_hle_plan_test` pins the matrix, including a 64-case
sweep asserting the boot decision is independent of
`deliver_event_ret` and the call decision independent of
`shell_entry_phys`. Runtime ctest 15/15, recompiler ctest 30/30.

Validated on Ape Escape (SCUS-94423) built against this framework with
both backends linked, headless, all four cases:

  OpenBIOS default   bios_boot=skip to game; route=2 fire at vec 0x30000
                     ra=0xBFC06EA8 (the continuation OpenBIOS.toml
                     documents); in-game on screen
  retail default     bios_boot=skip to game; route=2 at vec 0x30000
                     ra=0xBFC0702C; in-game on screen; differs only in
                     bios_backend=HLE (LLE fallback)
  PSX_BIOS_HLE=0     bios_boot=real intro; ring empty (no hook)
  KEEP_INTRO=1       bios_boot=real intro; ring empty

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 16:36:48 -07:00
Matthew Stanley bb5fccea51 fix: make FPS telemetry opt-in 2026-07-27 11:44:31 -07:00
Matthew Stanley 45dd4210cf Remove Tomba legacy hybrid controller path 2026-07-26 20:52:12 -07:00
Matthew Stanley f86087ad94 Remove stale RmlUi launcher remnants 2026-07-23 00:29:22 -07:00
Alex Vanderveen 7cf9958135 FMV optimizations 2026-07-21 21:38:04 -07:00
Alex Vanderveen 0b890cdc13 lobby game version control 2026-07-21 21:38:04 -07:00
Alex Vanderveen 31015ceab1 feat: launcher polish and recomp-net lobby netplay
Wire MotK-style lobby (recomp-net submodule, WS client, match_caps),
netplay delay-sync, and launcher UX so host sim settings stay aligned
across peers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 21:37:57 -07:00
Matthew Stanley da64f44e82 launcher: expose the Vulkan renderer
Cycle the renderer selector through Software, OpenGL, and Vulkan while retaining OpenGL-only option gating.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>
2026-07-21 15:55:16 -07:00
Matthew Stanley f1fd8ec848 vulkan: expose present blocking telemetry
Record queue-wait, acquire, and present durations plus presentation timestamps in the existing vk_perf ring.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>
2026-07-21 15:55:11 -07:00
Matthew Stanley f5498f796c vulkan: prefer MAILBOX for tear-free presentation
Let the frontend remain the sole frame pacer by requesting MAILBOX for tear-free delivery, with FIFO retained as the required fallback.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>
2026-07-21 15:55:06 -07:00
Matthew Stanley af9de64951 vulkan: reuse persistently mapped staging buffers
Cache best-fit host-visible staging allocations across queue-idle reclamation points and safely detach long-lived CPU-present buffers during teardown.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>
2026-07-21 15:54:42 -07:00
Matthew Stanley b5e9f763fe vulkan: batch work into one command buffer
Keep a shared work command buffer open across logical GPU operations and submit it at the existing synchronization boundary.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>
2026-07-21 15:54:29 -07:00
Matthew Stanley 92cbb1a327 vulkan: order back-to-back color passes
Add same-layout color attachment barriers before geometry and wide-surface render passes so prior writes are visible to LOAD and blend operations.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 15:54:17 -07:00
Matthew Stanley 7f9f59a2bb vulkan: wait for acquire before transfer writes
Include the transfer stage in the swapchain acquire wait mask because the present command buffer clears and blits the acquired image with transfer operations.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 15:54:12 -07:00
Matthew Stanley c25931e3b7 vulkan: align packed upload offsets
Pad each packed R16 upload region to an even texel count so subsequent VkBufferImageCopy offsets retain the required four-byte alignment.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 15:54:07 -07:00
Matthew Stanley ca1888a2f8 docs: FAITHFUL_TIMING_PLAN log entry for the alias re-entry root cause
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 00:07:34 -07:00
Matthew Stanley 6b069bedb8 feat: park duplicate-frame presentation smoothing
Adapted from https://github.com/mstan/psxrecomp/commit/ec889d6e5956fc4f34acfee41d87f30b24123b7f

Co-authored-by: Kareem Olim <kareemolim@gmail.com>
2026-07-14 23:07:14 -07:00
Matthew Stanley 2ceaf5abee feat: park projection and perspective correction
Adapted from https://github.com/mstan/psxrecomp/commit/ec889d6e5956fc4f34acfee41d87f30b24123b7f

Co-authored-by: Kareem Olim <kareemolim@gmail.com>
2026-07-14 23:06:38 -07:00
douglasjv 28165d6421 Expand Einhander player bounds for native widescreen 2026-07-14 23:06:05 -07:00
douglasjv 9a8cdb6772 Add typed native-wide textured edge expansion 2026-07-14 23:04:55 -07:00
Matthew Stanley 0e5c38d558 feat: add generic CD-DA playback and CUE pregaps
Adapted from https://github.com/mstan/psxrecomp/commit/0e9df70ca2da6ec67c8e7a1f3e5aaa025fddc369

Co-authored-by: Kareem Olim <kareemolim@gmail.com>
2026-07-14 20:03:02 -07:00
Matthew Stanley 7ae052534a spu: add hardware Gaussian interpolation
Port the reusable Gaussian interpolation slice from PR #16 while keeping its reverb engine on a separate branch.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 18:56:51 -07:00
Matthew Stanley 19e526d57d gpu: reject oversized hardware primitives
Apply the PS1 1023x511 size rule to every polygon triangle, line, and polyline continuation before widescreen transforms while preserving textured-command state latching.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 18:35:07 -07:00
Matthew Stanley 928085d5fb gpu: use exclusive PS1 software-raster edges
Adapt PR #14's biased 32.32 triangle edge DDA and half-open bottom/right coverage across the software raster paths, with a focused pure edge-math regression test.

Source: https://github.com/mstan/psxrecomp/pull/14

Source-commit: https://github.com/mstan/psxrecomp/commit/91a654f61dff18806f3eea43f72a30cb34430695

Co-authored-by: Kareem Olim <kareemolim@gmail.com>
2026-07-14 18:34:32 -07:00
Matthew Stanley 35684c5385 gpu: recognize shaded-polyline terminators in either phase
Adapted from NyperYuhgard's PR #13.

Co-authored-by: NyperYuhgard <93950153+NyperYuhgard@users.noreply.github.com>
2026-07-14 18:34:14 -07:00
Matthew Stanley c2b9d467e5 runtime: discover decodable unmarked overlay code
Admit post-EXE RAM to the dirty interpreter only after a real control transfer and an existing MIPS decodability check. Keep the already-merged overlay initialization guard out of this focused change.

Co-authored-by: Martin Penkava <mpenkava1337@gmail.com>

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 18:12:08 -07:00
Codex 347b6ffb01 Experiment with CPU-copied overlay discovery
Co-authored-by: douglasjv <vanderveerdouglas@gmail.com>
2026-07-14 16:13:29 -07:00
Codex edc3fd4e30 Preserve one-frame debug input pulses
Co-authored-by: douglasjv <vanderveerdouglas@gmail.com>
2026-07-14 16:02:13 -07:00
Codex b156770bbd Configure the runtime OpenGL 3.3 core context
Co-authored-by: douglasjv <vanderveerdouglas@gmail.com>
2026-07-14 15:59:39 -07:00
Matthew Stanley e247155cd6 overlay: use platform-native shared-library suffixes
Adapted from NyperYuhgard's PR #13 POSIX overlay work.

Co-authored-by: NyperYuhgard <93950153+NyperYuhgard@users.noreply.github.com>
2026-07-14 15:58:34 -07:00
Matt Stanley e5b5e309b5 Merge pull request #30 from mstan/feat/debug-client-command-parity-douglas
tools: expose existing debug-server commands in the client
2026-07-14 15:29:50 -07:00
Matt Stanley 4e31c6b71d Merge pull request #29 from mstan/feat/debug-analog-input-douglas
debug: expose analog input and stick status
2026-07-14 15:29:47 -07:00
Matt Stanley b1759ee8e1 Merge pull request #28 from mstan/park/pr13-misaligned-dispatch-diagnostics
traps: enrich misaligned dispatch diagnostics
2026-07-14 15:29:44 -07:00
Matt Stanley 75691a4546 Merge pull request #27 from mstan/park/pr13-overlay-cache-inventory
overlay: add opt-in cache inventory telemetry
2026-07-14 15:29:40 -07:00
Matthew Stanley 7350f2413a traps: enrich misaligned dispatch diagnostics
Adapted from NyperYuhgard's PR #13.

Co-authored-by: NyperYuhgard <93950153+NyperYuhgard@users.noreply.github.com>
2026-07-14 10:20:08 -07:00
Matthew Stanley 43e5f286b3 overlay: add opt-in cache inventory telemetry
Adapted from NyperYuhgard's PR #13.

Co-authored-by: NyperYuhgard <93950153+NyperYuhgard@users.noreply.github.com>
2026-07-14 10:19:54 -07:00
Matthew Stanley 7d1fadb07c runtime: report simulated-vblank FPS telemetry
Adapted from NyperYuhgard's PR #13.

Co-authored-by: NyperYuhgard <93950153+NyperYuhgard@users.noreply.github.com>
2026-07-14 10:19:50 -07:00
Codex dbaebaf37a Expose analog input through debug controls
Co-authored-by: douglasjv <vanderveerdouglas@gmail.com>
2026-07-14 10:01:12 -07:00
Codex 1211d09bf7 Expose existing debug server commands in the client
Co-authored-by: douglasjv <vanderveerdouglas@gmail.com>
2026-07-14 10:01:01 -07:00
Matthew Stanley 098b06e047 Merge remote-tracking branch 'origin/master' into feat/reachable-main-discovery-douglas
# Conflicts:
#	docs/config_schema.md
#	recompiler/CMakeLists.txt
#	recompiler/src/main_psx.cpp
2026-07-14 00:09:56 -07:00
Matt Stanley f7d6bf2149 Merge pull request #22 from mstan/feat/config-guarded-mips-patches-douglas
Add config-driven guarded MIPS patches
2026-07-14 00:05:13 -07:00
Matt Stanley f88828327e Merge pull request #18 from mstan/fix/posix-overlay-export-scan-douglas
Load cached overlay exports on POSIX
2026-07-14 00:03:48 -07:00
Matt Stanley e94574a3d9 Merge pull request #21 from mstan/fix/msvc-generated-init-shaneomac
Add MSVC portability for runtime and generated startup
2026-07-14 00:03:44 -07:00
Matt Stanley a03350fb68 Merge pull request #23 from mstan/fix/overlay-init-guard-shaneomac
Guard overlay entry points before initialization
2026-07-14 00:03:41 -07:00
Matt Stanley 23edb88b68 Merge pull request #20 from mstan/fix/cdrom-encoded-interrupts-kem0x
Fix encoded CD-ROM interrupt mask matching
2026-07-14 00:03:38 -07:00