mirror of
https://github.com/D-Modem/courier-emu.git
synced 2026-11-28 20:38:07 -08:00
Added codec_rx_size, line_frame_irq, frame_period, line_frame_next_cycle and cycles to codec_state(), and surfaced the core's codec state as `core_codec` on the bridge status, which nothing reported before. One instrumented dial answers what three commits of reading the code could not: line_frame_irq 5 frame_period 3472 line_frame_next_cycle 3472 cycles 0 codec_rx_size 228480 frames_clocked 0 pc / instructions 0 / 0 active False bootstraps 1 m_cycles is zero because the C52 never executes an instruction. The frame driver compares m_cycles against m_line_frame_next_cycle, 0 >= 3472 is never true, codec_frame() never runs, and the queue fills to 228,480 undrained. The reason is bridge.py:1327. A DSP reset closes the core, builds a fresh NativeC5x and sets active = False; active only returns when a re-download reaches bootstrap_target_size, and that second download never comes - bootstraps stays at 1 - so the part is held dead for the rest of the dial. Under ATX0 the supervisor skips the wait, loads the call overlay, and the DSP comes back, which is why that path has always worked. So the dial-tone failure is not a missing detector, not a missing flag and not a gated ISR. Three separate conclusions in this document said otherwise and all three were reached by reading code rather than by asking the core what it was doing. The instrumentation is kept for that reason. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>