mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
13c5e0c5b5
Root cause of the Tomba pause-menu wedge (loaded saves only): autocompiled overlay shards were emitted by a recompiler binary OLDER than the last emitter change, yet stamped with the CURRENT cg tag (compile_overlays derives the tag from --runtime-include; nothing tied it to the emitting binary). The stale shards corrupted the display-list task queue during load-game. NOT the IRQ-resume class the prior handoff claimed - disproven with the new ring. - recompiler: bake the emitter-source hash (shared canonical list runtime/codegen_hash_sources.cmake + hash_codegen.cmake) into psxrecomp-game; new --codegen-hash flag prints it (machine-parseable, pre-banner). - compile_overlays.py: HARD-FAIL when the recompiler binary's baked hash differs from the cg tag hash it stamps (or the binary lacks the flag). Applies to both cache and --static modes. Closes the read==write-tag / stale-content drift class structurally. - runtime.cmake: codegen-hash source list moved to the shared canonical file. - interrupts.c: always-on exception-EXIT half added to irqctx_ring (take_pc, real_epc, exit_pc, escape reason, same-thread/restore flags, v1/ra saved-vs-exit, RestoreState redirect count) - proves per delivery which escape path fired and whether the interrupted GPRs were restored. Kept the same_thread_resume GPR-restore refinement (ring-verified equal-value in practice; faithful: hardware restores all GPRs on every exception return). - debug_server.c: irqctx_ring dump extended with the exit-half fields. Validated live: Tomba menu opens on loaded save (Stormy Mountain) with the cache fully enabled after regenerating shards with a rebuilt recompiler (build-cosim + build-prod caches). Guard verified positive and negative. MMX6 gate passed: boot -> title -> opening cutscene -> gameplay handoff OK. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
23 lines
1.2 KiB
CMake
23 lines
1.2 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.
|
|
|
|
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.h
|
|
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/strict_translator.h
|
|
${PSXRECOMP_CODEGEN_HASH_ROOT}/recompiler/src/function_discovery.h)
|