/fgba

A Gameboy Advance (gba) emulator on fpga

Primary LanguageVerilog

fgba

This projects is a homework for the course "Digital circuits", and is stopped because the course ended.

Fgba intends to create a Gameboy Advance (gba) emulator on an fpga board. It includes an armv4t CPU, various modules on the gba, and outputs through VGA on the left top corner of a screen.

Environments & Language

  • Intel cyclone V, 5CSXFC6D6F31C6
  • Quartus v17.1 lite
  • Verilog HDL

Status

Module Status
CPU architecture done
ARM instruction set only SWI left.
Thumb instruction set only SWI left.
Memory ROM done,copied from http://vba-m.com/
Internal Working RAM done
External Working RAM done
Palette RAM done. But object is not yet implemented
VRAM done
OAM not started
Game Pak currently using on chip memory, which has only 140kb left. SDRAM could be used to achieve a full 32Mb Game Pak
Image System mode 0 not started
mode 1 not started
mode 2 not started
mode 3 done
mode 4 done
mode 5 not started
Object not started
Window not started
Rotating/Scaling not started
others Sound not started
Timer done
DMA not started
Key Input done
Interrupt Control not started
Communication all not started

Usage

compile

Just open the project using the Quartus software. If you wish to use other environments, it woild be easy to use our code either.

transfer your program to fgba through uart

An usb to ttl cable may be needed to connect your computer and fgba. To send data to fgba, please connect tx on the cable to gpio[8] on the fpga, and connect gnd on the cable to ground (which is the pin below gpio[9]) on the fpga. Now sending data from the computer through serial may cause LED on fpga to flash. LED[7:0] actually indicates the xor of all data received.

To transfer the program, please turn on SW[0] while pressing KEY[0] (which serves as the RESET key). Then fgba turns into a mode where he stores all data received to the Game Pak. Your program/data should be sent through serial port in little endian.

Others

putc

putc function could be used for debugging. To use putc, please connect rx on your serial cable to gpio[9] on the fpga, as well as gnd on the cable to ground on fpga. Then you would be able to run /tests/uart2pc, which sends a Hello, World through serial to your computer.