Retrocomputing, part 2 - Page 1
Forum section: electronics / projects

author: slburris
author_rank: Frequent Contributor
timestamp: September 26, 2010, 02:52:11 pm
content: Attached are the latest schematics and aPCB layout with a test routing run.Still have some work to do, I think I'm about 90% done.We're missing bypass capacitors, some net connections,and a few components.Once I'm done, I'll get all the parts together, and thenprint out the PCB at true size for a test fitting. I can'ttell you how many times I've caught little problemsdoing this.Once that passes, I'll send the gerbers off to a boardhouse and build a prototype. Hopefully it will work thefirst time!Scott

author: FreeThinker
author_rank: Frequent Contributor
timestamp: September 29, 2010, 02:46:20 pm
content: I learned (to a basic level) machine code on a zx80, Yes it was possible. You have stated that you will use a soft core t80 which I assume is an emulator.Will it fully support the code set of the Z80 or only the "Official" codes?.As I remember the Z80 had a set of "sercret" opcodes that were not supported (actually did not work as expected) but were used a lot in games software and "Protection systems" because normal disassemblers would not handle them correctly.Probably being a bit anal bringing it up but I feel that it should work as originally built warts and all.Just a thought.PS. As to the wall wart problem, have you considered a bridge rectifier after the jack? Then the board would work no matter what polarity the tip is.

author: slburris
author_rank: Frequent Contributor
timestamp: September 29, 2010, 03:23:20 pm
content: Quote from: FreeThinker on September 29, 2010, 02:46:20 pmI'm working on two separate designs. The "classic" design is the schematic a couple posts agoand that uses a genuine Z80.The "FPGA" design uses the T80 core from opencores:http://opencores.org/project,t80It supports all undocumented Z80 instructions and is heavily used bythe retroarcade community. See for example:http://www.fpgaarcade.com/platforms.htmSo I have pretty high confidence that it works!Scott

author: FreeThinker
author_rank: Frequent Contributor
timestamp: September 29, 2010, 04:13:12 pm
content: Quote from: slburris on September 29, 2010, 03:23:20 pmHow cool is that!. Not just me then Lol.

author: slburris
author_rank: Frequent Contributor
timestamp: October 04, 2010, 01:55:53 am
content: I've placed an order with Digikey for the parts I don't have in stock, soI should get them Wed or Thur I think.So next weekend I should be ready to do the test fitting of parts toa printout of the board.While I wait for parts, it's time to get back to the FPGA design.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: October 08, 2010, 04:08:41 pm
content: Woohoo, my Digikey order has arrived, so I'm going to try tofinish up the schematic and PCB this weekend so I can doa test layout on paper with the components.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: October 10, 2010, 04:26:36 pm
content: The board is going to look something like the attached test layout render.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: October 12, 2010, 03:06:44 pm
content: Have I mentioned yet that I hate autorouters? I've been screaming at the Eagleautorouter because it's making stupid routing decisions. Come on, can't this thingsee this nicely aligned data bus and just connect everything up there first beforemessing it up with other traces? No, it can't!I've even tried the freerouting.net autorouter, which I think generally does a betterjob than Eagle's built in router. Still, neither autorouter gets to 100% .It's only a 4Mhz design, so layout really isn't critical, and there are zillions of connections,so I don't want to route this by hand.Next up, I'm going to try some old tricks, namely writing a script file that autoroutesthe "obvious stuff" first, then let's loose on the whole board. If that fails, I may have toat least partially hand route this board.Scott

author: Zad
author_rank: Super Contributor
timestamp: October 12, 2010, 07:07:00 pm
content: There is only one way to learn really. Go and do it. With the time you spent looking for alternative autorouters and shuffling around horrible looking routes you could have done it by hand and ended up with a decent looking board that you know inside out. Get the power buses and data lines in and take it from there.

author: TechGuy
author_rank: Regular Contributor
timestamp: October 12, 2010, 10:15:20 pm
content: Quote from: slburris on October 12, 2010, 03:06:44 pmRoute in groups, don't route the entire board at once (assuming eagle has a option to route a selected group of components - I use Diptrace). Then fix the problem ones manually and do another group, fix the problem traces, move on to another group. Not perfect but better than other options.

author: slburris
author_rank: Frequent Contributor
timestamp: October 20, 2010, 03:35:20 pm
content: OK, we've reached the PCB stage of things.I'm starting to shop around board makers for a roughly 25 sq in board, qty 25, 2 layer.This is too large for some of the real deals, like ITead Studio, or DorkbotPDX, or BatchPCB,so time to quote some of the standard places I've used before.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: October 21, 2010, 01:49:35 pm
content: Here are the latest schematics, at least until I find another error :-)Scott

