Monday, July 8, 2013

Gameboy and SID Interfacing Theory: Why Not?

Driving home after visiting the family on holiday and I had a wonderful idea. I was thinking about the computer that I am working on (and will post about extensively later on) and came up with another project I should be working on. "Why hasn't anyone else began this project," I thought to myself. So I quickly tore apart the box of candy bottle caps I had finished off and drew a quick size-representation of what one such device would look like on the dusty sugar-covered cardboard.

The gameboy is an 8-bit computer in the purest of form; ROM, RAM and simple I/O communication. Other devices have been designed for use with the gameboy both officially and unofficially, by Nintendo and by other devs. Adding any device should be as simple as hooking up the Address bus, data bus and placing said device somewhere in the existing memory map.

I have also been looking into pin 31 on the gameboy cartridge slot. This particular pin as far as I know has never been implemented in an official device and just goes to waste. It is referred to as the Audio-IN pin. All I know is that it connects to the z80 uP...I do not know which direction transfers occur nor do I know what kind of audio the trace can handle, amplified or otherwise. I will get back to this pin later on, now we shall discuss the connections and board layout.

My first sketch was simply to arrange the components without worrying about logic, power, or anything else.
Image Hosted by
The second sketch realized the need to map the SID's address with logic, power the SID at +12v and add an audio ouput.
Image Hosted by
Sketch three was made when I remembered that SwinSID would be a more reasonable build. The size and power supply will both more easily be designed.
Image Hosted by
Sketch four, or version 2.1 is the board I will start to design in Eagle PCB. as you can see, I added mostly SMT components due to size restrictions. ROM will be in a socket as a PLCC. RAM and MBC (the memory mapping chip) will be the ordinary SOIC that comes in most GBC cartridges. I have yet to realize a battery backup because I have yet to determine how the ROM will be programmed; hence the socket.
Image Hosted by

I believe 4Mbits (512Kbytes) will be sufficient size for the ROM to begin with. I only have 49f040 EEPROMs on hand right now anyhow. With the MBC5 chip, I can be a little more sloppy with the glue logic since there will be plenty of addressable bits left over. And lastly if the audio-IN pin works as I hope, there will be no need for an extra 1/8" headphone jack. How annoying would that be, amirite!

A few notes about SwinSID that make it choice for my project it is drop-in, pin-compatible with the original SID; both 6581 and 8581. It also runs on +5v rather than the 12 or 9 that the SIDs run on. It does however require its very own xtal but the gameboy has a clock pin running through the cartridge slot which is very slow. I will look into whether the speed is sufficient to run the SwinSid (probably not though).

More updates soon!

No comments:

Post a Comment