Getting Started with Doom on your badge
See The README for the latest info and more instructions including multiplayer wiring
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_v1.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
Note that the badge speaker seems to distort really easily, so I have the sound turned way down for now, this is probably good
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)
- Muliplayer via I2C (at least with 2 players, should work with up to 4) - see README for wiring
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 way to enter cheats
Things that might work:
- The end sequence (easier to test when I have added cheats)
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) during game
Button | Behavior |
---|---|
FN+Start | Show / Hide Map |
FN+Select | Press Select in rapid succession with FN down to press 1 then 2 then 3 etc. to select weapons |
FN+Left / Right / Up / Down / A / B | Strafe |
Note when FN is pressed, An FPS indicator is also shown
Button behavior in menus
Button | Behavior |
---|---|
A | Menu Back or 'N' (No) |
B | Menu Fowrard/Select or 'Y' (Yes) |
Button behavior when typing
Button | Behavior |
---|---|
Up/Down | Cycle through letters/space |
Left | Backspace |
Right | Select letter |
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_v1.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_v1.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: 0x1003d92c
target chip: RP2350
image type: ARM Secure