Sunday, September 22, 2013

Acclaim Custom IC - Sega Genesis/MegaDrive

While viewing different game cartridge boards for the Sega Genesis, I came across a few Acclaim boards. I no longer can remember what games they were because I have long removed the Mask ROMs, but one board has three 74-series ICs and a 2k eeprom for saving purposes. The fact that they utilize both parallel and serial communication methods causes problems for me, but we will get to that later on. In any case, the second board contains the 20-pin "Acclaim LZ95A53" IC (datecode 9453 A). this board also contains a 24lc04, which is double the size of the 24lc02 on the other board.

While searching the custom chip, I found that there is little information on it. I can only come to the conclusion that it is a custom memory mapper AND parallel to serial data conversion IC.

The three ICs on the first board from Acclaim are the 74ALS138 decoder used on many many other boards for memory expansion, a 74ALS74 Dual D-type flip flop and a 74ALS125: Quad bus buffer with three states. I cannot prove this theory yet, but I believe the Acclaim LZ95A53 is all three of these ICs built into one. 20 pins could easily achieve this since many pins are shared and many others are not used at all on the other chips.

Here is the first circuit board with all four ICs. Four ceramic capacitors, one electrolytic and two resistors. The board originally had only one mask ROM so I assume it was a game of 2MBytes.

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

And here is the circuit board with only two ICs. The custom "Acclaim LZ95A53" can be seen at the top right. By reducing the three chips into one, they also reduced the required space on the board, reduced component count and most likely cost. They also switched from their own board to a board made by Liteon. There are several improvements that I can see on the board when they made the switch. Not only is the copper much more smooth but the solder mask is shiner and they even tented the vias. I rarely see tented vias on game boards. The drills are also smaller and less sharp. The previous board has splintering around all of the drills.

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Looking at the revision designators on the boards, the liteon is newer. One more thing that I noticed about both boards is that neither have break marks to show that they were panelized. Acclaim chose to finish off the sides very nicely which is odd. Game boards were technically not supposed to be seen by the end user, but they took the extra time and effort to clean them up as opposed to (looks over at other boards on desk) konami and Capcom. A third Acclaim board that I own which is yet older than the two in detail above has also been finished on all four sides.

In conclusion, Acclaim seemed to have cared a little more about the games that they produced. Going the extra mile to make their boards of higher quality and to develop proprietary ICs. I can respect them for this though I never had any doubt about them. EA on the other hand...made boards that I despise. I may post about them another time. For now I will be following the pins on the LZ95A53 back to their origins and proving whether or not it is simply a combination of three 74-series ICs. Granted it is, I will have a pinout shortly there after.

EDIT:

I have since begun following pins on the board from the custom chip to other locations. So far it would seem that I was correct, mostly. The chip is definitely decoding ROM address and possibly RAM addresses (granted your board requires parallel RAM) and has connections with the Serial RAM; however, it is also making connections to the !AS pin on the 68000 and the !LDSW and !UDSW pins. these pins are beyond me, but I have read they have to do with writing only a single byte at once rather than the full 2-bytes (16-bits) that it capable of.

I will continue to edit the diagram below once I have more information:


          __  __                  
A20    1=|      |=20   VCC     
A21    2=|      |=19   NC 
/C_OE  3=|      |=18   !OE2(ROM2)     
/C_CE  4=|      |=17   !OE1(ROM1)     
/AS    5=|      |=16   NC
D0     6=|      |=15   NC     
/RES   7=|      |=14   NC     
/LDSW  8=|      |=13   NC
/UDSW  9=|      |=12   SDA(24lc04)
GND   10=|      |=11   SCL(24lc04)
         |______|

Also note that pin 12 which connects to SDA of the serial eeprom is also connected to VCC via a 10K ohm resistor. I assume this is a pull-up resistor for data  

Tuesday, September 17, 2013

Gameboy Cartridge Reader Update

It has been a long and wonderful journey since the beginning of this project and if given the chance, I would do it all over again. For any readers who did not purchase a board, we are closing in on the end of the project. All of my boards and parts have arrived and I am simply pumping out completed board one after the other. Surface mounted components are very easy to do granted you have a hot air station, which I clearly do! Now that I have a little practice on the machine, SMT components take less time than through hole components. An FT232RL chip takes me less time to solder than a Through-hole resistor! Who would have guessed?

