Showing posts with label Eagle CAD. Show all posts
Showing posts with label Eagle CAD. Show all posts

Wednesday, June 22, 2016

NES controller on PC Engine / TurboGrafx 16

My brother needed a second controller for his PCEngine so we could co-op some shmups but original controllers are wildly expensive! And even if you find a cheaper option from another region, you'll need to buy yourself an adapter...ugh. So what I was design a circuit board to implant into an NES controller shell!

Easy as pie. This board supports either the cord for a PCengine or a turbografx and has broken out headers in case you want to install it into a different (larger) controller shell. This version does not support turbo buttons right now though.


Top Side:
Back Side:
Once I print some, I'll update with another post. 

Saturday, December 12, 2015

Odyssey 2 variety cart

I am also currently working on a flash cart for the Odyssey 2 that supports a wide array of roms, proms, eproms, etc.

27C-, 28F-, 29F-, 29EE-, 49F-, etc.
16, 32, 64, 128, 256, 512, 010, 020, 040, and maybe more.


SwinSID SE - reworked by Me

Been toying with the SwinSID which is a decent DIY version of the SID chip. My version takes up no more space than the original and would be a drop-in-replacement with no extra wiring. Programming the atmega would be a little difficult though since there is no room for an ICSP.

Monday, June 1, 2015

min64 - The bare minimum rom cart for commodore 64

The idea was to design a cart that would fit entirely in the commodore without sticking out. Surprisingly, it could even be made small enough to fit a shell, if I make one in the future.

The board has has one ROM and thats it.








The board is a meer 1.05 inches deep and has notches for easy removal or mounting (granted a shell is designed). Measuring my own commodore, a board of 1.1875 inches would be flush with the chassis. Also has optional reset switch as suggested by catskull.

My main concern was supporting as many proms, eproms and eeproms as I could since too many are no longer made, but easy to find.

Those supported include:

28F010, 28F020, 28F040,
29F010, 29F020, 29F040,
49F010, 49F020, 49F040
2764, 27128, 27256, 27512
27c64, 27c128, 27c256, 27c512

As well as SF's, GL's, EE's, etc.

Also working on support for 2704, 2708, 2716, and 2732. These will fit, but would require a few rerouted pins.

In any case, I can't wait for these to arrive from OSHpark.

Monday, October 28, 2013

Jazz Disassemblies Ep3: Sega Genesis Saving Teardown

I love the Sega Genesis, but rarely do anything with it. I have made a handful of reproduction carts in the past because there is nothing better than playing games on real hardware but I always have a regret after destroying a donor cartridge, whether it is sports or not. One of the goals I always set myself up with during a creating is to use 100% renewable components. By renewable, I mean of course modern and commercially produced components; nothing salvaged and nothing obsolete. Having nothing obsolete is very difficult in my circle of interests, but salvaging components is my greatest downfall.

During my journeys into the technologies that Sega and other companies used within the cartridges for the Sega Genesis/MegaDrive, I have found three official forms of saving data. Two forms use serial EEPROMs and the third uses the tried-and-true parallel SRAM with battery backup. My goal is to recreate these cartridges using new components and my stretch goal is to expand the addressable memory or just to improve them in some way while making the carts themselves renewable.

We already know that the plastic shells can be remade by the everyday hobbyist and their 3D printers and circuit boards can be fabricated by Chinese companies for pennies on the dollar. All that leave now is the components which are definitely on their way out of style. The components that we are looking for are 8- and 16-bit, parallel ROMs and RAMs. Referring to a statement above: by renewable I meant purchasable from Mouser or Digikey, etc in large quantities which will later be restored. Glancing at Mouser (My supplier of choice) I have already been able to locate a handful of ROMs and RAMs that come in both selectable 8- and 16-bit configurations!

The next goal I will have is to recreate the higher density logic with PLDs, but that is best left for another time.

1. KM62256 Parallel SRAM

These boards found in most of the miserable football and soccer games. Until I find another varient, I will cover one such board revision: "171-6279A"

The board seems to be made by Sega though I have long lost the ROM which was originally soldered in. It contains:

1x (CE) 47uF electrolytic capacitor
5x (C1-C5) .1uF ceramic capacitors
1x (BAT) CR2032 coin-cell battery
1x (IC1) 42-pin Mask ROM (27c160 equivalent) - 16Mbit
1x (IC2) KM62256BPL-7L, 32Kx8 bit (32Kbyte) Low Power CMOS Static RAM
1x (IC3) BA6162, Reset IC with battery backup function by Rohm
2x (IC4, IC5) 74HC00AP, Quad two-input NAND gate

