Coder Social home page Coder Social logo

hackinvent / stm32f_gbcart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dhole/stm32f_gbcart

0.0 2.0 0.0 1.47 MB

Game Boy Cartridge emulation from a stm32f4 Development Board

License: Mozilla Public License 2.0

Makefile 4.02% Python 5.58% C 73.63% C++ 16.76%

stm32f_gbcart's Introduction

stm32f_GBCart

Game Boy Cartridge emulation from a stm32f4 Development Board

I wrote about this project in my blog:

Description

This project implements the emulation of a gameboy cartridge using a stm32f4 Development Board. A real gameboy can be connected to a stm32f4 running this software and load real roms as well as homebrew roms.

  • ROM Only and MBC1 Cartridges are implemented. See a full list at:
  • RAM emulation implemented. The contents will be erased upon powering off the stm32f4
  • Custom boot logo implemented. It will be shown only during the first boot.

ROMs

In order to use a rom in the code, the file must be converted into a C array:

cp Tetris.gb rom.gb
xxd -i rom.gb | sed 's/unsigned/unsigned const/g' > tetris_rom.h
rm rom.gb

Files

main.c: Main Program body.

Initialization of the GPIOs.

stm32f4xx_it.c: Interrupt handlers.

The interrupt handler for the rising flag trigger is defined here. It handles the read and write operations of the gameboy to the cartridge.

Custom logo

draw_logo.py: Draws a logo on a window

Requieres pygame

make_logo.py: Converts a png logo image into a binary file to be used as a boot logo

Requieres pygame

./make_logo.py dhole_logo2.png dhole_logo2.bin
cp dhole_logo2.bin logo.bin
xxd -i logo.bin > dhole2_logo.h
rm logo.bin

Issues

If some games don't run, or you get crashes at some points, it may be a timming issue (the timmings are very tight, and I believe they may need to be different on different hardware revisions). You can try goebish's branch which modifies the number of NOPs in the code.

stm32f_gbcart's People

Contributors

dhole avatar

Watchers

HackInvent avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.