(Translated by https://www.hiragana.jp/)
Game Boy - 8BC Chiptune Wiki
The Wayback Machine - https://web.archive.org/web/20080221140919/http://8bitcollective.com:80/wiki/index.php?title=Game_Boy

Game Boy

From 8BC Chiptune Wiki

Jump to: navigation, search

This article is about the first generation of Game Boys, using the GB-Z80 CPU. Note that some information applies to some Game Boy Advance models as well, due to backwards compatibility. For specific information about the Game Boy Advance family of handhelds, see the Game Boy Advance article.

This page is under construction

Contents

[edit] Technical Details

[edit] At a glance

The Nintendo Game Boy is a console based around the 8-bit CPU Sharp LR35902, more commonly referred to as GB-Z80, clocked at ~4 MHz (DMG) or ~8 MHz (GBC). It has a 4 channel sound chip, with 2 square waves, one channel with a user defined waveform which can be also used for sample playback, and a unique noise channel. The screen is 160*144 pixels big and has a color depth of 2 bits, meaning 4 grayscales (Monochrome models) or a 56 color palette of colors from a total of 32768 colors. (GBC models)

[edit] The CPU

The Game Boy's CPU is an 8-bit CPU similar to the Zilog Z80. Some things have been added, some things have been taken away. (Most notably there are no index or shadow registers) It is clocked at 4.194304 Mhz. This number may seem odd, but it is in fact not. Looking at it in hexadecimal, it makes sense, the clock speed is exactly 0x400000 Hzへるつ. Because of the CPU works, every opcode consumes a number of cycles which is a multiple of 4. Therefor it is fair to say that the actual speed of the CPU is 1 MHz (Because the CPU can execute about one million NOP instructions or similar every second) For the Game Boy Color, these figures are doubled. (Assuming that it runs in double speed mode, which is selected by software) For a deep plunge into the Game Boy's hardware, refer to [Pandocs]

[edit] Sound

[edit] The channels

This is the most interesting section for us musicians. ;) The Game Boy family has five channels.

  • Two quadrangular channels. (Aka square wave or pulse wave) Both these channels have a volume envelope, a 4 mode pulse width (12.5%, 25%, 50% and 75%) and a frequency register that ranges from the note C-3 to above what human being can hear. The first pulse channel additionally has a frequency envelope which can be used for things like portamento, special effects or drum synthesis.
  • One wave channel with user-definable waveform. This channel has a bank of 32 samples of 4-bit depth. When used with a wave form, this channel can play notes one octave lower than the pulse channel, IE down to C-2. It can also play back samples by writing a wave sample to its register, one bank at a time.
  • One pseudo-random noise channel. The noise channel is probably the most unique channel the Game Boy has to offer. Apart from white and brown noise, this channel can produce noise with a much more melodic character. More information about how the noise is generated is available in the [Lord Nightmare's Comprehensive GB sound document].
  • One external sound channel. This is the fifth and least known channel of the Game Boy. It's an analogue input that allow external synthesis on cartridge to be mixed with the rest of the sound. To this date, no cartridges are known to use this functionality. However one freeware games uses the residual voltage on the pin to create a wave sound by quickly turning the channel on and off.

[edit] Differences and Inconsistencies Between Models

[edit] Noise levels and signal quality

All different Game Boy models sound different because of the dsign of the circuits. Herbert Weixelbaum has taken the time to compare different models. The full report is available here: [Game Boy Sound Comparison]

[edit] GBC Phase Inversion

The sound circuit of Game Boy Color is designed in such a way that the PU2 channel plays phase inverted compared to PU1. This may make some compositions meant for older models sound dramatically different on Game Boy Color. (And vice versa)

[edit] SGB Pitch Change

Becuase the Super Game Boy is using a different CPU clock frequency, which is slightly higher than that of DMG's, the sound will play at approximately a 2.4% higher pitch. This makes the sound out of tune compared to other insturments. This "bug" can be fixed by using a different sound frequency table if an SGB model is detected. LSDj incorporates such a fix.

[edit] GBA Sample Playback Bug

All Game Boy models suffer from a bug when playing back samples where there's a small voltage spike between the wave frames. This causes a tonal component in the samples. This usually is quite unnoticable. However, the GBA additionaly has a hardware bug where thi effect is accentuated, making sample playback almost unbearable without a bug fix.

[edit] Game Boy Models

Although some Gameboy Advance models are able to run GB-Z80 software, these are covered separately in the Game Boy Advance article.

[edit] DMG-01 (Game Boy)

The DMG-01 is the first and most classic Game Boy model. Although it exists in numerous case colors, it is commonly called the "Grey brick" due to the original and most common color. Note that the correct model number is DMG-01 rather than DMG-001 which is seen in some places. It runs on 4 AA batteries.

[edit] MGB-001 (Game Boy Pocket)

The Game Boy Pocket sports a significantly smaller size than the original Game Boy. It runs on 2 AAA batteries, and is known to have some power problems.

[edit] MGB-101 (Game Boy Light)

The Game Boy Light is a slightly larger variant of the Game Boy Pocket which features an 'indiglo' style backlit screen. It was only released in Japan/China.

With the backlit screen off the sound quality is comparable to the Game Boy Pocket. With the light on the machine gives out a noticable 'whine' due to power consumption.

[edit] CGB-001 (Game Boy Color)

The Game Boy Color was the first Game Boy model to have multi-color display. It can display a palette of 56 colors from a total of 32768. The CPU also has a double speed mode where it runs at ~8 MHz. It runs on 2 AA batteries.

[edit] Music Creation Software

[edit] Music Software With Players

These programs come with a separate player. They're useful for embedding in games and demos.

[edit] Stand-alone Music Software

These programs come as stand-alone programs. They're suitable for performing musicians, and have special funcitonality as such.

[edit] Game Boy Camera

Nintendo's Game Boy Camera has a "DJ mode," with which songs can be recorded and played. It can only store one song at a time, but the Game Boy Printer can print out a map of the song.

[edit] Backup Methods

[edit] Cartridge Writers

These can be used to back up Game Boy cartridges, and also to write programs such as the above to flash cartridges.

[edit] Memory Cards

These can be used to back up the save files in Game Boy games and programs, such as the Game Boy Camera.

[edit] External Links