Quake on an FPGA (MRISC32 CPU) [video]
Quake has been ported to run on a custom MRISC32 softcore CPU implemented in an FPGA, impressing many with how smoothly a 1990s 3D game can perform on fully homebrew hardware, toolchain and ISA. Commenters use it as a springboard to explore dreams of “Quake-specific” hardware, the limits of FPGAs for general-purpose computing, and the role of open-source tools like Yosys and F4PGA in making such projects more accessible. The thread also dives deep into CPU microarchitecture — from vector-first designs to modern x86 and ARM pipelines — to examine how instruction sets, branch prediction, and code density affect performance on projects like this.
Project Overview & Clarifications
- The demo is Quake’s original software renderer running on a custom 32‑bit MRISC32 softcore CPU in an FPGA, not a pure “all-logic” Quake implementation.
- The author uses Quake as a realistic benchmark to tune cache, branch predictor, and overall CPU design.
- On a Cyclone V board it runs around 40 FPS at 320×180 upscaled to 1080p, with a proper FPU and ~110 MHz clock (timing margins are “overclocked” beyond formal closure).
Hardware vs. Software Implementations of Classic Games
- Several commenters fantasize about Quake-specific hardware implemented entirely in FPGA logic, running at extreme frame rates.
- Others note that full hardware implementations of large, general-purpose games are unrealistic; softcores plus accelerators or custom instructions are more plausible.
- Historical context: early arcade games and some consoles used mostly discrete or analog hardware; fully digital GPU-style architectures became dominant much later.
FPGA Tooling and Ecosystem
- Tooling is widely criticized (e.g., vendor IDEs); seen as a key barrier to broader FPGA use.
- Open-source efforts mentioned: Yosys, F4PGA/SymbiFlow, Verilator. These are promising but considered less mature than mainstream compiler stacks.
Custom GPUs and Related Projects
- Several related FPGA graphics projects are cited:
- A Quake level viewer and tiny Quake renderer on very small FPGAs.
- A mid‑90s‑style custom FPGA GPU that runs Quake via a Vulkan‑like API.
- A “Doom chip” and other tiny GPU experiments.
- There is interest in combining custom CPUs and GPUs on the same FPGA or via PCIe, though hardware and board design complexity are noted.
MRISC32 ISA, Vectors, and Microarchitecture
- MRISC32 is a “vector‑first” RISC-style ISA with simple hardware vectors that work well for Quake/Doom rasterization loops.
- Current vector use is hand‑written assembly; compiler auto‑vectorization support is still missing.
- Discussion dives into pipeline design, branch prediction strategies, and how branch delay slots compare to modern predictors.
RISC vs. CISC and GBOoO Debate
- Long subthread debates:
- How modern x86 cores internally translate complex instructions into micro-ops.
- Whether they should be seen as “load/store RISC under the hood” or as a separate class (“great big out‑of‑order” designs).
- Tradeoffs in code density, uop cache size, instruction decoding complexity, and power efficiency across x86, AArch64, and RISC‑V.
- Consensus: front-end complexity and uop caches are a major “x86 tax,” but all high‑performance cores, regardless of ISA, now converge on similar large out‑of‑order microarchitectures.
Display, Resolution, and Retro Aesthetics
- Some prefer low‑resolution Quake on CRTs, arguing that analog smoothing and brain “fill‑in” made games feel better than today’s sharp LCD scaling.
- The demo renders at low res, then scales with nearest neighbor to 1080p, producing very sharp pixels; opinions differ on whether additional smoothing would be desirable.
Practical Getting-Started Advice
- For FPGA newcomers, advice is to:
- Buy a cheap FPGA dev board and start experimenting.
- Use Verilator for simulation once designs grow.
- Browse community resources (e.g., FPGA-focused forums/subreddits) for board and tutorial recommendations.
Miscellaneous
- Some side discussion on blocking intrusive “Sign in with Google” popups; uBlock Origin with “annoyances” filters is reported to help.