Tuesday, September 10, 2013

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:

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.



AtariVox may not even be available anymore...

Going to contact Paul now. Thanks for reading!


No comments:

Post a Comment