Article History
 
 
 

8364 views
40% Savestate

GameBoy (format)
 

Nintendo Gameboy
token - gameboy

points - Chipist

file types - .gbs .sav .mp3

max filesize - 10mb

description - (no standard file format for gameboy composition software)  
::|CONTENTS
  1. Specifications
  2. Modifications
  3. More on sound
  4. Programming
  5. Tools of the Trade
The GameBoy is a hand-held game console developed and manufactured by Nintendo and was first released in 1989. It uses a 4 grey scale LCD display and an extended 8080 CPU, taking inspiration from the Z80, but also adding its own instructions not seen in either.

The sound card has 2 pulse wave channels, the first with an additional sliding effect, a 32-sample 4-bit Freewave PCM channel and a noise channel. The speaker is mono but stereo is available through headphones.

ROM cartridges varied in size from 256kbit to 32Mbit.

The GameBoy remains the most successful hand-held console in history and came originally bundled with the famous Tetris puzzle game.

Specifications



CPU
4.19MHz custom 8-bit core along the lines of the Intel 8080 and the Zilog Z80.
RAM
8KB
Video RAM
8KB
Display
160 x 144 pixels
Frame Rate
59.73 frames per second
Color Palette
4 (off and LCD intensity levels 1-3)
Sound
2 pulse waves, 1 4-bit PCM wave, 1 white noise, and an audio input for ROM use.

The Game Boy Color has 32KB of RAM and 16KB of VRAM, both implemented via bankswitching. It has a colour gamut of 32768 colours (5:5:5 RGB) but the scale is NONLINEAR (half-way is still quite bright).

The GBC also has a facility for ROM/RAM-to-VRAM DMA transfers (as well as the ROM/RAM-to-OAM DMA facility) and the CPU has a double-speed mode.

GameBoys can also communicated via built-in serial ports. The connector type of this unique cable is not generally manufactured.

Modifications



...changing the hardware of the Gameboy
Pro Audio, overclocking, underclocking, midi control . . .

Someone might want to mention Prosound here.

More on sound




(basically just deriving from pandocs here though some stuff is from memory)

The Game Boy has stereo sound with 4 channels built in, plus an extra pin on the cartridge for sound expansion. The panning is quite coarse: you have 3-bit master volumes for the left and right channels, and you can set each of the 4 channels (plus the external channel) to go either on the left, the right, both, or neither.

There are two channels for pulse waves (channels 1 and 2), each with a selectable duty from {12.5%, 25%, 50%, 75%}, just like the NES. Both channels have a 4-bit volume level, hardware volume slide ("sweep"), an optional note cutoff length, and an 11 bit period, each. The first pulse channel also has a note slide ("tone sweep"). These are most likely not completely necessary, but could simplify some things.

The Game Boy also has a wave channel (channel 3) with a 16-byte / 32-sample, 4-bit user-definable waveform. This also has an 11-bit period and a note cutoff length, but only 4 volume settings: 100%, 50%, 25%, and off - the volume settings are simply right-shifts of the sample data, and will probably make it sound quite bad. You WILL need to turn the channel off BEFORE you write to the wave data, and RESTART the channel afterwards!

Finally, there is a noise channel. It uses at least the equivalent of a Fibonacci LFSR with taps on the bottom two bits - the length of the LFSR can be either 15 bits or 7 bits (user-selected). There are 128 period values that can be used (16 * 8), although as expected there is some overlap. This has 4-bit volume plus a volume envelope and a note cutoff length.

See pandocs (listed below) for more information.

Programming



Gameboy Development Kit
on sourceforge and a quick tutorial
.
Some of you may prefer to use WLA-DX
as an assembler, which also contains Z80 and 6502 compilers along with a few others.

There are some very good docs known as the pandocs
. You must have that stupid Nintendo logo in your ROM, though, otherwise your code won't run on the real thing!

Tools of the Trade



LSDj
: Little Sound Dj is by far the most popular and widely known way of producing music for the Gameboy.

LSDj is a native tracker that you can either run within an emulator, or on the Gameboy hardware given you have a cartridge loader with LSDj on it. It boasts many features like having various sampled drum-sets, speech synthesis, and synchronization between two Gameboys for double teh awesomeness! \o/ ... but of course double Gameboy isn't allowed in the Gameboy format, just one!

Tutorials
Nullsleep LSDJ Tutorial: Video Guide

Beginner Tutorials - Little Sound Dj Wiki


===========================================

XPMCK
: XPMCK is an MML compiler capable of generating Gameboy .gbs sound files (among many others).

If you're not familiar with MML, it's a way to type out music through specific, written notations. It's got a bit of a learning curve, and can sometimes be buggy, but some prefer it to running a native tracker within the Gameboy.

Manual
XPMCK - Cross Platform Music Compiler Kit


===========================================

DefleMask
: DefleMask is a multi-platform tracker that targets various platforms, similar to XPMCK... except it's a tracker!

DefleMask's stability is often questioned... but once you know the ropes, you can navigate and work the program with little to no problem! It can export .gbs files as of a recent update, making it a more sought-after platform to create Gameboy tunes with.

Tutorials
DefleMask Tracker - Tutorial 1: Basics - YouTube

DefleMask Manual


===========================================

GameBoy Music Compiler
: GBMC is yet another MML compiler, written for the Windows operating system.

GBMC is the preferred MML compiler for Gameboy tunes due to its ease of compiling .gbs files (and .gb + .gbc files too) without the need for extra files and programs. The catch though... the manual is written in Japanese! However, Savestate's Winter Chip X entry has comments outlining the basic use of GBMC. The link to the MML is in the comments thread.

===========================================

FT-NSF2GBS
: FT-NSF2GBS is a Lua script that simply converts any Famitracker-generated NSF to a .gbs file, verbatim, as long as it uses one Namco N163 channel. Best for people who pretend that they can make music for two systems without having to learn another new tracker/compiler... right?