Anyhow, I know that all you're waiting for is pictures, so here they are:
In rough order from delivery to completion.

  Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Tuesday, September 10, 2013

GameGear CPLD Cartridge

After researching PLD for my Atari dev cart, I remembered a time when I was trying to figure out a Gamegear flash cartridge. It is simple enough, but I had little luck because I was still very unlearned at the time when it came to Addressing bits.

Anyhow, I came across a Caesar's Palace Cartridge by Majesco which utilizes a CPLD! At the time I figured that I would never see one again, nor would I care at all if I were to. Now I care very much because they are pretty damn incredible devices!

The pictured CPLD is by Xilinx and now that I think about it, I really should locate it once more and dump the program on the CPLD. I dumped the game ROM, but it was exactly bit for bit the same as one I ... erm ... 'found' online.

Image Hosted by ImageShack.us Image Hosted by ImageShack.us Image Hosted by ImageShack.us

below is some pictuyres I took when I was trying to make that flash cart. I really wanted to play the Translated Phantasy Star on actual hardware, but I never got to before dropping the project.

Image Hosted by ImageShack.us

My drawing is flawed in that the highest address pins are connected to VCC and I programmed the ROM at the lowest bank which would place it at a point where the highest Address pins would all be low. Haha, silly me. had I simply filled in the extra ROM space with the ROm over and over again, it would have worked. I'll try again in the near future, no worries.

Below are more pictures of the bare board. Good times. lol
See how I ruined a few pins by pulling the pads up? That was a long time ago and I am proud to say that I can do much better.

Image Hosted by ImageShack.us


Image Hosted by ImageShack.us

Even though the game gear is a terrible handheld, battery- and longevity-wise, it uses some great technology. Some things I like the most are the fact that it has all of the fingers on one side of the board, such as the gameboy. The atari the fingers on two sides, which gets annoying when designing a board. You'll also notice that every component is Surface Mounted; caps and Mask ROM included. This makes the size of the complete board much smaller and able to fit inside of the cartridge shell much more comfortably.

I may try to make a flash cartridge in the near future. One such cartridge that will use a CPLD so we can address higher memory addresses and will utilize saving features with a battery just because it is easier. If I stuck with those parameters, it should be able to support more official games as well as any homebrew titles.

I really like looking back on past projects and seeing how I could have done them better with what I know now. I am still rather new to EE, but I have every last bit of motivation and hunger for learning. I hope I can go back to school soon. I would really like to pursue my Master's degree next if not at least another BS degree.

Thanks for reading,
Jazz

Atari 2600 Development Cartridge *Super Deluxe*~!

So I decided to design another dev cart for the Atari fully aware that there are so many others already out there. What can I add, what can I change, how can I make it smaller, cheaper and more reliable?

To begin with, I decided to go with the very most basic design: A ROM. Thats it, just ROM. As everyone else puts it, the current number of ROM chips are all low enable whereas the Atari originally used high-enable Mask ROMs for whatever reason. This means that the /CE pin must be connected to a low output, but GND may not suffice if there are timing difference with the program (or so others say). basically, the low input must be that of a low output from the address bus. Fair enough, lets sacrifice the A12 pin since most games are not above 4 Kbytes anyhow.

A12 is technically the 13th Address pin so to calculate the total addressable memory, we take A0 through A11; which is 12 pins. The numbers one and zero are the 2 useable addressing bits, so 2 to the power of 12 = 4,096. But there are 8 data pins, so 4,096 x 8-bits or 4Kbytes. That was easy! This cartridge will be able to hold software up to 4,096 bytes.

