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!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s