I have already recreated everything on the board in Eagle PCB libraries including the board dimensions and general component layout. Tracing all of the connections is slower work and I will get to that eventually. In the meantime, my goal is to layout a functionally-identical board with 3v3 ROM/RAM, SMT caps and level shifters for proper data flow. THen we will have ourselves a flash cartridge!









Above you have seen the board itself with and without components. Ignore the text on the Mask ROM though since I just stuck a random IC in there to show it with one.

Looks pretty good if I do say so myself, though the traces are not as authentic as the layout. Sega never seemed to use top-side pads. They have vias which allow for double sided boards, but I have only seen EA cartridges that use top-side pads. These pads of course make for miserable desoldering since I need much more heat... and patience.

Some fun facts about this board is that the ROM is 16-bits but the SRAM is only 8-bit. Although I do not have the full details on how the software accesses these, the Gen/MD has two pins which are called !LDSW and !UDSW (Upper Data Set Write and Lower Data Set Write). When reading from RAM, the processor ignores the upper byte of data since there should be nothing there. While writing though, the !LDSW pin goes low which enables the !WE pin on our RAM. These two pins are for transferring 8-bits (one byte) at a time rather than 16 (two bytes).Not knowing how to activate either of these pins, it would seem that someone may add a second SRAM and use the currently unused !UDSW pin as the enable.




The above picture is how I found the glue logic for addressing our memories. Only 6 out of 8 gates are used which is a waste of space and battery power since the unused pins are connected to the Vout pin on our reset IC. If you think about it, the three NAND gates that have both inputs connected act as NOT gates which is something we would take into consideration if we were to redesign this with single-gate SMT ICs or on a PLD.

one problem I have with this board is that A21 and A22 are simply left hanging. Just a guess, but using A20 as a ROm address and A21 in the logic would expand the addressable memory, but Sega chose not to for some reason.

2. Acclaim Serial 24LC02B RAM

The next board I will cover is the P/N 670120 REV 2 by Acclaim. The contents of our board are as follow:

1x (C1) 47uF electrolytic capacitor
4x (C2-C5) 0.1uF ceramic capacitors
2x (R1, R2) 4.7K Ohm resistors
1x (U1) Mask ROM (capacity not yet known)
1x (U2) 74ALS138N, 1-of-8 decoder/demultiplexer
1x (U3) 74ALS74AN, Dual D-type flip-flop with set and reset
1x (U4) 74ALS125AN, Quad TRI-STATE Buffer
1x (U5) 24LC02B, I2C™ Serial EEPROM (2K capacity)

As you can see, the naming routines is different than that of Sega and yet again, we could reduce the chip count to much less with a PLD. U2-U4 could easily be designed in a PLD to reduce space and cost. For the time being, I assume the resistors are pull-ups or pull-downs.








3. Acclaim Serial 24LC04B RAM w/ LZ95A53

You're probably thinking that I recycled this board from a previous post and yes, yes I have. It does pertain to the topic though and I can probably shed a little more light on the special IC now that I know more about !LDSW and serial eeproms.

Anyhow, this board contains:

1x (C1) 47uF electrolytic capacitor
4x (C2-C5) 0.1uF ceramic capacitors
1x (R1) 10K Ohm resistor
2x (U1, U2) Mask ROMs (27c160 equivalents)
1x (U3) Acclaim LZ95A53 (memory mapper, glue logic, serial data interpreter, etc)
1x (U4) 24LC04B, I2C™ Serial EEPROM (4K capacity)




Above is the board that I created by probing all of the traces. Looks nice, but my next goal would be to reverse engineer the Acclaim's LZ95A53. Unfortunately, I have no scope to do so...



The above picture is my schematic which shows the connections on the LZ95A53. I had to make an addition to my cartridge connector since it uses several different pins that very few others use. I believe that the Acclaim's LZ95A53 IC contains the same logic as the board which used the 24lc02 serial RAM. Again, I cannot test this theory.




In hindsight, all of these boards used 27c160 equivalent Mask ROMs. The 27c160 can store a 2MB ROM which means the board with 2 Mask ROMs had a 4MB game. A piece of information for those making reproduction carts with the 27c400, 800, 160 and 322's, the first three mentioned all have a !BYTE pin. This pin allows for the EPROM to function as either an 8-bit or 16-bit ROM which means you may use it in many different systems.

