Commit Graph

1834 Commits

Author SHA1 Message Date
Matthew Stanley 4b96c039f6 Integrate current ICE lobby transports and preserve settled LAN boot settings 2026-10-10 10:53:54 -07:00
Shokunin 0b0641cbae Lobby: honour transport "ice" launches (same-NAT peers no longer dial themselves)
The lobby server starts a 2-player room the host relay cannot carry on ICE
(recomp-net-server start_transport, launch transport "ice"). This client
knew only "host" and the legacy server relay. It inferred a relay from
equal host/guest endpoints -- which is exactly what two peers behind one NAT
advertise -- and each peer dialled its own public address: the match stayed
at "linking" forever.

- psx_lobby_launch_transport.h: one pure decision (host / ice / relay /
  direct) with a unit test covering ICE, same-NAT endpoints, host relay and
  the legacy relay cases.
- PsxLobbyJoinInfo.transport_ice; the launch handler records it and never
  turns it into a relay; launch fill and resolve_use_ice start ICE p2p
  (signalled over the lobby) for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:37:31 -07:00
Matthew Stanley 8f6867225c Support independent co-op audio voices and diagnostic OSD rows 2026-10-10 00:53:39 -07:00
Matthew Stanley 80f19e166d Keep playtest execution identity aligned with validated Windows build
The X4 co-op contract already fingerprints SPU and private audio sources. Defer the additional global execution-contract inputs, added after the approved Windows build, until a coordinated rebuild of both platforms. This preserves the owner-tested Windows artifact for playtest 2.
2026-10-09 16:58:40 -07:00
Matthew Stanley 4cf3c5b0cd Add private SPU sample residency for co-op character audio 2026-10-09 16:41:18 -07:00
Matthew Stanley 2b2fd6fd86 Honor launcher-selected controller instances and LAN list scope 2026-10-09 14:56:25 -07:00
Matthew Stanley 8fff59f82c Agree trusted camera options and isolate local render transactions 2026-10-09 04:33:12 -07:00
Matthew Stanley 1483cc3831 Allow explicit shared controllers in development builds 2026-10-08 16:36:24 -07:00
Matthew Stanley dfd29f76e2 Require retained-bank OpenGL policy for trusted co-op sessions 2026-10-08 14:30:44 -07:00
Matthew Stanley 1e33761d2a Route explicit virtual host devices through netplay input capture 2026-10-08 14:07:28 -07:00
Matthew Stanley aa1035f9be Add trusted co-op netplay profiles and host state digest policy 2026-10-08 13:46:08 -07:00
Matthew Stanley bf4246f236 Share newly exposed placement bounds for adaptive scene residency 2026-10-08 05:49:27 -07:00
Matthew Stanley eba5b86325 Integrate latest shared runtime with serial renderer and resident loading work
# Conflicts:
#	runtime/CMakeLists.txt
#	runtime/runtime.cmake
#	runtime/src/gpu.c
#	runtime/src/gpu_gl_renderer.c
#	runtime/src/memory.c
#	runtime/tests/run_gl_texture_filter.py
#	runtime/tests/test_gpu_gp0_history_guard.py
#	runtime/tests/test_savestate_status_protocol.py
2026-10-08 05:40:53 -07:00
Matthew Stanley e740b81c3c Preserve native fractional scroll mappings in Capcom wide views 2026-10-07 22:56:22 -07:00
Shokunin 91cd6db705 guest_cycle_scale: one CPU charge for every tier, declarative gate, rollback
Review of #561. Guest time now has two entry points (psx_cycles.h): the
CPU charge psx_cpu_charge() (instruction base, load fudge/region/completion,
i-cache refills, BIOS HLE costs), which applies [timing] guest_cycle_scale,
and the unscaled device advance psx_advance_cycles() (DMA, idle skips,
mul/div and GTE deadline waits). The emitters' block-mode charges emit
psx_cpu_charge; overlay DLLs accumulate it raw and publish through the
cpu_charge callback (was advance_cycles, same slot) into the same host
function, so nothing is scaled at the DLL boundary. The batched
psx_cyc_charge path, the dirty-RAM interpreter, psx_cyc_readmem, i-cache
refills and bios_hle.c all charge through it. At scale 1 it is exactly
psx_advance_cycles.

