What are the pins of a Game Boy cartridge for?

Discussion of programming and development for the original Game Boy and Game Boy Color.
Post Reply
brook2
Posts: 1
Joined: Sun Jan 19, 2014 10:16 am

What are the pins of a Game Boy cartridge for?

Post by brook2 »

I counted that a game boy cartridge has 32 pins, but what do they all do and how does it work?

From searching around I gather that there is a voltage pin at the end and ground at the other, and there must be a couple of pins to say whether the cart is being accessed in read or write mode. I think that 15 of them are used to address a memory location and 8 of them are used to output a byte (and maybe input it too, if you're in write mode). I don't really have complete information on it though.

Edit: I remember reading that there is an "audio" pin but that was never used in anything.

Edit 2: I found the answer here
  • VCC – Power (5 volts)
  • CLK – Clock signal (not used)
  • ~WR – if low(grounded) and if RD is low, we can write to the SRAM and load a ROM or SRAM bank
  • ~RD – if low (grounded) and if WR is high, we can read the ROM and SRAM
  • CS_SRAM – if enabled, selects the SRAM
  • A0 – A15 – the 16 addresses lines that we tell the ROM which particular byte of data we want to read
  • D0 – D7 – the 8 data lines that we read the byte of data selected by the 16 address lines. These data lines can also be used to control which ROM bank to load (important for later).
  • Reset – needs to be connected to VCC
  • Audio in – (not used)
  • GND – Ground
Last edited by brook2 on Mon Jan 20, 2014 9:07 am, edited 1 time in total.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: What are the pins of a Game Boy cartridge for?

Post by tepples »

Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: What are the pins of a Game Boy cartridge for?

Post by Great Hierophant »

I don't like to Necropost, but this post will do.

The CLK pin is used with the Game Boy Camera, partially for its sensor, and by the MCB7 to clock the EEPROM.

The audio input pin is a tough one. The TAMA5 and HUC-3 cartridges do not use it, their have their own built-in speakers and batteries for generating sound while the Game Boy is off. It is possible that the Pocket Sonar could have used it, but I'm skeptical.

I think the only thing likely to have actually used the audio input pin is the Beeshu Stereo FM Tuner/Radio. It plugs into the Game Boy's cartridge port, but only is confirmed to use it for powering the radio. The black bar is displayed when the Game Boy is turned on. But I wonder if it could also use the Game Boy's speaker when headphones are not plugged in. One website report on weird Game Boy accessories indicates that it does, but I'd like more certain confirmation.

This is what it looks like :

https://www.konsolenkost.de/gameboy-ste ... a-1028630/
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: What are the pins of a Game Boy cartridge for?

Post by lidnariq »

For homebrew, Nanoloop mono uses the audio input pin.
nitro2k01
Posts: 252
Joined: Sat Aug 28, 2010 9:01 am

Re: What are the pins of a Game Boy cartridge for?

Post by nitro2k01 »

The Bung Pocket Voice apparently used the external input as well.

However, this pin was also used on some flash cartridges as the /wr (write) signal for the flash chip, enabling the cartridge to be flashed with special hardware, while avoiding conflicts potential between the MBC and the flash chip.

The information in the post contains information written from the perspective of writing a cart reader, which is fine for that purpose. But it should not be used for design advice for anyone making a cartridge. For example, /CS goes active both when external cart SRAM is accessed and when internal work RAM is accessed. Which means that further address decoding is necessary unless you want reads and writes to work RAM to conflict with save RAM.

Side note: Reiner Ziegler took down his whole site so I put up a mirror of it. Here's the link to the page linked above.

http://reinerziegler.de.mirrors.gg8.se/readplus.htm
Shonumi
Posts: 342
Joined: Sun Jan 26, 2014 9:31 am

Re: What are the pins of a Game Boy cartridge for?

Post by Shonumi »

It is possible that the Pocket Sonar could have used it, but I'm skeptical
I can confirm it doesn't use VIN (or Audio In, or PIN 31, or whatever else it could be called.) I opened mine last week and took some pictures of the PCB. I sent them to gekkio, but I'll post them here too: https://mega.nz/#!ng1UWQSZ!0lyVAUi1Dkdr ... ePAbFmg0_g

I'm not an electronics expert, but it doesn't look like VIN is connected to anything. At any rate, the Pocket Sonar repurposes most of the normal MBC1 cart registers that deal with cart RAM to instead control the sonar, so only the address lines are used from what I can tell. If anyone spots anything interesting from the photos I took, let me know so I can include it in my research document (initial version is going public tomorrow btw).
Post Reply