mirror of
https://github.com/ARMSX2/ARMSX3.git
synced 2026-08-24 16:58:52 -07:00
Three faults that showed up in tester logs, all of which made the emulator look broken in ways the log then hid. Eternal Sonata flooded with SPU "Invalid code" errors: when the analyser produced no data the recompiler had an empty branch with a TODO where the fallback belonged, so the block was neither compiled nor marked, and the same address was retried forever. It now marks the block failed and lets the interpreter take it -- 6320 errors in one session down to none. The unknown-instruction and halt messages are rate-limited, per opcode and per address rather than globally, so a repeating fault reports once instead of every execution. One tester's log went from 600 MB to 2.0 MB; the log volume itself had been slowing the emulator, so this is not only a readability fix. ARM64 fault classification in Thread.cpp preferred a heuristic comparing si_addr against the PC, which misreads a genuine data fault as an instruction fetch. It now decodes ESR first and only falls back to the heuristic, and an SPU halt at the 0xffdead00 sentinel is reported as a guest assertion rather than a host segfault. BLEACH crashed here, and the misclassification gated every recovery path behind it.