No description
  • Rust 77.6%
  • C 17.7%
  • Nix 3.5%
  • LLVM 0.8%
  • Linker Script 0.4%
Find a file
sock fc5ef61d42 refactor: split the display server core out of the simulator
The simulator is not the display -- it is one of two server apps that
present the same display over the same UDP protocol. The other is the
daemon that replaces the C firmware and drives the real panel. Neither
is a client of the other.

So display.rs, net.rs and hart.rs were in the wrong crate: nothing in
them is simulator-specific. They move to servicepoint-display, which is
a ServicePoint display minus the thing that emits light. The simulator
keeps only panel.rs and its window; the hardware server will add a PRU
backend against the same core.

The end-to-end tests move with it. They never touched the window -- they
cover exactly what the two servers have in common, which is everything a
client can observe.

No behaviour change.
2026-07-26 20:11:59 +02:00
crates refactor: split the display server core out of the simulator 2026-07-26 20:11:59 +02:00
docs docs: how the hart differs from the ISA, and how to re-run the diff test 2026-07-26 03:05:16 +02:00
programs gorillas: pace frames off measured work, not an imagined 1 MIPS hart 2026-07-25 23:25:22 +02:00
.gitignore Add RISC-V display demos + guest-program build 2026-07-23 23:43:38 +02:00
Cargo.lock refactor: split the display server core out of the simulator 2026-07-26 20:11:59 +02:00
Cargo.toml refactor: split the display server core out of the simulator 2026-07-26 20:11:59 +02:00
flake.lock Scaffold servicepoint-riscv: RISC-V UDP uploader for the AirportDisplay 2026-07-23 22:22:40 +02:00
flake.nix gorillas: let the packaged client find its own guest binary 2026-07-25 22:37:38 +02:00
README.md gorillas: draw for the panel's 8-lit/4-gap rows, and take player positionally 2026-07-25 22:55:35 +02:00

servicepoint-riscv

Upload and run flat RV32IM programs on the CCCB AirportDisplay ("ServicePoint") over UDP.

The display firmware (mara/cape-cccb-apd) exposes a tiny RISC-V core via its CMD_RISCV network command. Its 64 KiB RAM is mapped at 0x8000_0000, with the reset entry point at offset 0. A program is a flat RV32IM binary that ends in a 0x00000000 halt word. See docs/protocol.md for the full wire-format and machine-model reference.

Build

Uses a Nix flake (crane + Rust from nixpkgs 26.05):

nix develop          # dev shell with cargo/clippy/rustfmt/rust-analyzer
cargo build --release
# or, build the package directly:
nix build

Usage

# Upload a flat RV32IM binary and start the core (defaults to the CCCB display):
servicepoint-riscv run program.bin

# Choose tick rate (µs/instruction) and target. Default is 1 = full speed;
# larger values slow the guest down. Note 0 is NOT "no delay" — the firmware
# reads it as its 125 µs default, the slowest setting.
servicepoint-riscv --target display.club.berlin.ccc.de:2342 run program.bin --tick-us 4

# Stage bytes into guest RAM without resetting:
servicepoint-riscv poke data.bin --offset 4096

# Halt the running core:
servicepoint-riscv stop

# Inspect the datagrams without sending them:
servicepoint-riscv run program.bin --dry-run

Default target is display.club.berlin.ccc.de:2342.

gorillas

A four-player GORILLA.BAS-style artillery game. The display is the screen; each player's terminal is only an input device, because the guest has no way to talk back to a client. One person starts the game, then everyone joins:

# one person uploads and starts it (this resets the core):
nix run .#gorillas -- start

# each player takes a slot 1..4 and aims live:
nix run .#gorillas -- play 1
#   left/right  aim      up/down  power      space  fire      q  quit

The packaged client already knows where its guest binary is. Building it by hand (nix build .#gorillas) is only needed to upload it some other way, in which case point the client at it with --binary or GORILLAS_BIN.

See docs/gorillas.md for the mailbox layout and why the client is write-only.