10 Commits

Author SHA1 Message Date
Matthew Stanley e3ddd8c426 Merge Tombi EU integration branch into master
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 12:08:24 -07:00
Matthew Stanley 3f3cfb7571 Integrate EU RC4 runtime and overlay tooling changes
Import the supplied developer handoff against 03e635e8. Include regional capability controls, texture validation, SHA acceleration with portable fallback, SPU CD/XA correction, and overlay export/staging fixes. Validated with rebuilt EU runtime, guarded AOT audit and focused regressions.
2026-10-21 16:54:05 -07:00
Matt Stanley f9db2561d0 Fix persistent HD texture cache churn and missing live background dumps (#626)
* fix: reuse resident HD textures and publish live background dumps

* test: keep residency stubs local to the filtering fixture
2026-10-10 12:55:54 -07:00
Matthew Stanley 0662437c56 Merge commit '2b517f3a0529742647b4c12c1a6f3d4818b29d84' into integrate/pr558plus-fixes-20261008
# Conflicts:
#	runtime/include/gpu_render.h
#	runtime/src/gpu_gl_renderer.c
#	runtime/src/gpu_render.c
#	runtime/tests/gpu_hd_texture_stubs.inc
#	runtime/tests/test_gl_hd_texture_pack.c
2026-10-08 10:59:40 -07:00
Shokunin 2b517f3a05 HD + render thread: keep the A0 hold across HD activation and savestate loads
Track an open GP0(A0) upload in the renderer whatever the HD state
(facade gr_vram_upload_begin/commit/set_open): HD activation mid-A0
waits for the commit instead of reading the FBO over received words,
and a full-VRAM load no longer ends the hold; gpu.c restores it from
gp0_state on load and ends it on GP1(01h). Sync the render thread
before flushing dumps or reading HD diagnostics, suppress dumps from
generated frames, use _putenv on MinGW, drop a stale log. Adversarial
fixtures for both cases in full-VRAM and high-resolution-window modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 03:41:54 -07:00
Shokunin 64292bb23d Render thread: HD texture residency in command order
HD texture packs matched draws on the render thread but tracked uploads and
invalidations on the emulation thread, hashing gpu.c's array: a data race
(crash seen in hd_texture_pack_match) and wrong identities whenever the
emulation thread had already recorded a later upload.

The facade now sends residency changes through an optional backend hook
(hd_texture_note). The render-thread backend records them as RTH_HD_NOTE
after the upload/draw they follow; the replay hashes the render thread's own
VRAM copy, which the HD module now follows with the SW rasterizer
(gpu_hd_textures_bind_vram). Pack (re)configuration and HD mode changes are
sync points. Other backends apply the change immediately as before.

The HD GL fixture gains a render-thread case (fails without this change)
and links again: the scale fixture's facade stubs no longer collide with
the real gpu_render.c it includes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 03:33:17 -07:00
Shokunin 6799806481 HD texture packs: re-admit learned uploads after a VRAM restage
Rewind and in-session savestate loads have no sidecar. Each Beetle-keyed
upload rectangle seen in the session is remembered (at most 256); after a
restage it becomes resident again only if the restored words still hash to
a replacement key, so the HUD keeps its replacement across loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:48:04 -07:00
Shokunin 8acc3d8093 HD texture packs: keep upload residency across savestates
A savestate restage cleared every upload identity, so a texture uploaded
once (a race HUD) lost its replacement after any load until the game
uploaded it again. Saving a slot now also writes the Beetle-format residency
beside it (*.hdres: host metadata, never in the .pst), bound to a CRC of
the whole native VRAM. A load restores it only over exactly that VRAM, so
no identity is fabricated; anything else falls back as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:48:04 -07:00
Matthew Stanley ed398cc37e Improve DuckStation texture capture and replacement fidelity 2026-10-07 13:40:57 -07:00
Matthew Stanley bceadc6124 Add DuckStation-compatible texture pack mod and gameplay dumping
Load modern texpage/texupload PNG replacements independently of DuckStation source. Integrate pack folders and options with mods, preserve native VRAM, and validate GL rendering, format matching, dump safety, and upload invalidation.
2026-10-06 23:24:47 -07:00