Besides a little bit of work on the silkscreens, these boards are all ready to send to any fab house, granted they make 1.6mm thick boards. I will also be adding some more pictures of the other two boards shortly. Thanks for reading.

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:
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

Saturday, July 27, 2013

Pre-Blog Projects Revisted pt. 1

I was digging through old photos on my ImageShack profile and decided to talk about them. There is no particular order, but each has a story to go along with it.

Shown below is from when I was working with the z80 (as if I ever stopped). I pulled this z80 from a dead Sega Genesis and built it onto a breadboard to test the functionality. It turns out whatever was wrong with the Genesis was not the z80. The testing circuit was simpl; executing NOPs (no Operations) by connecting all Data pins to ground via a pull resistor. This caused the Address pins to run from $0000 to $FFFF bit by bit and since each Address pin was connected to an LED, the LEDs would light up (very quickly mind you) as a binary counter. The only LEDs I couls see flashing were the high erbits becuase the lower bits were mush too fast.

Also shown is a memory chip which remained unattached, an AY-3-8910A Programmable Sound Generator IC, a CTS256A-AL2 Text-To-Speech Controller IC which has gone unused because I do not have the SPO256-AL2 companion voice synth IC. And lastly, in the bottom corner is just a simple xtal running through NAND gates to clean up the signal.



Here is one of my favorite projects! This was a simple Atmega microcontroller based logic Analyzer which I redesigned around very strict limitations. Original credit to:
http://www.serasidis.gr/circuits/mini_logic_analyzer/miniLogicAnalyzer.htm
The limitations were that I wanted it to fit inside of a nintendo gameboy, run on 4x AA batteries like the gameboy and use the battery contacts, battery compartment, power switch and screen location from the gameboy itself.

First came the board. The gameboy has a rather small square mainboard which has several specific mounting holes. All measurements were done very crudely with a clear mm ruler...I sure wish I had a digital caliper. Luckily, everything fit (the second time). The board shown is the board that I printed myself with the transfer method as it is called. you may print your circuit onto a clear coated paper (I use magazine pages) and then iron the image onto a copper clad board, clean and immerse into an etchant solution. Maybe I will write up a tutorial at some point, but it is pretty straight forward. Since this was not my first board to have etched myself, it turned out wonderfully. Some boards...did not. But alas; I am persevering!Notice my old logo etched on the right. ;)

Image Hosted by ImageShack.us

Here is the same board after being populated by hand and placed into the gameboy. "BA-DING" ... just kidding. At least the LED shows power is applied. The microcontroller is on the underside since I designed it to fit into a socket. Another restriction that I just remembered was that I wanted to use the gameboy's buttons to navigate through the program. The bottom of the board is suppose to hold ordinary push buttons, but I did not fit them so that I could wire up the GB's.

Image Hosted by ImageShack.us

LOOK IT WOR......thanks China for the crappy LCD screen. >_>
Yes, the text is indeed upside-down, but at least I managed to get it working. This happens to be the second problem with this particular LCD. The first was that it runs on 5v, not 3.3 like the datasheet stated. Also, the control pins were all sorts of switched around. With a little retrcing of my board design, I had that sorted out as well. My favorite problem (sarcasm) was that the LED backlight happened to be high-enabled rather than low...so if I had not caught that as soon as I did, they probably would have been damaged.

Image Hosted by ImageShack.us

Add the case and logic probes (minus one)...and...Ta-da! A working logic Analyzer!

Image Hosted by ImageShack.us

The above mishap from China isn't true for all electronics though. The USB ISCP below works very well. The only problem is that the ZIF socket is hardly ever used. It is used for a few Serial programmable microcontrollers and eproms. The only eproms I use are parallel programmable for which I use a different programmer.

On either side of the programmer are my sockets to program the microcontrollers (written on the sides of the boards). YES, I realize that having these boards entirely kills the 'S' in ISCP, but few of my designs fit an ISCP connector...

Image Hosted by ImageShack.us

Here is a smaller project: two guitar pedal boards. These board were suppose to use the PT2399 IC to create a variable echo effect, but I never found all of the needed components so the board were stores away in one of my many crap-boxes.

