Lavender

ZX Spectrum Plus Repair

Let's have a look inside a ZX Spectrum Plus this time. It's basically the same as a ZX Spectrum, but with a (somewhat) better keyboard and a reset button. However, this machine caused a few surprises.

The first surprise was that instead of a serial number, the words "Upgraded" were printed on the case. Next to it there was a (broken) warranty seal from Sinclair Germany. It was completely new to me that Sinclair had actually sold upgrade packages for the ZX Spectrum.

Instead of a serial number, "upgraded" is printed on the case.

Inside the case, I found an Issue Two board, which is a rare sight in a ZX Spectrum Plus. For an obvious reason: The Issue Two heatsink is too big for the Plus case, so the board was somewhat crammed into the case.

An Issue Two board is crammed into the case. The heatsink is twisted to its maximum angle.

As I was going to replace the 7805 with a DC/DC converter anyway, this ugly sight of the twisted heatsink would be solved soon though.

I also found that the keyboard membrane got brittle over the years, and needed replacement with a modern replica.

The keyboard connectors are brittle and broke off.

Technical Check

The very first thing I do is the composite mod. It just takes a bit of wire and a few minutes of soldering, so it's worth to invest the time even if the Speccy should turn out to be irrepairably broken. A first check showed the start screen, so everything seemed to be allright first.

The machine seems to be working.

But then I connected the diagnostics cart, and the trouble started.

This does not look good at all. All RAMs are reported as broken, and there are strange horizontal lines.

The diagnostics reported that all eight lower RAM chips were broken, and the LEDs on the cart showed that the -5V and 12V power lines were missing. A voltmeter confirmed that -5V was gone, and there were only 7V on the 12V line, so the onboard power converter was broken. Strange enough: When I disconnected the diagnostics cart, the system started again, although both voltages were still bad.

I checked the coil, but it showed no short circuit between the windings. So I replaced the usual suspects of a broken power converter: TR4, D15 and D16. I also replaced the 7805 with a DC/DC converter as planned, and recapped all the electrolytic caps. The -5V and 12V were good after that, and all diagnostic tests passed.

Green tint, pale colors, horizontal disturbances. What has happened here?

But now the screen had a strong green tint, the colors were pale, and there were visible horizontal lines.

On Issue Two boards, there are two pots for calibrating the white balance. One just needs to connect a scope to the composite line, and then adjust both pots until the signal noise is reduced to a minimum. However, I only managed to get the green tint a bit better, but it didn't disappear. Also the disturbing horizontal lines stayed. This was the best I could get out of the signal.

But why was the white balance perfect before I fixed the power converter? I later found out that the 12V are necessary for generating the color signal. While the power converter was broken, the 12V were missing, and so the display was presented in a perfect black and white. Since the start screen does not use colors, it just looked good on the first sight. When I restored the 12V line, the color signal was generated again, and the screen got tinted.

I first suspected the ULA, but the problem stayed when I swapped it with a known-good one. Then I swapped the LM1889N. The strange horizontal lines disappeared after that, and overall the colors got better, but were still not perfect.

The pots still couldn't restore a clean white. But then I found that VR1 wasn't really working well, and the signal was crackling when I was turning it. So I replaced it with a Piher one, which almost didn't fit because it is encapsulated. After that, I could finally calibrate the signal to have a minimum noise.

The result was a perfectly white-balanced picture, with the only green things being the passed diagnostics tests.

Much better: Nice colors, perfect white balance, overall good image quality.

For a test, I reinstalled the previous LM1889N, and the color issues and the horizontal lines came back. So the problem with the green screen was a combination of a broken LM1889N and a broken pot.

The repaired board: New capacitors, repaired power converter, U?? and VR? replaced.

The hardware part is done. Let's have a look at the keyboard next.

The Keyboard

The keyboard of the ZX Spectrum Plus is a bit special. On the connector side, there is no difference to the ZX Spectrum keyboard. However, the ZX Spectrum Plus has some more special keys, like cursor keys or a dedicated delete key. These keys need to do two simultaneous keypresses in the correct order. This is done by two membrane layers that are connected to each other. A keypress then closes the contacts on both layers.

These layers are interconnected at the top of the membrane connectors. So it is crucial to do a clean work there, and to make sure that the layers are properly aligned and securely fastened under the brackets. Do not overtighten the screws though. Remember that the plastic is almost 40 years old. πŸ˜‰

The different layers are interconnected at the top end of the connector. It is crucial to properly align the layers and secure them firmly.