author: slburris
author_rank: Frequent Contributor
timestamp: October 23, 2010, 04:52:49 am
content: Oh bah, I realized I made two part changes fairly late in this processand so the SD card connector has the two side holddowns in a differentspot than the one I found in the Eagle library. Plus I ordered a 5 pin mini USB-Bconnector instead of a 4 pin which is on the PCB.Back to more corrections, reroute, stare at it some more, then send it offto be fabbed. I think this board is going over to pcbfabexpress.comScott

author: slburris
author_rank: Frequent Contributor
timestamp: November 02, 2010, 03:47:44 pm
content: I added headers for the address/data/control buses for a logic analyzerconnection, just in case I need it. And now I'm having a hard time gettingeverything re-routed....Plus I discovered I made a mistake in the PCB symbol design for the compactflash socket. I thought I'd be clever and modify an existing design ratherthan start from scratch, but I discovered that I computed some coordinatesincorrectly (measured from where the solder mask ended rather than thepad itself) and a few things are off by a fraction of a mm. So off to fix thatsymbol. Have I said how much I hate creating new parts in Eagle?Then, I'll stop making changes and just send the boards off to be manufactured.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: November 13, 2010, 02:05:48 pm
content: OK, I ordered 5 boards from pcbfabexpress.com yesterday morning and theylet me know in the afternoon that my uploads passed their design rule checkso they are in process. I'm not in a hurry, so they are being made on a 10 dayturn.The boards are rectangular, about 30 square inches. It sure takes a lot of chipsto get anything done using those big Zilog chips of the 80's!Scott

author: slburris
author_rank: Frequent Contributor
timestamp: November 13, 2010, 02:26:07 pm
content: Here are the latest schematics and an image of the board.No, I didn't route the board by hand. At 4 Mhz, I figure thecircuit will work in spite of any craziness done by the autorouter.I did wirewrap a Z80 circuit in the 80's and it worked just fine.That being said, I didn't use the Eagle autorouter to do thisboard.....Scott

author: RayJones
author_rank: Frequent Contributor
timestamp: November 18, 2010, 07:48:37 am
content: LOL, a true retro project would be using the ubiquitous 1488/1489 RS232 interface chips and the associated +- 12V railsNah, only joking. This is the stuff I cut my teeth on, and it is good clean fun and amazingly capable.More importantly they boot in seconds!

author: slburris
author_rank: Frequent Contributor
timestamp: November 18, 2010, 02:45:46 pm
content: Quote from: RayJones on November 18, 2010, 07:48:37 amYeah, and a 40lb transformer with multiple windings to provide the power.And none of this DB9 stuff, RS232 uses DB25's, darn it! (yes, I knowit's really called DE9 and DE25 but nobody seems to use those terms).And 8" floppy disk drives....Scott

author: slburris
author_rank: Frequent Contributor
timestamp: November 18, 2010, 02:53:38 pm
content: And now I'm on day 4 of my 10 day turn for the prototype boards.Did I just order another set of green coasters? Or will the boards work?Or at least be able to be fixed by cutting traces and using jumpers.Stay tuned!Scott

author: baljemmett
author_rank: Unknown
timestamp: November 18, 2010, 03:19:12 pm
content: Quote from: slburris on November 18, 2010, 02:45:46 pmNah, DB25 is right, but what's commonly called DB9 is really a DE9. The letter indicates the size of the shell; hence VGA uses a DE15 connector, since it's the same size shell but with more pins (not to be confused with DA15 for Ethernet AUI connectors!). All good fun, and probably why lots of people just call them "9-pin D" etc.Looking forward to seeing the boards when they arrive! Have you decided yet how you're going to present the storage to CP/M? I seem to recall you were thinking about partitioning schemes a while back.

author: slburris
author_rank: Frequent Contributor
timestamp: November 18, 2010, 03:42:04 pm
content: Ah, there's misinformation about DB vs DE then:http://en.kioskea.net/contents/elec/connecteur-prise-db25.php3I haven't really thought more yet on how the CF card is going towork.My most immediate goal is to get an EPROM burned that initializes theserial port and prints "Hello World!". Then I'll build a little monitorprogram that can read a bootstrap off the CF card.I think I'm going to need a CP/M system to build the BIOS and BDOSfor the CF card. I'm a little vague on the details of how this hangstogther, since it's been 30 years when I last customized a CP/M system.Something about using SYSGEN to write a diskette that you can boot from?What I think I'll do is bring up an Altair z80 simulator running CP/Mand use that to build the right images for my system:http://simh.trailing-edge.com/http://www.schorn.ch/cpm/intro.phpIt will be good practice for the next project, the one I originallyproposed, which was to use a soft core Z80 in an FPGA talking toa VGA connector, mouse, and keyboard. For that design, there willbe more memory, as my intention is to let you boot either CP/M orMP/M.And then of course as I was rummaging through my chip collection,I came across some 68000 series chips. I have 68000's, 68020's,and a 68040. If I haven't burned out on this stuff, maybe I'll do someretro 68000 thing.Scott