So what makes my cartridge different than others? Mostly component choices. I have a different flash rom than others use and I am also getting into SMD components. A year ago while I was working on Gameboy flash cartridges (hand-built, not professionally printed) I made a few successful carts and on a whim clouded by pure excitement I bought 50 49f040 512KByte eeproms. They were so cheap that it didn't make much of a difference...unfortunately I have been sitting on them for the entirety of that year. These chips are in the PLCC package, meaning they are surface mounted or placed in a socket. My NOT gate is also SMD. I chose the 74HCTG04 because there is only one gate and it is tiny! My decoupling cap is also SMD, but I placed the option for a through hole cap too just because I had to get the VCC trace to the bottom of the board and why not?


Image Hosted by ImageShack.us Image Hosted by ImageShack.us

So...I made a mistake. Can you see it? I chose the closest library file I could find and went with it. The 27c040 has a different pin-put than the 29f040 and 49f040. VPP is non-existent and the /WR pin is in place of A18 which has been moved to where VPP was. VPP is the programming voltage which is around +12v or something. Besides, who uses PLCC chips with UV windows anymore? lol


Image Hosted by ImageShack.us Image Hosted by ImageShack.us

Can you see the difference in the board? Probably not since it is so incredibly small of a change. Again, A18 was moved but still connects to GND and I pulled /WE high since we don't want any accidental programming. /WE is right next to VCC, so there is a tiny bridge between them.


Image Hosted by ImageShack.us Image Hosted by ImageShack.us

Here are the 3D images I created. You will notice that my QR code has holes from the drills, but actually my through-holes are all tented which means the solder mask (green stuff) goes over them. Pov-ray doesn't seem to want to display this but they are indeed. I need to figure out text though, because each time I add my URL, it is moved to the right. It bothers me and gets messed up in the gerbers and on actual boards....hmm... Another problem I have with Pov-ray is the limited 3D images. My inverter above the caps is not displayed and I have no clue on how to add more images.

Now that that board is out of the way, lets improve it! 4Kbytes is sad to program for if you have a really great idea for a game or software. How does 8Kbytes sound? Now how about 16KB or even 32KB sound!? NOW HOW ABOUT 64.....we'll do that one later. ;)

J. Grand (or Pixel Past) with Grand Idea Studios created a cartridge that uses a SPLD or Simple Programmable Logic device to add up to 32KB of addressable memory. This can be used many different ways, however the main idea is that you may access 8 banks of 4KBs by addressing "hot spots" to switch banks.

The only problem is that he wrote a program for a now-obsolete PLD. Sadly I did not find that out until after I had redesigned the above board to accommodate it. I made my own Library files and everything...

Up to this point I have a board that supports 32KBs of ROM...but the PLD cannot be found even on ebay, or at least not in the SO24 package...

By the way, if any of the readers want a library file I use or created, just ask. I would be happy to help.

Image Hosted by ImageShack.us Image Hosted by ImageShack.us Image Hosted by ImageShack.us Image Hosted by ImageShack.us
So what does one do when they need an obsolete component? Find a replacement. I went to mouser and searched thier PLD's, filtered by SPLD and again filtered by price from lowest to highest. I got rid of Through-hole ICs and found the cheapest SMT SPLD with at least 9 inputs. The result was the ATF22V10C-10SU. It has all of the pins I need, plus some and according to the datasheet is nearly a drop-in replacement for the obsolete chip!

I first created the library file based on the datasheet and an existing SO24 footprint, then I imported it into the Schematic file and removed the old PLD. Since I thought I would have to write the entire PLD program myself, I decided to move around the I/O pins to better my PLCC ROM.

Image Hosted by ImageShack.us

Not bad if I do say so myself. :) Unfortunately this is where the bad news comes in. I further looked into J. Grand and it turns out he already crated a 64KB board and ... used the same PLD as I found. Looking into his pin diagrams, he even used the same pinout as me, shy of A0 and A10 being switched. He also has the entire PLD program available for free. Here I was really excited to be able to write one of my own, but I may as well swap the two address pins and use his design...Thats right:
http://www.grandideastudio.com/wp-content/uploads/pp_atari2600_64k_schematic.pdf

He beat me to it...in 2004. Haha...

This is alright though, because I never planned on making a ROM-only cartridge anyhow. I am working my way toward a Cartridge that is capable of storing data! Yes, an Atari 2600 cartridge that will save files, progress and any other data the game dev wishes.

