Sunday, October 4, 2015

When Pee-Cees Leak

The next most important thing on the big white board where I keep my TO-DO list is to finally go through all my Commodore PCs and Amigas for a battery check and replacement.

You see, just like modern computers, these older PCs use batteries to maintain power on its internal clock chip.  This is why your computer remembers what time it is between reboots.  However, the older computers used Nickel-based batteries that, over time, would go bad, leak a base chemical onto the motherboard, and eat away at your computer like an acid!



Here you can see a NiCd battery leaking its evil all over the motherboard of a Commodore PC10-III.

The most obvious solution would be to clip out this bad battery and replace it with an identical one.  However, that only puts off the next leak for another decade or so.  I figured it was better to find a more permanent solution.



The solution I've been going with is to replace the NiCd battery with a Lithium ION battery holder.  This solves several problems: it makes the battery more easily replaceable in the future, Lithium batteries will last many many years longer even than the rechargeable NiCd, and best of all, Lithium batteries don't leak when they go bad; they just fade away.

In the picture above, you can see that my battery holder is two-pin, while the NiCd battery it replaced was three pin.  There were two positive-side pins.  I chose to solder the positive pin on the battery holder into the hole most removed from the rest of the motherboard, which was important, as I'll explain below.



While trying to educate myself about this problem, I learned that the NiCd batteries would push 3.6V into the clock chip when the computer was turned off.  However, when it was turned on, the power supply would push 5V back into the battery to recharge it.  Some people have said that pushing 5V at a non-rechargeable Lithium battery might actually cause it to explode or something!  To prevent this, I followed some advice I found about putting a Shotsky diode between the positive output from the Lithium battery and the motherboard.  A diode allows current to flow fairly freely one-way (out of the Lithium battery), but blocks current coming from the other direction (into the Lithium battery).

Since the original battery was two pins, with only one of them going to the clock chip, I saw this as a perfect chance to put my diode across the two old positive holes, on the underside the motherboard, after separating the short between those holes, of course.  The 3.6V from the battery would flow through the diode, and from there out to the clock clip.




Success! (Yes, this is just a gratuitous picture of the PC10-III running PC-GEOS).




So, later Commodore PC motherboards corrected the mistake of using leaky NiCd batteries by using Lithium batteries as well.  Unfortunately, they didn't use battery holders, but did something which, IMHO, was almost worse: they used an integrated battery + clock chip in a single monolithic black box.  The Lithium-Ion battery is actually underneath that black casing, enclosed in plastic.

This is wonderful for preventing damage to the motherboard from leaking NiCd batteries.  However, even the Lithium batteries run out eventually, and then what do you do?  



The answer was to carefully drill away at the block-o-plastic to expose the Positive and Negative poles of the internal battery, and then solder on a new battery holder, into which I put a new battery.

I used a very small grinding head on my Dremel tool to slowly expose the hidden pins.  I then tested the exposed metal with my multi-meter to confirm I'd really gotten the right ones.  If you look carefully, you'll see I actually had to remove a component to get to it.



This wonderful picture from Peter Wendt of Germany shows exactly how to go about this.  You can read his own account here: http://www.mcamafia.de/mcapage0/dsrework.htm

So, that's what I've been up to.  I took down every single one of my Commodore PCs, and I've been slowly taking each one apart, checking for batteries to replace, doing quick tests, taking pictures, and then shuffling them away. :)




However, as you can see here, I still have quite a few to go.... and those don't count the boxed PCs, or the PC50-III I have hooked up.

Monday, September 28, 2015

Two Things I'm Not Fixing Right Now

Sometimes I find a problem just isn't worth fixing, and sometimes the problem just isn't worth fixing by Me ... Right Now.

I recently went through two devices that were taken off the shelf for one reason or another, but both got re-shelved when I determined that my limited repair knowledge and resources were best used elsewhere.


First up was this Commodore VC-1540 disk drive.  It was just sitting lose with a pile of other stuff, so I decided to clean it up and properly box it, since it's 220V and not a drive I use every day here in the 110V U.S.

I also wanted to confirm that it actually had the original 1540 roms.  A disturbing number of 1540 disk drives were "upgraded" to 1541 roms for compatibility with the Commodore 64.


