gbpb gameboy prototyping board

4
MICRO PROCESSOR 42 Elektor Electronics 1/2001 GBPB — GameBoy Prototyping Board A development aid for the GameBoy Design by L. Lemmens In previous editions we proved beyond doubt that the Nintendo GameBoy is perfectly suitable for more serious tasks than playing games. The sampling oscilloscope described in the October and November 2000 issues was a prime example. In the December 2000 issue, we published a follow-up article on GameBoy Development Tools. This month it’s time to offer help in the hardware department.

Upload: nacional007

Post on 11-Apr-2015

43 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: GBPB GameBoy Prototyping Board

MICROPROCESSOR

42 Elektor Electronics 1/2001

GBPB — GameBoyPrototyping BoardA development aid for the GameBoy

Design by L. Lemmens

In previous editions weproved beyond doubtthat the NintendoGameBoy is perfectlysuitable for more serioustasks than playing games.The sampling oscilloscopedescribed in the Octoberand November 2000issues was a primeexample. In theDecember 2000 issue,we published a follow-uparticle on GameBoyDevelopment Tools. Thismonth it’s time to offerhelp in the hardwaredepartment.

Page 2: GBPB GameBoy Prototyping Board

A helper board

All of the problems mentioned above areavoided by our prototyping board of whichthe circuit diagram is shown in Figure 1, andthe PCB design, in Figure 2.

Any components on the prototyping boardwill be visible and accessible when theGameBoy lies horizontally on your desk. Thisallows measurements to be carried out on theprototype hardware while the GameBoy dis-play and buttons are accessible at the sametime.

The cartridge connector is part of the PCB,and its connections are linked to a standard34-way boxheader. In many cases, this is suf-ficient, because it is then easy to connectyour own (experimental) board to the Game-Boy via a length of standard flatcable. Theorder of the connections is given on Table 1.Note that the boxheader has 34 pins while

In the December 2000 issue of Elek-tor Electronics we supplied pointersto a variety of GameBoy emulatorsthat allow software for thisextremely popular ‘games console’ tobe tested on a PC. Emulators are finetools for projects consisting of soft-ware only. However, the momentextra hardware has to be linked tothe GameBoy, two problems occur:the connector for the (game) car-tridge is a Nintendo proprietarydesign and to make matters worse itis hidden deep in the GameBoy case.

These problems with the cardedge connector do not appear whena PCB is designed and etchedstraight away for the prototype ofthe circuit you have in mind. Still,because a large part of the cartridgeboard is hidden by the GameBoy

case, it will be hard, if not impossi-ble, to do any measurements on thenew board. Sure, it is possible toopen the GameBoy case by removingthe screws that hold the rear panel.That way you have access to the car-tridge board, at least for measure-ments. However, opening the Game-Boy case is a far cry from the idealsolution because the screws are dif-ficult to remove with an ordinaryscrewdriver. Moreover, opening theGameBoy case voids the productwarranty you may have, and withoutthe rear panel there is no batterycase! The most annoying problem is,however, that the prototype is at therear side of the GameBoy, while thedisplay and controls are located onthe front (now who did thatdesign?).

MICROPROCESSOR

431/2001 Elektor Electronics

Figure 1. Circuit diagram of the GameBoy Prototyping Board (GBPB)

1 2

3 4

5 6

7 8

9 10

11 12

13 14

15 16

17 18

19 20

21 22

23 24

25 26

27 28

29 30

31 32

33 34

K2K3

K4

10A0

9A1

8A2

7A3

6A4

5A5

4A6

3A7

25A8

24A9

21A10

23A11

2A12

1420

CS

22

OE

281

VPP

11D0

12D1

13D2

15D3

16D4

17D5

18D6

19D7

IC1

EPROM

26A13

27A14

27C256

1

2

3

4

5

6 7

9

10

11

12

13

14

15

IC2

&

0

1

2

3

4

5

6

7

DX0

2

G07

74HC138

C1

100n

+5V

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

A10

A11

A12

A13

A14

A15

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

A10

A11

A12

A13

A14

A15

D0

D1

D2

D3

D4

D5

D6

D7

D0

D1

D2

D3

D4

D5

D6

D7

A13

A14

A15

D0

D1 D2

D3 D4

D5 D6

D7

A0

A1 A2

A3 A4

A5 A6

A7 A8

A9 A10

A11 A12

A13 A14

A15

+5V

AUDIOIN

RAMCS

RESET

ECLK

K1

+5V

A10

A11

A12

A13

A14

A15

GND

32

31

WR30

RD29

28

A027

A126

A225

A324

A423

A522

A621

A720

A819

A918

17

16

15

14

13

12

D011

D110

D2

D3

D4

D5

D6

D7

9

8

7

6

5

4

3

2

1

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

A10

A11

A12

A13

A14

A15

+5V

+5V

+5V

IC2

16

8

C2

100n

+5V

D0

D1

D2

D3

D4

D5

D6

D7

ECLK

WR

RD

000151 - 11

Game BoyWR

RD

A000

Page 3: GBPB GameBoy Prototyping Board

