DEFCON32 Badge Doom
Getting Started with Doom on your badge
NOTE: installing Doom will overwrite the contents of flash on your Badge. You should either back up the contents first, or just be prepared to download and re-flash the stock firmware later. Use this firmware at your own risk!!
Note you can install Doom on your badge by:
- Turning the badge off
- Unplugging it
- Holding the BOOT button on the back while plugging the USB back in. This should bring up an RP2350 drive on your computer (/possibly phone)
- Drag doom1_full.uf2 onto the RP2350 drive and wait for it to download and reboot
See the bottom of these notes for details on using picotool
to save your original flash contents and more
Overview
This is a version of my "rp2040-doom" (which itself now supports RP2350) modified to run on the DEFCON 32 Badge. Thanks to Dmitry for some LCD code that I borrowed!
Note that the badge speaker seems to distort really easily, so I have the sound turned way down for now, this is probably good The audio is now much better, if still a little quiet.
anyway so you don't annoy people around you, but the volume control in the menus does work.
If you want to read about getting the fully functional and complete Demo version of Doom running in 264K and 2MB of flash, you can do so
in the blog post here.
The regular build instructions should work with the latest pico-sdk and other dependencies, but you should pass
-DPICO_BOARD=defcon32_badge
to CMake as well.
Things that I have tried and are kwown to work:
- Demos
- Playing a game
- Completing levels
- Save/Load game (note these are stored in flash, so will persist across badge power cycles)
Things that don't work:
- "Quit Game" main menu item which is actually meant to quit to DOS (i removed the DOS mode because it uses 640x480 screen)
- Note the menu to end an active game is actually under "Options/End Game", and does work
- There is no button for strafe
- There is no way to enter cheats
Things that might work:
- The end sequence
- Multiplayer; rp2040-doom does support I2C networked games
Controller Input:
Normal button behavior
Button | Behavior |
---|---|
Start | Show Menu / Go back |
Select | Select Menu |
Left / Right / Up / Down | Move |
A | Open Door |
B | Fire |
Button behavior when pressing the FN (bottom right on the back)
Button | Behavior |
---|---|
FN+Select | Show / Hide Map |
FN+Up | Y (for menus) |
FN+Down | N (for menus) |
FN+Left | Press Left in rapid succession with FN down to press 1 then 2 then 3 etc. to select weapons |
Note when FN is pressed, An FPS indicator is also shown
Button behavior when typing
Button | Behavior |
---|---|
Up/Down | Cycle through letters/space |
Left | Backspace |
Right | Select letter |
Note that typing does not seem to work in any dialogs except save game.
Using picotool
Picotool is a very handy complement to RP2040 and RP2350 devices for interacting with devices in BOOTSEL mode (i.e. after holding BOOT while powering on)
You can find the source and build instructions here
You can backup your whole badge flash by doing
picotool save -a all_flash.bin
picotool verify all_flash.bin
you can then load it back later via:
picotool load all_flash.bin
Or
picotool load --family absolute all_flash.bin
If picotool complains based on what is in your flash already
Files
doom1_full.uf2 - this is a UF2 which includes both the code and the WAD in one
You can load it with picotool
or by drag/drop
picotool load -vx doom1_full.uf2
Note you can use picotool info
to see what is on your device
$ picotool info
Program Information
name: doom_tiny
features: WHX at 0x10040000
I2C multi-player
UART stdin / stdout
binary start: 0x10000000
binary end: 0x1003dc38
target chip: RP2350
image type: ARM Secure