Coder Social home page Coder Social logo

dmg-go's Introduction

DMG-go

DMG-go

Hi and welcome to the repo for my (still WIP) Gameboy DMG emulator written in go. This is a first attempt at systems stuff so it’s not the best and quite inaccurate but I hope this can serve as a good learning resource or smth for other people hoping to attempt the same thing.

NOTE - this was originally supposed to be a Gameboy Color emulator but I decided partway through to just focus on doing basic DMG emulation as CGB seemed to hard, however you may still find traces of GBC stuff in here

Screenshots

./Screenshots/kirby.png

./Screenshots/pokemon_yellow.png

./Screenshots/tetris.png

Keybinds

At the moment I don’t have custom keybinds done but it’s on my list, so these are the current keybinds

  • Up - Up arrow key
  • Down - Down arrow key
  • Left - Left arrow key
  • Right - Right arrow key
  • A button - Z
  • B button - X
  • Start button - A
  • Select button - S
  • Switch between palettes - R (kinda finicky and needs a bit of fixing)

Current features and TODO’s

  • [X] Functional (albeit inaccurate) CPU
  • [X] Working PPU (but needs fixing)
  • [X] Basic saving and loading
  • [ ] Audio
  • [ ] CGB support (probably unlikely)
  • [ ] Custom keybinds
  • [ ] Add more CLI flags
  • [ ] Refactor code a bit
  • [-] MBC support [4/5]
    • [X] MBC0
    • [X] MBC1
    • [ ] MBC2
    • [X] MBC3 (timer not implemented)
    • [X] MBC5

Resources and credits

I used a lot of resources and I also referenced some already existing gameboy/color emulators for inspiration and to get an idea of how they structured things and just kinda for help, below I will list some of these.

https://github.com/djhworld/gomeboycolor - this is another gameboy-color emulator written in go that I used as a reference point for a couple of parts of mine. It’s a very well made project and I thank the creator 🙏

https://gekkio.fi/files/gb-docs/gbctr.pdf - The gameboy technical reference. This one helped a lot with the creation of the CPU instruction functions as it helped me clearly see how some of the functions operated

https://gbdev.io/gb-opcodes//optables/ - This is one of quite a few tables that show all of the CPU instruction functions along with their OPCode and other stuff, this helped quite a lot with understanding the CPU instructions more as well

https://rylev.github.io/DMG-01/public/book/introduction.html - I didn’t end up following this one exactly but it was helpful as a baseline to help me understand the basics of emulating the system and served as a great entry point. Also really well written (even tho it uses rust 🤢)

https://gbdev.io/pandocs - The absolute beast, like 90% of the information I gained came from this, many places tell you to use this and I can see why. It’s amazingly written and while it can be a little bit confusing it’s amazing reference material

https://hacktix.github.io/GBEDG/ - Great for helping with quite a few things as it specified some things that are either vaguely described in the pandocs or just aren’t

dmg-go's People

Contributors

theornyx avatar

Watchers

 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.