Giter Club home page Giter Club logo

pokegb's Introduction

pokegb

A gameboy emulator that only plays Pokemon Blue, in ~50 lines of c++.

See the technical write-up.

Features

Plays Pokemon Blue (and Red).

Screenshots

1 2 3 4 5 6 7 8 9 10 11

Source Code

Building

Only builds on Linux and macOS AFAIK.

$ make

On macOS, you'll need to create a save file too (just the first time):

$ make rom.sav

Running

Get a Pokemon Blue (or Pokemon Red) ROM file. The files that are known to work have the following sha1s:

Name sha1
Pokemon - Blue Version (USA, Europe) (SGB Enhanced).gb d7037c83e1ae5b39bde3c30787637ba1d4c48ce2
Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb ea9bcae617fdf159b045185467ae58b2e4a48b9a

Others might work too, but these are the ones that I've tried.

Rename the file to rom.gb and put it in the current directory. Then run:

$ ./pokegb

The save file is written to rom.sav.

Keys:

Action Key
DPAD-UP
DPAD-DOWN
DPAD-LEFT
DPAD-RIGHT
B Z
A X
START Enter
SELECT Tab

Updating keys

Look for line 24 the source. The following table shows which numbers map to which keyboard keys:

number default key gameboy button
27 X A Button
29 Z B Button
43 Tab Select Button
40 Return Start Button
79 Arrow Right DPAD Right
80 Arrow Left DPAD Left
81 Arrow Down DPAD Down
82 Arrow Up DPAD Up

Replace the numbers on this line with one from the SDL scancode list.

pokegb's People

Contributors

binji avatar horki avatar

Watchers

James Cloos avatar  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.