Files
psxrecomp/runtime/codegen_hash_sources.cmake
T
Matthew Stanley e8b6ddc343 irq: gate post-exception cooldown on guest cycles, not check-calls (MMX5 fork fix)
The post-exception IRQ cooldown counted psx_check_interrupts CALLS. A call is a
backend-dependent unit: compiled checks at block edges (plus extra sites like a
`jr ra` return transition), the dirty-RAM interp checks per-instruction. So the
per-call countdown reached zero at a DIFFERENT guest cycle in each backend, the
next IRQ was delivered at a different cycle/EPC, and the two backends forked
(cosim first-divergence cp 3259 @ cyc ~213.5M). Convert the cooldown to a
guest-cycle DEADLINE (post_exception_cooldown_until): guest cycles advance
identically in both backends (shared, ruler-validated cost model), so the
delivery decision is now backend-independent. Magnitudes preserve prior
breathing room (claimed ~= old 8 blocks, unclaimed ~= old 500 blocks).

Also:
- gpu: GP1(00h) reset no longer clears VRAM. VRAM survives a GPU reset on real
  hardware; only power-on gpu_init() clears our backing store (gpu_reset_state).
- codegen hash: include the emitter/translator/discovery .cpp TUs, not just
  their .h. A change confined to full_function_emitter.cpp altered generated
  dispatch+overlay code while leaving the hash unchanged -> stale overlay-cache
  hazard (same class as the ws-emission-not-in-hash gap).
- debug: ring-buffer WINDOW-QUERY primitives -- frame_lo/frame_hi filters on
  wtrace/mmio dumps + a capture-freeze frame so a causal window's tail is not
  evicted by a post-window event storm before a probe reads it (query the
  always-on ring for the window of interest, not arm-and-hope).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-04 23:51:32 -07:00

31 lines
1.8 KiB
CMake

# codegen_hash_sources.cmake — the CANONICAL list of recompiler codegen sources
# folded into the overlay cache tag hash (hash_codegen.cmake).
#
# Included from BOTH:
# - runtime/runtime.cmake (bakes the hash into the runtime's cg tag)
# - recompiler/CMakeLists.txt (bakes the SAME hash into psxrecomp-game,
# exposed via `--codegen-hash`)
# so the two hash computations can never drift by list divergence. Any file
# added to the emitter pipeline must be added HERE, once.
#
# Input: PSXRECOMP_CODEGEN_HASH_ROOT — the psxrecomp repo root.
# Output: PSXRECOMP_CODEGEN_HASH_SRCS — absolute paths to hash.
# NOTE: include the emitter .cpp translation units, not just their headers. A
# change confined to full_function_emitter.cpp (e.g. the 2026-07-03 Class-A
# shell-window overlay-dispatch fix) alters both generated dispatch and overlay
# code but left the hash unchanged when only the .h files were listed — a stale
# overlay-cache hazard (same class as the "ws emission not in cg hash" gap).
set(PSXRECOMP_CODEGEN_HASH_SRCS
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/code_generator.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/mips_decoder.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/control_flow.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/basic_block.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/function_analysis.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/full_function_emitter.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/full_function_emitter.h
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/strict_translator.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/strict_translator.h
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/function_discovery.cpp
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/function_discovery.h)