After a bit of cleaning, I could then reassemble the machine.

And that's it. Now I finally also have a ZX Spectrum Plus in my collection.

A ZX Spectrum Plus

New ZX Spectrum 48K

The original Issue 3 board, with some labels explaining the functions of the components. I got this board of a Sinclair ZX Spectrum. It must have been a ZX Spectrum Plus model before, because there was this reset wire attached to it. There were also a few labels that were explaining the functionality of the components in German language, maybe for educational purposes.

I tried to run the diagnostics, but the module didn't even start, and the D0 LED was permanently dark. There must have been a short circuit somewhere on the data bus. But instead of repairing it, my plan was to make a completely new ZX Spectrum from as many new components as possible, with reusing only the ULA, CPU, LM1889N, the coil, and the RAM chips.

So I first removed the valuable components. The stripped original board was a sad sight, but the prospect of making a new Speccy from it made it less painful.

The board, with all valuable components stripped.

I checked the ULA in another Speccy, and it turned out to be fine. From the 16 RAM chips however, only 9 were still functional. This was much less than I expected. I'm having some of those old RAM chips in my stock, but they are precious and hard to find.

A New Board

The new board and some of the components. The new replica board is made by PABB and can be ordered from PCBWay.

For the required components, I assembled a bill of materials. It contains as many new components as I could find, but some rare parts are long out of production. They can still be found as NOS parts at online marketplaces, or they can be replaced with replacement types or replicas (like the Retroleum Nebula or vRetro vLA82).

There are four wire bridges that configure the type of the upper RAM chips, and the brand of the ROM chip manufacturer. The correct configuration can be found in my bill of materials as well.

Instead of the modulator, I decided to use an S-Video mod and a 3D printed base plate. A simple alternative is to just solder an RCA connector to COMP and GND, and use it as a composite output.

After a lot of soldering, the assembly was almost completed. But before seating the valuable chips, I first checked that all three voltages (+5V, +12V, -5V) were present and within their acceptable tolerance.

The replica board, with all components soldered in, but the chips are not seated into their sockets yet.

The S-Video mod takes the place of the original modulator, but is not soldered in, but held by two screws. The screws also provide ground, so they must not be isolating. Three wires then connect the board with +5V, and the composite signal as luma. The chroma signal is connected to the positive end of C65, which must be removed first so the luma and chroma signals won't mix.

The S-Video mod mounted in place.

After that, the new board was finally completed and ready for a first test.

The completed ZX Spectrum replica board with S-Video mod.

Bugfixing

But alas, this is what I was seeing when I powered it up for the first time.

This is what we don't want to see: black and white columns.

The diagnostics showed no action on the CPU bus controls. My suspicion was confirmed when I checked the clock input of the CPU with a scope. It was just a flat line:

The CPU clock is generated by the ULA, but the clock signal was present there.

A look into the schematics shows that between the ULA clock output and the CPU clock input there is the transistor TR3, probably for amplifying the signal. Strange enough, the signal was still present at the right of R24, which is directly connected to the clock output, but at the left of R24 (which is connected to the base of the transistor) the signal was missing already. When I removed TR3, the clock signal appeared there too, so TR3 must have been the cause.

After a longer search, I found out that the Spectrum is very picky about the type used for TR3. The original ZTX313 is not in production anymore, so I used a BC548 first, which is said to be a replacement type, however not at this position. For TR3, the only recommended replacement type is the MPS2369, which is also a bit hard to find now. With that type, the clock signal was finally good (cyan: ULA clock output, yellow: CPU clock input).

And to my joy, the new Spectrum finally started up and showed the famous start screen.

Hello there, Speccy!

The next step was to run a full diagnostics check. Now I got an error that the M1 signal was missing.

Diagnostics complains that the hardware was not found.

The M1 signal is generated by the CPU, and indicates the first of four machine cycles, which is the cycle where the next instruction is read from memory. The Spectrum itself does not use the M1 signal, but a few expansions like the ZX Interface 1 need it.

After replacing the CPU, all diagnostics checks finally passed.

We are green!

So at the bottom line, all I could reuse from the old ZX Spectrum was the ULA, the ROM, the LM1888N and the coil. I was hoping for the RAM chips and the CPU, but I haven't been really lucky with them.

Test Run

Anyway, it was finally time for a test run. I connected the new Speccy to my computer, and used tzxplay to play the tape file of my favorite game, Starquake. It was loading and running fine. Also, the image quality of the S-Video output is excellent, and probably the best one can get from this old design. Only the ZX Spectrum Next has a better quality with its native, pixel perfect HDMI output.

