Show HN: Nandfs – A computer made of folders that runs DOOM github.com · 2 point...
Show HN @show
Show HN: Nandfs – A computer made of folders that runs DOOM github.com · 2 points · 0 comments · HN thread
TL;DR Nandfs is a project that builds a computer out of directories and symlinks: every NAND gate is a folder, every wire a symlink, and a FUSE filesystem simulates the logic. It runs a CHIP-8 that plays Pong in real time and a PicoRV32 RISC-V core that runs DOOM at a few minutes per frame. The thread has no comments yet, so no community reaction is recorded.
- Every NAND gate is a directory with symlinks a and b, and its out file reads NAND(a, b); flip-flops are similar folders with a symlink d and a q file.
- The CHIP-8 design is 327,027 NAND gates and 35,251 D flip-flops, including its 4 KB RAM, registers, timers and screen, and plays Pong in a terminal in real time.
- The RISC-V machine (PicoRV32 wrapper) has 22,677 NAND gates and 2,035 flip-flops, with 16 MB RAM kept as a special primitive; it runs DOOM at roughly 7,500 instructions/s, under three minutes per frame.
- You can inspect and break the running machine with ls, readlink, ln -sf and rm; removing a wire changes the game's behaviour, and restoring it repairs it.
- The daemon re-reads the whole tree after structural edits, so changes take a few seconds to apply; it is tested against reference models, and the author notes DOOM is not playable in any useful sense.
- Requires Linux (Debian/Ubuntu) or macOS with macFUSE; the first build takes about 10 seconds for synthesis plus about a minute to write 1.2 million folders, using around 3.3 GB.
Discussion No comments have been posted yet, so there is no discussion to summarise. The submission has 2 points.