I built a RISC-V emulator that runs DOOM
Details
- External ID
- 47996055
- Source
- HN
- Company
- —
- Product
- I built a RISC-V emulator that runs DOOM
- Website domain
- github.com
- Launched
- May 3, 2026
- Cohort
- —
- Upvotes
- 50
- Upvotes percentile
- 0.8408723747980614
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:26 p.m.
- Updated at
- Sept. 7, 2026, 9:26 p.m.
Description
Demo: https://www.youtube.com/watch?v=f5uygzEmdLwHi HN,I built a RISC-V emulator that implements the RV32IM instruction set and a minimal syscall interface to run DOOM. A few weeks ago, I got my first output with a simple hello world assembly program.Since then I have been working tirelessly to get DOOM to run.I needed to figure out how to run C programs first, and came across newlib, which allows the underlying environment to implement the syscall stubs one by one until the programs run.I have also added ELF loading, but currently only a single `PT_LOAD` segment is supported.To port DOOM, I used doomgeneric, which was quite convenient to get working once the required stubs were in place.DOOM renders to a fixed area in memory (0x705FDD = VRAM_START): 0x7FFFFF +-------------------------------------+ | | | QUEUE_SIZE (32 bytes) | | | 0x7FFFDF +-------------------------------------+ <-- QUEUE_START 0x7FFFDE | QUEUE_READ_IDX | 0x7FFFDD | QUEUE_WRITE_IDX | +-------------------------------------+ | | | | | VRAM (1,024,000 bytes) | | | | | 0x705FDD +-------------------------------------+ <-- STACK_START | Stack | | | | | v | | | | ^ | | | | | Program data + Heap | | | 0x000000 +-------------------------------------+ I made a small linker script so that the entry point of a C program is at _start and virtual address is always 0. That kept the ELF loader code simple.Inputs are written to the queue by rvcore which are then intercepted by DOOM running inside it.
Enrichment
- Theme
- lightweight and on-device AI runtimes
- Vertical
- Horizontal
- Function
- Dev tools
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Hobby / open-source project
- Normalized one-liner
- risc-v emulator that runs doom
- Manually corrected
- False
Could you build this?
No Developing a functional RISC-V CPU emulator (RV32IM instruction set) capable of executing Doom requires detailed computer architecture knowledge, instruction decoding, memory virtualization, and OS syscall emulation.
What it would actually take: The engine requires an accurate RISC-V instruction decoder and ALU implementing RV32I and the 'M' extension (hardware multiplication/division), virtual memory and address translation, and an integrated system call emulation layer (POSIX open, read, write, mmap). It also needs a minimal frame buffer driver (e.g., using SDL2 or WebAssembly/Canvas) to handle Doom's video memory and input event loops. Expertise in CPU architectures, compiler ABIs, and emulator development is necessary.
Discussion
4 comments analyzed.
Competitors
Other products that read as similar to this one — 158 launches clear the similarity bar, closest 8 shown.
Attention rank: #32 of 159 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 177 days after the earliest competitor.
- DOOM in the kernel, or fibers in eBPF · hn · 2026-09-09 · 53 upvotes · similarity 0.53
- KiDoom · hn · 2025-11-25 · 362 upvotes · similarity 0.51
- I wrote a DOOM clone in my own programming language · hn · 2026-04-28 · 34 upvotes · similarity 0.50
- iigs-doom · github · 2026-09-28 · 9 upvotes · similarity 0.48
- We attached vGPUs to sandboxed Chromium then played Doom 3 x WASM on it · hn · 2026-03-19 · 9 upvotes · similarity 0.47
- A6000-DOOM · github · 2026-09-10 · 9 upvotes · similarity 0.44
- Doom (1993) Playable in a GitHub Readme · hn · 2026-01-06 · 5 upvotes · similarity 0.43
- TTF-DOOM · hn · 2026-04-06 · 68 upvotes · similarity 0.43
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a dev tools tool for Sales yet.