GBEmu 0.0.2 Released

I have released the next version of GBEmu, 0.0.2 on GitHub and Handmade Network.  The major change in this release contains support for a configuration file, called config.txt.   This includes support for non-English keyboards as well.  This file currently supports custom keyboard and gamepad mappings, and controlling the size of the screen.  The final config.txt syntax is very similar to the syntax I posted in my previous post.  The main difference is now you can put more than one config value on one line.  In addition the macOS and Windows executables now have icons.

Screenshot of a portion of config.txt with US Keyboard:

Screen Shot 2018-10-29 at 6.53.45 PM

Screeshot of a portion of config.txt with Hebrew Keyboard:

Screen Shot 2018-10-29 at 6.52.12 PM

Now for the unfortunate part: I disabled VSync on Mac. The reason for this is while working on this release, macOS Mojave was released, which contained deprecation of OpenGL. This broke GBEmu’s rendering interface, SDL, in many ways. GBEmu would show up with a black screen and so I decided to wait for fixes for SDL before releasing this update.

Even with SDL fixes coming in, there was still a persistent black screen in the ROM debugger. This was due to the fact I was rendering the debugger on a different thread since all GBEmu windows are VSynced and OpenGL on Mojave doesn’t seem to like that.

“Conveniently”, I learned that VSync on OpenGL in Mojave is completely broken anyway and, so, I decided to take the easy way out and disable VSync on Mac. I hope to re-enable VSync when either SDL gets their Metal backend working, or I manually render in Metal myself.  VSync still works perfectly fine in Windows and Linux.

As always, comments and questions are welcomed and encouraged.  Feel free to post below in the comments or on


The Config File

The next update incoming for GBEmu is support for a configuration file. The file will be called “config.txt” and will live at the root of the GBEmu home folder. Initially, config.txt will support 3 things:

  1. Custom keyboard mappings of GBEmu functionality (Game Boy controls, Mute, etc).
  2. Custom controller mappings of GBEmu functionality (Game Boy controls, Mute, etc).
  3. The scale of the Game Boy screen.

The idea is to have a clearly readable and editable config file.  I arrived at a simple case-insensitive key-value syntax of the form:

<GameBoy button or option to set> = <the value>.

E.g. to assign the up button on the Game Boy to the W key, the config line would read:

Up = Key W

One thing to note is that the syntax is case insensitive.  In addition, if a config.txt file does not exist in the GBEmu home directory, a default one is generated for you with default key bindings.  And then from there, you can change the bindings as you wish.

Here is a sample of what the default keyboard bindings config.txt would look like:

Screen Shot 2018-09-10 at 2.25.51 PM.png

Of course, as time goes on, more options will be supported by config.txt. If anyone has any comments or questions, I’d love to hear them.  I hope to wrap this up soon and work on the next feature (TBD) for GBEmu!



Hey everyone! Now that I have finally released the first version of my Game Boy emulator, GBEmu, I have decided to start blogging my ideas and design decisions that will go into this project. This blog won’t strictly be for GBEmu, but it will be for the time being. My first post will be about the next non-trivial feature I am working on which is support for a config file, so stay tuned!