Showing posts with label SID. Show all posts
Showing posts with label SID. Show all posts

Friday, July 12, 2013

SID-Boy Update Jul-12-13

In continuation of this post:
http://jazz-disassemblies.blogspot.com/2013/07/sid-boy-cartridge-continuation.html

Since posting the above, I have been routing the traces and making final chip placements. Most of my connections are complete and all that is left would be to write a program and test it, scrap it, rewrite it and test, test, TEST!

Lets talk about my board thus far:


Image Hosted by ImageShack.us

I will start from the top left and work my way across the board.

The current audio output is connected to the stereo SMT 1/8" jack. The SwinSID emulates in stereo, which is not exactly true with the SID itself and not the best for my purposes using the audio-IN pin on the gameboy, but we will manage.

Next is an array of resistors and capacitors which are part of the audio filtering.

Then is the 16-bit DAC which converts the Digital data to Analog. This damnable components is the only part which is obsolete...something that we all must try to avoid when designing something cost effective and/or to produce in high quantities. 

I did just read on the SwinSID website: "You can use 8bit PWM output to playback sound without DAC, just connect B0 AVR pin with 4,7K resistor to AUDIO OUT SID socket pin. You also need to add bias by connecting 4,7K from +5V to AUDIO OUT pin. "

Doing this should save me time and money, but I plan on trying both methods to see which sounds better.

Next in the picture is the ICSP connector and the Atmega8515. I am also looking into the Atmega88, but have not placed one to see if it a better fit. This is where I can program any updates to the SwinSID while the chip is "In-Circuit" meaning I never have to remove it.

The middle-center has a large empty area. This is good. Every component has plenty enough room and I have space for modifications or additions later on! If you recall, I planned on adding RAM later on and RAM is nearly useless if you cannot back it up, so I also hope to fit a battery backup. I can't wait!

In the near-center of the board is the clock. This little crystal will be running at 24MHz, much higher than the gameboy itself and faster than any data traversing the traces surrounding it. The plan is to isolate it from any near-by traces to prevent bleeding or interference. Maybe I am exaggerating, but you can never be too careful.

In the bottom left is the MBC1b mapper chip. This allows for the gameboy's z80 microProcessor to address more memory whether in the form of RAM, ROM, or I/O (SID). The MBC1b is the oldest mapper designed for the gameboy, only allowing for a maximum of 16Mbit ROM and 8Kbyte RAM, but it is more than I will need while I utilize no RAM. When I redesign the program and board, I will use an MBC5 mapper chip which vastly increases the addressable memory.

And lastly in the bottom right corner is the ROM itself. Because I use an EEPROM, I may erase and reprogram the cartridge as many times as I like. The unfortunate part of having such a densely populated board is that I cannot socket the ROM if I enclose the cartridge in a shell so when I come to the point where I am finished programming, I will solder the EEPROM in place.

My biggest concern is in my address or I/O map. This is for lack of a better word a map of the binary or hex addresses of each and every device; where they are accessible and to what extent they are accessible. An example of the ROM address may be from $0000 to $3FFF and the SID may be from $4000 to $7FFF. These of course are not the actual addresses, but this is how it would look. The reason I am so concerned is because of how much trouble it is for me to determine the addresses! It is very confusing IMO.

Thanks for reading
-Jazz

p.s.


To clarify any confusion that may be looming over the project, this is not a replacement for the internal synth. This is not in place of the mysterious 5th sound channel and this will not be compatible with any official game without extensive patching. I am developing this board so that the gameboy can control 3 more channels on top of the four it already has, making it better for 8-bit musicians.


Tuesday, July 9, 2013

SID-Boy Cartridge Continuation

I could easily have written this post yesterday immediately after the last one because I was up working all night but so many components, arrangements, etc. changed. Now, I only minored in engineering at Central Michigan University but I plan on mastering in it eventually once my bills are caught up...anyhow, I decided to remove the RAM for the time being because it will make for an easier memory mapping. Both the SID and RAM are to be written to and there is no room for a battery backup, so whats the point of RAM at all? At least at this point in time.

Image Hosted by ImageShack.us
Currently I have the SwinSID, ROM, MBC5 mapper chip, components  and ICSP all placed. The TDA1543 DAC IC will remain through-hole because these chips are difficult to locate and the SMT version happens to be larger because of 8 unused pins! I have replaced the massive crystal with a tiny surface mounted one and will replace the resistors with SMT resistors as well. The PLCC socket will be removed because it is too large to fit inside of a gameboy but for the time being, I could only locate a 29f040/49f040 library file as through-hole.

Shortly, I will remove the logic chip that was never utilized and move the headphone jack to the other side because "if" the Audio-IN pin works as I hope it does, the traces would need to be on the other side.

If design goes as planned (for future versions) I will be able to support up to 64MegaBits of ROM! can you imagine a program that large!? However, RAM will probably be placed once I figure out how to add both the SID and RAM into the same 64Kbit addressing space. I may even decide to use a memory module that requires no battery backing, which would be a little more costly but less consuming of space.Hell, my program could easily be modified to support a YM2612 version if the project pans out. Just keep reading!

Also, if I manage to create a working prototype, I will be starting a kickstarter page for this project.

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 ImageShack.us
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 ImageShack.us
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 ImageShack.us
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 ImageShack.us

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!