author: RayJones
author_rank: Frequent Contributor
timestamp: November 18, 2010, 08:31:15 pm
content: Quote from: slburris on November 18, 2010, 02:45:46 pmLet's not forget that having a 10MB ST-506 HDD would be *very* extravagent

author: slburris
author_rank: Frequent Contributor
timestamp: December 01, 2010, 04:51:59 am
content: The PCBs have shipped! Picked up this evening from Sunnyvale, CA.Tracking says will be delivered by Dec 3 4:30pm. Hmm, they just haveto move a couple hundred miles down the state into southern California --even if Fedex drives them down by bicycle, it shouldn't take 3 days!Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 03, 2010, 11:51:07 pm
content: The PCBs are here!I'll try to post a high resolution picture of one in a bit.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 04, 2010, 06:48:48 am
content: The build has begun!First up, I put together the switching power supply and immediately hita small problem. For some reason, the outline of the input jack is incorrectand crowds the polyfuse and the first Schottky diode. Not enough to bea showstopper, but if you look closely I accidentally touched the jackwith the soldering iron and melted it slightly.Second problem was with the National Semiconductor switcher chip.I used a pinout with a staggered pin arrangement. But I only have aninline arrangement type in my parts box (about a hundred from an Ebaypurchase). OK, no problem, just bend the pins with a long nose pliers.I also didn't use the exact values of the capacitors I specified on theschematic. I had a bunch of 100uf caps, so I just used three of those.I figure the exact values aren't too critical, and going bigger shouldn'thurt anything.The LM2575 is only a 52Khz switcher, and the datasheet seems tosay you can use regular electrolytics and not need to get into thelow ESR tantalum or ceramic types. Yeah, probably at that switchingspeed nothing's too critical.So I built the power supply first because when I have a new board,I like to verify that it's going to output the proper voltage *before*I put a bunch of rare or expensive ICs on the board. It's probably not reallynecessary for this board because I have high confidence in thisSimple Switcher design and there's very little to go wrong. ButI tend to be paranoid about letting the magic smoke out.Connected up a 12v unregulated wall wart, fired up the DMM,and immediately remembered why I shouldn't work on this stufflate at night. I was using my UNI-T meter instead of a Fluke, and Ihad the leads plugged in to measure current, although the meterwas set to measure voltage. I measured the 5 volt outputand got nothing. Hmm, puzzled I put the probe on the polyfuseand got a small spark.Luckily with a switcher that is short circuit protected and a polyfuseto handle the raw input voltage, nothing bad happened. Fixed mytest leads and sure enough, 5 volts out!Now in looking at the PCB more closely, I spotted another mistake.The CompactFlash card socket has two tabs near where the card isinserted. The tabs are supposed to be soldered to the PCB.But when I made the part in Eagle, I forgot to block out the soldermask over the pad! Oh well, I can scrape the solder mask off withan X-Acto knife I guess.So where am I? I've installed the CPU, the 4Mhz master clockoscillator, and some sockets. I've put my Rigol on the clock andverified we're getting a good rail to rail 5V CMOS swing on thewaveform, and the Rigol says it's 4Mhz to boot.So far so good, and I haven't yet had to cut any traces.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 04, 2010, 10:44:32 pm
content: Here are some links to high resolution PCB images.There are each about 5MB in size:front -http://www.electroscott.com/images/P1000918.JPGback -http://www.electroscott.com/images/P1000919.JPGScott

author: slburris
author_rank: Frequent Contributor
timestamp: December 06, 2010, 07:38:50 pm
content: Here's the first serious errata.The symbol for the MCP131 voltage monitor is backwards.So as installed, it holds the RESET line low permanently andthe processor doesn't operator.The fix is to ignore the silkscreen on the board and turnthe TO-92 package around. Then it's connected properly.I did that and now my Z80 CPU free runs. Monitoring M1,I can see machine cycles being run.Next up, I need to make a diaignostic EPROM of some sort andprogram the GAL, then test the outputs of the GAL to make surethey are doing the right thing.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 06, 2010, 08:10:50 pm
content: So here's what I'm going to do for diagnostics.I'm going to read from each of the SIO, CTC, PIO, and Compact Flashports in a loop. The first port I will read once per loop, the second portI will read twice, and so on.Then, by monitoring both IORQ and a particular chip select line, I should seethe correct burst of 1, 2, 3, or 4 selects per cycle, if the GAL is programmedcorrectly. If not, I'll have to figure it out.If needed, I'll pull out the Tektronix 1240 logic analyzer, but I'm hoping this willgo well enough to make that unneeded.Here's the program I'm going to put into the EPROM:0000 1 org 00000 20000 3 siobase equ $000000 4 ctcbase equ $200000 5 piobase equ $400000 6 cfbase equ $600000 70000 8 loop:0000 db 00 9 in a,(siobase)0002 db 20 10 in a,(ctcbase)0004 db 20 11 in a,(ctcbase)0006 db 40 12 in a,(piobase)0008 db 40 13 in a,(piobase)000a db 40 14 in a,(piobase)000c db 60 15 in a,(cfbase)000e db 60 16 in a,(cfbase)0010 db 60 17 in a,(cfbase)0012 db 60 18 in a,(cfbase)0014 18 ea 19 jr loop22 bytes code generated and 5 labels definedScott

