Skip to content

A Pi emulating a GameBoy sounds cheap. What about an FPGA?

License

Notifications You must be signed in to change notification settings

congyong/VerilogBoy

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

VerilogBoy

Coding for fun - the hard way. Trying to implement a Game Boyยฎ compatible machine with Verilog.

This project consists of two parts:

  • An open source Game Boyยฎ compatible console Verilog RTL implementation (the VerilogBoy Core)
  • An open source FPGA-based handheld game console hardware (the VerilogBoy Handheld, or vbh for short.)

Both are hosted in this repository.

VerilogBoy Core

System Architecture

The main system architecture is designed as follows (outdated):

Architecture

There are three major parts needs to be implemented: the Game Boy CPU (8-bit CISC Processor called SM83, Intel 8080 like), the PPU (Pixel Processing Unit), and the sound unit (sometimes referred as a PSG, Programmable Sound Generator). Several interfacing modules are needed to support the IO capability provided by the specific hardware (FPGA development board or "VerilogBoy Handheld").

Targets (Ports)

Current Pano Logic G1 is the only supported platform. ML505 and VBH support are planned.

Progress

Refactoring in progress. Current version could run several commerical games with no noticable glitch on the Pano Logic G1 device. 'Master' branch contains the previous version that runs on the ML505.

  • SM83 CPU (Refactoring stage 1 done, passes all Blargg's tests)
  • PPU (Pixel Processing Unit, Pixel-FIFO architecture)
  • OAMDMA (Object Attribute Memory DMA)
  • PSG (Programmable Sound Generator)
  • Timer
  • Link (Dummy link module, allows some games to run in single player mode)

Next step would be improving the accuracy.

Photo of VerilogBoy on Pano G1 running open source GameBoy game Tobu Tobu Girl:

Running-on-PanoG1

For progress regarding different ports, view README.md under the specific target folder.

Accuracy

This project is not built to be entirely accurate, but built with accuracy in mind. Most of the CPU timing should follow the original DMG-CPU, and implement a rudimentary 2-stage pipelining just as the original one does.

Here are the results of several tests I have tried to run on it.

PPU implementation is ... wrong: There are two pipelines in the GameBoy PPU, one for BG and one for sprite. I only implemented one for both. There is only one fetcher, though.

Note: Tests which depends on the revision / model of GameBoy are omitted. VerilogBoy only focus on behaviors that are common among all monochrome GameBoys (GS).

Blargg's tests

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
cpu instrs ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

Notes: other tests hasn't been tried.

Mooneye GB acceptance tests

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
add sp e timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
call timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
call timing2 ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
call cc_timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
call cc_timing2 ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
di timing GS ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
div timing ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
ei sequence ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘
ei timing ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
halt ime0 ei ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
halt ime0 nointr_timing ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ
halt ime1 timing ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
halt ime1 timing2 GS ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ
if ie registers ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ
intr timing ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ
jp timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
jp cc timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
ld hl sp e timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
oam dma_restart ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
oam dma start ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
oam dma timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
pop timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
push timing ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
rapid di ei ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
ret timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
ret cc timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
reti timing ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
reti intr timing ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
rst timing ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

Instructions

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
daa ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

Interrupt handling

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
ie push ๐Ÿ‘ โŒ โŒ โŒ โŒ ๐Ÿ‘

OAM DMA

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
basic ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
reg_read ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘
sources dmgABCmgbS ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ โŒ โŒ

Serial

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
boot sclk align dmgABCmgb โŒ ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘

Note: this test only seems to test the time to finish the first transfer. What about the second? (Delta time required to do a transfer and get notified by the interrupt)

PPU

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
hblank ly scx timing GS ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ โŒ
intr 1 2 timing GS ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ
intr 2 0 timing ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ โŒ
intr 2 mode0 timing ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ โŒ
intr 2 mode3 timing ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ โŒ
intr 2 oam ok timing ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ โŒ
intr 2 mode0 timing sprites โŒ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ โŒ
lcdon timing dmgABCmgbS โŒ ๐Ÿ‘ โŒ โŒ โŒ โŒ
lcdon write timing GS โŒ ๐Ÿ‘ โŒ โŒ โŒ โŒ
stat irq blocking โŒ ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ โŒ
stat lyc onoff โŒ ๐Ÿ‘ โŒ โŒ โŒ โŒ
vblank stat intr GS ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ โŒ

Timer

Test mooneye-gb BGB Gambatte Higan MESS VerilogBoy
div write ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
rapid toggle ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘
tim00 div trigger ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘
tim00 ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
tim01 div trigger ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘
tim01 ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
tim10 div trigger ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘
tim10 ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
tim11 div trigger ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘
tim11 ๐Ÿ‘ ๐Ÿ‘ โŒ ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘
tima reload ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘
tima write reloading ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘
tma write reloading ๐Ÿ‘ ๐Ÿ‘ โŒ โŒ ๐Ÿ‘ ๐Ÿ‘

Directory Structure

Note: things that will be removed in the near future may not shown here. Not all source files are shown here.

.
โ”œโ”€โ”€ doc                          -- Documents
โ”‚ย ย  โ”œโ”€โ”€ control_unit.ods           -- CPU control unit LUT
โ”‚ย ย  โ”œโ”€โ”€ cpu_internal.md            -- CPU internal signal encoding
โ”‚ย ย  โ””โ”€โ”€ cpu.md                     -- CPU design note
โ”œโ”€โ”€ hardware                     -- Hardware source files for VBH
โ”‚ย ย  โ””โ”€โ”€ 3d_models                  -- 3D Model in SolidWorks
โ”œโ”€โ”€ LICENSE                        -- OHDL for VerilogBoy Core
โ”œโ”€โ”€ Makefile                     -- Toplevel Makefile
โ”œโ”€โ”€ README.md                    -- This document
โ”œโ”€โ”€ roms                         -- Place for platform independent ROMs
โ”‚ย ย  โ”œโ”€โ”€ bootrom.s                  -- VBC Boot ROM
โ”‚ย ย  โ”œโ”€โ”€ Makefile                   -- Makefile for building the Boot ROM
โ”‚ย ย  โ””โ”€โ”€ tests                      -- Unit tests
โ”‚ย ย   ย ย  โ”œโ”€โ”€ compare.sh               -- Script for comparing results between VBC and emulator
โ”‚ย ย   ย ย  โ”œโ”€โ”€ dmg_emu.exe              -- Reference emulator
โ”‚ย ย   ย ย  โ””โ”€โ”€ Makefile                 -- Makefile for running tests
โ”œโ”€โ”€ rtl                          -- VBC RTL files
โ”‚ย ย  โ”œโ”€โ”€ alu.v                      -- ALU
โ”‚ย ย  โ”œโ”€โ”€ boy.v                      -- VerilogBoy portable top level file
โ”‚ย ย  โ”œโ”€โ”€ brom.v                     -- Boot ROM
โ”‚ย ย  โ”œโ”€โ”€ common.v                   -- Common definitions
โ”‚ย ย  โ”œโ”€โ”€ control.v                  -- Control Unit
โ”‚ย ย  โ”œโ”€โ”€ cpu.v                      -- CPU top level
โ”‚ย ย  โ”œโ”€โ”€ dma.v                      -- OAM DMA
โ”‚ย ย  โ”œโ”€โ”€ Makefile                   -- Makefile for building the VBC using Verilator
โ”‚ย ย  โ”œโ”€โ”€ mbc5.v                     -- Cartridge paging, optional
โ”‚ย ย  โ”œโ”€โ”€ ppu.v                      -- Pixel Processing Unit
โ”‚ย ย  โ”œโ”€โ”€ regfile.v                  -- CPU Register file
โ”‚ย ย  โ”œโ”€โ”€ singleport_ram.v           -- Singleport RAM template
โ”‚ย ย  โ”œโ”€โ”€ singlereg.v                -- Singlebit register template
โ”‚ย ย  โ””โ”€โ”€ timer.v                    -- Timer
โ”œโ”€โ”€ sim                          -- Simualtion
โ”‚ย ย  โ””โ”€โ”€ verilator                  -- Verilator-based simulator 
โ”‚ย ย      โ”œโ”€โ”€ dispsim.cpp              -- LCD simulator based on SDL 2.0
โ”‚ย ย      โ”œโ”€โ”€ Makefile                 -- Makefile for building the simulator
โ”‚ย ย      โ”œโ”€โ”€ memsim.cpp               -- Boot ROM or Game ROM simulator
โ”‚ย ย      โ”œโ”€โ”€ mmrprobe.cpp             -- Unit for dumping memory or MMR accesses
โ”‚ย ย      โ””โ”€โ”€ vb_sim.cpp               -- Simulator main file
โ”œโ”€โ”€ target                       -- Targets (ports) of VBC
โ”‚ย ย  โ”œโ”€โ”€ panog1                     -- Pano Logic G1 devices
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ fpga                     -- FPGA RTL
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ dualport_ram.v         -- Template of dual port RAM
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ idt_clkgen.v           -- Code for interfacing with clock generator
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mig                    -- LPDDR memory controller
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mig_picorv_bridge.v    -- Bridge for connecting PicoRV32 and LPDDR controller
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mig.ucf                -- Timing constraint for memory controller
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mobile_ddr.v           -- Simulation model for LPDDR
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ panog1.xise            -- ISE project file
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ pano_top.v             -- Top level HDL
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ pano.ucf               -- Main pin location constraint
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ picorv32.v             -- PicoRV32 RISC-V softcore
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ picosoc_mem.v          -- PicoRV32 scratchpad memory
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ simple_uart.v          -- Simple UART transmitter 
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ testbench.v            -- Testbench with LPDDR model
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ usb_picorv_bridge.v    -- Bridge for connecting PicoRV32 and USB controller
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ vga_font.v             -- VGA font ROM
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ vga_mixer.v            -- Mixing PicoRV32 and VerilogBoy image
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ vga_timing.v           -- VGA timing generator
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ fw                       -- Firmware for RV softcore
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ bootloader             -- Bootloader for loading firmware from SPI Flash
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ bootloader.c         -- Main source code
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ Makefile             -- Makefile for building the bootloader
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ sections_bl.lds      -- Link script
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ start_bl.s           -- Startup code
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ dhrystone              -- Dhrystone test for RV softcore
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ firmware               -- Firmware for softcore
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ COPYING              -- GPLv2 License for firmware
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ firmware.c           -- Main source code 
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ isp1760.c            -- ISP1760 HCD
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ isp_roothub.h        -- RootHub emulation for HCD (optional)
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ Makefile             -- Makefile for building the firmware
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ misc.c               -- Delay and other common routines
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ sections.lds         -- Link script
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ syscalls.c           -- Syscalls for the newlib
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ term.c               -- Simple virtual terminal
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ usb.c                -- Host USB stack
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ usb_gamepad.c        -- Generic USB HIB gamepad driver
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ usb_storage.c        -- USB mass storage driver
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ README.md              -- README about firmware
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ README.md                -- README about Pano Logic G1 port
โ”‚ย ย  โ””โ”€โ”€ vbh                        -- VerilogBoy Handheld
โ”‚ย ย      โ”œโ”€โ”€ fpga                     -- FPGA RTL
โ”‚ย ย      โ””โ”€โ”€ fw                       -- Firmware for on-board MCU
โ””โ”€โ”€ tools                        -- Tools for building things
    โ”œโ”€โ”€ bin2mif                    -- Convert binary blob to mif
    โ””โ”€โ”€ vga_timing.xlsx            -- Tool for calculating VGA timing

How to use

Verilator-based simulator

Tested environment: Ubuntu 18.04.2 LTS.

Dependencies: build-essential, verilator, libsdl2-dev, wine(for unit test only, for now), rgbds(not available from apt, need build manually).

On Debian/ Ubuntu, do the following:

sudo apt install build-essential verilator libsdl2-dev wine byacc flex pkg-config libpng-dev
git clone https://github.com/rednex/rgbds
cd rgbds
make
make install

Build

At project directory:

make

Copy the bootrom.mif to where it is required. (For example, target/panog1)

Running unit-tests

At project directory:

cd roms/tests
make
./compare.sh

Please be aware currently tests are broken... (Difference in PC counting)

Running ROMs

At project directory:

./sim/verilator/vb_sim <path_to_your_rom.gb> --nostop

Few parameters:

--nostop: Don't stop execution at halt/stop (but stop at illegal instructions)
--trace: Generate vcd waveform trace
--testmode: Disable internal Boot ROM, headless mode, limit cycles to 32K.
--noboot: Disable internal Boot ROM, code execution starts at 0x0000 rather than 0x0100.
--verbose: Enable debug output

FPGA targets

See README inside target directory.

VerilogBoy Handheld

VerilogBoy Handheld is an open source FPGA-based handheld game console. All design sources of the VerilogBoy Handheld are hosted in this repository.

Hardware-Architecture

Note: the architecture is subject to change.

  • FPGA: Xilinxยฎ Spartanยฎ-6 XC6SLX16
  • RAM: Using on-board PSRAM for VRAM/WRAM
  • ROM: Using on-board PSRAM for game cartridge emulation
  • Video output: 1.54" MIPI-DSI 320x320 IPS TFT-LCD
  • Audio output: On-board I2S codec (WM8960)

Photo of the Rev. 0.2 prototype:

Running-on-VBH

Acknowledge

This project reused codes from several other projects. A great thanks to their efforts!

These projects are used as references. Again, thanks for sharing.

These are extremely helpful resources about the Game Boyยฎ itself:

Game used for demonstration, thanks for the great game:

Legalese

I'm not affiliated with Nintendo in any way. Game Boyยฎ is a registered trademark by Nintendo. Nintendoยฎ is a registered trademark. All other trademarks are property of their respective owner.

License

The dsicore is made by twlostow, released under LGPL 3.0.

The PicoRV32 is free and open hardware licensed under the ISC license (a license that is similar in terms to the MIT license or the 2-clause BSD license).

Some firmware code of pano-g1 target are released to public domain.

All other software codes are licensed under GNU GPL 2.0.

All other HDL codes are licensed under OHDL 1.0.

All other text documents are licensed under CC BY-SA 4.0

About

A Pi emulating a GameBoy sounds cheap. What about an FPGA?

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Verilog 44.5%
  • C 35.0%
  • Coq 12.1%
  • VHDL 3.2%
  • Assembly 2.3%
  • C++ 1.7%
  • Other 1.2%