Fortunately, the roms were indeed the original 1540 roms, which give the VIC-20 both compatibility and a nice little boost in load-speed by default.  This youngster is a "true" and stock VC-1540.


The drive worked great as well, of course; the only problem I found was that, at some point in the past, the fuse-mount was cracked.  It was dangling loosely when I examined it.  I considered replacing the fuse mount, but there was still enough thread to secure it with a thin nut, and replacing would have meant tearing off the rubber insulation and/or desoldering the wires from the power supply.  Clearly I decided that this was good enough for now.

It's still a lovely drive, and since I know I won't be seeing it for awhile, I enjoyed giving it some consideration.







Next up was the Commodore 128D/81, which was originally taken down just for retr0brighting.  The entire lower half of the case was a pastel burnt orange, as were several keys.  You can still see that those keys could use some more work, but the rest of the case came out beautifully.

The problem is the same as it was when I first got it.  Neither the computer inside, nor the motherboard of the internal "1563" 3.5" disk drive, would boot properly.



I immediately dismissed the idea of repairing the computer at this time.  Here is a photo of the motherboard taken by the previous owner.

The MMU, video circuitry, and especially the all-important Z-80 processor board are a jumbled and hacked Mess.  Some day I may lay out a working C128 motherboard and start swapping out the chips from this thing to make sure that, circuitry aside, at least the chips are OK.  For now, however, there is no way I'm touching this thing.  Nope Nope Nope!

However, the 1563 drive struck me as an easy task.  It was only last month that I brought its direct descendant, the 1581, back from the dead.  During that fix I made sure I had every chip on the 1581 motherboard, so I was flush with parts.  NO Problem, Right?


At first it was simple.  I swapped out the CPU, no effect.  Then the 74ls241 (which was the bad chip on my 1581), to no effect.  I then went after the 8520 CIA chip.

Whoa nelly! See that little blue wire running from the 8520 to another point on the board?  That was the tip of the iceberg.  The 8520 on this board had several pins "clipped" and then re-soldered to the socket in *different pins locations* using more little blue wire.  In other words, that 8520 was going Nowhere without carefully diagramming how the schematic was being altered, and then de-soldering everything.  To try another 8520, I'd have to more-or-less ruin it by bending up pins and reproducing the hack job hidden underneath that innocent-looking little 40 pin chip.

It was a jungle under there! And I was too terrified to mess with it.


So, whether I'm waiting for knowledge or just courage, I put the lid back on this bad boy and sent it back into the sunset.  Some day though .. some day...

Saturday, September 19, 2015

Matsushita's Revenge

I just finished swapping out the capacitors on the disk drive devices in a Commodore 720-D.  Since this is the 7th and 8th time I've done this particular process, I figured it would be useful to share some of the lessons and pitfalls I learned.



First off, this post is for anyone who has one of the following disk drives or computers:
Commodore SFD-1001 Disk Drive
Commodore 8250LP Disk Drive
Commodore 8296D Computer
Commodore 720D Computer
Commodore 256-80-D Computer
Any computer or disk drive with Matsushita 1MB DSDD 5.25" disk drives mechanisms.

If you own one of the above, you *must* change the capacitors in it, and soon.  The capacitors in them *will* leak, and they will damage the drive motherboard.  The damage gets worse over time, so the sooner the better.  If the above doesn't scare you, consider this: of the 8 drives I've checked, all 8 have had at least one leaking capacitor with some amount of drive board damage.

Here's a picture of what I'm talking about:


You can see the leak damage in the bottom left and the upper right.

So, to replace the capacitors, you will need the following:

  1. Soldering iron and solder
  2. Solder wick
  3. Alcohol and Q-tips for cleaning
  4. Small phillips-head screwdriver
  5. Flux pen
  6. Pen-razor
  7. One (1) 33uf 25V capacitor  (5mm tall or so)
  8. One (1) 47uf 10V capacitor  (5mm tall or so)
  9. Two (2) 4.7uf 25V capacitors (5-7mm tall)
  10. Two (2) 22uf 10V capacitors (5-7mm tall)
  11. Multi-meter with continuity checker



The first step is to remove the screws to the round magnetic wheel thing.  These screws can be very difficult to start, but slide right out once they are turning.  Just don't strip them trying to get them started.  Put some muscle in it!


