Rust · RISC-V · Xous
A side-scrolling platformer that runs native on the DEF CON 34 badge — five levels, coins, patrolling enemies, lives, score, and a reactive light show on the onboard LEDs. Built in a day, at the con.
No emulator. No interpreter. No ROM. No VM.
An ordinary Xous process, not a cartridge.
Rust compiled to riscv32imac-unknown-xous-elf, running as a normal process out of
the badge's swap region under the Xous microkernel. The badge is a bunnie Baochip-1x —
RISC-V RV32IMAC, a 128×128 one-bit OLED, six buttons, ten addressable LEDs, and no sound
hardware at all.
The hardware wrote most of the design document.
| The badge gives you | So the game is |
|---|---|
| 128×128 display, 1 bit | hand-drawn 8×8 mono sprites |
| no FPU | fixed-point i32, 1/16 px |
| 128px tall = 16 tiles | no vertical scrolling at all |
| 6 buttons, key-DOWN only | held keys via SetRepeat |
| 10 LEDs on a coprocessor | light show, free of the CPU |
| no audio hardware | silence |
Physics without floats.
Platformer movement is normally written in floating point — gravity, velocity, sub-pixel
positioning. The RV32IMAC core has no floating-point unit, so all of it runs in fixed-point
i32 at 1/16-pixel resolution. That gives sub-pixel motion precise enough for
jump arcs and collision without ever touching a float, and it stays fast enough to hold
frame rate on a microkernel process sharing the CPU.