
A maze exploration game rendered on a 128x64 OLED (SSD1306) via I2C. The core game logic is a pure combinational circuit generated from DSLX (Google XLS), wrapped by a Verilog module that holds 123 bits of state in flip-flops.
The player navigates a 16x8 hardcoded maze from start (1,1) to goal (14,6). Up to 2 walls can be broken using the BREAK button. The game outputs audio feedback (move beep, wall-break noise, goal fanfare) via a piezo speaker.
I2C runs at ~195kHz using pseudo open-drain outputs on the bidirectional pins. Button inputs are synchronized (2-stage FF) and debounced (~5ms sampling).
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | btn_up (direction: up) | unused | I2C SDA (pseudo open-drain, 4.7k pull-up required) |
| 1 | btn_down (direction: down) | unused | I2C SCL (pseudo open-drain, 4.7k pull-up required) |
| 2 | btn_left (direction: left) | audio_out (piezo speaker) | unused |
| 3 | btn_right (direction: right) | unused | unused |
| 4 | btn_break (wall break, active high) | unused | unused |
| 5 | btn_cancel (cancel confirm dialog) | unused | unused |
| 6 | btn_restart (restart game, press twice) | unused | unused |
| 7 | btn_refresh (refresh display, press twice) | unused | unused |