Now lift off the magnetic wheel and set it aside.  You'll also want to remember to pull out the "spacers", otherwise they will just fall off and slide around.  Some drives will have two of them.  Some only one "fatter" one.



The next thing I usually do is de-solder the power-cable in the upper-left.  You can see the four pins of this wire in the picture above, being pointed at by the soldering iron.  Apply some flux and solder wick, and they will dry up.  When removing them, you'll want to carefully rock them back and forth a bit until they come out.


Now remove the remaining four screws on the board.  These are a BITCH.  They will start difficult, get easy for a few turns, then go difficult again.  They are harder to strip than the "wheel" screws, but still trouble.  Just make sure you push down hard and GO SLOW when working on them.  Remember that the longer screw went in the upper-left area.


Now you'll want to carefully lift the motherboard up from the LEFT side ONLY.  Underneath the right-side area is a little ribbon cable that can be damaged if you yank it out, and once it is yanked out or torn, it is impossible to get back in.  This is also why I don't just de-solder the ribbon cable; you don't have to remove it to do your work if you are careful.

The board may be "sticky" at first when trying to lift it.  Just keep rocking it around and lifting up on it at various angles and it will eventually come up.  Remember not to pull up on that right side though!  Below is a picture of the board lifted up, so you can see the little ribbon cable we are protecting:


You can see it just above the right-middle of the white wheel paper stuff.  Sometimes you will have lots of slack.  Sometimes you will have very little.  Just feel your way to how much you can move the board around without disturbing that cable.



The first time I did this, I made myself a little drawing showing the six capacitors I was replacing, what their values were, and which pin was ground.  This is because, unlike resisters, capacitors are polar, and it is important to put the correct pin in the correct hole.  In my drawing, I show each capacitor is a V shape that points to its value, and where one of the V legs has the traditional ground symbol.

You can also see that I documented the colors of the wires in the power-cable we removed, so that I would put it back in correctly.  It turned out that that was not really a problem, but well, safer than sorry, right?




Here are the actual locations of the six capacitors you will be desoldering.  No special tricks here.  I just apply some flux and soak it away with the solder wick.

The only problem I ever had was with a through-hole trace that was so badly corroded and covered with black gunk that I had to scrape it off with my pen razor a little bit in order to get any solder lifted off.  Also the metal trace was no longer secured to the board, so I had to treat it with kid gloves.  It sucks when that happens.


After desoldering the capacitors and setting them aside, I typically take a magnifying glass and a bright light and look at the through-hole traces where the new capacitors will go in.  Acid damage from the bad capacitors will often leave a black gunk on top of the metal, making it impossible to get a good solder connection to it.  When I see this gunk, I use the tip of a pen-razor to scrap the gunk off as best I can.  Make very light tiny scrapes around the edges of the through-hole.  It doesn't take any pressure at all to remove the gunk, and if you scrape *across* the trace, you might accidentally pull it away from the board, so I recommend scraping in a circle, very lightly.  Obviously, if you can see all the metal around the hole, this is unnecessary.


At this point you can start cleaning off the places where the capacitors were removed with some alcohol solution and q-tips.  You'll need several q-tips because of all the black gunk you'll lift, as well as any flux left from desoldering.


Once everything is cleaned, you can use your multi-meter to start checking to make sure the acid damage from the bad capacitors did not eat clean-through any traces.  If any traces were damaged, you'll have to repair them with wire.  None of mine have been quite that bad, but I have heard of ones that were, so be prepared.



Now you can put the new capacitors in.  As I mentioned above, capacitors are polar.  The side of the capacitor with the white stripe is "ground" and should match with the hole that is in the white-half of the circle in the above picture.  You can also consult my little diagram for the same information.


It should also be mentioned that this board lives in a very tight space.  If you purchased capacitors that are taller than the things around them, you'll need to bend them down.  I made this mistake in one of my early re-caps.  The capacitor was too tall, so the board sat a few millimeters higher than normal, which caused the board to scrape against the magnetic wheel once it was put back on, preventing the drive from turning.



Once the new capacitors are in, you can put everything back together.  Don't forget to re-solder the power-cable we removed in an early step!

Also, make sure the screws are very tight.  Yes, the 4 screws for the motherboard will be almost as painful going back in as they were coming out.  Again, go slowly and firmly.

