Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
| Comment: | badge-demo: snake Zepto firmware (move logic, 0x43 status, BOOT button, WS2812)
New app firmware/zepto/examples/baremetal/badgesnake/, the env zepto_badgesnake already named in platformio.ini: - snake_move.c: reads the Battlesnake move request JSON into a grid and picks a move: stay on the board and out of bodies (own tail free unless stacked), avoid squares next to an equal or longer head, prefer room for the whole body (flood fill), avoid hazards, nearest food, most room. No division, no heap. - snake_button.c: debounced BOOT button; short press toggles the LED and counts in byte 1, a press held 1.5 s counts in byte 2; byte 0 is down/LED flags. - snake_frame.c: docs/Protocol.md frames for info/start/move/end. - ws2812.c: cycle-counted bit-bang on PA15, run from RAM with interrupts off (~30 us). - main.c: polls the target at 0x42, serves the status at 0x43, SysTick ms clock. src/zepto_i2c_target.c: optional second own address (TOAR2, told apart by TSR.OAR2SEL/ADDRMATCH per SLAU847F 22.3.45/22.3.47); with it on, the TX FIFO is only filled once a read starts. Other apps are unchanged. Buffer sizes can be set with -D; the snake uses a 4 KB request (two snakes of length 20 make about 1960 bytes). Checked on x86-1: crystal run scripts/test_zepto_badgesnake_host.cr passes (fixture move gets "up", matching move-response.json); sniffer host tests pass. build_zepto.cr with Alpine GCC 15.1: badgesnake 6060 bytes, UNICOMM variant 5868; blink 364, i2c_sniffer 3364, i2c_target_diag 1480 still build. In the image SysTick points at SysTick_Handler, ws2812_send_ram is in RAM with the planned NOP counts, RAM use 7976/16384. Nothing run on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMkqwN396ebKzNRNvE |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | mechanical-turk-crystal-build |
| Files: | files | file ages | folders |
| SHA3-256: |
1b9ec2e32fcb920482eab8b963bc69ac |
| User & Date: | x86-1-interactor 2026-11-03 03:34:56.464 |
|
2026-11-04
| ||
| 18:21 |
badge-demo: zepto-bridge, I2C and BSL flashing over a Unix socket for sandboxed OCX runs on the badge
OCX runs on the badge node can see /dev/i2c-1 but can't open it: the sandbox bind is nodev (interactor runs 27f15fdba0, 360ee9d28c). This root helper does the hardware work for them over a socket until OCX can pass devices into a run (requested in interactor post dbd9c6b21f). - badge-demo/bridge/src: BSL packets (ported from badge-demo/scripts/flash_zepto_bsl_direct_i2c.py), i2c-dev transfers, pads and control lines, and the server and client - badge-demo/bridge/spec/zepto_bridge_spec.cr: 12 examples pass on x86-1 - badge-demo/scripts/build_zepto_bridge.cr: static aarch64 cross-build, inputs checked by SHA-256 - badge-demo/systemd/zepto-bridge.service, badge-demo/docs/ZeptoBridge.md Not yet run on the badge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMkqwN396ebKzNRNvE check-in: bbd74274f8 user: x86-1-interactor tags: mechanical-turk-crystal-build | |
|
2026-11-03
| ||
| 03:34 |
badge-demo: snake Zepto firmware (move logic, 0x43 status, BOOT button, WS2812)
New app firmware/zepto/examples/baremetal/badgesnake/, the env zepto_badgesnake already named in platformio.ini: - snake_move.c: reads the Battlesnake move request JSON into a grid and picks a move: stay on the board and out of bodies (own tail free unless stacked), avoid squares next to an equal or longer head, prefer room for the whole body (flood fill), avoid hazards, nearest food, most room. No division, no heap. - snake_button.c: debounced BOOT button; short press toggles the LED and counts in byte 1, a press held 1.5 s counts in byte 2; byte 0 is down/LED flags. - snake_frame.c: docs/Protocol.md frames for info/start/move/end. - ws2812.c: cycle-counted bit-bang on PA15, run from RAM with interrupts off (~30 us). - main.c: polls the target at 0x42, serves the status at 0x43, SysTick ms clock. src/zepto_i2c_target.c: optional second own address (TOAR2, told apart by TSR.OAR2SEL/ADDRMATCH per SLAU847F 22.3.45/22.3.47); with it on, the TX FIFO is only filled once a read starts. Other apps are unchanged. Buffer sizes can be set with -D; the snake uses a 4 KB request (two snakes of length 20 make about 1960 bytes). Checked on x86-1: crystal run scripts/test_zepto_badgesnake_host.cr passes (fixture move gets "up", matching move-response.json); sniffer host tests pass. build_zepto.cr with Alpine GCC 15.1: badgesnake 6060 bytes, UNICOMM variant 5868; blink 364, i2c_sniffer 3364, i2c_target_diag 1480 still build. In the image SysTick points at SysTick_Handler, ws2812_send_ram is in RAM with the planned NOP counts, RAM use 7976/16384. Nothing run on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KMkqwN396ebKzNRNvE check-in: 1b9ec2e32f user: x86-1-interactor tags: mechanical-turk-crystal-build | |
| 02:32 |
badge-demo: build Zepto firmware with a Crystal script, without PlatformIO
firmware/zepto/scripts/build_zepto.cr calls arm-none-eabi-gcc and objcopy directly with the flags from platformio.ini and platforms/zepto-mspm0/builder/main.py. PlatformIO needs Python, which the maintainer does not want used, and its glibc toolchain will not run on the musl client x86-1. ZEPTO_PROOT="PROOT ROOT" runs the toolchain inside a root such as a scratch Alpine with gcc-arm-none-eabi. Checked on x86-1 with Alpine 3.22's GCC 15.1 (the handoff used 14.2.1): blink 364 bytes (as before), i2c_sniffer 3364 (handoff: 3380), i2c_sniffer_led 996 (handoff: 1008). Vector 17 points at GROUP1_IRQHandler; no __aeabi_* helpers. Host tests pass. Build check only: nothing run on hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TUH8KJsvFXxaGvYpnQ848p check-in: 484dda70d0 user: x86-1-interactor tags: mechanical-turk-crystal-build | |