/VerilogBoy

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

Primary LanguageAssemblyOtherNOASSERTION

VerilogBoy

Coding for fun - the hard way. Trying to implement a Game Boy® compatible machine with Verilog. It was my course final project for CMPEN275 (Digital Design Laboratory) at PSU. I am trying to keep it well commented and documented.

Goals of the project

This project aims to recreate the whole Game Boy gaming system on an FPGA development board, with the ability to play commercial game like The Legend of Zelda with no major glitches.

To be specific, it should be able to run the unmodified Game Boy machine code, produce gray-scale graphics and output to an external monitor, produce the sound and output to the 3.5mm jack on the FPGA board, and accept user input to control the game. Other functionalities like serial communication and IR communication are currently not part of this project.

System Architecture

The main system architecture is designed as follows:

Architecture

There are three major parts needs to be implemented: the Game Boy CPU (8-bit CISC Processor, Intel 8080 like), the PPU (or GPU), the Sound unit. Several interfacing modules are needed to support the IO capability provided by the FPGA development board. Game ROM would be stored in on-board NOR flash, and RAM would be implemented with on-chip Block RAM.

Hardware

Currently targeting on Xilinx ML505/XUPV5 and Terasic DE10-Lite. A dedicated handheld is in developement.

Progress

Refactoring in progress. Previous version could run The Legend of Zelda: Link's Awakening and Pokemon Yellow with no noticable glitch. See 'master' branch for previous version, at least for now.

GameBoy Related:

  • CPU <- Refactor in progress
  • PPU
  • Sound
  • Timer
  • Link
  • Keypad

Board Related:

  • DVI Interface
  • AC'97 Interface
  • Cartridge (Emulated with FlashROM)
  • Controller Interface

Accuracy

This project is NOT built to be cycle exact accurate. I did run some test on previous version, see the old readme.

How to use

See INSTALL.md

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.

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 Game Boy® boot ROM code is copyrighted material and intellectual properity of Nintendo®. It is provided solely for educational purpose only.

All other software codes are licensed under MPL 2.0.

All other HDL codes are licensed under OHDL 1.0.

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