When you are done, the only thing that should move around is that magnetic wheel, and it should spin freely.  In fact, you might want to give it a spin with your finger as a final step.  If it scrapes against the board, it means you need to lower that board (or raise the wheel) until it does not.

Now your drive is good for another 10 years (or more?)!









Sunday, September 13, 2015

Commodore 8296D: De-Deutsch-ification


Some years ago I picked up a Commodore 8296-D from a kind fellow aus Deutschland (from Germany).



If you don't know about the C= 8296-D, it is a computer similar to a CBM 8096-SK, but with built in CBM 8250-compatible dual disk drives and the Execudesk rom and software package.  The 8096-SK, if you don't know, is the new-"Porsche" style of the CBM 8096 computer.  And the CBM 8096, in turn, is a CBM 8032 with 64k expansion.  The 8032 is the 80 column version of the Commodore PET 4032-12.  If you don't know what the PET 4032 is, shame on you.

Since I loved the 8296 so much, it quickly became a member of my official PETting Zoo.
Several reasons eventually put it on my workbench.  One is to "re-cap" the Matsushita drive mechanisms.  They are notorious for leaking capacitors, and that notoriety is well-known to this collection.  Every Matsushita drive I have inspected has had at least one leaking capacitor.

Another task was to fix the internal roms.  The computer had been born in Germany as an english 50hz 220V Execudesk computer, but at some point had been converted to a German 8096-SK-D by replacing the Execudesk rom with a German editor rom, and the addition of a Paperclip-software chip, both on hand-written 462532 EPROMs.

The last task had to do with the internal fan on its magical power supply.  For some reason I cannot explain, the power supply works perfectly at U.S. 110V.  Nice for me!  However, the fan only operated at 220V.  A simple fix.

The first task was to recap the drives.  These would be the 5th and 6th such drives I've done.  This wasn't exactly a "new" task, and yet on the second of the two, I had a hell of a time with two of the screws on the magnetic platter. In fact, these were the first unturnable screws I'd ever encountered.   After researching the problem on the internet and trying several things, I had only made the problem much worse.



The last thing I wanted to do was take a drill to them in order to use a stripped screw remover, but that is exactly what it took.  Luckily only one of these drives suffered this fate, and I'll know more to avoid it in the future.

The second task was the ROM replacement.  Unfortunately, I had no spare 2532 ROMs.  So I ordered some compatibles off eBay, and received TMS 2532As, which I discovered, to my great annoyance, are unprogrammable by either my Prominade C1, the parallel port-based programmer on my PC 50-II, or my modern PC's USB-based programmer.  In frustration, I ended up re-purposing the Paperclip rom (I had others).  I burnt the english Execudesk rom, same as the one on my U.S. CBM 8296 computer, and plugged it in.



To my surprise, this didn't work.  The Execudesk menu was shifted too far to the left.  While that was only a mild annoyance on that particular menu, a similar problem made BASIC unusable.  I had discovered that there truly is a difference between 50hz and 60hz PET editor roms, and what I needed was a 50hz Execudesk.  Some research uncovered the fact that my U.S. Execudesk ROM was identical to the PET Editor 4.0 60hz rom, with the addition of the menu code at the end.  So all I did to generate a 50hz version was to add the Execudesk code to the end of the PET Editor 4.0 50hz rom.  In the end, I got my PET Editor 4.0 50hz Execudesk rom, and the computer was in business.

The last task was the simplest.  Find a 3 x 3 x 1.5 inch 110V fan, and swap.  Easy-Peasy.



The PETting Zoo is whole again!

Monday, August 24, 2015

The Commodore 128D Journey Ends

This is the final installment in my four-part walk through of repairing and upgrading my old Commodore 128DCR.




When we left off, I was trouble-shooting a problem with the section of the C128's address bus that touches the back cartridge port.  Several months ago, a lightning storm had sent a surge through the network wiring in my house, zapping a network cartridge in that port.

The four chips pictured above are the only four on that leg of the address bus, from left->right: Character ROM, 2k video ram, flip flop, and bus tranceiver.  The Char-ROM had already been replaced when I first started working on the computer, since it was strange character shapes that told me something was wrong.  It was a failed attempt to use a diagnostic cartridge in the cartridge port that told me that there was still something amiss in that area.

