Commit Graph

716 Commits

Author SHA1 Message Date
Shokunin 8e50b37cfc Attribute replay completion waits to render queue operations 2026-10-21 14:11:21 -07:00
Shokunin a3a3599432 Allow unchanged presents when the deadline pacer caps guest timing 2026-10-21 14:11:21 -07:00
Shokunin b2b9ba24d8 Allow sparse route captures to locate steering landmarks 2026-10-21 14:11:21 -07:00
Shokunin 287762a078 Select a route frame for existing composed burst captures 2026-10-21 14:11:21 -07:00
Shokunin eb7b893395 Apply the display ceiling after supersampling and monitor selection 2026-10-21 14:11:20 -07:00
Shokunin d7e5b6536d Keep presenter pacing out of dynamic-resolution overload signals 2026-10-21 14:11:20 -07:00
Shokunin 7a015840db Limit supersampling on high-resolution displays by opt-in policy 2026-10-21 14:11:20 -07:00
Shokunin 5025b7cdf8 Retain the completion clock in bounded production replay 2026-10-21 14:11:20 -07:00
Shokunin d99581b5d3 Replay recorded routes and export production frame costs 2026-10-21 14:11:20 -07:00
Shokunin 28d82a9441 [video] match_display_max_lines: opt-in cap on Match display's height
On an 8K panel Match display asks 18x (27x with supersample 1.5), past
the full-VRAM surface: the high-resolution window engages, dynamic
resolution is ineligible there, and the render thread saturates (R4 0.8
on an RTX 4080 at 7680x4320: fixed 27x, render_busy 100 %, Low 51.9
guest Hz). A game.toml key caps the display height that Match display,
its dynamic-resolution floor and preset detection resolve against.
Default 0 keeps today's behaviour for every title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:11:20 -07:00
Matt Stanley 916da6f80d Integrate shared disc tray with the maintained menu provider (#652) 2026-10-19 18:13:38 -07:00
Matthew Stanley ee9e464fd0 Preserve stock-frame VSync on faster displays 2026-10-19 18:02:47 -07:00
Matt Stanley 13b7f81d29 Add guarded instruction variants fixed during offline mod activation
Keep selector zero stock and seal all choices until the next session restart. Refuse nonzero online activation, scope non-stock save states by frozen choices, and preserve original instruction guards when combined with effective-address adapters. Use overlay ABI34 on current master without the old menu dependency stack.
2026-10-19 16:37:32 -07:00
Matt Stanley c0ffd6d4c5 Support guarded mod address adapters and atomic extended memory cards
Extract the audited adapters and card transport onto master without the held selector/menu stack. Keep adapters and codecs tied to mod activation, use overlay ABI 33, retain rejected-load protection on codec registration, and refuse extended-card codecs in netplay before frame zero. Preserve default atomic save publication and guest-visible write failures.
2026-10-19 16:00:11 -07:00
Matt Stanley bc574c5700 Isolate runtime publication and wall-time diagnostics from held mod selector stack 2026-10-19 14:07:22 -07:00
Matt Stanley da9029a73a Merge current master and qualified review fixes into PR #408 2026-10-19 13:09:25 -07:00
Matt Stanley cda860fe74 Merge current master and qualified review fixes into PR #670 2026-10-19 13:09:14 -07:00
Matthew Stanley db596520ab Record real renderer activity and explicit playtest verification coverage 2026-10-18 20:55:22 -07:00
Matthew Stanley 6bc150c85c Restore device profiles when developer pad injections finish 2026-10-17 09:53:22 -07:00
Matthew Stanley cf9bf1f9fd Allow developer pad injections to exercise serial hotplug 2026-10-17 09:40:22 -07:00
Matthew Stanley fedb5319d2 Support scoped modern controls and replay controller presence
Keep temporary keyboard profiles separate from saved bindings. Add optional persistent mouse capture with ordered release/focus/reset handling, and let offline sources represent an unplugged port without falling back to physical input. Existing capture and source defaults remain intact. Beads: beads-9wg8 and beads-eio.19.18.
2026-10-17 09:19:31 -07:00
Shokunin b279afdc4a In-game presets: draw-thread-safe callbacks and a coherent menu seed
P1: quality_launcher_apply is now a pure preset -> rows mapping
(psxq::rows_from_runtime plus startup constants); it never writes the live
globals. The in-game menu publishes only thread-safe callbacks: that
mapper, and a re-detect that returns this session's detection (a fresh
probe needs the GL context and mutates the run's state, so it stays in the
pre-game launcher). Summary/reason strings and the detection are fixed on
the main thread at menu setup; settings_get reads only the main-thread
snapshot.

