|
1 year ago | |
---|---|---|
.vscode | 1 year ago | |
Game-Boy-Cartreader-Client | 1 year ago | |
Game-Boy-Cartreader-Firmware | 1 year ago | |
eagle | 1 year ago | |
images | 1 year ago | |
.gitignore | 1 year ago | |
Game-Boy-Cartreader-Firmware.atsln | 1 year ago | |
Jenkinsfile | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago |
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.
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.
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).
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.
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.
sudo apt-get install gcc-avr avr-libc
cd Game-Boy-Cartreader-Firmware
make
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.
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 ./...
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 |
+---------+-----------------------------------+-------------------------------------------------------------------------------+
TODO: This will describe how to use the Client for the Cartreader device.
Distributed under the MIT License. See LICENSE
for more information.