After narrowing down the problem, I ended up replacing the flip flop and tranceiver, socketing them as you can see above.  I then tried the diagnostic cartridge again.



The cartridge did boot this time, so those chip swaps were not in vain.  However, the cartridge would now lock up when it got to the Color RAM test.  This told me that the final unreplaced chip, the 3517B-15 2k ram chip, also needed socketing and replacing.

After doing that, the computer was finally able to run through an entire diagnostic check, finding no other issues.

I was finally able to get back to my upgrades!

The only upgrade I had not yet completed was a second sound chip for stereo sound.  I was going to use a SID2SID board (a pre-built PCB that saves a ton of time and dinky wires for second sound chip installation), but the board did not fit under the C128DCR's power supply.

I also gave piggybacking the sound chips a go, but the legs on those 8580 SIDs just weren't holding solder at the low temperatures, and those sound chips are just too expensive to risk higher temperatures.  For piggybacking, I had even constructed a small signal sub-board, and figured out how to get the filter capacitors on the second chip without soldering them.  However, like I said, piggybacking wasn't happening.

So I went back to the SID2SID board and basically attached an extension cable, so that the SID2SID board could be mounted elsewhere in the case.



To make the board easy to remove, yet firmly mounted, I chose to hot glue the board to a corner of the top of the metal RF adapter case, careful not to allow any short-circuits.  I also chose to use test-lead clips for some of the other necessary signals instead of soldering more wires directly to the board, including ground.  In the end, you can see that it's quite a mess there, but quick and easy to assemble and disassemble when necessary.



A quick test using a type-in program from the Commodore Programmers Reference Guide allowed me to confirm that all 3 voices on both chips were functional.  Since I had clipped the chip select to pin 7 of the cartridge port, the second SID would be found at I/O port address $DE00, which is typical.  However, a switch would allow me to release that port for other uses by shorting the chip select pin on the second SID to 5V (pin 3 on the cartridge port).



All of my upgrades were done!

In the last entry about this journey, you saw that I had actually removed the entire motherboard for the chip replacements.  So now it was time to put everything back together.



Once everything was reassembled, I ran it through one more pass of the diagnostic cartridge (even to the point of attaching the port-testing leads, not shown here) before putting the case top back on.



And that's all there is to it.  All shiny and clean and upgraded! She has:
  • All the stock features of the Commodore 128DCR, of course, including 128K of user ram, 64k of 80 column video ram, and 2k of C64 color video ram.
  • 2 new built in software packages in a switchable option rom, 
  • JiffyDOS kernal rom, also switchable
  • Second SID sound chip for stereo music
  • SuperMMU 128 for interaction with the SuperCPU accellerator card I'll plug back in
  • 4GB UIEC/SD internal compact flash card disk drive, complete with enable switch, as well as forward/backward button for quick disk-image mounting.
  • A thoroughly repaired address bus, including 4 new socketed chips.

I hope you found this useful!


Sunday, August 9, 2015

The Commodore 128D Journey: Crossroads

Sometimes it is when things seem to be going very well that you discover you've been whistling past the graveyard without even knowing it.

If you followed the first two posts on this journey, you know that we last left off with a final project to add dual stereo SID (sound) chips.  This project has been set aside to solve a more dire problem.



At one point, I paused to run a full diagnostic on the Commodore 128DCR, to make sure everything was OK after all the insertions and removals of the MMU that came from messing with the sound socket (shown above).  That's when I discovered that the diagnostic cartridge, which works fine on a flat C128, didn't boot at all.  Testing other cartridges revealed the same behavior -- cartridges simply would not boot correctly.



However, everything else about the computer SEEMed fine.  C64, C128, and Z80/CPM modes all booted normally and ran software normally.  Everything seemed OK.  But cartridges were definitely not working.

Luckily for me, while the C128 diagnostic cartridge would not boot at all, it would crash into the C128's Machine Language Monitor program, allowing me to take a quick glance at the code in Bank 10, addresses $8000 - .   That address is where the software of the ROM chip inside the diagnostic cartridge would be mapped to in the C128's memory.  $8034 also happened to be where the cartridge software would crash. Using the ML Monitor to disassemble that area of memory revealed, unsurprisingly, that many of the ML commands were corrupted, but only maybe 10% of them.  For some reason, this suggested a problem with the Address bus, which is one of the most complicated systems inside an already complicated computer like the C128.