P2: psxq::MenuSelection keeps what the player selected versus what is live.
A pick's next-launch rows and netplay-deferred rows stay selected for the
next seed until the live value matches; other rows follow live. The host
classification moves to psxq::classify_launcher/row_differs (same rules).

Tests: quality_presets_test test_ingame_menu_host_path runs the review's
fixture through the host get/pick/apply/save path (Ultra -> High, then
Antialiasing = NONE; a governed edit is still Custom from High; a netplay-
deferred row stays selected). menu_quality_callbacks_test guards the
draw-thread callbacks against runtime writes and stateful calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:09:49 -07:00
Shokunin aaeefc59f1 In-game menu: the Graphics preset row (same contract as the launchers)
mh_launcher_game_info publishes the presets (quality_fill_game_info),
mh_launcher_settings_get seeds the preset and the governed rows as in
force, and an applied menu change goes through quality_take_launcher, so
a pick or a governed edit is settled by the same save transaction
(settle_save) as the launchers. Shown rows apply live; preset-only keys
at the next launch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:53:45 -07:00
Matt Stanley 379565a6ff Merge pull request #673 from RetroPortingToolKit/feat/texture-filter-catalog
Launcher handoff: hand every frontend the texture-filter catalog
2026-10-15 13:56:46 -07:00
Matthew Stanley 50958497c4 Integrate merged experimental wheel support before preset validation 2026-10-15 13:49:46 -07:00
Matthew Stanley a6ee3aa062 Integrate current master and canonical BIOS stamp for PR609 validation 2026-10-15 13:40:27 -07:00
Shokunin 8be777f1f1 quality presets: a supported key set, host-side Custom classification
- [quality.*] accepts only the supported keys (quality_key_supported):
  twelve player-editable ones (masked, copied, classified, applied) and
  nine preset-only ones (no settings.toml form; applied on select). Any
  other key, e.g. vsync or renderer, is a load error.
- Picking a preset now also applies bloom, texture LOD, anisotropy, FMV
  chroma smoothing and dithering (quality_apply_video_globals).
- The frontends flag Custom on any tracked row; the host counts only rows
  of keys the title governs (psxq::launcher_custom_edit), so Antialiasing
  no longer turns Ultra into Custom when no preset sets it.
