This is a Gameboy Cart Reader for the Atmel Atmega 32 Microcontroller. Possibilities: -Readouts of: -RAM -ROM -RTC -Writing to RAM https://phenomic.net
 
 
 
 
Go to file
PHENOM bf8e7707c6
git.phenomic.net/Gameboy-Color-Cart-Reader/develop This commit looks good Details
git.phenomic.net/Gameboy-Color-Cart-Reader/master This commit looks good Details
Added missing Schematic
2019-05-01 17:41:01 +02:00
.vscode Added basic Go Client, implemented serial command protocol, added writing to cartridges 2019-04-30 23:43:20 +02:00
Game-Boy-Cartreader-Client Added CommandWriter to handle the Protocol, created SerialConnection Wrapper 2019-05-01 07:14:26 +02:00
Game-Boy-Cartreader-Firmware Added basic Go Client, implemented serial command protocol, added writing to cartridges 2019-04-30 23:43:20 +02:00
eagle Added Circuit Board 2019-05-01 17:26:10 +02:00
images Added Circuit Board 2019-05-01 17:26:10 +02:00
.gitignore Added basic Go Client, implemented serial command protocol, added writing to cartridges 2019-04-30 23:43:20 +02:00
Game-Boy-Cartreader-Firmware.atsln Added basic Go Client, implemented serial command protocol, added writing to cartridges 2019-04-30 23:43:20 +02:00
Jenkinsfile Added basic Go Client, implemented serial command protocol, added writing to cartridges 2019-04-30 23:43:20 +02:00
LICENSE Added basic Go Client, implemented serial command protocol, added writing to cartridges 2019-04-30 23:43:20 +02:00
README.md Added missing Schematic 2019-05-01 17:41:01 +02:00

README.md

Game Boy Cartreader & -Writer

Build StatusBuild Status FirmwareBuild Status Windows

This is a Game Boy Cartreader and -Writer for the Atmel AVR ATmega32 Microcontroller. It is able to read ROM, RAM Saves and the RTC Registers on Game Boy Cartridges. It also is able to write to the RTC Registers and RAM Saves.

Go to the Repository

Image of Cartreader

Table of Contents

Motivation

I started this project in 2014 and working on it further and overhauling it an will be used in combination with the Game Boy Emulator.

Circuit board

Schematic

Schematic

Board with Parts

Board with Parts

Board ready for Print

This Board can be printed out. The image has a DPI of 600. Afterwards you need to connect wire bridges, as shown in the top image with the red lines (Top Layer connections).Board ready for print

EAGLE

The schematic- and board layout project files are located in the ./eagle directory. The project files can be opened with Cadsoft EAGLE or Autodesk EAGLE.

Getting Started

Required Hardware

  • AVR ISP Programmer (In-System-Programmer) to program the Microcontroller
  • Game Boy Cartreader & -Writer Circuit Board
  • USB 2.0 Cable Type B for the Cartreader

Prerequisites

In order to use this project you need to have all the required Hardware and have either AVR Toolchain installed for 8-Bit Controllers or use AtmelStudio to compile the project. Afterwards you want to use a Flashing tool such as avrdude to write the firmware on the controller. You also need to have the Go Binaries installed and having set the $GOPATH environment variable to your Go workspace.

Compiling the Firmware

sudo apt-get install gcc-avr avr-libc
cd Game-Boy-Cartreader-Firmware
make

Flashing the Firmware

sudo apt-get install avrdude
cd Game-Boy-Cartreader-Firmware

# Writing the Firmware
avrdude -c <programmer> -P <port> -p m32 -U flash:w:game-boy-cartreader-firmware.hex
avrdude -c <programmer> -P <port> -p m32 -U eeprom:w:game-boy-cartreader-firmware_eeprom.hex

# Setting the fuses
avrdude -c <programmer> -P <port> -p m32 -U hfuse:w:0xC1:m
avrdude -c <programmer> -P <port> -p m32 -U lfuse:w:0xFF:m

If you need a comprehensive guide on how to use avrdude please take a look here.

Installation of the Client

Currently only Windows is supported. Cross-Platform support will follow.

# Clone Project and receive dependencies
go get git.phenomic.net/phenom/gameboy-color-cart-reader/...

# Install Client
cd $GOPATH/src/git.phenomic.net/phenom/gameboy-color-cart-reader
go install ./...

Usage

Serial Commandlist

This describes the Protocol being used for Communication over the serial line. When rebooting the device the Baudrate is set to 9600 Symbols per second on reset.

+---------+-----------------------------------+-------------------------------------------------------------------------------+
| Command | Parameter List (Length Name, ...) |                                  Description                                  |
+---------+-----------------------------------+-------------------------------------------------------------------------------+
| 0x00    | -                                 | Trigger CPU Reset and print READY(0x52 0x45 0x41 0x44 0x59) after back Online |
| 0x01    | 0x04 Baudrate                     | Set Baudrate (Initially 9600)                                                 |
| 0x02    | -                                 | Reset Memory Banking Controller and print OK (0x4F 0x4B) after done           |
| 0x03    | 0x02 Address                      | Read Byte from Address                                                        |
| 0x04    | 0x02 Address, 0x01 Value          | Write Byte on Address                                                         |
| 0x05    | 0x02 Address, 0x02 Length         | Read n Bytes from Address to (Address + Length)                               |
| 0x06    | 0x02 Address, 0x02 Length         | Writes n Bytes from Serial from Address to (Address + Length)                 |
| 0x07    | 0x01 Value                        | Selftest: Returns the Value over Serial                                       |
+---------+-----------------------------------+-------------------------------------------------------------------------------+

Go Cartreader Client

TODO: This will describe how to use the Client for the Cartreader device.

Dependencies

Game Boy Documentation used

License

Distributed under the MIT License. See LICENSE for more information.