DOOM

The badge runs DOOM. E1M1, Knee-Deep in the Dead, appears on the badge’s e-paper panel at a few frames per second, in four levels of gray. The piezo buzzer plays the music of the level.

The result is a slideshow, and you can play it.

How to install it

DOOM needs two steps, because the game data is much too large for the badge’s USB drive. The firmware goes into the badge’s program memory over USB. The game data goes into the separate 2 MB QSPI flash chip over a serial connection.

  1. Write the DOOM firmware on the Flash page, as you write any other image.
  2. Power cycle the badge.
  3. Upload a WAD with the loader below.

Upload a WAD

This browser cannot upload. Web Serial is required, and only Chromium-family browsers ship it (Chrome, Edge, Brave, Opera, Arc). Firefox and Safari do not. You can still send the blob from a terminal with a YMODEM tool such as sb or lrzsz.

1 Choose a WAD

No WAD chosen yet.

2 Put the badge in upload mode

Reset the badge while holding Cancel. It does this on its own too, whenever no WAD has been uploaded yet. The screen says it is waiting for a transfer.

disconnected

Pick the badge's serial port when the browser asks — on Linux it is usually /dev/ttyACM0, on macOS a usbmodem entry, on Windows a COM port.

3 Upload

idle

Nearly two megabytes over a serial line takes a few minutes. Leave the tab in the foreground and do not unplug the badge.

Diagnostics

Controls

InputAction
JoystickMove, strafe and turn
Joystick press (Fire)Shoot
ExecuteUse, and open doors
CancelChange weapon. Held during the start, it enters WAD upload mode
Execute + CancelTurns the music on or off

If something goes wrong

The browser shows no serial port. The badge shows its serial console only in WAD upload mode. Reset the badge while you hold Cancel, then try again.

“Timed out waiting for the badge to ask for data”. The badge is connected, but it is not in upload mode, so it asks for no transfer. Reset the badge while you hold Cancel.

The upload stops in the middle. Nothing is damaged. The badge has no usable WAD, and it returns to upload mode. Connect again and send the file again.

DOOM starts, but it reports missing game data. The firmware is installed and the WAD is not. You get this state after every firmware write. Upload the WAD above.

Firefox and Safari show no Connect button. Neither browser has Web Serial. Use a Chromium-family browser, or send the blob from a terminal with a YMODEM tool:

sb --ymodem-1k e1m1.blob < /dev/ttyACM0 > /dev/ttyACM0

About the game data

Only one level fits. The blob above is about 1.8 MiB, which is about 92% of the badge’s QSPI flash. The asset pipeline in the cyberaegg-doom repository builds it from the freely distributable shareware doom1.wad, and it cuts and compresses the data. DOOM and its game data stay the property of id Software.

To build your own blob from a copy of doom1.wad that you have:

bash tools/build_assets.sh    # doom1.wad -> build/e1m1.blob

Then select that file in the loader instead of the prepared one.

Source

The port is at rarenerd/cyberaegg-doom. It is a fork of next-hack/nRF52840Doom, which comes from prBoom and GBADoom. The fork fits the engine to the badge’s e-paper display, its buttons and its power budget. The DOOM engine is under the GPL.