How can that be done...? Well, all you need is a /Write enable pin pin to go low when the /Output Enable pin goes high. And inverter you may ask? Well, sure! Why not? That could easily work, but we have an entire PLD at our disposal, so the plan is to use that and save the extra $0.05 for an inverter. This board will use the EEPROM as RAM and ROM which makes the RAM non-volatile like other cartridges that use SRAM. SRAM requires a battery to hold the data once power is disconnected.

If I design the my board around his 64KB cart, then I can switch the addressable memory to be something like 32K RAM, 32K ROM or possibly 8K ROM, 56K RAM. it would be as simple as changing a few outputs on the PLD in software so the same board could be programmed for any one of my above combinations of ROM/RAM!

Plus, the board is tiny; less than 5cmx5cm which means it can be printed cheaply! The main goal is to have some skilled person program a musical software that utilizes the save feature. I was thinking Paul Slocum, the writer of Synthcart. He has another project called Loopcart which is pretty much exactly what I want and it already can save...but unfortunately can only save with the AtariVox; an expensive and complicated attachment for atari homebrew carts which allows saving and vocal synthesis. Really cool, but beyond the requirements of my little project.

Loopcart;
http://www.qotile.net/loopcart.html

AtariVox:
http://www.richard.hutchinson.dsl.pipex.com/new_page_5.htm

AtariVox may not even be available anymore...

Going to contact Paul now. Thanks for reading!

Cheers,
Jazz

Wednesday, August 28, 2013

A New Soldering Station and a New Confidence

I SPENT REAL MONEY!

 Being as underemployed as I am it is very hard to allocate funds such as this, but I threw 80 bucks at a new soldering station because this is no longer a hobby. I may only make a little here and there, but soldering and designing electronics is now a profitable experience.

I thought to myself "If I wish to further my abilities, then I had better stop limiting myself with this horrid Radio Shack iron..." So I did. :)

I researched and asked and polled for the best station under $80 and the 'nearly' unanimous response was the Kada (or similar) 852D+ 2-in-1 SMD rework station. The one I picked up is by XPower, but it uses the same iron and case as other clones; it probably even has the same 'stolen' program as Kada's.

So far, my experience has been very positive. I haven't given it any extensive use as of yet, but my Gameboy Programmer Boards will be arriving soon! If you've read that post, they have some surface mounted IC's and I am just dying to try out my new hot air gun! I have watched a few videos on how to apply SMT chips and components with a hot air gun and solder paste. It seems as simple as if I were to glue them on and blow dry it!

Once the boards and parts arrive, I may make a video on the completion of one board. The video will also be a review of the station so that others may learn before they buy. (Though I suggest any self-respecting modder should) ;)

well here she is:


Image Hosted by ImageShack.us

I REALLY need to clean off my desk...This should fit well at the back but I still have to build my solder-smoke filters to rest underneath. Those will be another post soon enough.

Wednesday, August 21, 2013

Making Gameboy Sprites, Tiles and Maps

Just to put it on the table, you have no business creating anything for Gameboy if you have not yet read "Everything You Always Wanted To Know About GAMEBOY: but were afraid to ask."

Read it and then return for my tutorial. I can wait.

***

Now then, lets start talking about sprites, maps and other graphic elements. As you very well know, the Dot matrix gameboy displays four shades of grey (or green). Each shade is represented by two bits: 00, 01, 10 or 11 respectively. It isn't that important to know right now, but while setting up the palette in your gameboy code, it is commonly done as follows:

...
init:
ld a, %11100100 ; Window palette colors, from darkest to lightest
ld [rBGP], a        ; Load Accumulator A (11100100) into rGBP
...

Where "rBGP" Equates to $FF47, an address representative of the specially reserved I/O Register...but why am I just repeating what you have already read, right?

Now, back to the point. You may choose to design all of your characters and objects for your game strictly in binary or hexadecimal data if you wish but I prefer the visual approach. You know, the kind with a GUI. ;)

First download these two programs:
Gameboy Tile Designer: http://www.devrs.com/gb/hmgd/gbtd.html
Gameboy Map Builder: http://www.devrs.com/gb/hmgd/gbmb.html

