GithubHelp home page GithubHelp logo

blazer82 / gb.teensy Goto Github PK

View Code? Open in Web Editor NEW
116.0 11.0 6.0 17.52 MB

Gameboy emulator for the Teensy 4.1 microcontroller

License: GNU General Public License v3.0

C++ 98.94% Shell 0.53% C 0.52%
emulator arduino gameboy

gb.teensy's Introduction

Teensy Gameboy

build-badge cpu-instrs-badge

This is a work-in-progress Gameboy emulator for the Teensy platform. It requires some custom hardware and wiring in order to work properly.

Breadboard Gameboy

Features

  • Runs Tetris
  • Passes Blargg's CPU instruction tests
  • Audio output (4 separate channels)

Dependencies

The project uses a Teensy 4.1 as its main processing unit and storage device (SD card).

The FT81x Arduino Driver is used as a display system.

Additional wiring is required for audio output and button input.

Wiring

Display

For display wiring please refer to this guide for the FT81x Arduino Driver.

Buttons

Button wiring is straight forward and doesn't require any pull-up resistors:

Button Wiring

Audio

For proper audio output some filter and amplifier circuitry is required:

Audio Wiring

Tip: Audio output is most authentic with a Gameboy replacement speaker.

Running and Loading a Game

Game ROMs are not included with this repository and have to be provided via SD card! Make sure the SD card is formatted using the FAT32 filesystem using Master Boot Record partitioning style. File names should follow the 8.3 MS-DOS style.

As of now, the ROM to be loaded has to be specified inside src/main.cpp, e.g:

Cartridge::begin("tetris.gb");

Contributing

Any contribution is welcome! Please have a look at open issues and pull requests or create your own.

Credits

Substantial contributions have been made by:

The code builds upon the following libraries:

gb.teensy's People

Contributors

blazer82 avatar grantbreaksthings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gb.teensy's Issues

Power consumption?

Hi,
really interesting project. May I ask how much power the breadboard version consumes?
With the original gameboy I was able to play around a day. How long would it be with this setup?

Create SD Card Menu

Create an SD card menu to browse ROM files. Preferably with some kind of memory to remember the last loaded ROM, so the menu doesn’t have to be the first thing the user sees.

Document Wiring

For better reproducibility document the wiring especially for buttons and sound output.

Implement Background Tile Map Switching

There are two different tile maps that can store tile data. Currently, the emulator is assuming that all tile data is coming from the first tile map (MEM_VRAM_MAP1). It does not check to see if the game is requesting the second tile map (MEM_VRAM_MAP2)

Fix Sound-Related Lags

Sporadically, the execution of the ROM hangs for a brief amount of time. The issue has appeared with changes to the APU and is most likely related with the hardware timers.

Game and music running, but no display

Hi, so I tried the project with your ft81x-driver pcb, the same display and your code and made a custom pcb for wiring and the audio. My problem is, that the game is running with sound (I can also hear feedback when I press the buttons), but I can't see anything on the display. Communication with the FT812-Chip seems fine, it is responsive. The all pixels on command directly to the display-controller is also working. I've also reassembled the ft81x-pcb multiple times.
It seems to be a problem in the connection between the ft812 and the display controller.
Has anyone had this problem?

Fix Noise Issue During Quiet Parts of Tetris

When entering a quiet part of the Tetris Game (e.g. after no activity on the start screen) all sounds stop as expected with each channel becoming noisy again after a short amount of time.

Add Support for Cartridges

Add support for more cartridge types, possibly with ROM loading from external storage.

--> Merge (and maybe adapt) #1

Control emulation speed

Hi @blazer82 ,

first of all thanks for the great work!
I've rebuilt it a bit and use it with a 4 "TFT touchscreen. Depending on how I configure it, I have speeds of around 30% above and below 100%. Therefore, I suspect that somewhere there is a constant factor for reducing the speed is. Can you tell me where?

Thanks very much!

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.