C:\GRIFFIN\PROJECTS\EMBEDDED\CORNE-ARCANE>

[@] MAP
###C########P###
#...........$..#
#.===......%%..#
#......@.......#
#..%%......===.#
#..............#
###H########O###
EMBEDDED/CORNE-A

Doors are hotkeys. Or click the screen and walk with the arrow keys.

Corne Arcane OLED

Status
Accepted on hardware
Stack
C · Embedded · RP2040 · QMK · Firmware
Source
github.com/Griffinhale/corne-arcane-oled
  1. #1 Griffin Hale

    Firmware for a Corne split keyboard that turns typing rhythm into a spell duel over a city on its two small screens.

    At a glance

    • Outcome: Turns a split keyboard’s two OLED screens into a spell duel over a city, shaped by key positions and typing rhythm.
    • Status: The 0.4 firmware passed a hardware check on July 22, 2026. Public downloads restarted their numbering: fw-v0.2.0, released October 2, passed the same check.
    • Role: Designed the duel, city, data formats and memory limits, reviewed AI-assisted implementation and ran the hardware checks.
    • Stack & libraries: C11 on RP2040 controllers under Vial-QMK; a Python Linux daemon; desktop, browser (WebAssembly), iPhone and Apple Watch shells over the shared C core; HealthKit on the Watch.
  2. #2 Griffin Hale

    • Source: Public under GPLv2.
  3. #3 Griffin Hale

    Corne Arcane is firmware for the Corne, a split keyboard with a small screen on each half. The two screens show a spell duel over a city. You type normally. The firmware reads which keys you press and when, never the letters, so it records none of your words.

    The full master half in its translucent printed case, OLED lit, showing the key layout and thumb cluster.
    The complete keyboard half shows the screen beside the keys that control it.
  4. #4 Griffin Hale

    The row you type on most picks a spell’s element. How varied your typing is sets the spell’s form and the shield you hold while typing. A pause of about half a second casts it. Spells leave fires, repairs and other effects in the city’s eight districts below the towers.

    Two simulated OLED towers beside position grids. One left key position is highlighted; the left spell is Collecting and both health readouts are 7/8.
    At 9.80 seconds, scripted upper-middle-row input builds a Force spell. The indicators show positions, never typed text.
    The same OLED pair after impact, with no highlighted keys, left health 7/8 and right health 5/8. The right room contains raised-arm figures.
    At 13.12 seconds, the released Force spell has cost the opponent two health and triggered a room response.
  5. #5 Griffin Hale

    The keyboard runs on its own. An optional Linux helper program changes the city’s setting to match your computer: a Workshop while you write code, an Arena while you play a game, an Observatory during a Pomodoro timer. It sends only categories and counts. Window titles, web addresses and typed text never reach the keyboard.

  6. #6 Griffin Hale

    The half with the USB cable runs the game 25 times a second. It sends the other half a 32-byte summary of the game over the cable between them, and that half only draws it. Each summary carries a checksum, so the receiving half drops damaged or unknown updates. A lost link shows a default scene until a good update arrives.

    The master half of a Corne keyboard under USB and TRRS, its OLED lit blue and rendering a city skyline with tower silhouettes.
    The master half runs the duel on a 128x32 OLED turned to portrait.
    The opposite half of the same keyboard, its OLED rendering a matching city scene.
    The other half draws the world from a 32-byte split snapshot without recomputing it.
  7. #7 Griffin Hale

    The game uses whole-number math, sets aside all its memory up front and never reads the clock. The same keystrokes always produce the same frames. Tests compare drawn frames with saved fingerprints, scan for memory requests and fail the build if the firmware outgrows its storage or memory budget.

  8. #8 Griffin Hale

    The same game code runs in a desktop window, a web browser, an iPhone and an Apple Watch. A test runs the same starting seeds through the native and browser builds and requires matching frames.

    One simulated duel shown as narrow OLED towers, a square town and a wide landscape, with left health 7/8 and right health 5/8.
    Three native C layouts draw the same state at 13.12 seconds. This comparison was rendered on NixOS; it is not a capture of the browser, phone or watch apps.
    A web page titled The duel city. A black canvas shows a white one-bit city: a central tower with a wizard on its balcony, roofs, hills, clouds, a sun and a plaza with residents. Below are canvas and district pickers, resume and new seed buttons, and counters reading seed 90, elapsed 0:12, ticks 301, spells cast 4.
    The browser version: the same C compiled to WebAssembly and drawn on a canvas. Seed 90 at 12 seconds, paused for the capture. The world plays itself.
    An iPhone screen showing the white one-bit city on black: the central tower with a wizard on its balcony, a spell arcing through the sky toward a target bracket, roofs, hills and residents in the plaza.
    The iPhone app on an iPhone SE, with a spell in flight. The city plays itself.
  9. #9 Griffin Hale

    On the Watch, daily activity, heart rate and last night’s sleep become kites, a windmill, and a cockerel or a sleeping cat. A missing reading draws nothing. The app keeps only the latest levels in memory and sends no health data anywhere.

    An Apple Watch screen filled by the tower, with the wizard on its balcony, a sun to the left, clouds and roofs below. The time 3:02 shows at the top right.
    The full-screen Watch app on an Apple Watch SE 3.
  10. #10 Griffin Hale

    The Linux helper and Vial, the keyboard’s keymap editor, both need the keyboard’s one data channel to the computer. I built a launcher that stops the helper, opens Vial, and restarts the helper afterward only if it was running before.

  11. #11 Griffin Hale

    Vial can start a second copy of itself and quit while its window stays open, so the launcher waits until nothing still holds the keyboard. Tests cover a missing Vial, an interrupted launch, a Vial that hands off to a second copy, and a helper that was already stopped. The diagnostics tool uses the same handoff code.

  12. #12 Griffin Hale

    The video above is the real keyboard. A simulator capture from October 7 shows the same duel with its input and health labels. Each download carries the firmware image and the helper as a Debian package. Next is daily use: the current cities and spells get read at desk distance over full working days before more art or spells are added.

  13. #13 Griffin Hale

    The 0.4 firmware passed its hardware check on both halves: every key on all four layers, keymap edits in Vial, display sleep and a dropped split link.

  14. #14 Griffin Hale

    Recorded the duel running on the keyboard while typing continues.

  15. #15 Griffin Hale

    Published fw-v0.1.0, the first downloadable firmware image, with the Linux helper as a Debian package.

  16. #16 Griffin Hale

    Published fw-v0.2.0 with richer spells and deeper cities. It passed the same hardware check.

  17. #17 Griffin Hale

    Captured 30 seconds of the simulator driving both screens from scripted key positions.