MBC5/CPLD for the GameBoy
Custom MBC5 cartridge with Xilinx CPLD, 512kB flash and 128kB SRAM
MBC5 Prototype Cartridge

Contents :
Introduction What the cart contains, and a picture of the cart hooked to a gameboy.
Partslist The cpld, the memories and a little extra
Cart Schematic Not much to see, the cpld pretty much do all the interesting stuff
Cart PCB Near eurocard size, "single" sided.
Link PCB Just a extender pcb fitting in to the gameboy cartridge slot
Downloads Why did I ever start with these stupid explanations...
    Project pages :
Index page Main index page.
  Links section :
Links & Credits Located on other page



Back to  Contents
Picture !
This is what the MBC5/CPLD cartridge looks like in the hands of a lousy photographer.... The sram is
completely hidden behind the cable, and the lcd looks like it should be sent in for repair !
The gameboy actually runs a GBDK testprogram which enables functional tests of the MBC5 part and
the CPLD i/o. (see downloads below).
Note that the pcb is an prototype and thus older from what is shown further down this page.

The use of the word cartridge is a little far fetched, as the pcb is bigger than the gameboy plus the fact
that it doesn't even fit in the expansion slot, but uses a ribbon cable with a passive link PCB to connect
to the gameboy. Next step could be to minimize it, but that would require a through-plated pcb.

Digital part consists of a Xilinx CPLD whichs hosts the MBC5 functionality and i/o, a 512 kBytes flash and a
128 kBytes sram.

IDC interfaces besides JTAG and a 5V connector  :
Cart connector        IDC1 IDC2        To gameboy cartridge slot via link PCB. Karlsruhe/Marc Rawer pinout.
IO connector          IDC3 IDC4         All i/o pins from the CPLD including i/0 select and relevant adress signals.
Emulator                IDC5                 Matches at least Andrew March's "emul8r".
All IDC connectors are 34 pins to ensure that even the smallest distraction will have fatal consequences.

Power supply
The cart have a fixed 5V regulator intended to drive the cpldcart and a adjustable regulator set to 3V for the gameboy.
In this scenario the current consumption is close to 200mA. The pocket gameboy uses approx.80mA (at 3V, no sleep)
and the cpldcart approx. 100 mA.
Note that the maximum input voltage is about 12V unless the regulators is fitted with some kind of heatsink.

The external power supply is connected via a 4 pin molex and a single pin supplies 3V to the gameboy. There is
no 5V connection from the cpldcart into the gameboy (via the link cable) but no harm is done if it should happen. (!)
The 3V must be supplied in order for the smps in the gameboy to produce the negative bias voltage for the LCD.

It would be nice to have the opportunity to be able to run both the gameboy and the mbc5/cpld cart on the normal
gameboy batteries alone (for a short time....), but i haven't done anything to check it out yet.

How to build :
Like anything else.

Price :
I have no idea what it costs to produce a cartridge as the one shown here. And i don't care :-) This is completely
besides the point with this project. If you think that this could be a cheap alternative to a whatever consumer pirate
copier that might exist then I am afraid I will have to dissapoint you right away. Sorry !


Back to  Contents

Number Name Case Manuf. Type
IC1 XC9572-15 PLCC84 Xilinx CPLD
IC2 AM29F040B-120JC  PLCC32 AMD Flash
IC3 KM681000CLP-5L DIL32 ? Sram
Both the flash and the sram are normal industry standards and can probably be replaced with anything of similar type.

5 IDC34              (17x2 connectors). At least the one for the link cable are mandatory.
7 pin molex        JTAG programming jig.
4 pin molex        DC IN, external 200mA DC power supply.
1 pin molex        GB 3V, to GB battery terminal or DC input plug.
100nF & 47uF decoupling caps + a few resistors and a LM317 + 7805.


Back to  Contents
The schematics. It should be apparent that the CPLD is busy doing everything but hosting the memories..
If this board ever runs out of connectors....

See downloads for a postscript version of the schematic.

I/O Connectors
These contains the three 8bit CPLD i/o ports PORTA, PORTB and PORTC. The definition of these ports are discussed on cpld page. The signals IO_CE and A0..A3 are included so that the free i/o adresses can be used as well. Note that there is no read or write control signals available on the connector.
Cart Connectors


   CART -  PCB

Back to Contents

Two sided PCB intended to be made as single side PCB with wire links (i.e. enameled wire) instead of copper tracks in upper layer.

Dimension : 160 x 80 mm


   LINK -  PCB

Back to  Contents
The link pcb together with a 34 way ribbon-cable is the interface between the gameboy and the MBC5/CPLD Cart.
The PCB goes into the cart slot of a unmodified pocket gameboy. It's quite long because the IDC connector otherwise
would block for access to the power switch at the gameboy top. Suppose this actually makes the bulky IDC connector a
poor choice, but newer mind.

The 5V track is by default open to let the gameboy supply its own internal 5V circuits.

The dimensions are 51.3 mm X 90.4 mm but the essential measure is 47.0 mm between the centers of the outermost gameboy pins.
(the pin spacing is 1.5 mm nominal).
One way to position the link PCB in the gameboy cartridge slot is to murder a cartridge and use the plastic shells. In this case
the PCB should be 0.8 mm thick. You'll have to cut away the 'end-piece' in the plastic shells to make it fit.



Back to  Contents
 Zip'ed postscript printer file (HP5) in with pcbs in scale 1:1
   MBC5/CPLD cart & Link PCB V1.2 (PS)

Zip'ed postscript printer file (HP5) with the cart schematic
   Cart schematic

Software :
  Testprogram written in GBDK, both binary and source. This is the program that runs on the gameboy
  in the photo above. Can run in no$ emulator as well (except for the obvious exeptions!)

Back to  Contents
Links & Credits

  Links & Credits located on other page...

Made with Netscape Composer. Basic font is Arial Narrow.
Copyright Claus Bjerre Pedersen 1999