Tests cover the rejection, every player key's masking/copy, and the
classification cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:57:27 -07:00
Shokunin c9c49c64d7 Launcher handoff: the texture-filter catalog for every frontend
Hands the launcher game info (pre-game launcher, soft return, and the
in-game menu's launcher_game_info) the [video] texture_filtering
vocabulary {Nearest, Bilinear, xBR} = PSX_TEXTURE_FILTER_{0,1,3}, so
frontends keep xBR across startup and soft return instead of collapsing
it to Bilinear. Needs a recomp_launcher.h with
RECOMP_LAUNCHER_HAS_TEXTURE_FILTER_CATALOG (recomp-ui); without it this
is a no-op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:56:41 -07:00
Matthew Stanley 6d3c5308a7 Integrate current master and canonical BIOS stamp for preset re-review 2026-10-15 08:34:17 -07:00
Matthew Stanley 9f88c128f4 Preserve the selected preset base when launcher edits become Custom 2026-10-15 08:33:23 -07:00
Matthew Stanley c91331ff67 Isolate save slots for verified mod content plans 2026-10-15 01:50:14 -07:00
Shokunin ab49f294e9 quality presets: one preset/key-ownership transaction for every settings save
The boot launcher, soft-return launcher and the in-game menu's live
settings now save settings.toml through psxq::settle_save:
- a one-run PSX_QUALITY override never persists: governed keys and the
  quality_* keys come from disk, so the previous preset or Custom values
  survive even when the boot seed was built empty;
- a governed live edit (psxq::live_edit) or launcher Custom becomes
  Custom from the current base, with the edited values, and survives
  restart instead of being masked away;
- a launcher pick records the preset; unrelated edits keep it.
Tests reproduce both review cases through a settings.toml round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 01:05:25 -07:00
Matthew Stanley d110d0a423 Integrate current master for reviewed PR597 and retain canonical BIOS stamp 2026-10-15 00:36:07 -07:00
Matt Stanley d550ddf2e9 Merge pull request #590 from RetroPortingToolKit/feat/idle-skip-store-counters
idle_skip: elide store-counter wait loops (PsyQ v_wait), opt-in
2026-10-15 00:34:00 -07:00
Matt Stanley 9521343200 Merge pull request #664 from RetroPortingToolKit/fix/menu-host-followups
Menu host follow-ups: restart bits for touched groups, local return, recomp-ui default provider
2026-10-15 00:33:44 -07:00
Matthew Stanley d946aec09a Integrate current master for reviewed PR597 and retain canonical BIOS stamp 2026-10-15 00:00:06 -07:00
Matthew Stanley 80674e4d9f Integrate current master for reviewed PR593 and retain canonical BIOS stamp 2026-10-14 23:59:50 -07:00
Matthew Stanley 2d2c1849f3 Integrate current master for reviewed PR591 and retain canonical BIOS stamp 2026-10-14 23:59:13 -07:00
Matthew Stanley e0800a28e0 Integrate current master for reviewed PR590 and retain canonical BIOS stamp 2026-10-14 23:58:57 -07:00
Matthew Stanley dfd4555d09 Include fixed scaled-charge batching profile in netplay compatibility 2026-10-14 23:51:49 -07:00
Matthew Stanley 2947916215 Detect active gamepad sessions without hijacking Deck Desktop Mode 2026-10-14 23:49:26 -07:00
Shokunin c3a2f2c068 Menu host follow-ups: restart bits for touched groups, local return, default provider
- Restart bits: a group waits only when the edit touches it (next differs
  from the live value) and the result differs from boot. Dynamic
  resolution moves the live internal resolution off boot, so an in-game
  texture filter change relaunched the game. test_menu_video_snapshot
  covers both cases.
- Return to the frontend from a local game opens the launcher as at
  boot; only a lobby match start (the runtime's pending-launch exit, or
  the provider's lobby view asking once its match started) keeps the
  launch and resumes the room.
- Default provider: with no title choice, the UI library's provider is
  used when it ships one (recomp_ui_psx_menu.h), so recomp-ui stays the
  default; PsxMenuHost.default_selection tells it to keep the title's
  default presentation.
- Debug: menu_host reports provider, open, pause, capture and snapshot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:17:18 -07:00
Matt Stanley d3db61b199 Merge pull request #598 from RetroPortingToolKit/feat/host-pause
Host pause API (in-game overlay P1)
2026-10-14 11:55:36 -07:00
Matthew Stanley f4c5d6c93f Draw paused host menus even before the first held game frame 2026-10-14 11:47:04 -07:00
Matthew Stanley 934e6c96b6 Synchronize shared menu video and netplay getters across runtime threads 2026-10-14 11:29:13 -07:00
Shokunin 0d096e2858 GPU: carry the depth24 held-VBlank flag in the snap; executable hold regression
Review follow-up on #661 (#636):
- test_depth24_present_hold_vblank.py reads sources as UTF-8 (cp1252 on
  native Windows Python raised UnicodeDecodeError).
- The present skip is now guest state: set at guest VBlank, read (not
  consumed) by the present and packed into the GPU snap's hold word (bit 8;
  older snaps derive it from the count). The executable test showed the
  host-side latch made the present of a restored tick differ from live on
  the last held VBlank (hold 0, skip 1), exposing stale trailing FMV
  columns after a rollback load.
- Depth24 scanout staging and trailing-column blanking move from main.cpp
  into gpu_depth24_stage_scanout (gpu.c), so the test renders through the
  same code every CPU depth24 present runs.
- New depth24_present_hold_exec_test: drives real gpu.c through a 15-bit to
  24-bit FMV, GP1(07h) retargets and mode transitions; compares hold, skip,
  upload span and snapshot bytes across windowed/headless/deferred presents,
  rollback replay from every tick and disk loads, and checks staged frames
  never show stale movie pixels while the new movie stays visible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:53:21 -07:00
Shokunin 594d365060 GPU: count the depth24 present hold down at guest VBlank
GP1(07h) arms s_d24_present_hold to skip a few Swaps after a depth24
display-band retarget. The hold is in the GPU snap, but it counted down
only at host present: a headless run (and any path that skips the present)
left it stuck, and a rollback snap load zeroed it. In R4's 4-seat rollback
self-test the replayed saves then differed from the live saves of the same
ticks in the GPU section (hold 3 live, 0 replay; #636).

The count now moves at guest VBlank (gpu_vblank_tick), which also latches
whether the following present skips its Swap; the present only consumes
that latch. A rollback snap load keeps the restored count. A disk
savestate load still clears it so the restored VRAM shows at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 17:19:25 -07:00
Shokunin 83f1468860 In-game menu host: a provider-neutral contract (psx_menu_host.h)
psxrecomp owns the contract between the runtime and any in-game menu
frontend. A provider (PsxMenuProvider: attach, event, is_open, set_open,
draw, detach) is registered by the title with psx_menu_set_provider();
none is registered by default, so a title's UI and pin are unchanged.
The runtime offers every provider the same host (PsxMenuHost): pause
(P1, refused in netplay), video get/apply on PsxHostVideoSettings (P4),
mod switch/option set (P5, via the new psx_mod_feature_enable /
psx_mod_feature_set_option shared with the launcher ABI provider),
reload bindings, exit (quit, back to the frontend loop in-process, or a
quick relaunch with the original arguments), disc/tray slots filled by
the tray policy (psx_menu_set_disc_ops), and optional helpers on the
shared launcher ABI both frontends already speak (game info with the
mod catalogue and lobby, settings get/apply with the handoff's filter
translations).

Policies live here, the same for every provider: the lobby is pumped
during play and a started match ends the local session and starts in
the frontend loop (pending launch, seats and signals kept, pumping
stopped so the match port stays free), the menu is closed and its pause
dropped first; the provider detaches before its GL context goes away at
session teardown and attaches to the next one. --launcher sets
RECOMP_LAUNCHER_PREGAME for frontends that boot into the game;
PSX_HIDDEN_WINDOW is a hidden-window test hook that keeps the frontend.
Nothing here includes or names a frontend's own headers or types.
Tests: psx_menu_host_test, host_overlay_test (relaunch quoting).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:02:57 -07:00
Shokunin 0f09935c23 Live video apply: one texture-filter enum for settings, handoff and menu
Review (#601/#603): the live path and the launcher handoff both collapsed
the texture filter to a boolean (value ? 1 : 0), so neither could carry xBR
(#586) and they could drift from settings.toml. PSX_TEXTURE_FILTER_* is now
the one enum (equal to [video] texture_filtering / gr_set_texture_filter),
and psx_texture_filter_from_ui is the one translation used by the launcher
handoff (seed, UserSettings, live globals) and the in-game apply. Unit-
tested in host_overlay_test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:02:57 -07:00
Shokunin 09144c8c31 Live video apply: netplay guard, persist every field, build in Release
Review (#601):
- psx_video_apply_live had no netplay guard. In a match only presentation
  (fullscreen, scanlines, linear present) applies live; dynamic resolution,
  frame generation and the filters are saved and reported with the new
  PSX_VIDEO_RESTART_NETPLAY bit (next session).
- internal_resolution and present_thread are written to UserSettings like
  the other restart-only fields, so the choice survives a restart.
- The live-apply code sat inside #ifndef PSX_NO_DEBUG_TOOLS but is used by
  the launcher path, so Release + launcher did not compile. It now lives
  outside the debug-tools block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:02:57 -07:00