author: slburris
author_rank: Frequent Contributor
timestamp: December 06, 2010, 11:18:37 pm
content: Picked up a bunch of 27C256 EPROMs from my collection and put themin the EPROM eraser. Can't remember how long they are supposed to bein there, so let's try 1/2 hour.I'm having flashbacks to how I built stuff like this in the mid 1980's! :-)Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 07, 2010, 03:20:43 am
content: So I programmed an EPROM, programmed a GAL, plugged themin, and ..... nothing.No IORQ cycles at all, which means not even the part of the GALdealing with memory address decoding is working properly.Back to debugging...Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 07, 2010, 05:32:17 pm
content: Uh oh, I grabbed a Lattice GAL20V8 instead of an Atmel ATF20V8 andI made the fuse map with Atmel's version of WinCUPL.It's been so long since I programmed GALs, that I can't remember if thefuse maps are identical between different manufacturers...Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 11, 2010, 04:43:38 am
content: Poking around with my trust Rigol scope, it appears that the GAL isn't working.I can't seem to find any Atmel 22V10's, but I have plenty of Lattice Semiconductor22V10's. So I'm now downloading their "classic" software and I'll have to figure outhow to generate a fuse map all over again.Turns out even though the software is free, they *still* require a license. So I'mawaiting a license key in email.Maybe I should have done all the memory and I/O decoding in discrete logic, but theboard already has so many chips on it to do so little.When I built my first CP/M computer from scratch after the Altair, I wirewrapped aton of chips together. It worked, as long as you didn't breathe too heavily on the board.I learned over time if the system didn't boot to press just so in a certain area on theboard. Must have been an intermittent wire wrap.This PCB should be much more reliable, once I get past these early startup problems....Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 11, 2010, 08:54:53 pm
content: Well, that was pretty stupid. I actually pulled a GAL20V8 instead of aGAL22V10 and programmed it with the fuse maps of a 20V8. Uh, that'snot going to work....I picked a 22V10 and now things are looking much better.Remember how I was going to do one I/O read from the SIO, twofrom the CTC, and so on? Here are capatures of !siosel, !ctcsel, !piosel,and !cfsel. See how the groupings increase each time?This verifies that the GAL is at least mostly working, plus the EPROMis working, woohoo!Now I have to get the serial port to print "Hello World!" :-)Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 11, 2010, 10:46:49 pm
content: Here's a shot of the power input jack that's too close to the polyfuseand input diode. Kinda hit it with the soldering iron....Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 11, 2010, 10:48:49 pm
content: My attempt to solder the tiny FTDI chip. It looks slightlyoff, but should still work, I hope.Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 12, 2010, 06:34:42 am
content: And I'm currently stuck trying to get the USB chip to berecognized. For awhile I had convinced myself that I hadwired the mini USB-B connector backwards, but comparingto some commercial products, it's OK. I did have a badsolder joint connecting the GND pin, so that had mescratching my head for a bit.But when I plug it in to a computer, the FTDI chip seems toimmediately go into SUSPEND mode. The computer doesn'tsee it as a USB uart chip, and FTDI's EEPROM setting utilitydoesn't see it either. I'm following the self-powered diagramin the FT232R datasheet, but no joy.I must be doing something stupid wrong, but I'm not seeingit tonight. Maybe tomorrow will be a better day.On another note, I had forgotten how hot these NMOS chipsgot. And the Lattice GAL chip is the hottest of them all, eventhough I'm using an LP (low power) version. Even the LP versiondraws 90ma at 5v, that's almost 1/2 watt!Scott

author: slburris
author_rank: Frequent Contributor
timestamp: December 13, 2010, 05:00:12 am
content: Well, things are still not going well in USB land.I found a bad solder joint at the USB connector such that theUSB D+ line wasn't making contact. That's now been repaired.So when I plug the board into windows, it now says that'sit's detected a new device, yea!Then it says this USB device is broken, boo! I can't seemto see the device with FTDI's programming utility either.Am I going to have to capture what's going on with the USB datalines to figure out what's going on? I hope not -- this would takeme far off my field of expertise. The whole point of using the FTDIchips is to not have to really know anything about USB.Scott