GithubHelp home page GithubHelp logo

malax / elmboy Goto Github PK

View Code? Open in Web Editor NEW
310.0 5.0 8.0 2.21 MB

A Nintendo™ Game Boy™ Emulator written in Elm.

Home Page: https://malax.github.io/elmboy

License: GNU Affero General Public License v3.0

Elm 97.71% HTML 0.12% JavaScript 0.99% SCSS 1.18%
gameboy emulator functional-programming elm gameboy-emulator

elmboy's Introduction

Elmboy Build Status

A Nintendo™ Game Boy™ Emulator written in Elm.

Tetris Title Screen The Legend of Zelda: Link's Awakening Title Screen Pokemon Red Title Screen Kirby's Dreamland Title Screen Super Mario Land Title Screen Tetris Gameplay The Legend of Zelda: Link's Awakening Gameplay Pokemon Red Gameplay Kirby's Dreamland Gameplay Super Mario Land Gameplay

You can try it out here, it works best in Google Chrome. The page also provides you with links to legal homebrew ROMs you can use to test Elmboy.

Some games are playable, but the emulator is not yet very accurate. Expect bugs and non-working games.

Talk Recordings and Podcasts

Since the release of Elmboy, I gave a couple of talks and appeared in a podcast where I talk about this project. If you want to learn more, those resources are your best bet.

Why Elm?

You might think that Elm is a weird technology choice for writing an Emulator, and rightfully so. Emulators are highly stateful programs and their state changes a lot and very fast. With Elm being a purely-functional language everything has to be immutable and state must to be passed around the program. Additionally, running in the browser has its own set of issues, especially in the performance department.

So why Elm then? I wanted to start a non-trivial side-project in Elm. At that point it was not even decided what it would be, but it ended up being a Game Boy emulator. I wanted to push me and Elm to the limits, and this project has definitely done that 😄.

It will never be as performant or accurate as other Game Boy emulators out there that are written in lower level languages, but this is not what this project strives to be. If you are looking for a serious emulator, I can recommend SameBoy or Gambatte.

Performance

In its current state, some games, especially earlier ones, run at their native speed of ~60 frames per second on Chrome. This is on my MacBook Pro (Mid 2015, 2.5 GHz Intel Core i7, 16 GB RAM), running Chrome 69.0.3497.100. Performance in other browsers is worse, Chrome seems to have a better performing JIT compiler for this project. I want to further improve performance in the future, also on other browers.

Project Goals

This is mainly for my own entertainment, education and challenge. It's a non-trivial problem to solve, I love retro games and have a some sort of emotional connection to the Game Boy. There are hundreds of Game Boy emulators out there, but there wasn't one for Elm yet. And as I love Elm very much, this was the perfect side-project for me. Also, I think it's pretty cool!

One goal I have is staying true to Elm. As little JavaScript as possible and nice functional code all around. Sadly, I had to compromise on the nice functional code in some cases due to performance issues, but I want to re-introduce some abstractions and nicer types again as the core performance issues are ironed out and there might be some breathing room to put them back in.

Non-Goals

  • Achieving a very high degree of emulation accuracy
  • Becoming a "serious" emulator that can used by Homebrew developers and/or speed runners
  • Debugging capabilities
  • Game Boy Color support

Building

Run npm install to produce an optimised build in the dist folder. For development, run npm start to spawn a HMR development server.

elmboy's People

Contributors

dependabot[bot] avatar malax avatar ursi 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

elmboy's Issues

Pass Blargg's Test Roms

  • 01-special.gb
  • 02-interrupts.gb
  • 03-op sp,hl.gb
  • 04-op r,imm.gb
  • 05-op rp.gb
  • 06-ld r,r.gb
  • 07-jr,jp,call,ret,rst.gb
  • 08-misc instrs.gb
  • 09-op r,r.gb
  • 10-bit ops.gb
  • 11-op a,(hl).gb

Hello!

Hello!

Just wanted to reach out, I also make GB emulators, I've been working wasmBoy for a while now.

I just wanted to mention there's a really good GB communitty at awesome-gbdev. We have a discord, and chat a lot about internals and other random GB stuff. I don't lurk there as often as I should, but definitely a great resource and awesome people to chat with.

Also, if you need any help with things like implementing Sound, or GBC. Feel free to reach out, glad to answer any questions. I've played with elm a tiny bit, but nothing on this scale haha!

Have a nice day! 😄

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.