Gate in psxrecomp: [timing] guest_cycle_scale_gate, RAM predicates judged
at every VBlank edge (deterministic, works online, no mod needed), plus
psx_mod_set_guest_cycle_scale_gate() in mod_plugins.h for custom logic or
to tie the scale to a mod (guest_cycle_scale_gated = true; every mod
session reset shuts it). The carried fraction and both gate states are a
boot_state section (BS_SEC_GCS, written only when the scale is not 1), so
savestates and the netplay rollback snapshot re-simulate the same cycles.
psx_guest_cycle_scale_gate_test pins tier identity, the gates and rollback
re-simulation against the real psx_cycles.c.

OpenBIOS regenerated (emitter stamp); retail SCPH1001 is not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:41:39 -07:00
Shokunin 1e6e43639a Title timing constant: [timing] guest_cycle_scale (and _gated)
No CPU is emulated: recompiled code charges the guest clock a fixed cost
per instruction. guest_cycle_scale = N charges 1/N of it (instruction,
load, mul/div, GTE latencies, overlay DLL batches) while VBlank, timers,
CD, SPU and DMA keep hardware time, so the game never runs out of frame
time. A title constant in game.toml (1 = faithful, 1..64), never a player
setting; guest_cycle_scale_gated applies it only while the title's mod
opens the gate (psx_guest_cycle_scale_gate_open). PSX_GUEST_CYCLE_SCALE
overrides for testing. A scale other than 1 is folded into the netplay
content fingerprint as a safety net.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:41:34 -07:00
Matthew Stanley ec8c5c54c2 Share authored-map Capcom adaptive background packet rendering 2026-10-07 21:30:51 -07:00
Matt Stanley 1cf45e45cd Merge pull request #574 from RetroPortingToolKit/fix/parappa-audio-buffer-target
Honor game audio buffer_ms in the SDL audio bridge
2026-10-07 21:17:41 -07:00
Matthew Stanley 0e9845a07b Honor configured audio buffer target in SDL bridge 2026-10-07 20:35:02 -07:00
Matthew Stanley 502393296a Share bounded resident Mode 2 sector cursor for title loader HLE 2026-10-07 19:42:21 -07:00
Matthew Stanley 609cc88dd2 Share strict aligned archive extent validation for resident loading 2026-10-07 19:18:52 -07:00
Matthew Stanley fd489f47ec Share validated Neversoft archive and renderer extensions 2026-10-07 18:32:54 -07:00
Matthew Stanley e9fbe0d1b3 ws_backdrop_scene_test: stub the GPU packet key gpu.c now calls
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 18:21:00 -07:00
Matthew Stanley 7bcb11916a GPU packet keys keep the enhancement aperture apart from the main RAM it aliases
The UI prepass re-read aperture node payloads through the RAM-folded key, so
THPS2's relocated prim arena discarded the HUD squash every frame.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit fd6267e952)
2026-10-07 18:20:59 -07:00
Matthew Stanley 12036fab6e ws_ui_groups: count why a UI prepass was discarded
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit edd67d848e)
2026-10-07 18:20:59 -07:00
Matthew Stanley c55ddc4f29 Widescreen HUD size: proportional option shrinks the auto-UI HUD beyond 16:9
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 41a9889566)
2026-10-07 18:20:59 -07:00
Matthew Stanley 3431e2e2a8 Render passes capture the part of the buffer the presenter shows (netplay local viewport)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit d4b2ec0828)
2026-10-07 18:20:59 -07:00
Matthew Stanley 9379df8f12 Render passes in netplay dual raster; verify mode checks the whole CPU VRAM
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 2a46b01374)
2026-10-07 18:20:58 -07:00
Matthew Stanley 14237c6beb Port-2 injection: release the pad when the injection ends
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 701f54eb0b)
2026-10-07 18:20:58 -07:00
Matthew Stanley e28f7f18ee Host sampler: accessors in every build; tools/host_profile.py names hot functions
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit a51504fd3b)
2026-10-07 18:20:58 -07:00
Matthew Stanley 9af4abb94f Widescreen prepass: validate DMA nodes through an address index, not a scan per node
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 1ba6c41595)
2026-10-07 18:20:58 -07:00
Matthew Stanley 9032b1005e Always-on host CPU sampler ring (TCP host_profile)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 0901bb8b1e)
2026-10-07 18:20:58 -07:00
Matthew Stanley eb783e15ed Motion kit: blend mirrored orthonormal bases; snap a handedness change
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 487224cd9c)
2026-10-07 18:20:57 -07:00
Matthew Stanley dd64bc6611 TCP input injection for port 2 (set_input/press/clear_input port=2)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 66cc81fe63)
2026-10-07 18:20:57 -07:00
Matthew Stanley b77b18a3b1 Preserve PGXP projection and depth through flagged subdivision stores 2026-10-07 18:06:07 -07:00
Matthew Stanley 4b4fddb769 Present finite 2D backdrop scenes at 4:3 in native-wide
A full-screen rect backdrop that stops short of the reveal vetoes polygon overhang (Tomba village, beads-eio.4.28).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 17:46:17 -07:00
Matthew Stanley 5b8d39e5bb Track PGXP geometry and texture depth in allocated GPU primitive buffers 2026-10-07 16:52:26 -07:00
Matthew Stanley 972d4f4c71 fix: restore draw-entry primitive arenas through the render sandbox journal 2026-10-07 16:19:50 -07:00
Matthew Stanley 968788ccf6 fix: accept allocated primitive arenas in sandbox OT submission 2026-10-07 16:11:35 -07:00
Matthew Stanley 9f673fa2b2 Fix GetlocP drive position after explicit CD seeks 2026-10-07 15:43:08 -07:00
Matthew Stanley be2bfbf6b4 test: retain refreshed HD provenance fixture stubs 2026-10-07 15:38:52 -07:00
Matthew Stanley c20c05ccc0 fix: keep HD texture authority on the synchronous renderer 2026-10-07 15:03:51 -07:00
Shokunin 86b15cfbbb Frame generation: in-between frames never rasterize native VRAM
Under HD texture-pack authority (and dual-raster netplay) every draw was
also rasterized into CPU VRAM unless a render pass was active. Replayed
draws of a generated frame were not exempt, so each in-between frame wrote
interpolated geometry into the guest's native VRAM. They are presentation
only, like a pass. Fixture: compose under HD authority, VRAM unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:51:50 -07:00
Matthew Stanley b620b13837 Integrate current framework master without dropping texture fixes 2026-10-07 14:39:05 -07:00
Shokunin 7006855de8 Call frame generation "Smooth motion" in user-visible text
Log lines and doc headings say "Smooth motion (frame generation)", the
player-facing name. Config key [video] frame_generation and PSX_FRAME_GEN
are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:24:51 -07:00
Shokunin 25b475ea04 Pipeline toggles as player settings and launcher rows
render_thread, present_thread and frame_generation are read from the
player's settings.toml [video] (over the game.toml default; PSX_* env
still overrides one run and is never saved), written back by
save_user_settings, and round-tripped through the recomp-ui Display rows
when the launcher defines RECOMP_LAUNCHER_HAS_RENDER_PIPELINE. The
pipeline starts once at boot: a first-boot launcher choice applies
immediately, an in-game change is saved and applies at next launch.
Regenerated the OpenBIOS emitter stamp for the config_loader change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:24:51 -07:00
Shokunin 3ebb7f39a0 Test: GP0 history guard fixture stubs the frame-generation hooks
gpu.c's precise-triangle path references Smooth motion's vertex sources;
the software-only fixture never reaches them (abort if it does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:24:51 -07:00
Shokunin 1a5156d6c9 Test: GPU exec fixtures stub the frame-generation vertex-source hooks
gpu.c asks the GL backend and gte.cpp for Smooth motion's vertex sources;
master's native_wide_projection_test (cd9981cd) links gpu.c with these stubs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:24:51 -07:00
Shokunin 1947932cba Frame generation: shared corners are one vertex; no motion rounding
The remaining tunnel cracks came from vertex sources, not from missing
depth: 46 % of R4 lookups were marked ambiguous because the same 3D point
is projected several times per frame (corners shared by separate meshes,
other functions), so those vertices fell back to a triangle-mean guess.
- The same point projected again is one vertex (the smaller identity, so
  the choice does not follow draw order).
- Up to two different points on one pixel are kept; gpu.c picks the one
  projected by the same function as the triangle's other vertices, else
  the one nearest their depth.
- Per-vertex motion is no longer rounded to 1/8 px: at high internal
  scales the rounding opened hairlines along long T-junction seams.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:24:51 -07:00
Shokunin 83bc766d13 Frame generation: close cracks, skip frames the camera passes through
Corner and tunnel runs showed light cracks along seams and near the view
edge in generated frames:
- weld: every placed vertex at one screen position of a view moves alike
  (the same corner arrives from several projections);
- a vertex without a projection on an edge between placed vertices moves
  as that point of the edge (T-junctions from the game's polygon splits);
- a vertex the in-between camera passes is projected at a clamped depth,
  and such a game frame is not generated (no near-plane clipping: tunnel
  ceilings, overhead bridges);
- debug: "clamped", "guessed" (CPU-built vertices placed by a triangle
  mean over a >1 px motion spread).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:24:51 -07:00