Commit Graph

599 Commits

Author SHA1 Message Date
Matthew Stanley e1673a52f2 Merge land/pr492 into land/pr493 2026-10-05 10:11:34 -07:00
Matthew Stanley 4a276ef0a2 Merge origin/master into land/pr492 2026-10-05 10:11:09 -07:00
Matthew Stanley fe42da2744 Merge release/native-rendering-20261003 into master
Keeps both lines: master's PGXP session, draw-distance clamps, masked rejects
and saturated-winding NCLIP; the release's render-pass kit additions, verified
media/disc extents, timeline/present rings, cull-scale sites. Overlay ABI v30.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 19:27:02 -07:00
Matthew Stanley 95aa6e68b6 Merge review/pr492-fix into review/pr493-fix
# Conflicts:
#	runtime/src/debug_server.c
#	runtime/src/render_pass.c
#	runtime/tests/test_render_pass_abort.c
2026-10-04 10:45:21 -07:00
Matthew Stanley 0ae34cd0de Merge remote-tracking branch 'origin/master' into review/pr492-fix
# Conflicts:
#	runtime/include/gpu_gl_renderer.h
#	runtime/src/debug_server.c
#	runtime/src/render_pass.c
#	runtime/tests/test_render_pass_abort.c
#	runtime/tests/test_render_pass_sandbox.c
2026-10-04 10:41:19 -07:00
Matt Stanley 8b52fad591 Merge pull request #489 from FractalEngineer/fix/windows-release-executable-suffix
release: preserve the .exe suffix when selecting Windows release binaries
2026-10-04 10:35:27 -07:00
Matt Stanley a9098f7c98 Merge pull request #488 from FractalEngineer/fix/netplay-disabled-online-stubs
runtime: fix missing online-player lobby symbols in netplay-disabled builds
2026-10-04 10:35:23 -07:00
Matthew Stanley cd9981cda8 Clip proven native-wide world faces across camera and screen planes 2026-10-03 23:51:14 -07:00
Matthew Stanley d2c8f03e76 Add guarded native draw replay, motion interpolation and stable world filtering 2026-10-03 23:46:25 -07:00
Matthew Stanley 64bd153bc7 Merge commit '128684b6a3526120aa26394f2bd553f991ee03e8' into pr/medievil-quality-upstream 2026-10-03 23:26:54 -07:00
Matthew Stanley d221cc221e Discover counted relocatable modules and build declared native placements 2026-10-03 23:26:28 -07:00
Matthew Stanley 9f7031f878 Merge commit '256ab7d36de99e0004aaf24872b819febbf1b14a' into pr/medievil-quality-upstream 2026-10-03 23:26:27 -07:00
Yves b491a3597f render passes: restore mod callback context after watchdog aborts
Adapted from the original feature commits, retaining their author credit:
[6d44e21d](https://github.com/FractalEngineer/psxrecomp/commit/6d44e21df7ccedd1acbfa31844a53bf8bd8b316e)
[35b209d4](https://github.com/FractalEngineer/psxrecomp/commit/35b209d406c168e14f51bb8bbd549742473c7388)

Source scope and current-master validation: docs/internal/upstream/render-pass-mod-callback-rollback.md

Co-authored-by: Yves <calibratedbeats@gmail.com>
2026-10-04 05:54:03 +08:00
Yves dedbe47c97 render passes: expose refusal and framebuffer failure details over TCP
Adapted from the original feature commits, retaining their author credit:
[257a88b0](https://github.com/FractalEngineer/psxrecomp/commit/257a88b06d26bb99a9e6066b89f839af41090118)

Source scope and current-master validation: docs/internal/upstream/render-pass-refusal-diagnostics.md

Co-authored-by: Yves <calibratedbeats@gmail.com>
2026-10-04 05:54:03 +08:00
Yves 564607e8bc release: preserve the .exe suffix when selecting Windows release binaries
Adapted from the original feature commits, retaining their author credit:
[9976567e](https://github.com/FractalEngineer/psxrecomp/commit/9976567eb8e95510ca7eeeeccd9af3a260885de5)

Source scope and current-master validation: docs/internal/upstream/windows-release-executable-suffix.md

Co-authored-by: Yves <calibratedbeats@gmail.com>
2026-10-04 05:54:03 +08:00
Yves 88e8d59de3 runtime: fix missing online-player lobby symbols in netplay-disabled builds
Adapted from the original feature commits, retaining their author credit:
[ce63101f](https://github.com/FractalEngineer/psxrecomp/commit/ce63101f0f964845d51fb7d4b1fc96ab35192509)

Source scope and current-master validation: docs/internal/upstream/netplay-disabled-online-stubs.md

Co-authored-by: Yves <calibratedbeats@gmail.com>
2026-10-04 05:54:03 +08:00
Matthew Stanley 5f780a8e5e Add native draw replay and projection interpolation; fix foreground wall classification 2026-10-03 11:12:09 -07:00
Matthew Stanley 128684b6a3 Document owned mask and centered HUD contracts 2026-10-02 21:00:01 -07:00
Matthew Stanley 9c1e716a61 Preserve PGXP mod selection through renderer initialization 2026-10-02 20:24:38 -07:00
Matthew Stanley 6674024285 Merge master into feat/medievil-native-wide-guards
Reconciled with #470 (PGXP): gpu.c precise vertices take PGXP only under geometry correction and count it, then native-wide edge recovery; the PGXP triangle stat stays PGXP-only. Stubs and tests from both kept; stamps recomputed.
2026-10-02 20:00:23 -07:00
Matthew Stanley 42053afc17 Merge master into up/screen-x-edge16
recompiler/CMakeLists.txt: keep both new codegen test targets (this PR and #468).
2026-10-02 19:43:43 -07:00
Matt Stanley dec516c08b Merge pull request #476 from Alexbeav/up/netplay-start-failure-text
netplay: say why a start failed
2026-10-02 19:42:52 -07:00
Matthew Stanley 256ab7d36d tools: decode counted MIPS relocation containers 2026-10-02 19:41:26 -07:00
Matthew Stanley 40af8a428c Merge master into feat/pgxp
Master moved the textured-dot test stubs into gpu_exec_stubs.inc; the PGXP stubs move there too. pgxp_note_rect_bypass stub takes (int). Stamps recomputed.
2026-10-02 19:30:59 -07:00
Matthew Stanley 30a4072c25 Merge master into feat/max-detail
Stamps recomputed with tools/bios_emitter_fingerprint.cmake after #480's restamp.
2026-10-02 19:22:24 -07:00
Matt Stanley 921d0b021d Merge pull request #467 from RetroPortingToolKit/feat/vs-split
GL: texture window per vertex; opt-in batching across texture windows
2026-10-02 19:20:52 -07:00
Matt Stanley 0347edd577 Merge pull request #455 from Alexbeav/up/settings-paths-relative
runtime: keep a portable game folder portable (relative settings paths)
2026-10-02 19:20:44 -07:00
Matt Stanley 19af12e073 Merge pull request #449 from RetroPortingToolKit/fix/release-ui-notices
release: ship recomp-ui's license and asset notices in bundled zips
2026-10-02 19:20:35 -07:00
Matthew Stanley a95d8c77ee Merge remote-tracking branch 'origin/master' into feat/guarded-packed-wide-cull 2026-10-02 16:51:02 -07:00
Matthew Stanley 1ed0dfd22d Recover saturated winding at guarded native-wide rendering branches 2026-10-02 16:47:59 -07:00
Matthew Stanley 3787120488 Recover saturated horizontal projections in opt-in native-wide rendering 2026-10-02 16:00:02 -07:00
Matthew Stanley 04375fd453 release: ship TinyCC's LGPL-2.1 notice with the bundled tcc
Closes #474. The win64 binary zip carries no license file; stage the notice beside tcc.exe and in licenses/, and make the zip verifier require both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 15:49:13 -07:00
Matt Stanley 973d93a907 Merge pull request #456 from Alexbeav/up/bios-scph5500-5501-2
bios: add the SCPH-5500 and SCPH-5501 profiles
2026-10-02 15:35:49 -07:00
Matt Stanley a4cb03959d Merge pull request #457 from Alexbeav/up/cmake-osxcross-toolchain-2
cmake: add a macos osxcross toolchain file
2026-10-02 15:35:42 -07:00
Matthew Stanley c29e934308 Add guarded packed-coordinate culling for native-wide adapters 2026-10-02 14:12:20 -07:00
Alexandros Mandravillis 57f0505bd2 Widen lui and bltz screen_x_sites: a screen X kept in the high half
A renderer that keeps a screen X as SX << 16 tests the right edge against
a lui-held W << 16 and the left edge with bltz on the shifted value. No
explicit [widescreen.cull] kind fits either: bltz_sites compares the whole
register with -margin, and a lui at a screen_x site was a build error.

screen_x_sites now also takes
  lui rt, W        -> rt = (W + margin) << 16
  bltz x, outside  -> taken while SX < -margin   (x = SX << 16)
Both are the identity at 4:3. The helpers are defined for native code and
for overlay shards; their math is in ws_cull_edge.h. The two prototypes are
written only for a config that lists screen_x_sites, so the generated code
of every other title is unchanged.
2026-10-02 21:27:15 +03: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 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
Alexandros Mandravillis 1d98dd5d30 netplay: a failed start from the launcher returns to the room
A match started from the launcher closed the program when the start failed, with the reason on a console the player does not see. It now ends through netplay_soft_exit, keeps the sentence for the status line and goes back to the room before the scheduler runs, so the game is not booted offline. No session is open at that point, so no BYE is sent. A command-line start still exits with code 1.
2026-10-02 19:13:57 +03:00
Alexandros Mandravillis c1a9e52894 netplay: say why a start failed
A failed start printed "built without recomp-net, or bind/peer invalid" for every cause. A player whose system held the UDP port read first that the build had no netplay.

The library answers a refused bind, a listen address it cannot read and a peer address it cannot use with the same -1. main.cpp now does those steps again (it reads the listen address as the library does, looks up a name, binds without address reuse) and reports the system's answer. The sentence names a cause only when the system does: address in use, access denied (a port range Windows keeps for Hyper-V or WSL, a port below 1024 elsewhere), address not available. Any other error gets the number and the system's text. The peer address is named only when the listen address opened and the peer address cannot be read. The build is named only when it has no netplay.

The sentences are in netplay_exit_reason.c with unit cases; a source guard checks the wiring in main.cpp.
2026-10-02 19:13:57 +03: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
Shokunin d229db395d release: require recomp-ui notices in bundled zips 2026-10-02 01:54:16 -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
Shokunin dd5fdec6bb Add opt-in draw-distance clamps ([[draw_distance.clamp]])
Many PS1 renderers drop a primitive whose depth index falls past the end
of their ordering table. Raising that limit can write past the table, so
a title can now list such guards in game.toml with the register that
carries the index and the last safe value. While a trusted mod has called
psx_mod_set_draw_distance_clamp(1), generated main-EXE code clamps that
register before the guard runs, so far geometry is kept in the farthest
slot instead of popping in later.

- Off by default and reset at every session start, so netplay and every
  title that lists no sites run unchanged; with no sites the generated
  code and declarations are byte-identical.
- Main executable only: the full instruction word is the guard,
  generation fails on a mismatch or a load-delay hazard, captured
  overlay code keeps its own code (the sites are not part of the overlay
  config identity), and the dirty-RAM interpreter applies the clamp
  where the game's text image holds the listed word.
- Compatibility: code_generator.cpp is a codegen-hash input, so the
  codegen hash and the overlay-cache tag change for every title, sites
  or not. Savestates from earlier builds are refused, and overlay shards
  rebuild once on first visit. Generated code and behaviour are
  unchanged for a title without sites or with the switch off.
- Tests: draw_distance_codegen_test (config rules, emission, guards,
  declarations, overlay identity) and draw_distance_interp_test (store,
  switch, interpreted guards); the session-reset guard covers the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 11:36:48 -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
Shokunin ff570512ed docs: ENHANCEMENTS G1.11/G1.12, PGXP as a title's default, with R4 numbers
G1.11: the hook-flavor runtime, the mod armed at session start, dataflow
only, exact projection, and the rectangle shortcut. It covers what tri_mixed
can and cannot see, and the R4 census after every change:
- 1P: 99.91% dataflow, 0 of 389k drawn triangles mixed;
- menus, attract and 2P VS: every truncation reject is a vertex at the
  saturation limit.
The wobble table drops the preserve-projection row, which is 0 by
construction.

G1.12: precise culling (the culled-row crack, the rule, why it is mod-only,
packet headroom, identity, cost under R4's default stack) and
[video] pgxp_mod_only.

TCP_COMMANDS: the new geom_correction fields and the pgxp verb's culling
knob. MOD_PACKAGES: the session arming takes the request; how a title
ships PGXP on. GAME_PROJECT_SETUP: pointer to pgxp_mod_only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 06:08:55 -07:00
Shokunin 67da069f9c GL: texture window per vertex; opt-in texture-window batching
The OpenGL textured program read the GP0(E2h) texture window from a
uniform, so every window change ended the open textured batch (batch
reason 5). Titles that tile far textures with per-primitive windows pay
for that in draws: Ridge Racer Type 4's split screen changes the window
about 515 times a game frame and drew about 180 batches, against 17 with
batching on. On the native-wide path every batch that reaches the margins
is drawn again into the wide surface; under heavy load on an M4, 2P with
widescreen at Match display ran at 39-43 guest VBlanks/s and 1P at 50,
against 50-58 and 57 with batching on.

The window now rides in each textured vertex (a_twin, the E2h low 20 bits
as one float) like texpage and CLUT already do, and the shader decodes it
there; the uniform and the window-replay queue's copy of it are gone.
With the default unchanged, batches still split at every window change,
so every vertex carries the batch's window and the image is the same as
before: the new test's oracle passes on the unmodified renderer too, with
the same digests at 1x, 4x, 9x and in the windowed 9x/18x mode.

[video] texture_window_batching = true (game.toml only, default off) lets
primitives with different windows share a batch. The image is the same:
an opaque batch draws its colour in one painter-ordered pass and
semi-transparent primitives are still drawn one per batch. While mask
checking is on the window stays a batch key, because an opaque batch
fixes the stencil for its STP=1 texels after its colour pass.
PSX_GL_TEXWIN_BATCH=0|1 overrides it for a run and the TCP command
gl_texwin_batch switches it live. Software and Vulkan are unchanged.

Tests: gl_scale_invariance_test gains mode "twin" (alternating windows
over opaque, semi-transparent, set-mask, mask-check and bilinear prims,
into the native-wide margins): off and on give the same native VRAM,
frame at S and wide surface, on draws 17 batches instead of 46 and flushes
only for the 5 mask-check window changes. Each run also checks an oracle
that does not depend on the renderer: raw rects through all four windows
into a 4-bit and a 15-bit page must give, pixel for pixel in the native
VRAM and at the centre of each pixel at S, the texel the PS1 window rule
picks from the VRAM as read back. A decode or packing error both settings
share fails it (checked with (v_twin >> 11) and with off_y left out of the
packed window). video_enhancement_settings_test checks the key's default
and opt-in.

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