RISCBoy is an open-source portable games console, designed from scratch
208 points
• 5 days ago
• Article
Link
RISCBoy 是一个从零开始打造的开源便携游戏机项目,设想如果在 2001 年就有 RISC-V 架构,掌机会是什么样子——可把它看作对 Gameboy Advance 的一种重构。项目覆盖完整的硬件栈:定制的 RISC-V 兼容 CPU 、光栅图形流水线、显示控制器,以及总线结构、内存控制器等必要的芯片基础设施。
硬件以可综合的 Verilog 2005 编写,目标器件为 iCE40-HX8k FPGA 。在该 FPGA 仅有 7680 个逻辑单元的资源约束下,设计必须经过高度优化,才能实现一个 32 位的游戏系统。集成处理器名为 Hazard5,支持 RV32IMC 指令集,已通过 RISC-V 合规测试套件并针对指令一致性进行了形式化属性检查。
仓库中还包含用 KiCad 设计的完整 PCB 布局,兼容常见的四层原型制造服务。项目结构对开发者友好:为硬件描述语言(HDL)模块、系统级软件测试、 FPGA 综合脚本和文档各自设立独立目录。 HDL 部分模块化良好,处理器、图形单元、内存控制器和外设驱动等都做成独立且易于管理的子模块。
开发流程基于开源工具链:用 Yosys 做综合、 nextpnr 做布局布线、 Project Icestorm 生成比特流。虽然以 iCE40 为主,项目也提供对 ECP5 FPGA 的实验性支持,允许采用不同的存储配置,例如用 ECP5 的内部系统内存块替代主要开发板上的外部 SRAM 。
为帮助他人构建或仿真系统,项目提供了配置交叉编译工具链和运行回归测试的详细说明。用户还可以用 Xilinx ISIM 等工具对网表进行仿真,以在投片到物理硬件前进行调试验证。作为一个完全开源且自包含的架构,RISCBoy 既是一台可实际运行的掌机,也是一套面向 FPGA 设计与 RISC-V 实现学习的完整教学资源。
RISCBoy is an ambitious, open-source portable game console project built entirely from scratch. The system functions like a reimagined Gameboy Advance, exploring what handheld gaming might have looked like if the RISC-V architecture had been available back in 2001. The project encompasses the complete stack of hardware design, featuring a custom RISC-V compatible CPU, a raster graphics pipeline, a display controller, and necessary chip infrastructure like bus fabrics and memory controllers.
The hardware design is written in synthesizable Verilog 2005 and is engineered to fit onto an iCE40-HX8k FPGA. Given the constraints of the FPGA's 7680 logic elements, the project requires highly optimized design choices to accommodate a 32-bit gaming system. The integrated processor, known as Hazard5, supports the RV32IMC instruction set and has been verified against the RISC-V compliance suite and various formal property checks for instruction consistency.
Beyond the core processor, the repository includes a complete PCB layout designed in KiCad, which is compatible with standard 4-layer prototyping services. The project structure is organized to support developers, with separate directories for hardware description language (HDL) components, system-level software tests, FPGA synthesis scripts, and documentation. The HDL section is particularly modular, housing the processor, graphics unit, memory controllers, and peripheral drivers in distinct, manageable sub-components.
Development for RISCBoy relies on an open-source toolchain, utilizing Yosys for synthesis, nextpnr for place and route, and Project Icestorm for bitstream generation. While the project is primarily developed for the iCE40, it also includes experimental support for the ECP5 FPGA platform. This flexibility allows for different memory configurations, such as leveraging internal ECP5 system memory blocks as an alternative to the external SRAM used in the primary development hardware.
To assist others in building or simulating the system, the project provides detailed instructions for configuring a cross-compilation toolchain and running regression tests. Users can simulate the gateware using tools like Xilinx ISIM to debug and verify the system before committing to physical hardware. By offering a fully open, self-contained architecture, RISCBoy serves both as a functional game console and as a comprehensive educational resource for those interested in FPGA design and RISC-V implementation.
35 comments • Comments Link
该项目用 RISC-V 替换原始硬件,重新构想了 Gameboy Advance 的架构,以向这款经典掌机致敬。
项目文档以专业、无表情符号的风格呈现,因而广受关注,许多人将其视为高质量、人工创作而非自动生成的证据。创作者是在 Raspberry Pi 任职的资深 ASIC 设计工程师,因参与 CPU 核心开发并创建 Hazard3 RISC-V 核心而知名。其技术文档详细描述了基于可编程扫描线缓冲区的渲染管线,受到对定制硬件设计感兴趣的读者高度评价。该设计属于 wafer.space 的首批生产批次,功能是否完善尚未得到证实。创作者此前的成果(如 PicoDVI)也体现了他在打造独特硬件接口方面的持续造诣。
值得指出的是,AHB 、 APB 等 AMBA 协议属于开放标准,这澄清了人们常把它们误认为是 ARM 专有技术的误解。对于软件策略,采用现成的开发流程(例如移植 GB Studio)被认为比强行在该设备上迁移臃肿的现代游戏引擎更为务实。在受限硬件上开发与现代计算不同:可以采用更简化的资源管理方式,例如静态内存分配和直接控制外设,而无需应对安全机制或操作系统开销带来的复杂性。由于硬件限制严格,在内存极小且无独立 GPU 的设备上运行现代游戏引擎从根本上不可行。
总体而言,该项目是复古游戏怀旧情绪与现代开源硬件工程之间一次引人注目的交汇。技术讨论凸显了人们对创作者工作的高度尊重,尤其是在 RISC-V 实现和定制渲染管线方面;讨论主要集中在硬件与软件整合的务实挑战上,既强调了早期主机开发的简约实用,也指出了将现代、资源密集型游戏引擎强行移植到此类受限平台的不可行性。 • The project reimagines the Gameboy Advance architecture by substituting the original hardware with RISC-V, framed as an homage to classic handheld technology.
• The project documentation is noted for its professional, emoji-free presentation, which some perceive as a signal of high-quality, human-authored content rather than automated output.
• The creator is an accomplished ASIC design engineer at Raspberry Pi, recognized for contributing to CPU core development and creating the Hazard3 RISC-V core.
• The technical documentation detailing the programmable scanline-buffer-based rendering pipeline is highly regarded by those interested in custom hardware design.
• The design was part of the inaugural wafer.space run, though its functional status remains unconfirmed.
• The creator's previous contributions, such as the PicoDVI project, demonstrate a sustained expertise in creating unique hardware interfaces.
• AMBA protocols like AHB and APB are open standards, dispelling the common misconception that they are proprietary to ARM.
• Adapting existing development workflows, such as porting GB Studio, is considered a more practical software path than attempting to force heavy, modern game engines onto the device.
• Developing for constrained hardware is distinct from modern computing, as it allows for simplified resource management like static memory allocation and direct peripheral control, free from the complexities of security or OS overhead.
• Running a modern game engine on hardware with minimal RAM and no dedicated GPU is fundamentally unfeasible due to strict hardware limitations.
This project serves as a compelling intersection of retro-gaming nostalgia and modern open-source hardware engineering. The technical discussion highlights the high level of respect for the creator's work, particularly regarding the RISC-V implementation and custom rendering pipelines. Much of the discourse focuses on the pragmatic challenges of hardware-software integration, contrasting the streamlined simplicity of early console development with the impracticality of applying modern, resource-heavy game engines to such limited platforms.