15 Commits

Author SHA1 Message Date
565b58480a docs(kernel): document frontend output modes
Added a 'Frontend output modes' section explaining plain text (default),
--debug (annotated trace), and --raw (hex), with launch.sh examples for
each.

Generated by Clanker
2026-06-20 18:20:15 +02:00
3cf13f14f2 adjust debounce time
All checks were successful
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Successful in 59s
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 1m0s
Build kernel module / package (pull_request) Successful in 18s
Build kernel module / release (pull_request) Has been skipped
2026-06-20 17:52:41 +02:00
63adefea86 yes
All checks were successful
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Successful in 1m23s
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 1m24s
Build kernel module / package (pull_request) Successful in 17s
Build kernel module / release (pull_request) Has been skipped
2026-06-20 17:25:00 +02:00
b2e4f9710d refactor(kernel): align GPIO pin layout with the reference listener
All checks were successful
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 1m1s
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Successful in 1m8s
Build kernel module / package (pull_request) Successful in 29s
Build kernel module / release (pull_request) Has been skipped
Adopt the confirmed-working reference's pin assignment so the module runs
on that proven wiring: DATA=BCM2 (pin 3), CLK=BCM3 (pin 5), ATN=BCM4
(pin 7). RESET is kept and relocated to BCM17 (pin 11), the pin freed by
moving CLK. All five GPIOs stay in bank 0, so the direct-register hot
path and ATN IRQ are unchanged -- only the IEC_GPIO_* defines, the
device-tree overlay, and the docs/self-test move.

DATA/CLK now sit on the ARM I2C pins (GPIO2/3) with the SoC's fixed
~1.8k pull-ups; keep dtparam=i2c_arm off. The bare-board self-test
expectation changes from 0x15 to 0x0b accordingly.

Generated by Clanker
2026-06-20 16:09:10 +02:00
acfce76011 feat(kernel): add debounced (glitch-filtered) sense-line reads
All checks were successful
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 57s
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Successful in 1m14s
Build kernel module / package (pull_request) Successful in 23s
Build kernel module / release (pull_request) Has been skipped
The IEC bit loop sampled GPIO with a single register read, so a glitch
on a level-shifted 5V<->3.3V bus could corrupt a bit with no chance to
retry (the loop runs with IRQs off). Add a stable-read filter that only
believes a level change after it holds IEC_DEBOUNCE_US (now 5 us); the
fast path is a single read so tight CLK polls stay cheap. Used across
the receive hot path; the ATN ISR and self-test keep raw reads.

Generated by Clanker

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 15:50:54 +02:00
b3d63664a0 docs(readme): Add instructions for running frontend on Pi
Document the process for setting up and running the Python frontend on
a Raspberry Pi using release packages. Include details on wiring
self-tests, module selection, and using `launch.sh` for streamlined
execution. Update kernel README to cross-reference top-level changes.
2026-06-20 05:31:11 +02:00
3135a2502b fix(kernel): Handle unreadable module files in selftest.sh
Improve error handling in module discovery by identifying unreadable
`.ko` files and providing detailed error messages. Suggest actions like
unzip or rebuild to resolve issues.
2026-06-20 05:13:48 +02:00
2aa5104812 feat(kernel): Improve selftest.sh module discovery and error handling
Enhance module selection process by validating vermagic against the running kernel. Add detailed error messages with suggestions for manual path overrides or rebuilding for the current kernel. Ensure robust fallback behavior and improve user guidance.
2026-06-20 04:53:40 +02:00
6e5ec9b84f docs(kernel): Update README with module selection details
Expand documentation on selftest.sh behavior, module matching, and kernel compatibility. Clarify the auto-selection process based on `vermagic` and provide examples to guide users through fallback handling and manual overrides.
2026-06-20 04:53:31 +02:00
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
de2fb56a59 feat(kernel): Add trixie SHA1 signature workaround to Dockerfile
All checks were successful
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 8m4s
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Successful in 5m25s
Build kernel module / release (pull_request) Has been skipped
Introduce a conditional `trusted=yes` setting for the Raspberry Pi
repository in the Dockerfile when `DEBIAN_SUITE=trixie`. This bypasses
SHA1 signature rejection by trixie's apt system using Sequoia. Ensure
that bookworm maintains full signature verification. Updated
documentation to explain the trixie-specific caveat.
2026-06-19 21:03:18 +02:00
914c92bdea feat(kernel): Add support for Debian suite configuration
Some checks failed
Build kernel module / build (1:6.12.93-1+rpt1, bookworm) (pull_request) Successful in 8m4s
Build kernel module / build (1:6.18.34-1+rpt1, trixie) (pull_request) Failing after 2m31s
Build kernel module / release (pull_request) Has been skipped
Introduce `DEBIAN_SUITE` as a configurable argument in the Dockerfile, build
script, and CI workflow to align kernel builds with the target Raspberry Pi
OS release. Updated documentation to clarify the relationship between
suite versions and kernel compatibility.
2026-06-19 20:45:15 +02:00
231fdba93d feat(kernel): Add working directory log to build script
Some checks failed
Build kernel module / build (1:6.12.93-1+rpt1) (push) Failing after 41s
Build kernel module / release (push) Has been skipped
Log the current working directory in `build-in-docker.sh` to improve the
debugging process during kernel module compilation. This update helps
track the build context path passed to the Docker container.
2026-06-19 03:40:43 +02:00
e0a78871ca feat(kernel): Add GPIO descriptor-based initialization and self-test script
Replace legacy gpio_to_desc() with GPIO descriptor resolution by chip label
and hardware number, ensuring compatibility with kernels using non-zero
gpiochip bases. Added `selftest.sh` for non-persistent module testing, which
performs a hardware self-test and verifies wiring before connecting the real
bus. Included a detailed README.md documenting the self-test process.
2026-06-19 00:23:45 +02:00
e4cab679b5 first try 2026-06-18 22:25:42 +02:00