You see, if one of the many chips that translates and routes a particular memory address to a particular chip in the system has gone bad, this would explain why some entire ROM bytes are being presented incorrectly to the ML monitor (and the CPU!).  Since I know the data inside the cartridge is good, and the data is not generally scrambled, I dismissed the Data bus as a possible culprit.  No, my focus would be the complex Address bus.

To solve this problem, I removed the motherboard from the computer and Got Serious.



I began running other tests, and taking care of some low-hanging fruit:

  • I carefully cleaned the pins on both cartridges, and the cartridge port.  No help.
  • I tested continuity between all cartridge port pins and an external cartridge.  All checked out.
  • I wrote and ran a BASIC program that tested as much of the RAM chips as it could.  No errors.
  • I swapped out the 8722 MMU (shown above) since it was socketed, and I have several spares.  No changes.
Since I had decided to focus on the Address bus, and had already tried the MMU, I decided to go after the MOS 8721 PLA (Programmable Logic Array). While the PLA is not socketed, I did have several spares, so it seemed a relatively harmless thing to try.  So I snipped out the old PLA, did one of the best de-soldering jobs of my life to remove the pins and clean out the holes, and soldered back in a precision 48 pin socket.  I went slowly and carefully -- It took all of an evening.  



But when I put the new PLA into the socket and powered on the computer with the diagnostic cartridge in place, nothing had changed.  It was all for naught and I felt like an idiot for risking that part of the motherboard.

I was now at a bit of a loss, so I decided to go back to the beginning and focus on the information at hand: the cartridge crashes into the ML monitor, and I had access to the Machine Language commands and bytes, corrupted versions of those in the diagnostic cartridge, that were causing the crash.  I went online and actually found a binary copy of the firmware for one of the diagnostic cartridges (the one on the left in the picture above, marked simply "C128").  The firmware is for Commodore 128 Diagnostic Revision 588121.  You can download it yourself here.

Having access to the bytes that SHOULD be shown in the ML Monitor but were not, I printed out those correct bytes on a piece of paper, and compared them to the bytes shown in the ML monitor.  Whenever a byte did not match, I crossed it out in blue and wrote in the Corrupted byte shown in the ML monitor.



As you can see, there were several bad bytes discovered.  Upon reflection, I realized two patterns in the bad bytes:

  1. Every bad byte was at an even numbered address: $8024, $802e, $803a, etc..
  2. Every bad byte was strangely *close*, in value, to the byte after it, often matching exactly: $9f/$9a, $cd/$ca, $20/$20, $00/$00, $00/$06, $00/$00, $9d/$9d, $bd/$bd, $9b/$9b, $80/$80...
Both of those facts made me seriously think that something might be wrong with the Address line that handles the first/lowest/0 bit on the address bus, often called 'A0' on schematics.  If this bit were being incorrectly held high, then attempts to read even numbered addresses would instead grab values from the odd numbered one right after it.  

So back to the schematics I went.  I learned that the low address byte on the cartridge port is part of the "SA0 - SA7" address bus.  The high byte is called the "TA0 - TA7" bus.  The SA lines are my focus.  They touch several chips in the upper-middle area of the motherboard, including, strangely enough, the MOS 390059 Character ROM chip.  If you recall, replacing a bad Character ROM was what actually started this entire journey, so, in a way, I had my first confirmation that I was on the right track.




Further study of the schematic shows that this SA0-SA7 address bus touches four different chips: the Character ROM, a color memory ram chip (?!), and two other chips (a tranceiver and a flip/flop) which appear to translate other address busses: the main 'A' CPU address bus, and an address bus called the 'VMA0 - VMA7' address bus (I did warn you this computer had a complicated address bus system!).  Those chips, at locations U55, U17, U18, and U19, are pictured at the bottom left of the photo below:



And this is where I will end our journey today.  My next step will be to tackle socketing and replacing those two address bus translation chips, starting with the transceiver (a 74F245N), since it handles translation for the main address bus.  Hopefully, my next entry on this journey will regard its end.

Good night!