logoalt Hacker News

Running Doom on Our Custom CPU and Going Viral

90 pointsby arghuntertoday at 3:54 AM20 commentsview on HN

Comments

_joeltoday at 12:15 PM

Cool, I thought this was a CPU custom designed for Doom, but I guess that's just a 486 :)

edit: I went to down a quick hole "The historical footnote is that a version of this genuinely happened. SNES Doom shipped with a Super FX 2 in the cartridge, a custom RISC chip with a pixel-plot instruction, because the console's own CPU had no chance. Jaguar and PlayStation ports both moved the rasteriser onto dedicated hardware. Doom's design was shaped by the absence of an FPU, and then hardware kept getting built to catch up with it."

Archit3chtoday at 10:23 AM

Reading "Custom CPU" I expected wafer.space, instead of FPGA.

show 1 reply
Flex247Atoday at 7:30 AM

Great work!

This reminded me of a project I built a while back: a RV32IM emulator in C++ that can boot and run DOOM. Initially I implemented only RV32I, and implementing the M extension provided a massive speedup!

If anyone's curious, here's the source code: https://github.com/lalitshankarch/rvcore

show 1 reply
paulmooreparkstoday at 7:34 AM

Very cool!

I just did the same thing, but for a byte-code interpreter for a completely novel ISA I made up a while back (with an assist from Claude). I just haven't made the HN post yet, since I'm doing a bit of cleanup.

https://github.com/paulmooreparks/Maize/

dmitrygrtoday at 5:19 AM

For anyone else curious: custom FPGA-based CPU code but not a custom architecture. This is an RV32I core. The article takes along time to give up this fact.

show 2 replies
terekhindctoday at 9:19 AM

why Zmmul and not full M — is it just fpga area, or did the doom port let you drop div/rem?

sweetjulytoday at 5:23 AM

Always a delight seeing Chisel in the wild :)

deton3991today at 11:54 AM

[dead]

huflungdungtoday at 9:44 AM

[dead]