Both of these tools will help you create and visualize the output of tiles and maps. Tiles are going to be used both for maps and for sprites, you can imagine a sprite or character figure to be a collection of tiles. Pretty simple.

You'll start by opening  Gameboy Tile Designer (or GBTD.exe). I like to keep the default color palette which is "Gameboy Pocket" because it is easier to work in shades of black rather than shades of green. Under View, I also like to switch to "simple" and use nibble markers, though they are not very easy to see. 

Image Hosted by ImageShack.us

Next select the color you would like to draw with by adding it to either your left mouse button or right mouse button by clicking on it with the corresponding button. Start filling in squares to your liking. You make design single 8 x 8 sprites or larger. Anything you wish as long as it is four colors. Once you finish a tile, click on the next blank tile on the far right of GBTD.

Image Hosted by ImageShack.us

You will save the file with whatever content you have at this point and name it something relative to the content. Open Gameboy Map Builder (or GBMB.exe) and click file > Map Properties then use the browse button to locate your new *.GBR file that you made in GBTD. For no, you may ignore width and height because you can add columns and rows at will.

Image Hosted by ImageShack.us

Once you have loaded in your tiles, you may continue to make more tiles! Make and place tiles, side-by-side by having both programs open at once. Each time you save your *.GBR file in GBTD, GBMB will automatically update! How cool is that?

Here are some time-elapsed screenshots of my own work.


Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

The above Map is simply a 160x144px image that I can manipulate on screen. REMEMBER:
"The main GameBoy screen buffer (background) consists of 256x256 pixels or 32x32 tiles (8x8 pixels each). Only 160x144 pixels can be displayed on the screen." That means that where ever I place the image on the gameboy, there will be large empty scape on the sides. If I wanted to, I could have designed a full 256x256px map and used a scroll option and the d-pad buttons to view it all.


My process of designing such a large map was that I took an image I had re-sized and pixelized in Photoshop. There are a few options when pixelizing and for this one, I chose "pattern."

Below is the full 160x144 image which I have then transposed into GBTD...one tile at a time. It took nearly four hours, but I figured out that I was able to copy and paste a few of the colors. It turened out that the three lightest colors could be copied and pasted from PS to GBTD. I still had to fill in the black (11) pixels though.

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

With a temporary frame, I was able to see more clearly which pixels I was currently working on. Again, I did this one 8x8 tile at a time.

Once you get better at creating tiles, you can create all sorts of maps and sprites, both for game characters and even art!

Image Hosted by ImageShack.us

When I am able to write better ASM code, I will demonstrate how to export these files and INCLUDE them into your very own ROM images. Thanks for reading!

Wednesday, August 7, 2013

Gameboy Cartridge Reader Board-Run

I plan on doing a small run of two sided PCBs based on Reiner Ziegler's Reader. I have redesigned the board in EagleCAD as a mostly SMT populated board, though some components have either option! I do not plan on supplying full kits, so part ordering will be up to you.

If you wish to throw some money into the pool and have a board sent your way, email me here:
Apple2ja*Cmich*edu (dots instead of asterisks).

Here are some pics, dimensions and a 3D render:



Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Some notes about the boards, I have decided to add vias if people want to use through-hole components rather than SMT components. This does not include the ICs because these components are too large to fit within my strict board limitations. The photos show no through-hole resistors, but I am adding them shortly.

Lets try not to add both version of said components, k? If you choose to use a ceramic resonator rather than an ordinary crystal oscillator, be sure to ignore the cap locations. If you choose to place an crystal oscillator, be sure to check the data sheet as to the capacitance of caps you will need.

Also note that the ICSP connector must be on the bottom of the board. After programming the Atmega8515, you may remove the ICSP connector since there will probably never be any updates.

Reiner Ziegler's site is here: http://www.reinerziegler.de/readplus.htm

I have also posted about the pool at these locations to open up the audience:

http://www.epforums.org/showthread.php?86553-Gameboy-Programmer-Group-Printing

http://www.amibay.com/showthread.php?t=49126

http://chipmusic.org/forums/topic/11867/gameboy-programmer-group-printing/

http://www.noisechannel.org/