Each board controls an analog mono audio signal and connectos two potentiometers for control. on the right of the board is where a 7805 voltage regulator would fit and at the center is where the chip would have been socketed. Again, I degin all of my boards using Eagle CAD and then print them onto a PDF so that the vectorized image remains thew highest quality and static size.

Image Hosted by ImageShack.us

This is a print of a gameboy cartidge programmer designed my Reiner Zeigler to be used with modified cartridges or other commercial carts. It allows for you to read and write not only ROMs, but also RAM data if present. This board is the reason why I built the Atmega 8515 programmer above.

Reiner designed two version of the board; one for USB and one for Serial. I tried my hand at the USB because at the time, I didn't have a serial connector on the desktop I built...as is one of the few disappointing facts about new computers.

Image Hosted by ImageShack.us

lastly is the board after etching. It turned out terribly! This was the first board I had ever etched so I can't really complain. It was a learning experience and nothing more. Since nearly all of the data and addressing pins bled together, the board was tossed and I tried again later on after redesigning the board to accommodate my barbaric etching methods. I think the problem was that I didn't iron it long enough and with enough pressure. Some of the plastic ink peeled off or bled together.

Image Hosted by ImageShack.us



Tuesday, July 16, 2013

Using POV-RAY

Just a quick run-down of how to use POV-RAY after you have installed it. I assume you have installed it.


Hit RUN at the top of your board toolbar.



Image Hosted by ImageShack.us




Then run 3d41.ulp in the directory shown.




Image Hosted by ImageShack.us



The setting are extensive and somewhat confusing.
The defaults will work though. Click "Create POV-File and Exit".



Image Hosted by ImageShack.us




You will probably be prompted to add text and sockets to certain ICs. Do as you wish.



Image Hosted by ImageShack.us




There will also be parts that cannot be rendered because you do not have the 3D part files. Thats ok.



Image Hosted by ImageShack.us



 If there is something you would like changed for example size, angle, silkscreens, etc., change the settings a little bit. My silkscreens are in different layers than the default so I had to add these to the misc tab.



Image Hosted by ImageShack.us



Go ahead and load your output into POVray and click run to render the image. Play around with the options until you are satisfied.

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Monday, July 15, 2013

SID-Boy v1 Hardware Completion

As per the title of this post, I have completed the board. All of my necessary components are placed, routed and errors have been checked over and or fixed. I have even chosen to decorate the board a little with my QR code just because I can.

Here is the board before I corrected my errors. 855 ERRORS! Many of them were silkscreen errors where the silkscreening was too close to pads and vias. These were easily fixed.
The clearence errors were also fixed very easily by movig the traces a little farther from eachother or from vias and pads.

Image Hosted by ImageShack.us

Here is the board in its entirety, both with and without the ground planes.

Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

Lets view some of the board up close. Here are the two resistors, R4 and R5, that I added as described by the SwinSID website. 47Kohms between PWM and +5v and 47Kohms between PWM and the output which happens to be the Audio-IN pin on the gameboy. The board now contains both methods of audio output so that I may find out which is better.

Image Hosted by ImageShack.us

Here is my logo as I call it. It is just a QR code that I made which leads to this blog. Adding BMPs to a board is very simple. Beside that you can see a small block of text that describes the caps and resistors above. There was limited room next to them.

Image Hosted by ImageShack.us


My clock. This clock a larger than the clock I had been using before, but is more easily available. Pins 1 and 3 are the two terminals for the oscillation. I may need to change the sizes of caps and resistors depending on the availability of them in the future, but each has plenty of room for change.  I believe these caps were size 0603. Something of note is that the traces of the clock are distant and not of the same length from the MCU. This is something people would call poor design, but the clock speed of 24MHz is not terribly fast and the clock is isolated as much as possible from traces and other devices so that I do not believe any problems will arise.

Image Hosted by ImageShack.us

Here are my power rails. Yes, they are round. Why? Well, because I can. ;)

Image Hosted by ImageShack.us

The last thing to do would be to write a program that stores SID data to the RAM locations where I have placed the SID in the memory map. I will have to research the SID banks, commands and gameboy programming. Once I have my board printed and populated, I will test a known-working ROM such as mGB, the midi software just so I know the board is routed to the gameboy correctly.


LC the kitten likes my board. How nice of him to approve. :D

Image Hosted by ImageShack.us

I really really need an oscilloscope so that I can perform extensive testing with this and other projects. I think that it is currently my greatest downfall...