the GameBoy cartridge connectorhas only 32. The simple reason forchoosing a 34-way boxheader is thata 32-way version does not exist.

Extension cards like the onedescribed here usually have a proto-typing area where additional com-ponents may be fitted to test a par-ticular circuit you have in mind. Sucha prototyping area has been pur-posely omitted here. The essentialpoint in this case is to make the spe-cial cartridge connector and theextension part accessible well out-

side the GameBoy case. Veroboard ischeap and widely available fromlocal electronics shops (or by mailorder), and easy to connect via apiece of flatcable. What’s more,despite accurate soldering and des-oldering, prototyping board will notlast long when used frequently.

Options

Connectors K3 and K4 are initiallyintended to facilitate measurementson the data and address bus. You’ll

MICROPROCESSOR

44 Elektor Electronics 1/2001

000151-1 (C) ELEKTOR

C1

C2

IC1

IC2

K2 K3

K4

/RD /WR

A000

ECLK /WR /RD +5V

T

D7D6D5D4D3D2D1D0

A15A14A13A12A11A10A9A8A7A6A5A4A3A2A1A0

000151-1 (C) ELEKTOR

000151-1

COMPONENTS LIST

Capacitors:C1,C2 = 100nF

Semiconductors:IC1 = socket for 27C256IC2 = 74HC138

Miscellaneous:(K1 = card edge connector on board)K2 = 34-way boxheaderK3 = 16-way SIL-headerK4 = 8-way SIL-headerPCB, order code 000151-1 (see Readers

Services page)

Figure 2. PCB design.

Page 4: GBPB GameBoy Prototyping Board

cause problems. You should, however, con-sider how the board will be used, that is, withthe EPROM mounted on it or with the mem-ory device located on the external board. Inmany cases, boxheader K2 will suffice. If youare only into developing and testing softwarefor the GameBoy, it is sufficient to fit theEPROM socket only.

(000151-1)

find the data and address linesneatly arranged on these contactstrips. Of course, the lines may beused for external connections. Simi-lar considerations apply to the PCBpins for RD, WR, ECLK and the twosupply connections +5 V and GND.

The latter pins should only beused for supply voltage measure-ments, or for powering an externalcircuit. They must never be used topower the GameBoy or the hardwareon the extension card.

Any cartridge should contain apiece of software in ROM that allowsthe GameBoy to start up. That’s whya socket for the 27C256 EPROM isprovided on the extension board.The memory may of course also belocated on the board connected toK2. In that case, IC1 should not befitted on the extension board.

An EPROM emulator like the onedescribed elsewhere in this issue isconveniently coupled to the socketfor IC1. Such a configuration is veryuseful and handy when you are intodeveloping software for the Game-Boy — write and assemble thesource code on the PC, load theobject code in the emulator using aHEX file transmitted via the serialport, and finally test the program onthe GameBoy. Arguably, this is amuch faster process than erasingand reprogramming an EPROMafter every modification made to theprogram.

The circuit includes a 74HC138

(IC2) which allows two selectionlines to be decoded for controllingexternal hardware. Pins 9 and 10 ofthe ‘138 carry the active-Low readand write signals respectively foraddress A000. For ease of connec-tion, these signals are brought out toPCB pins.

Construction

Before the soldering iron is poweredup, you should check if the board fitsin the GameBoy. Note that the nor-mal thickness of the cartridge caseplus board should be about 2.5 mmto ensure proper contact with theGameBoy cartridge connector. Here,we only employ the PCB (i.e., no car-tridge case), and that is why thePCBs supplied ready-made throughour Readers Services have been pro-duced with a special thickness. Ifyou want to make your own boardfrom the layout shown in Figure 2,but do not have PCB material of theright thickness, a thinner size maybe employed. Strips of cardboard orplastic may be glued on to the bot-tom side of the board to achieve thesame effect. This should be donewith care and precision — if the con-nector is too thin, the contact withthe GameBoy will be unreliable oreeven totally absent. A too thick con-nector, on the other hand, means aserious risk of damaging the Game-Boy connector beyond repair.

Populating the board will not

MICROPROCESSOR

451/2001 Elektor Electronics

Table 1. Connections onthe extensionboard.K2 pin # . . . . . . . . . . . signal1 . . . . . . . . . . . . . . . . . . . VCC2 . . . . . . . . . . . . . . . . . . . ECLK3 . . . . . . . . . . . . . . . . . . . WR4 . . . . . . . . . . . . . . . . . . . RD5 . . . . . . . . . . . . . . . . . . . RAMCS6 - 21 . . . . . . . . . . . . . . . A0 - A1522 - 29 . . . . . . . . . . . . . . D0 - D730 . . . . . . . . . . . . . . . . . . RESET31 . . . . . . . . . . . . . . . . . . Audio input32 . . . . . . . . . . . . . . . . . . GND33, 34 . . . . . . . . . . . . . . . not connected

K3 pin # . . . . . . . . . . . signal1 - 15 . . . . . . . . . . . . . . . A0 - A15

K4 pin # . . . . . . . . . . . signal1 - 8 . . . . . . . . . . . . . . . . D0 - D7