mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
2ff21c4aff
(1) OBJECT_DEPENDS on overlay_codegen_hash.h for the cg-tag CONSUMERS (overlay_loader.c, boot_state.c). overlay_api.h pulls that header via __has_include, which the compiler depfile does not record when the header is absent at first compile -- so a later hash change left a STALE baked-in PSX_OVERLAY_CODEGEN_HASH, making the loader READ cg<old> while autocompile WROTE cg<new>: the runtime silently ignored freshly compiled shards and the area ran ~97% interpreted (the recurring read!=write overlay-lag class). The explicit dependency makes the runtime cg tag unable to drift from the headers/autocompile. (2) recompiler/tests/test_overlay_guard_codegen.py: deterministic codegen regression test (no game) -- synthesizes a tiny PS-EXE, runs the recompiler in overlay vs static mode, and asserts overlay functions emit the fail-closed psx_native_bad_entry guard in their entry-switch default while static functions keep the legacy fall-through. Guards the native-overlay blue-screen wedge fix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>