Thursday, 26 May 2016

Vintage Computers - an ebay buyers guide

Ebay is a good source of old computers, and I buy quite a lot from there. I usually go for the unwanted, unloved, un-bid-on items that need a bit of TLC. Over the years you get to see patterns in what is listed and what actually arrives.

I was pointed at a listing last week which stated:
Does not power on - item was working then one day it just stopped.
Everything was probably working one day, the day before it broke for example. It doesn't change the fact that it is currently broken. It was probably working before they tried to power it from the wrong mains adapter. Probably working before they tried a composite video mod with a plumbers soldering iron. Probably working before it got put into the washing machine. Probably working before the all night Donkey Kong session with the ventilation holes covered. Probably working before it had beer spilled on it. Probably working before they opened it up to see how it worked and damaged the membrane tails etc.

Elvis was fine, then one day he just stopped working. No, Elvis is dead. Sorry to break the bad news, but you should have heard by now.

For reference, here is a translation of what many of the terms used on ebay listings actually mean:

  • "Tested and working"  - the light came on. 
  • "Untested"  - the light didn't come on.
  • "Probably a simple fix"  - probably won't be a simple fix
  • "Could be the fuse"  - I tried the fuse and it wasn't that
  • "Working when put away"  - Now broken
  • "Can't test as I don't have the power supply"  - Tested and broken (the power supply will be listed next week)
  • "Sold as seen" - Broken, probably with bits missing inside or damage carefully cropped out of the photos.
  • "Will be well packed"  - Will be wrapped in a black bin liner and thrown at the cheapest courier service.
  • "Rare" - Common as muck
  • "UK Seller" - Chinese Seller

You see the pattern developing there? Caveat Emptor. I hate to go all Fox Mulder, but Trust No One. I buy a lot of stuff from ebay (this is me now, not Fox), and usually approach it with the expectation that it is going to be bad.
Certainly be wary of power supplies, I've had several Atari 2600's both ebay purchases, and ones sent in for repair (that were probably ebay purchases) which came with the wrong mains adapters, and worked fine with the right power supply. Mains plugs are definitely worth checking. They almost always have 13A fuses fitted, the screws inside loose and sometimes the odd wire reversed.
I've also had Spectrums, and recently an Oric-1, where the internal regulators had been bypassed. Always worth a look inside, you never known what you are going to find, or not find in the case of this Spectrum +2 which was looking a little short on the RAM front. This was listed as 'was working when put away'...
To balance those out, sometimes you do get extras. I found a nice selection of springs inside a Commodore PET 8032-SK. Very kind of the seller to include them, but not the best for the address bus drivers.
I had a guitar amp in for repair that I think had come from ebay. The lights were on, but only a loud buzzing sound. As well as a lifetime supply of cat hair, inside I found a bonus free guitar case key wedged between a MOSFET and some wire links. Worked a lot better with that removed.
On the plus side, it's always a bit disappointing when you buy something and it is in perfect condition and works first time. It is much more interesting to fix things, so I prefer the broken ones, and I am rarely disappointed.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.

Wednesday, 25 May 2016

Commodore 64 USB keyboard kit with dual USB joysticks

This is an update of a previous post on a Commodore 64 USB keyboard with dual joystick, I have updated the board, and shrunk it a bit. This will convert a Commodore 64 keyboard into a USB keyboard that can be used on a modern PC. The two 9 way D joystick ports allow standard Commodore / Atari style joysticks (such as my favourite Zipstiks) to appear as USB joysticks for use with modern games or emulators.
The new board does not have the DC-DC power option on, so can be a bit smaller. It still has the connection for the Commodore 64/C64C/C16/VIC20 keyboard, two 9 ways D connectors , mode switch and a USB port that can be mounted internally or externally.
The smaller board now allows it to be fitted next to a Raspberry Pi with it's side connectors accessible via the C64 cartridge port.
The internal connection can also be used if you want the USB cable to exit from the rear.
The external USB connector option has the USB port in what was the power connector hole on the side of the C64. The push button where the power switch used to be is the mode switch. This changes the keyboard mapping between normal desktop use and emulator mode. See Commodore USB keyboard kits for more information of the mappings.
The original Commodore 64 metalwork is retained and the new board fits through the holes in that. The board and metalwork are best bolted to the case to hold them in place as joystick leads are inserted and removed.
This can be fitted to a Commodore 16 or VIC20, but the metalwork from a C64 would be required to fit the board or leave the metal work off.
The board also fits into the Commodore 64C case, although some adjustment may be required to the keyboard support brackets, as the profile of the joystick connectors is slightly different
This is available as a kit, containing the USB keyboard and dual joystick controller, mounting pillars, replacement LED and USB lead.
The kit can be ordered from my Tindie Store.

Other versions

See also standard and mode switch Commodore USB keyboards (without joystick ports)
See also Commodore 64 shared USB keyboard controller, share the keyboard between the Commodore 64 and a USB keyboard.

Commodore USB Keyboard Kits

Whilst updating the list of my USB keyboard kits, I realised I didn't have a buy it now option for the standard Commodore 64 USB keyboard kits, so here is one.
I have built various versions of the Commodore 64 USB keyboard controllers over the years. The standard board I use at the moment converts a Commodore 64 / Commodore 64C / VIC20 / Commodore 16 keyboard into a USB keyboard. Note none of these are suitable for the Commodore Plus/4 - see the separate post on Commodore Plus/4 USB keyboard kits. This comes in two versions, the standard one, and one with a mode switch to select from two keyboard mappings. There are also versions which convert a pair of 9 way D joysticks into USB joysticks, and a version which shares the keyboard with the original Commodore 64 board.
The keys on the keyboard are mapped such that when you press a key, the appropriate key is send to the PC you are connected to. Some rearrangement happens in the firmware to make this work as some of the keys on the Commodore 64 keyboard are different to a modern PC.  For example, on the C64 the 6 key has an ampersand symbol on it, so when you press shift + 6 on the C64, the firmware actually sends shift + 7 to the PC and the & symbol appears, as & is on the 7 key on a PC. See mappings for the Commodore 64 USB keyboards, and also Commodore 16 keyboard mappings.
If you are planning to use you converted Commodore 64 with an emulator such as Vice or CCS64, the keyboard mappings need to be adjusted. Not only does shift + 7 needs to be send as shift + 7, a number of other keys are mapped positionally, so for example on the top row of the C64, it goes 8 9 0 + -, and on a PC it goes 8 9 0 - =. To make it a one to one mapping in emulator mode, I actually send - when you press + on the C64, so that vice then translates that and + appears on the screen. This is great for the emulator as all the keys now work as if it were a real C64, but it's a bit annoying when you quit the emulator and go back to normal desktop apps. To that end, the mode switch versions of the board have a button which switches between the normal and emulator mappings, changing the power LED to show the mode, red (emulator) or green (normal).

Standard Commodore 64 USB keyboard kit.

The standard kit version comes with the controller, adhesive pillars and a USB lead. This can be installed on the back of the keyboard, with the power LED cable connected to this board to light up when the USB is connected.
It can also be mounted in a few places inside the case so the USB connector is externally accessible.
The kit can be purchased from my Tindie store. This is suitable for Commodore 64 and VIC20, Commodore 16 and Commodore 64C.

USB Keyboard kit with mode switch

If you are planning to use you converted Commodore 64 with an emulator such as Vice or CCS64, go for the version with the mode switch.
The kit for this includes the controller, mounting pillars, USB lead and a replacement power LED for the Commodore 64 which will indicate the mode.
This is best fitted where the mode switch can be pressed, either through the IEC and video ports, or the expansion port. The replacement LED fits where the original was.
The kit can be ordered from my Tindie store. This is suitable for Commodore 64 and VIC20, Commodore 16 and Commodore 64C