I bought the original board without any case. But luckily, there are replica cases, keymats, membranes, and faceplates on the market, so I could assemble a brand new outerior. Of course, I chose a transparent case, so the nice black mainboard could be seen from the outside. Well, at least a bit.

And there it is, an (almost) new ZX Spectrum in mint condition.

Amiga Debugging with Linux

A "zero modem" adapter between the serial-to-USB and DB9-to-DB25 adapters The AmigaOS offers a debug console as a simple way for debugging. Log data can be written via the linkable Debug.lib, which is also used by all kind of tools like MuForce, Mungwall, or PatchWork. AmigaOS provides a simple internal debugger called ROMWack (which has been replaced by the even simpler SAD in later versions). But also DiagROM is writing diagnostics data via the serial port, which comes in handy when a RAM chip or something in the video area is broken.

The log output is sent to the serial port and can be read by a terminal connected to it. Back in the good old days, not so many hobbyists could afford an actual terminal or a second computer for that, so we used tools like Sushi or Sashimi to redirect the debug output into a Shell window, which worked fine unless the system has crashed too hard.

Today, I assume that almost all of the Amiga owners also have a second computer at home, and if it's just a second Amiga. πŸ˜‰ This blog article is about how to connect your Amiga to your Linux PC, and get the debug output.

On the hardware side, you will need a construction with a DB25 female port on the one end, and an USB connector on the other end. I use one of those USB-to-Serial converters that can be found on hardware shops for little money. They are often equipped with a DB9 male connector, and are supposed to be connected to peripheral devices (like modems). To connect them to a computer, a so-called zero modem (or null modem) is required, which is just a small adapter that enables to connect two computers directly together by crossing the transmit and receive lines. Finally, we need a DB9-to-DB25 connector with the correct genders, to connect the other end of the zero modem to the Amiga.

This hardware stack is connected to the Amiga's serial port on the one end, and to a USB port of the PC on the other end. Remember to turn off the Amiga before connecting something to the serial port. Unlike USB, the ports of old computers are not designed for connecting or disconnecting devices while the system is powered. It could actually damage the system to do so!

On the software side, we don't need to install drivers on the Amiga. The debug or diagnostics output is just sent to the serial port. On Linux, we can use any terminal emulator. The most prominent is certainly minicom.

The default serial port settings are 9600-8N1 (9,600 bps, 8 bits per character, no parity, 1 stop bit). However, the debug output is just directly sent to the serial port. If you changed the serial parameters on Amiga side, and used the serial.device for something else, the debug output will use the current settings. Handshake must be turned off in any case, though.

Maybe the easiest way is to create a file called ~/.minirc.amiga with the following content (change the pu port value to your actual TTY USB device):

pu port             /dev/ttyUSB0
pu baudrate         9600
pu bits             8
pu parity           N
pu stopbits         1
pu rtscts           No
pu xonxoff          No

On many Linux distributions, the user also needs to be added to the dialout group in order to access a serial device:

sudo usermod -aG dialout $(whoami)

After that, just start minicom with the amiga profile:

minicom amiga

Now you should see all the debug output generated by AmigaOS on your minicom screen. For interactive debuggers like ROMWack, you can also type commands into the console.

To leave minicom, press CTRL-A and then Q. πŸ˜‰

Amiga CD32

A TTL-to-DB9 converter board and a PS/2 cable connected to it Unlike other Amiga models, the CD32 has no dedicated RS-232 port. Instead of that, it provides a simple serial interface at the Aux port that is connected to Paula's UART pins internally.

To build an adapter, you need a PS/2 cable (e.g. from an extension cord or an old PS/2 input device) and a MAX3232 based TTL-to-DB9 level converter. These converters can be found at online marketplaces for a few Euro.

Cut one end of the cable and connect the wires to the converter like that:

  • Pin 2: TXD
  • Pin 3 (and the shield): GND
  • Pin 4: VCC
  • Pin 6: RXD

Leave the remaining two wires unconnected, and check for correct polarity before connecting the wires to the converter!

The CD32 does not provide any control and handshake signals, but fortunately they are not needed for debugging and diagnostics purposes.

Amiga 1200 Black Edition

When I found this Amiga 1200, I felt pity for it. The case and keyboard was very yellowed, but what was even worse was the screwed up attempt to fit a Gotek drive into the case. The previous owner obviously tried to open the floppy disk area with some kind of cutter pincers, essentially ruining the case.

