Commit Graph

2271 Commits

Author SHA1 Message Date
boburning b3abd6df01 fix: keep generated defaults portable with conditional resources 2026-10-24 09:39:02 -07:00
Matthew Stanley e5d92035a9 Review integration: borderless composition workaround
# Conflicts:
#	runtime/include/window_fullscreen.h
#	runtime/tests/test_window_fullscreen.cpp
2026-10-24 09:38:19 -07:00
Matthew Stanley d04fa8f10d Apply TCP debug policy on every game session
Start a newly selected production listener on offline rematch, reuse an existing listener, and cleanly release its transport state when disabled. Balance Winsock ownership and failed starts. Native production runtime and four focused tests pass, including six isolated real listener/bulk-write launch cases. Tracking: beads-eio.3.385.
2026-10-24 09:36:58 -07:00
Matthew Stanley 4979d99ab3 Add opt-in production TCP debugging and bulk RAM writes 2026-10-24 09:36:24 -07:00
Matthew Stanley 2043d8274b Review integration: exclusive multiplayer profiles and local grids
# Conflicts:
#	docs/MOD_PACKAGES.md
#	generated/OpenBIOS.emitter.sha
#	runtime/src/debug_server.c
#	runtime/tests/test_mod_runtime.cpp
2026-10-24 09:35:23 -07:00
Matthew Stanley 9bbd395f58 Review integration: guarded function override lifecycle
# Conflicts:
#	docs/TCP_COMMANDS.md
2026-10-24 09:32:39 -07:00
Matthew Stanley 56b6839602 Reject partial function override activation before session callbacks 2026-10-24 09:31:11 -07:00
Matthew Stanley 98e8bcda23 Review integration: postfx publication and bounded diagnostics
# Conflicts:
#	runtime/CMakeLists.txt
2026-10-24 09:28:59 -07:00
Matthew Stanley d2e1629aca Review integration: review/717-residency-20261024
# Conflicts:
#	runtime/src/debug_server.c
#	runtime/tests/test_duckstation_texture_pack.cpp
2026-10-24 09:28:21 -07:00
Matthew Stanley 7a0ba0e509 Review integration: review/703-encoder-lifecycle-20261024
# Conflicts:
#	docs/TCP_COMMANDS.md
2026-10-24 09:27:56 -07:00
Matthew Stanley e706b9d84f Publish coherent postfx projection and escape bounded diagnostic JSON 2026-10-24 09:26:47 -07:00
Matthew Stanley c5f67a1f4e Cover source retirement and indexed texture fallback on current master 2026-10-24 09:26:46 -07:00
Matthew Stanley dd7f45bb7e Bound recorder pipe writes and child shutdown waits 2026-10-24 09:23:38 -07:00
Matthew Stanley 57c25ece61 Validate current-base multiplayer build and preserve local render telemetry 2026-10-24 09:20:17 -07:00
Henrique Guedes 4cbedf5579 Add function overrides with guarded registration and cycle credit on current runtime 2026-10-24 09:18:57 -07:00
yacineolivier-maker aed7b1be1e HD textures: filtered sampling, a cache sized for a whole pack, indexed keys
- Filtered replacement sampling: with any texture filter but nearest, the
  replacement is sampled through its mip chain (textureGrad), the footprint
  clamped to the primitive's own UV bounds so atlas neighbours cannot bleed
  in. Texture windows (repeat) and UVs outside the page keep hd_texel.
- Edge clamp: an out-of-bounds sample clamped to the primitive's UV bounds
  takes the edge's sub-texel position too (keeping the outside fraction read
  a 1 px sliver of the next glyph at sprite borders).
- GL cache: 4096 slots and a PSX_HD_GL_CACHE_MIB budget (default 2048 MiB)
  with a direct-mapped hint table; a 4x pack of one race scene is several
  hundred textures, and the old 256 slot / 128 MiB cache re-uploaded and
  re-mipped them every frame.
- Invalidation: duck_texture_pack_invalidate returns early when a native
  write touches no residency or cache entry (almost every draw under HD
  authority lands on the frame buffer), and retire_unused walks the
  residency lists once instead of once per source.
- Indexed replacements: a TTTTTTTT-index.png key resolves through the palette
  in use at draw time, for packs whose textures are shared by several CLUTs.
- Debug: TCP {"cmd":"hd_uploads","x":..,"y":..} lists the texture uploads
  covering a VRAM point (pack authoring).

