15

The Nintendo Game Boy Advance had a Z80-like processor which was typically used for backwards compatibility with GB and GBC games. According to its Wikipedia page, an uncited comment claims that this CPU was also used by GBA games to supplement audio (emphasis mine):

Backward compatibility for Game Boy and Game Boy Color games is provided by a custom 4.194/8.388 MHz Z80-based coprocessor (Game Boy Advance software can use the audio tone generators to supplement the primary sound system), while a link port at the top of the unit allows it to be connected to other devices using a Game Link cable or GameCube link cable.

This brings up two questions:

  1. Is this true? Was the Z80 ever used by GBA games to supplement the audio?
  2. How did the Nintendo DS (which has no Z80) deal with this when running GBA games?
2
  • 3
    That sounds to me like it's just saying that the original sound hardware can supplement the new, which somebody has confusingly decided to place next to comments about the old CPU?
    – Tommy
    Commented Sep 15, 2018 at 18:12
  • 1
    I wonder if this misinformation is related to the Sega Genesis / Mega Drive, which did have a Z80 that was used for both backward compatibility (for Master System games) and for driving the sound chip.
    – Joe Sewell
    Commented Apr 15, 2022 at 14:08

3 Answers 3

16

The Wikipedia comment is misleading. The Game Boy CPU has several components in one chip, including the Z80-alike CPU core and a sound generator among others. These components may all be in the same chip but they are functionally independent; you don't need the Z80 CPU to be able to produce audio.

The Nintendo DS inherited the Game Boy sound generator circuitry and dropped the Z80 and other associated components. This allows GBA games to produce audio, but original GameBoy games won't work.

The GBA shares the sound generator between whichever CPU is control of the system; the ARM for GBA games and the Z80 for Game Boy games. Note that when the ARM is in control the Z80 is disabled and can't perform any multi-processing tasks.

Then again the Z80 is so slow and the ARM is so fast that it is questionable how useful the Z80 could have been in that situation, and it would have required a lot of support circuitry to allow both to be active and share the bus without impacting the performance of each other.

21

None of the GameBoy series machine has a Z80, but instead a Sharp LR35902, which runs a "GBZ80" instruction set, which is if I'm not mistaking similar but incompatible with the genuine Z80, as it lacks the two registers sets (much like the 8080) and other instructions. Just like the 2A03 in the NES, the CPU is in the same chip as the sound generation hardware, even though both are separated.

The GBA had to be backward compatible with GameBoy and GameBoy Color games, so it included the Sharp LR35902 CPU as well. However Game Boy Advance games can only use the sound generation hardware.

The backward compatibility is actually a second machine in the same package. When inserting a Gameboy or Gameboy Color game in a Game Boy Advance, it presses a switch which change the voltage and which console is booted. It is possible to press that switch manually and boot as old Game Boy without inserting cartridge. Therefore completely different hardware is used when running a GB/GBC game in backward compatibility mode on a GBA, the sound generation and the input are the only things both systems have in common.

The Nintendo DS has only the sound generation hardware implemented, as the Sharp LR35902 "Z80" CPU wasn't needed anymore.

5
  • 3
    I'm aware that it's not a true Z80 chip, but it's similar enough that it's often referred to as a Z80.
    – forest
    Commented Sep 16, 2018 at 0:23
  • Tangential note: the Nintendo DS does allow DS games to use both CPUs (the "new" DS ARM CPU and the "old" GBA ARM CPU, which runs at twice the GBA clock rate when in this mode, and with a different memory layout) Commented Feb 18, 2020 at 11:54
  • @user253751 Yes I meant the Z80, I'll fix this ambiguity in my post thanks.
    – Bregalad
    Commented Feb 18, 2020 at 13:06
  • 1
    @user253751 That's not entirely true. Nintendo's SDK supposedly does not allow game developers to use the ARM7 except through specific SDK-supplied APIs. All game computation must be done on the 67 MHz ARM9, leaving the 33 MHz ARM7 exclusively for audio, wireless, and slot-2 communication. So although the system does run both processors at once, a game developer can't offload certain tasks to the ARM7 to lighten the load on the main processor. In practice, unless the game requires significant software audio processing, the ARM7 will be idle the vast majority of the time.
    – forest
    Commented Feb 14, 2021 at 2:08
  • 2
    @forest Well, Nintendo's SDK may not allow it, but mine does. The machine is perfectly capable of running code on both processors. I don't think I've ever used it except for experimentation. Single-processor embedded code is already tricky enough. Commented Feb 14, 2021 at 6:36
7

I developed few game on the GBA back in the days and I remember that I looked into using the Z80 but found nothing in the official documentation. Even if possible, it is an unsupported feature and therefore I doubt that any Nintendo approved game uses it.

1
  • 2
    It would be interesting to find out if it was physically possible. The Nintendo DS for example has both an ARM9 and ARM7 processor, and the latter is downclocked and used on its own to run GBA games, but even NDS games can make use of both processors simultaneously (although Nintendo requires that game makers only use the ARM7 to offload audio and networking processing). I wonder if the GBA can do that as well.
    – forest
    Commented Jul 22, 2019 at 6:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .