TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

RP2040 Doom

447 pointsby xkriva11about 3 years ago

24 comments

gchadwickabout 3 years ago
Awesome! A huge amount of work must have gone into this.<p>I did some playing around with VGA graphics from the Pico when it first came out (wrote a simple library to produce SNES like graphics, wrote it all up on my blog <a href="https:&#x2F;&#x2F;gregchadwick.co.uk&#x2F;blog&#x2F;playing-with-the-pico-pt6&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gregchadwick.co.uk&#x2F;blog&#x2F;playing-with-the-pico-pt6&#x2F;</a>). It felt like Doom should be doable but I figured you&#x27;d need an off chip RAM expansion interfaced via the PIO. Clearly not.<p>The Pico really is a very fun board to play around with. Could be a great target for a retro style mini console thing.
评论 #30676880 未加载
评论 #30681803 未加载
评论 #30682673 未加载
评论 #30732574 未加载
WithinReasonabout 3 years ago
This thing even has networked multiplayer! In about 256K of RAM and 2MB flash! (It&#x27;s the Raspberry Pi Pico board)<p>Carmack would be proud!
评论 #30676458 未加载
评论 #30678072 未加载
Cthulhu_about 3 years ago
That&#x27;s cool, it&#x27;s Doom in a completely self-contained cartridge size. Would it be possible to just hook up a cartridge like this to a monitor (through e.g. usb-c) directly?<p>Also if the RP2040 is just $1, does this mean we should be able to get e.g. Doom on cheap handheld single-game devices like the old Game &amp; Watch and similar machines? I remember spending hours on these &quot;racing games&quot; or 12-in-1 Tetris LCD machines from the toy shop. How much does a small (2-4&quot;) color OLED or backlit LCD cost these days? Actually, what is the cheap handheld market looking like these days? I had a boggle at the local toy shop&#x27;s website, VTech is still going for it but mainly with baby toys it seems, and those Tetris handhelds are still the same from 20-30 years ago, they cost just €3,99 these days. I&#x27;m also seeing some products from a company called Wonky Toys, and miniature Atari arcade cabinets.
评论 #30733823 未加载
AlotOfReadingabout 3 years ago
What a coincidence, I was working on porting doom to the e-ink badger2040 last week. Getting doom to fit into memory was fairly straightforward, but they did a better job than me. I&#x27;m very impressed they got the original WADs and networking going as well. Great work!
评论 #30676945 未加载
pflanzeabout 3 years ago
This is impressive.<p>I&#x27;m wondering about a few things:<p>- &quot;I decided to leave the XIP cache to do its thing, and select a few small areas of hot code or data to promote to RAM manually&quot;[1]: I understood this as you leaving the XIP cache activated. But this seems at odds with &quot;16K of flash XIP cache, that we’ve talked about, but decided not to use.&quot;[also 1], which I&#x27;m interpreting as &quot;decided not to make use of the XIP cache (i.e. turn it off)&quot; (maybe I&#x27;m misreading).<p>- I thought ARM32 has 12(-14) usable registers (compared to 14-15 in x86-64), so why these mentions of &quot;scarce Cortex-M0+ registers&quot;? (Does FIQ mode reduce the number of usable registers?)<p>- &quot;not good on a Cortex M0+ where the overhead of a function call is generally 30-40 cycles, with the corresponding loss of most of your precious “in-register” state&quot;: are function calls <i>disproportionally</i> slower on Cortex M0+? (Certainly 30-40 cycles seems high.) Why is that? (Registers r4-r11 are callee-saved[2], thus not lost; mutable data might have to be re-read from memory, though--just like on other architectures, but maybe CPU caches are faster on those.)<p>- &quot;These OR values can be stored in a lookup table indexed by higher bits in the sample position, and thus the 8x space savings can be realized without needing any branches in the code!&quot;[3]: Cortex-M0+ has a 2-stage pipeline[4], I&#x27;d hence expect the cost of a jump to be just 1 additional cycle, for the re-processing of the 1st stage for the next instruction (maybe I&#x27;m wrong), which would be the same as a memory access. (Maybe multiple jumps can be saved this way, though.) Did measurements show the lookup table to be faster?<p>[1] <a href="https:&#x2F;&#x2F;kilograham.github.io&#x2F;rp2040-doom&#x2F;speed_and_ram.html" rel="nofollow">https:&#x2F;&#x2F;kilograham.github.io&#x2F;rp2040-doom&#x2F;speed_and_ram.html</a> [2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Calling_convention#ARM_(A32)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Calling_convention#ARM_(A32)</a> [3] <a href="https:&#x2F;&#x2F;kilograham.github.io&#x2F;rp2040-doom&#x2F;sound.html" rel="nofollow">https:&#x2F;&#x2F;kilograham.github.io&#x2F;rp2040-doom&#x2F;sound.html</a> [4] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cortex-M0%2B#Cortex-M0+" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Cortex-M0%2B#Cortex-M0+</a>
评论 #30683142 未加载
评论 #30682366 未加载
ogurechnyabout 3 years ago
&gt; You can refer to Doom Wiki - WAD section to get a bit more detail about the types of lumps mentioned below.<p>I just HAVE to nitpick on Fandom&#x2F;Wikia search term squatting. There is a real Doom Wiki at doomwiki.org.
chefandyabout 3 years ago
The Pi Pico reinvigorated my love of tinkering with electronics. I can hack my way through C on an Arduino (and would probably still use it for any serious deployment that I didn&#x27;t expect to turn into a big community effort) but for standing up quick proof of concepts, embedded python is outstanding. Incredible for $4.<p>These newer compatible boards being released are awesome.
评论 #30733904 未加载
ChuckMcMabout 3 years ago
Fun stuff, it always amazes me that people are surprised. Not having lived through it is a part of that I&#x27;m sure.<p>The RP2040 is more powerful than an 80286. The PC&#x2F;AT which was hugely more powerful than the original IBM PC (on which DOOM also ran). Put a keyboard, mouse, and an frame buffer on an STM32F4 or F7 and you&#x27;ve got the computational and capability equivalent of the PC&#x27;s that powered the world in 1985. People did accounting, CAD, spreadsheets, email, all sorts of things on them. Amazing I know, but here we are.
评论 #30681816 未加载
评论 #30678182 未加载
评论 #30678640 未加载
评论 #30678097 未加载
评论 #30681901 未加载
评论 #30679057 未加载
qwertoxabout 3 years ago
&gt; I2C networking for up to 4 players<p>How does one even get these ideas?
评论 #30679501 未加载
0desabout 3 years ago
Music and sound too???<p>...what am I doing with my life
anthkabout 3 years ago
Also, check fastdoom:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=EZvI8wCVOPU" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=EZvI8wCVOPU</a><p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Eh31az9epAo" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Eh31az9epAo</a>
vardumpabout 3 years ago
I&#x27;m speechless. That was... an impressive effort.
grymoire1about 3 years ago
Stacksmashing was able to get Doom running on an RP2040 with an LCD screen. I&#x27;d love to see it running on the Lily-GO board. <a href="https:&#x2F;&#x2F;usa.banggood.com&#x2F;LILYGO-TTGO-T-Display-RP2040-Raspberry-Pi-Module-1_14-inch-LCD-Development-Board-p-1915490.html?cur_warehouse=CN" rel="nofollow">https:&#x2F;&#x2F;usa.banggood.com&#x2F;LILYGO-TTGO-T-Display-RP2040-Raspbe...</a><p>It has two buttons built-in and support for LiPo batteries. It might be possible to make this a teeny-tiny handheld device.
randomuser13132about 3 years ago
This is really nice. Trying to port Doom to RP2040 was on my on my todo list, but all along I feared that the SRAM would simply not be sufficient for a port with authentic feel and original assets. I&#x27;m glad to be proven wrong. I wonder if DEH support is out of question.<p>I can&#x27;t wait to see what kind of a chip they make after the RP2040.
Narishmaabout 3 years ago
&gt; 320x200x60 VGA output (really 1280x1024x60).<p>The original game ran (if you had a fast enough PC) at 35 FPS on a 70 Hz display.
aaroninsfabout 3 years ago
&gt; RP2040 Doom supports up to four players in regular&#x2F;deathmatch mulit-player over a two wire I2C connection.<p>I thought I had done something worthwhile with I2C.<p>I was wrong, and I am a bad person.
miereabout 3 years ago
Just as a programming language must be turing-complete to be worthwhile, a new hardware must be doom-complete to be useful.<p>Edit: typo
mikewarotabout 3 years ago
Has anyone seen the schematic for this?<p>I&#x27;ve got some Raspberry Pi Picos, and would like to try it out.
评论 #30693648 未加载
anthkabout 3 years ago
I would love nethack&#x2F;slashem on this, but I think NH 3.4.3 needs 2MB of RAM at least.
1024coreabout 3 years ago
So I just got my hands on a couple of Picos. I was so excited to find a RPi board in stock, that I forgot to check if it has WiFi or not. I would like to run some form of OpenSprinkler on that (even if not OpenSprinkler, I can use cron jobs to control the sprinkler relays by hand).<p>Any tips on how to get WiFi working on Pico?
评论 #30682443 未加载
评论 #30682327 未加载
_joelabout 3 years ago
This is a work of art, I&#x27;ve learnt a lot reading this, thank you.
RF_Savageabout 3 years ago
Oh boy, that is really impressive.
IMSAI8080about 3 years ago
Wow. That&#x27;s just amazing work.
alexk307about 3 years ago
Well done!