Measured with a full HD HUD and course pack for R4: steady 60 fps in races
where the old cache dropped to the high 20s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6
2026-10-24 09:04:34 -07:00
yacineolivier-maker 3ad83c910b Post effects: depth and history inputs, u_time / u_proj, live uniforms
For title-specific lighting presets ([video] post_shader):
- `input <sampler> depth`: view depth sz (GTE screen z) of the presented frame,
  R32F at window size, rebuilt from the surfaces' PGXP depth; 0 where nothing
  3D drew. Only built while a loaded chain reads it.
- `input <sampler> history`: the pass's own target from the last real frame
  (trails, temporal filters); generated frames do not update it.
- `u_time` (seconds since the chain loaded) and `u_proj` (latest GTE
  projection: 240/H, screen centre in uv, aspect) in every pass.
- Live uniforms: psx_host_set_post_uniform(name, x, y, z, w) sets a preset
  `uniform` from game state (e.g. a light source projected to the screen);
  the preset value applies until the first call.
- Debug: TCP {"cmd":"post_shader"} reports the loaded preset, its parse status
  and the live values; {"cmd":"post_shader","path":"..."} reloads a preset
  (or loads another) without restarting, for shader work.
docs/POST_EFFECTS.md documents the inputs and the uniforms.

Used by a lighting preset for R4 (sun and tunnel light shafts, lamp halos,
speed streaks, paint reflections on the player's car from live car pose),
about 0.7 ms of GPU at 1080p on an RTX 3060.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6
2026-10-24 09:04:33 -07:00
Matthew Stanley 8dcd73de96 Keep recorder production builds working and test the unsupported audio path 2026-10-24 08:52:20 -07:00
Matthew Stanley 7f0f77b9e1 WIP: video recorder, offscreen window, input_route axes
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 08:52:20 -07:00
Matthew Stanley 182ea3d8d3 Merge branch 'review/718-fmv-safety-20261024' into review/psx-prs-20261024
# Conflicts:
#	runtime/src/debug_server.c
2026-10-24 08:52:19 -07:00
Matthew Stanley 6640236dd8 Bound HD movie allocations and join decoder workers at teardown
Reject invalid index products and unsafe paths, cap encoded/decoded residency, recover allocation and partial worker-start failures, release GL movie textures with their context, and serialize diagnostics through the presenter. Real SDL decode/restart/failure test passes and SDL2 C seam compiles warning-free. Guest/present timestamp ownership remains a separate design gate. Tracking: beads-eio.3.388.
2026-10-24 08:51:46 -07:00
Matthew Stanley 400c747c11 Add atomic local four-view split presentation and extra test input ports 2026-10-24 08:46:37 -07:00
Matthew Stanley 9a17832619 Support exclusive roster mods and selectable netplay seat profiles 2026-10-24 08:45:18 -07:00
Matthew Stanley 6b6f0ed8f7 Resolve and show only conditionally selected mod resources 2026-10-24 08:45:07 -07:00
Matthew Stanley d352dc4342 Require original mounted disc geometry alongside content identity 2026-10-24 08:44:24 -07:00
Matthew Stanley bcbd1d4635 Enforce configured original disc content independently of mods 2026-10-24 08:44:23 -07:00
Matthew Stanley d7a2d5dd2a Support Portuguese diacritics in native indexed fonts 2026-10-24 08:44:11 -07:00
Matthew Stanley 8585e2c8c3 Stage json11 license with native translation runtimes 2026-10-24 08:44:11 -07:00
Matthew Stanley 6323433e58 Qualify native language sessions and derived file lifecycle 2026-10-24 08:44:11 -07:00
Matthew Stanley 6e0ac7cb10 Add native JSON text and verified Mode-2 language assets 2026-10-24 08:43:46 -07:00
Matthew Stanley fa9f31adf4 Keep the local paired canvas through shared and fallback frames 2026-10-24 08:43:35 -07:00
Matthew Stanley 21c6b9c482 Add protected offline local view pair presentation 2026-10-24 08:43:17 -07:00
Matthew Stanley 2fe9f3126e debug: start queued controller input after a native state load 2026-10-24 08:42:32 -07:00
Matthew Stanley 5382f05b16 debug: allow frame-scheduled input routes on guest pad two 2026-10-24 08:42:31 -07:00
Matthew Stanley 6d465307a8 Persist launcher mod edits before Play
Save preferences independently of content preparation and simulation activation. Refs beads-eio.9.166 and MegaManX4Recomp#15.
2026-10-24 08:42:20 -07:00
Matthew Stanley ea7d4d2f58 Migrate stateless mod guards across snapshot configuration changes
Preserve mutable-provider schemas, memory layout and atomic validation. Only declared stateless legacy records can be discarded. Refs beads-eio.9.167.
2026-10-24 08:41:58 -07:00
Matthew Stanley 90c565148b Use ordinary borderless windows with Windows SDL2
Keep native fullscreen separate, preserve window geometry, and qualify both SDL backends. Refs beads-eio.3.354.
2026-10-24 08:41:58 -07:00
Matthew Stanley f38f2577cf Log launcher account startup outcomes without changing sign-in 2026-10-24 08:41:57 -07:00
Matthew Stanley d326c31b27 Keep independent player views during netplay catch-up 2026-10-24 08:41:57 -07:00
Matthew Stanley 24b54b480b Preserve complete mod plans through lobby START and transport codecs 2026-10-24 08:41:57 -07:00
Matthew Stanley c73110fb0b Capture trusted title host snapshots and reset session resource arenas 2026-10-24 08:41:56 -07:00
Matthew Stanley c9079099d7 Merge keyboard and mapped-pad slot navigation into one step 2026-10-24 08:41:13 -07:00
Matthew Stanley b7c7d71582 Honor mapped save-menu controls and expose paused overlays to TCP 2026-10-24 08:41:13 -07:00
yacineolivier-maker 2d03e09d60 FMV: HD replacement of 24-bit movie frames (gpu_fmv_hd, fmv_hd/ packs)
An optional pack replaces a title's MDEC movies with high-definition frames
while the game keeps its own audio, timing and skip control:
- fmv_hd/<movie>/index.bin: header, then a luminance signature per source
  frame; fmv_hd/<movie>/frames/NNNNNN.jpg: `sub` HD frames per source frame.
- Every presented 24-bit frame is matched by signature (mean absolute
  difference), first around the last recognised frame, then over the whole
  pack when tracking is lost; a near global match is also tried a few lines
  up or down (each movie has its own vertical placement on screen) and the
  offset kept. Worker threads decode the upcoming frames ahead into a small
  RGBA ring.
- Format FMVHD002 records the native display the movie is shown in and its
  position, so the HD frame lands exactly where the original was.
- The last HD frame is held briefly when the next one is not ready or not
  recognised (no flicker back to the 4:3 original mid-movie), and is
  uploaded to the GPU only when it changes.
- Debug: TCP {"cmd":"fmv_hd"} reports the pack, the matches and lost frames.
No pack: no effect. Pack frames are the user's own upscale of their own disc;
nothing is distributed with the runtime.

Used for R4's intro and ending movies (SeedVR2 upscales, 25 fps sources).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6
2026-10-24 08:34:12 -07:00
Matthew Stanley 25588e01d1 Merge branch 'review/715-cadence-publication-20261024' into review/psx-prs-20261024 2026-10-24 08:33:10 -07:00
Matthew Stanley ff075a4ec5 Merge branch 'review/736-preload-repeat-20261024' into review/psx-prs-20261024
# Conflicts:
#	runtime/include/hd_texture_pack.h
#	runtime/src/duckstation_texture_pack.cpp
#	runtime/src/hd_texture_pack.cpp
#	runtime/tests/test_duckstation_texture_pack.cpp
#	runtime/tests/test_hd_texture_pack.cpp
2026-10-24 08:33:10 -07:00
Matthew Stanley 84ba185176 Publish cadence through shared video telemetry without reader races
Use a bounded atomic snapshot and presenter-owned reset across all backends. Readers sort their own snapshots; report host API completion cadence. Add deterministic and concurrent reader/reset coverage.
2026-10-24 08:32:29 -07:00
Matthew Stanley 214e5cdbe6 Account existing pinned textures across preload retries
Bound reservations against total retained residency, skip decoding pinned images, and report complete repeated loads truthfully. Cover cap reductions and publication retry in both formats. Tracking: beads-eio.3.386.
2026-10-24 08:31:16 -07:00
yacineolivier-maker b6b3578282 Debug: perf command, the cadence of real swaps (what the player sees)
The GL swap records the interval between real swaps (ring of 4096, single
writer). TCP {"cmd":"perf","window_ms":N,"reset":0|1} returns count, fps,
mean / p50 / p95 / p99 / max interval and hitches (intervals over 1.5x the
median) for the last N ms; independent of guest vblank counting, so frame
generation, pacing and driver stalls are all visible. PSX_FPS_TELEMETRY adds
the same summary to the window title.

Used to measure R4 runs on a test bench (60.0 fps, p99 18 ms after the
cadence fix of the video-standard switch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6
2026-10-24 08:26:31 -07:00
Matthew Stanley a7f7a4bed3 Account retained preload bytes after publication failure 2026-10-24 08:22:57 -07:00