Other versions

See also Commodore 64 USB keyboard controllers with built in dual 9 way D USB joystick ports
See also Commodore 64 shared USB keyboard controller, share the keyboard between the Commodore 64 and a USB keyboard.

Sunday, 22 May 2016

Oric-1 Repair Part 1 - Reset circuitry

This is the first part of an Oric-1 repair. This is the Oric-1 that I borrowed the keyboard from to test the Oric USB keyboard kit previously. I'll describe it's initial condition again, and cut down that section in the previous article. The repair starts after that.
This Oric-1 was 'untested' in ebay terminology - i.e. broken. I never plug anything in before checking it out. This is a case in point as to why that is a good policy.
Inside there is a 3 terminal regulator missing. Not the usual 7805 I was expecting, but for some reason the Oric-1 uses a 7905 regulator. The 7905 is designed to take -9V DC and generate -5V. Here it's wired slightly oddly to take +9V and generate +5V. Why they didn't use the normal version I don't know.
This arrangement means that in normal operation the 0V rail inside the Oric is about 4V above the 0V rail of the power supply. If you happened to have a power supply where 0V was tied to mains earth (which is not unreasonable), and you plugged it into a TV or monitor with it's ground referenced to mains earth (which is quite possible), it would short out the 4V differential and the board would be running at 9V?
Anyway, it turns out a previous owner had bypassed the 7905 making it a 5V DC input  That would make more sense, as long as it is clearly labelled, which it wasn't. There are also a few other suspicious mods, various extra capacitors scattered around the board, and some strange resistor and capacitor mod to the power feed to the modulator.
The Oric-1 originally had two 8K ROM chips. Later models had a single 16k chip. The board was designed for either arrangement, it was fitted with either two 8K ROMs and IC11, a 74LS00, or a single ROM and LK2 jumper link. This looks to have started as the two ROM version and been modified to a single ROM. The ROM fitted is an Oric-1 BASIC 1.0 mask ROM, so another machine has been involved. That may now be running with the two original ROM chips from this board.
The CPU is also not original and I'd hazard a guess it came from a mark 1 VIC20, as it is a 1980's date code MOS part, and I've seen blue stickers like that on many VICs. Looking again at these pictures, the date codes are all over the place, from 1980 to 1984. Many of the chips look to have been replaced at some point.
Feeding the board with 5V directly, it is not working, there is a nice pattern on the TV though. In these sort of situations, I tend not to trust previous repair work, when there is flux residue on lots of chips on the back of the board, you know someone has been messing around in there.
When chips have been removed and resoldered without sockets, it is sometimes difficult to know if any tracks or through hole vias have been damaged. These is some damage around where the 74LS00 was removed and not replaced, so I decided the best option was to remove the other chips which had been replaced in the past and check out the board.
Once the board was cleaned up, it was actually in reasonable condition, so I fitted sockets for the larger chips. I tested and replaced the TTL chips that had been removed, all were fine. I also removed the two ROM sockets and fitted a single socket since I would never be using a pair of 8K ROMs.
There were only meant to be a few electrolytic capacitors on the board, so I replaced those. I may install a 7905 (with additional heatsinking) or a switch mode replacement, but at this point I just tidied up the 7905 bypass. A large label will be attached to the case if I leave it like that.
I installed a set of known working set of chips (thanks to @futurewas8bit for the ROM images).
Retesting again it was still just showing the black and white boxes.
Back to first principles, power, reset, clock. The power is OK, 5V getting to all the chips, a bit of ripple, but not much. I tried adding some additional capacitance, but it didn't change that much and still showed the black and white bars. Slightly better now, with a temporary composite video modification.
The clock was also fine, 1MHz into and out of the 6502. The reset pulse didn't seem to be there, it was going high too fast and the CPU was not resetting. I shorted out the reset pin and it booted up!
I tried many times, but could not get it to start up itself without forcing a reset. The reset circuitry on the Oric-1 is as basic as you can get, a capacitor is charged up by a resistor and the voltage across it should initially be low enough to start the reset cycle, and after a second or so be high enough to complete it and start the chip running.
This wasn't working. I had already replaced the 1uF capacitor, but that and the original had tested fine. I did manage to get it partially working with a 10uF capacitor, sometimes it would start after about 5 seconds, other times it wouldn't. I tried several versions of the 6502 and with both the 6522 and AY-3-8912 removed as they both have reset connections, but it wouldn't start up without a kick.
Most of the other 6502 based systems I can think of use a 555 timer based reset circuit. The same RC circuit is used to trigger the 555 and generate a clean reset pulse of a defined period. As far as I can see all the Commodore 65xx based systems from the very first KIM-1 through to the Commodore 128 all used a 555, or half of a 556 to generate a clean reset pulse.
The BBC micro also uses a similar circuit. It is only the original Atari 2600 I can think of that used the RC circuit. In the later 2600 Jr and 400/800 series at least they use a logic gate to buffer the R/C signal.
Apparently the original design for the Commodore 264 series (plus/4, C16 etc.) used an RC, but the 555 circuit was reinstated when Bil Herd took over that project. Given the 555 one shot timer circuit had survived through so many machines and cost reduction exercises in Commodore, a company not known for extravagant additional circuitry, it must be necessary?
But the Oric-1 only has an RC on the reset pin. It seemed the thing to do was to fit a 555 based one-shot time circuit to generate a reset pulse. The output of the 555 is high during the pulse, then low, so the plan was to use a transistor on the output to pull the reset line low, connected where the capacitor was, leaving the resistor in place to pull it high in normal operation.
I tried to think of a way of adding that neatly. but one 8 pin chip, three resistors, three capacitor and a transistor are a little difficult to hide. I then decided to cheat.
It's still an 8 pin chip, an ATtiny25 microcontroller, but doesn't need all the other items, I've added a decoupling capacitor, force of habit. That will be setup to enable pin PB1 as an output, and drive it low. Wait 100mS then set it as an input. The existing 2K2 pullup resistor will then pull reset line high, the CPU will start up and the microcontroller will go to sleep. I've set it as an input rather than driving it high so that reset can still be pulled low by an external add on or reset switch.
I think it took longer to write that description than it did to write the code itself. With the chip programmed and the fuses set for brown out detection and the low power internal 128KHz RC oscillator divided by 8, it shouldn't draw much power or create any noise. To fit it to the board, I looked to the pads left when IC11 was removed.
IC11 was a 74LS00 quad two input NAND gate used to derive the chip select for the ROM chips when two 8K ROMs were used. It has 5V and ground, and several connections that just connect to other gates in the same chip. Only three pins on the microcontroller are need. The two power pins, pin 4 is ground, pin 8 is VCC, are fixed, but of the remaining six, any could be used as the output, and the rest set as high impedance inputs.
Ground is in the right place with the chip aligned to the right and the other two pins are connected to pads that were wired only to other pins on IC11. No tracks to cut, just 5V to apply to pin 8 and I can use pin 6 as reset, which I wired directly to pin 40 on the 6502. I added the decoupling capacitor on the back, directly across the chip.
I did try to use a ATtiny44, a 14 pin chip that would have fitted the original footprint, but the pins were in the wrong placed and I didn't want to cut any tracks. I don't think you would spot it unless you were looking for it, fits in quite nicely. The original capacitor on the reset circuit (C21) is removed.
With that fitted, it is now starting up every time. I initially used a 1 second delay, and dropped it down to the 100mS shown above, and it still seems fine. That is about what the BBC used, the Commodore PET had 1 second, and the C64 500mS.
Next step is to try to reinstate the original chips, fix the power supply and improve the video output with a permanent composite video modification or RGB to SCART.

Update - see Part 2.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.