The Amiga 1200 was very yellowed. The floppy drive was coarsely cut out, to make room for a Gotek drive.

My initial plan was to whiten the case and keyboard, clean the botched cut at the floppy drive with a rotary tool, and nicely close it again with a 3D-printed part. But then I got a better idea. 😁

The Mainboard

Let's have a look inside first. There is a Rev 1D.4 board in good optical condition. I replaced the electrolytic capacitors, and upgraded the ROMs to AmigaOS 3.2.1.

 The recapped mainboard.

On the bottom of the PCB, I found a copper wire for a so-called "floppy fix". When Escom was producing the final batch of Amiga 1200 systems, Amiga floppy drives were not available any more, and Escom had to find a way to use regular PC floppy drives instead. However, many games and demos with own trackloaders fail to load on machines with this modification.

The original floppy drive of this machine was not existing anymore, and Gotek drives can perfectly emulate Amiga floppy drives, so I decided to undo the floppy fix by removing the botch wire. To restore the original RDY signal, I instead put a wire from pin 34 of the internal floppy connector to pin 1 of the external connector.

The "floppy fix" cuts pin 34 from the original RDY line (not visible here), and instead connects it to the CHNG signal at pin 2. To undo the fix, remove the wire, and then connect pin 34 of the internal port with pin 1 of the external port, to restore the original RDY signal.

Since I was working on the bottom side of the PCB, I should also remove E123C and E125C, to enhance the stability of accelerator boards. However, on this machine these capacitors were not populated, so there was nothing to do.

It was finally time for a first thorough test run. Everything went fine, but then I noticed that the right mouse button was not working on both ports. I wrote a separate blog article about the cause and the fix, but to make a long story short, all I had to do was to replace four resistors with ferrites.

My work on the board was completed after that, and it passed all tests.

The Extras

As with my other refurbishments, I'm not only cleaning the machine, but I also futureproof it with some extras.

First of all: The yellowed case with the ugly cut. I was sure that even with a skillful repair attempt, the case would never look really beautiful again. Also I always wanted to have a black Amiga, so I decided to rehouse the machine into a brand new, black a1200.net replica case instead.

The floppy drive was missing, but instead of the Gotek drive that was there as replacement, I decided to use a Centuriontech GoEX drive. It uses an SD card instead of an USB stick, and comes with a dial encoder, which makes selection of a floppy image much easier. There is also a matching OLED display for it, but for my new Amiga I preferred to use a tiny display that is not that noticeable.

The display itself is one of those 0.91" OLEDs one can find in virtually every maker shop. However it is important to swap pin 1 and 2 when soldering wires to it, as the power pins are swapped on this display type compared to the original GoEX display module.

I then printed an A600 display module case, which luckily also fits on an A1200. I used hot glue to assemble the module, but in retrospect I should have used standard glue instead, since the hot glue softened the PLA of the print. The module is then just clipped into the cooling vents of the Amiga, no need for gluing.

The OLED display with new wiring. Pin 1 and 2 need to be swapped. The backside of the display module, before closing it. The display module put on the Amiga case.

To use this kind of OLED, a file called FF/FF.CFG needs to be created on the SD card, which contains this line:

display-type = oled-128x32

I also added an Indivision AGA MK3 for a pixel-perfect picture on modern TVs via HDMI. While doing so, I found out that the a1200.net replica case seems to have different measures than the original case, so I created a modified trapdoor and holder for this kind of case.

A black trapdoor for the HDMI connector. A holder keeps the HDMI board in place and prohibits that it pivots around the screw.

The computer came with a Marpet Developments M1207 RAM expansion in the expansion port. It got a fresh button cell, and now provides the machine with 4MB of additional Fast RAM, a 68882 FPU, and a RTC.

Assembling

What's missing? The black keycaps that are matching the black case! After many years of waiting they were finally available, and I got a set delivered right in time before Christmas.

The black replica keycaps look awesome! It took a while to replace the original caps with the new ones.

The black case does not include badges, but I found a nice black one from Badgeman.

After that, the Amiga was finally ready for the final assembly.

Everything is in place.

If Commodore had given the choice of the case color back in the 1990's, I would have chosen a black Amiga. And now here it is, an all black Amiga 1200 with a completely new outerior, and modernized interior.

The completed Amiga 1200 Black Edition. Power, floppy, and harddrive LEDs in custom colors. Of course the Amiga 1200 badge is black, too.