/gameboy-experiments

Experiments in Gameboy development.

Primary LanguageAssembly

gameboy-experiments

Experiments in Gameboy development.

Development environment

Much of the documentation for Gameboy development assumes running on Windows - often an older version like 2k or XP. All my development is being done on macOS 10.12.x, and as a result it took a bit of time to figure out what tools are the most modern but also Unix-friendly.

  • Emulator: BGB. Windows-only binaries, but runs perfectly using Wine. I recommend installing via the installer packages provided on the WineHQ website instead of via a package manager like MacPorts - I had issues doing it that way.
  • Assembling/linking: RGBDS - I'll also be giving Wiz a try.
    • Possibly ASMotor because "ASMotor is the spiritual successor to RGBDS, which was a fairly popular development package for the Gameboy. ASMotor is written by the original RGBDS author." Manual is offline because Google Code no longer exists, but can be found in this repo in the docs folder.
    • gbdk-n. I'll be writing examples using this in C at first. I intend to transition to using RGBDS and assembly primarily, but to begin C will save me a lot of headache.
  • Art: Gameboy Tile Designer for 8x8 or 8x16 sprites/tiles. Gameboy Map Builder for background and game maps. Allows us to create maps up to 1024x1024 made up of tiles created by GBTD. Both of these are Windows-only but work perfectly in Wine.

Learning resources

There's quite a bit of info for Gameboy development. Here I'll be listing resources I found particularly useful for programming using RGBDS/Wiz.

  • The Ultimate Gameboy Talk from the 33rd Chaos Communication Congress.
  • The latest Pan Doc aka, "Everything you always wanted to know about Gameboy but were afraid to ask." In-depth technical specifications of the system.
  • Gameboy Dev's ASM School. Collection of absolute beginner tutorials using RGBDS. Unfortunately, it is incomplete. Provides a good amount of background information on the system and some very initial programming.
  • Wichita State University's ECE 238 course page. Course in assembly taught using Gameboy programming. Surprisingly excellent resource.
  • Assembly Digest. Collection of tutorials on GB development. Haven't looked at this thoroughly yet.
  • Marat Fayzullin's GameBoy Homepage. Includes lots of technical information about the Gameboy I'm assuming he compiled while writing an emulator for it. Also check out his guide on writing emulators.
  • US Patent 5184830 for some architecture and video hardware info.
  • US Patent 5095798 for sound system info.

Open-source examples

GBDK + C

RGBDS + ASM

Closed(?) source examples

Use mgbdis to disassemble these.

Other

Listing of other tools/resources that might be helpful.

  • Link dump From #gbdev on efnet.
  • Awesome Game Boy Development. Basically a larger, better version of this document :)
  • GBT Player. Used for sound/music composition for use with RGBDS.
  • "Successor" to Lemon Player. Both GBT and Lemon require music in MOD format to convert to GBDK/RGBDS, so I'll probably be using MilkyTracker.
  • Brew tool - Might be useful, in particular the map tool. Can feed it an image and have tilesets be generated.