Commit Graph

1474 Commits

Author SHA1 Message Date
Matthew Stanley 534dcd5df3 PGXP: always-on ring of refused perspective-depth lookups (TCP pgxp_miss_ring)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 12:00:42 -07:00
Matthew Stanley ce22e54e89 TCP pgxp_shadow: read PGXP shadow slots by address or register
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:57:55 -07:00
Matthew Stanley 36bea23bd2 PGXP: census which check refuses a precise-word depth lookup
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:45:15 -07:00
Matthew Stanley 9594b3d79b Mod catalog: stage sibling runtimes one after another
Siblings sharing an output directory (PGXP clones, Tomba 2's regions) raced each other's mods/bundled wipe under -j2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:33:29 -07:00
Matthew Stanley af4dc2309e PGXP variant: stage the clone's mod catalog after the base target's
Both wrote one mods/bundled concurrently under -j2 and the wipe failed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:32:36 -07:00
Matthew Stanley bf91728a93 Widescreen: full-width overlays to within W/64 of each edge
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:26:28 -07:00
Matthew Stanley cfd13c0b0a Widescreen: needles and dial hands inside a HUD widget squash with it
Triangles and rotated quads in the HUD rank that lie inside the admitted pieces they overlap join that widget (Spider-Man's compass arrow stretched while its ring squashed).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:24:51 -07:00
Matthew Stanley 95fed96743 Widescreen: a full-display-width primitive is an overlay, not UI
Letterbox bars squashed as HUD left the revealed margins showing the frame's clear colour. Also link gpu_timeline.c into the GPU exec tests (broken since b2104464).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:19:28 -07:00
Matthew Stanley d614395470 Debug server: window_size resizes the game window for window-shaped checks
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 11:14:58 -07:00
Matthew Stanley e3133d27d8 Merge feat/render-pass-kit (ROTATION, counters, offline build fix)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:33:50 -07:00
Matthew Stanley f9cafa7318 Mod runtime: named plugin counters (psx_mod_counter_add, mod_counters)
Same API as the V8:2 branch's b2104464, for every frame-rate plugin.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:32:23 -07:00
Matthew Stanley 03f914be6f Motion kit: ROTATION kind for bare 3x3 rotations
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:29:52 -07:00
Matthew Stanley bd2c3b8c62 Offline builds: host relay status only with recomp-net linked
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:24:36 -07:00
Matthew Stanley 8e655d97ab Merge feat/render-pass-kit (motion kit, frame driver)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:17:29 -07:00
Matthew Stanley 642cd48f7d Render passes: motion kit and per-frame driver for frame-rate plugins; porting guide
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:16:55 -07:00
Matthew Stanley 3935ae8cab Render passes: spans run their calls with the full trampoline; phase 0 is the flipped image
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:12:19 -07:00
Matthew Stanley 61bc68e533 Render passes: FLIP_SHOWN mode for games that flip each frame as soon as it is drawn 2026-10-02 10:12:18 -07:00
Matthew Stanley b27be21d1e Frontend: --hidden-window never blocks on a modal or file picker 2026-10-02 10:12:18 -07:00
Matthew Stanley 1e6ef854c5 Frontend: --hidden-window runs the full presenter in a never-shown window 2026-10-02 10:12:17 -07:00
Matthew Stanley 5297bd7a00 Render passes: replay a span of a compiled guest function (psx_mod_run_guest_span)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 10:12:17 -07:00
Matthew Stanley 9c0c98bd96 Render passes: spans run their calls with the full trampoline; phase 0 is the flipped image
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 09:31:14 -07:00
Matthew Stanley a6c3728c22 Render passes: FLIP_SHOWN mode for games that flip each frame as soon as it is drawn 2026-10-02 09:11:43 -07:00
Matthew Stanley 8b1bcfe43a Frontend: --hidden-window never blocks on a modal or file picker 2026-10-02 09:03:05 -07:00
Matthew Stanley 7d1ad2ec19 Frontend: --hidden-window runs the full presenter in a never-shown window 2026-10-02 09:00:38 -07:00
Matthew Stanley 1c86297e3b Render passes: replay a span of a compiled guest function (psx_mod_run_guest_span)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 08:56:48 -07:00
Matthew Stanley 6b27a1a952 Merge fix: guest-function hooks carry the filter slot 2026-10-02 08:44:21 -07:00
Matthew Stanley 81b449d7c9 Merge V8:2 framework branch (b9f9ba23) into master for render passes
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 08:36:58 -07:00
Matt Stanley 641537be82 Merge pull request #473 from RetroPortingToolKit/fix/unsplit-shared-hud
Netplay: show complete shared timers in both unsplit views
2026-10-01 16:44:43 -07:00
Matthew Stanley 5e413cbd84 netplay: duplicate shared HUD counters into both unsplit views 2026-10-01 16:43:56 -07:00
Alex Vanderveen 1982e7dcb5 netplay: host relay for online rooms (amends §108 "online is always SFU")
An online room this build hosts asks the lobby server for transport "host"
(match_caps.relay): the host carries the match on its own UDP port and
guests dial it; the server's relay (SFU) is the fallback when a guest's
probe fails (recomp-net-server WS_LOBBY.md "Host relay"). The mechanics are
recomp-net's recomp_net/host_relay.h, pinned here (lib/recomp-net b0751b7);
this engine's own lobby-client copy gets the same glue as rnet_lobby_client:
the cap (emitted only when asked), the launch's transport ->
PsxLobbyJoinInfo.transport_host (force_input_relay 0; the host accepts
first / hubs instead of dialling the guest's LAN address), each seat's
published path / path_fresh, host_relay_step() from psx_lobby_pump, and
unmap on leave / disconnect.

psx_netplay: transport_host takes the LAN / hub path instead of the "MotK
online needs the SFU" rule. main.cpp: relay_host_get/set + relay_status
for recomp-ui (Network Settings / MATCH SETTINGS / ROOM "Match Relay"),
transport_host on the launch and into PsxNetplayConfig, and the
host==guest-advertise SFU inference skipped on a host launch; all under
RECOMP_LAUNCHER_HAS_HOST_RELAY so older recomp-ui pins still build.

Compile-checked against workspace recomp-ui 58604b0 (MOTK scratch
configure: full build and link).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-01 19:10:30 -04:00
Alex Vanderveen 35d604ab80 netplay: matches the Retro hub negotiates -- ingest_launch and --netplay-query
The hub holds the lobby seat; the game settles everything itself
(retcomm-launcher docs/NETPLAY_HANDOFF.md):
- psx_lobby_ingest_record replays the hub's seat/room/launch messages
  through handle_server_json, so fill_launch answers as in-game.
- --netplay-query answers what this build's lobby would send: disc_fp,
  set_ready (BIOS offer), start (default caps; settled from a room).
- set_ready/start builders and the host start-caps settle are factored out
  unchanged and shared by in-game PLAY and the query.
- A handed-off match ends the process (the hub holds the room).

Two CTR processes from records, local relay: all 80 live digests equal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 19:10:30 -04:00
Matthew Stanley 2163035e9a netplay local viewport: projection renderer, hi-res half present, state gate
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 16:02:08 -07:00
Matthew Stanley 881c94a869 widescreen: netplay local viewport keeps the display's pixel aspect
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 15:30:39 -07:00
Matthew Stanley 3b41a81365 netplay: debug-server input override drives headless peers
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 15:07:43 -07:00
Matthew Stanley fa74d5aa72 widescreen: auto_ui_squash admits small HUD pieces stacked on the front rank
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 12:22:05 -07:00
Matthew Stanley acb2e2c05e widescreen: auto_ui_squash admits backing panels enclosing front-rank HUD
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 11:23:44 -07:00
Matthew Stanley 4ddb7b3ca9 widescreen: auto_ui_squash corrects untextured HUD quads with their frames
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 11:19:45 -07:00
Matthew Stanley 85c88d269c widescreen: auto_ui_anchor = "in_place" squashes each HUD run about its own centre
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-01 11:13:30 -07:00
Matthew Stanley 53521866b4 SDL3: separate Windows desktop borderless and exclusive fullscreen 2026-09-30 23:30:28 -07:00
Matthew Stanley b9f9ba230f Support guarded mod callbacks and verified disc extents for combined content 2026-09-30 22:51:23 -07:00
Matthew Stanley 757790debe Keep large screen-space composites anchored as one group 2026-09-30 21:38:17 -07:00
Matthew Stanley 7c7133fbb4 Integrate MMX6 adaptive renderer with current framework master
Preserve current segmented dispatch, active-plan mod hooks and software scale limits. Extend function filters through the active plan, retain the last-store pointer with overlay ABI 25, and keep default config fingerprints stable. Refresh BIOS emitter stamps after byte-identical regeneration and reconcile regression fixtures.
2026-09-30 20:23:16 -07:00
Alex Vanderveen efcb48fbcb bios fingerprint: compute it with cmake -P, not a bash found on PATH
The windows-2022 release job accepted the committed backends in the step
shell (Git Bash) and refused them at configure: runtime.cmake ran the bash
fingerprint through whichever bash find_program() located, and that
environment hashed a byte-identical tree differently. The fingerprint is now
tools/bios_emitter_fingerprint.cmake, run with the configuring cmake itself
on every platform; the shell script is a thin wrapper around it. Same digest
shape as before, so existing stamps stay valid (verified on an LF tree and
an autocrlf clone).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 20:49:23 -04:00
Alex Vanderveen f180a32ec1 bios: commit the OpenBIOS and SCPH-1001 backends; releases link both
Decision (Alex, 2026-09-30): the recompiled BIOS carries the same risk as
the recompiled game, which titles already commit, so the retail backend is
compiled in rather than built on the player's machine. The retail image is
still never shipped: the runtime needs its data at run time and accepts only
the exact image the backend was built from, so the player supplies their
own dump as before.

- generated/{OpenBIOS,SCPH1001}_{full,dispatch}.c and their .emitter.sha
  stamps are tracked (.gitignore un-ignores exactly those); regenerated with
  the current emitter.
- bios_emitter_fingerprint.sh no longer hashes the ROM image: the profile's
  SHA-256 pin stands for it and the emitter refuses any other image, and CI
  has no dump, so hashing it made every CI configure read "stale".
- runtime.cmake: the staleness check covers every LINKED stem and
  -DPSXRECOMP_BIOS_STALE_FATAL=ON makes a stale stamp fail configure.
- game-release.yml: no CI-side OpenBIOS emission (generate_openbios.sh is
  gone); configure with BIOS_STALE_FATAL and assert both backends linked.
  check_generated.sh asserts the submodule carries both backends tracked
  and no dump is tracked anywhere.
- The player-side module build stays for a known image a build does not
  link (SCPH-5552).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 20:27:41 -04:00
Matthew Stanley ca14a118f0 fix(runtime): grow software present buffers for adaptive widths 2026-09-30 17:11:39 -07:00
Alex Vanderveen 170370a440 launcher: prepare a retail BIOS from the wizard with progress, not at Play
A buildable dump used to verify as usable and then block at Play behind a
modal while the module compiled. Now:

- ae_bios_verify reports a buildable, not-yet-cached dump as needs_regen,
  and the runtime wires recomp-ui's new bios_prepare_with_progress job
  (ae_bios_prepare) whenever the toolchain is present and no Generate host
  is: the launcher runs the build as a progress job from the wizard's
  "Prepare BIOS" button or the Play prompt, re-verifies, and resumes the
  wizard. Generate & rebuild is never offered for a BIOS in a bundled build.
- psx_bios_module.c gains a progress sink fed from the builder's output
  lines (dump / emit / compile / self-check / published map to stage
  percentages with readable messages); run_command streams lines on both
  platforms.
- The launch-time build stays as the fallback for --bios / --no-launcher.

Requires recomp-ui 9f86c49 (GameInfo.bios_prepare_with_progress).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 20:10:57 -04:00
Alex Vanderveen 60919f5a87 bios: build a retail backend from the player's own dump as a loadable module
Bundled releases link OpenBIOS only; retail-BIOS-derived C never ships.
"Bring your own BIOS" now works without it: when a dump matching a shipped
profile (psx_bios_known_images.h) is selected, the runtime builds that
backend on the player's machine with the overlay toolchain the release
already carries, caches it, and loads it as one more registered backend.

- runtime/include/psx_bios_module.h: the module contract. An overlay-style
  self-contained shared library (no imports from the executable) exporting
  psx_bios_module_{abi,codegen_hash,init,backend}; reaches the runtime only
  through OverlayCallbacks plus a new PsxBiosModuleCallbacks table (traps,
  dirty-RAM/kernel-bless probes, fntrace, log_probe) and pointer aliases of
  the globals the generated dispatcher touches. Its #defines rewrite the
  emitter's own extern lines, so the generated C compiles unchanged.
- runtime/include/psx_bios_module_glue.c.inc: module-side forwarders and the
  four exports, compiled after overlay_dispatch_preamble.c.inc.
- runtime/src/psx_bios_module.c: host side. Cache path
  <exe>/cache/bios/<os-arch>/bm<abi>_<codegen hash>_f<flavor>/<STEM>_<crc>,
  ABI + codegen-hash gated load, callback fill, and a blocking build via
  overlay_toolchain/bios_module_build.py (gcc via compiler.txt or PATH,
  else tcc), then psx_bios_register().
- psx_bios_backend.c: the registry is now a mutable table seeded from the
  CMake-generated psx_bios_builtin_registry by a constructor, with
  psx_bios_register(); every existing walker keeps working.
- main.cpp: validate_bios_for_launch acquires a module (announcing a first
  build) before declaring a mismatch; discovery accepts a buildable dump;
  the launcher verify reports it usable ("ready" / "compiled on first
  launch") with no Generate & rebuild; the BIOS row shows whenever the
  toolchain is present; bundled_only respects module support.
- emitter: the CPS-marker constructor is not emitted in a module build.
- overlay_api.h: OverlayCallbacks gains a struct tag;
  overlay_loader_callbacks() exposes the host table before loader init.
- tools/bios_module_build.py (ships in the toolchain): identity + profile
  SHA-256 gate, staged emitter tree, emit, three-TU compile, ctypes
  self-check, atomic publish. release_stage.py stages psxrecomp-bios, every
  bios/*.toml, the seeds and the builder into overlay_toolchain/.
- Tests: runtime/tests/test_bios_module_host.c against three fake modules
  (good / wrong ABI / wrong hash) on real dlopen; recompiler/tests/
  test_bios_module_build.py builds the bundled OpenBIOS end to end and reads
  the descriptor back; guards extended.

Verified on Twisted Metal 4 (bundled build + staged toolchain, headless):
first launch with --bios SCPH1001.BIN builds and loads the module and boots
on image=SCPH-1001; the second launch loads it from cache.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-30 19:26:29 -04:00
Matthew Stanley 9fc5b50d19 Merge remote-tracking branch 'origin/master' into test/netplay-bios-wire-20260930 2026-09-30 15:21:24 -07:00
Matthew Stanley e63a23b74c Merge latest master for segment E; preserve completed IsC accuracy notes 2026-09-30 15:06:59 -07:00
Matthew Stanley 4717aacd63 Merge latest master for segment D; retain both landed accuracy fixes 2026-09-30 15:05:40 -07:00