Jasmine is a Game Boy emulator written in C++.
(all of these should be in the std
of any C++ compiler worth its salt):
fstream
iostream
string
cmath
Also, SDL2 is required for sound and graphics.
Makefile
to make compilation and testing easier- The Makefile commands only work in UNIX-like shells, so if you're using Windows, you don't need Makefile.
- g++ is used as the compiler. You can use any C++ compiler, but the Makefile's commands use g++.
Clone the repository, and enter its root folder. Type make
into the shell.
On Windows, compile the code using any compiler you like.
First, either put your own copy of the Game Boy BIOS in the bios
folder, or run tools/makebios.cpp
. If you used the Makefile, then this should have already been written for you. Otherwise, compile and run tools/makebios.cpp
in the repository's root directory.
Type in ./jasmine
(or the name of the EXE file you got when compiling in Windows) followed by your ROM name.
ROMs are copyrighted and illegal to share. Dump your own GB cartridges or download some ROMs at your own risk.
A display with the game you chose will appear.
WASD: Up, Left, Down, Right
K: A
L: B
Enter: START
Shift: SELECT
- Support for the following memory mappers (the links tell you which Game Boy games use which memory mappers):
- MBC1
- MBC1M support is undefined. I haven't implemented anything in the code for it in particular since I don't know how it works, but from what I can find, the difference between MBC1 and MBC1M is entirely in wiring and not via a different chip so it may work in theory. If you want to run a multi-game compilation with guaranteed success, make it MMM01 (see planned features) rather than MBC1M.
- MBC2
- MBC5
- MBC1
- Debugger
- DMG-style display
- Keyboard input
- MBC3 support. Many of my favorite GB games use an MBC3, so this is a must for me. Also, the implementation of an RTC sounds kind of fun.
- Sound because duh
- HuC1 support. Only 5 games, but they're all cool as heck. Bomberman? The Pokemon TCG games? Sign me up.
- MMM01 support. It should be easy enough because the MMM01 is just multiple MBC1s. However, considering that only 2 games use the MMM01 chip, it might not be worth the effort.
- M161 support may come in the future, but it's kind of unlikely since only one game uses an M161 chip. The reason I'm even considering it is because an M161 is just an MMM01 that's limited to 1 bankswitch.
- Game Boy Color support. It shouldn't be difficult considering that I got the base Game Boy working, and the Color only has a couple upgrades to that.
- MBC6 support. Only one game, Net de Get - Minigame @ 100, solely released in Japan, uses this chip. The game works by installing minigames from the Web using the Mobile Game Boy Adapter, whose servers shut down in 2002. Anyone who wants to actually play this game needs to use a time machine, because the effort doesn't justify the payoff in my eyes.
- MBC7 support. First off, only a couple games use it, so it's not like the populace is exactly clamoring for this feature. Secondly, every game that uses this mapper also uses an accelerometer, and this software doesn't have accelerometer support, since I am never porting it to a system that has an accelerometer.
- Wisdom Tree mapper support. These games are unlicensed and use a custom mapper. However, this mapper is extremely simple to implement, so I might implement it just for the fun of it.
- Linking between 2-4 instances of this program. Sorry Pokemon fans, use a different emulator instead.
- By extension, the Game Boy Printer will likely never be supported.
- Super Game Boy borders. Properly implementing this would basically require me to write a SNES emulator. If I ever do decide to do that, then I might implement this.
- Linking between 2-4 instances of this program running on different computers. I'm not hosting a server for that.
- Game Boy Camera, Tamagotchi, and HuC3 support. Lack of documentation :(
- Support for games that use a custom chip, other than Wisdom Tree games since they have an extremely simple mapper. This includes (but is not limited to) EMS and Bung games.
- Why on earth would you use a flash cart on an emulator? Use it on original hardware lol
- Rumble support. At least in the case of MBC6/7, I can implement the actual memory mapper and pat myself on the back. With this, there is nothing to do since I am not porting this to a system that has rumble.