fix(kernel): allow command-phase byte reception while ATN is asserted #3

Merged
chris merged 1 commits from fix/command-phase-atn-abort into master 2026-06-20 03:36:35 +02:00

1 Commits

Author SHA1 Message Date
c9cfebafda fix(kernel): allow command-phase byte reception while ATN is asserted
All checks were successful
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 1m18s
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Successful in 1m13s
Build kernel module / release (pull_request) Has been skipped
wait_clk() aborted on any asserted ATN, but ATN is held low for the
entire command phase by design. Reception therefore aborted on the
first poll before clocking a single bit, so the listener never decoded
the LISTEN command and always fell through to "not addressed -> IDLE".

Make the ATN abort phase-relative via IEC_RX_ATN meaning "ATN changed":
in the data phase abort when ATN asserts (C64 interrupts with a new
command); in the command phase abort when ATN releases (command
sequence finished). The check collapses to
`iec_atn_asserted() == data_phase`.

Closes #2

Generated by Clanker

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 03:11:51 +02:00