The 3/60 Adventure -

Resurrecting a broken Sun Workstation


This is the 'diary' of my attempts to get an old, broken Sun 3/60 workstation back into working condition. If you want to do something similar, be warned: it's definitely not a project for you if you don't have appropriate knowledge in digital (and analog!) electronics, and working on a switching power supply involves voltages that can be hazardous. Do everything at your own risk! I won't take any liability for broken hardware or injuries!!!!

I grouped the text into a few stages which roughly outline the order of things I had to do:

Contents

1. The Sun 3/60

2. What I had

3. The Power Supply

4. LSI Chips on the Mainboard

5. The PAL Story

6. RAMs....

7. Power-On!

8. Conclusion

1. The Sun 3/60

The 3/60 belongs to the Sun/3 line of workstations Sun built before the switch to the Sparc-based RISC processors was made. Most models used a Motorola 68020 microprocessor as the central CPU, while some of the later ones (also called the Sun/3x architecture) had a Motorola 68030. The 3/60 is 68020-based, clocked at 20 MHz, and features a 68881 floating point coprocessor. Common with its 'little sister' 3/50, it is housed in a desktop case and has no VME bus for expansion cards. All peripherals (serial ports, keyboard/mouse, Ethernet, SCSI, monochrome video) are on-board. In contrast to the 3/50, the 3/60 allows to add a color video card and can be expanded for up to 24 Mbytes of RAM.

All operating systems available for the Sun/3 family are flavours of Unix. Sun's original offering was SunOS, a BSD derivative that supported Sun/3s from version 3.0 to 4.1.1u1. Since Sun discontinued the Sun/3 architecture a couple of years ago, the support for Sun/3's was dropped for later revisions. 4.1.1u1 was released in 1991. Of course you can still install and use it, but it is of course a bit dated... Thankfully, free alternatives have evolved: NetBSD is available for the Sun/3(x) family and continually improved, and there is another team trying to port Linux/68k to the specialities of the Sun/3 (Sun/3's use a proprietary MMU instead of Motorola's 68851). So for a Sun/3, you can still get an up-to-date operating system. Of course, the hardware's performance is not comparable to what you can buy today in every PC store (the 68020's performance is roughly comparable to an 80386), but the hardware is still very reliable and useful for a couple of things. I personally run my FTP and Web server on a Sun 3/260, one of the larger server models. And of course, the main incentive for repairing an old workstation is curiosity: I wanted to see if it's doable, similarly to the reason why Edmund Hillary climbed the Mount Everest:

"Because it is there."
But let's stop with philosophy, and come back to this specific Sun:

2. What I had

A friend of mine in our local computer club found the 3/60 in a pile of other computer junk. Since he knew that I was a collector of old Unix workstations, he brought it to me. Apart from being dirty, the machine was completely scavenged: the power supply was torn apart just to get a single chip, and all socketed chips on the mainboard were gone. Completing this machine and getting it into working condition almost seemed impossible because the scavenger also removed all the PAL chips from the mainboard. These are programmable logic chips that build the 'glue' logic between the processor, memory, and LSI peripherals. Their logic function is programmed into them by the customer, so you can't simply go to an electronics store and buy a new one - you would get an empty chip that has to be filled with the correct programming, and the manufacturer who made the original PAL either doesn't have the data any more or won't give it to you. We will see later how I solved this problem.

3. The Power Supply

The power supply in the Sun 3/60 is a switch-mode power supply, like most computer power supplys that have to deliver high currents at low voltages. Their operating principle is to first rectify the mains AC voltage of 115 or 230 volts, giving a DC voltage of roughly 320 volts. A high voltage power transistor is then used to chop the DC voltage at a frequency of 20..80 kHz, giving AC again which is sent through a transformer. The low voltage AC is rectified and sieved via coils and transformers, giving the 5 and 12 volts of DC a computer needs to run. A feedback circuit measures the output voltages and controls the on/off ratio of the primary power transistor and assures that the output voltages do not leave their nominal range. Such a power supply is of course far more complex than a linear power supply with a 50 Hz transformer, but it has some advantages that merit the extra effort:

The bad side is that their complexity makes switch-mode power supplies fail more often, as it was the case with my Sun. I am quite certain this was the primary reason why it was thrown out. I had some experience repairing switch-mode power supplies before, but DON'T attempt to repair one if you're not absolutely sure what you're doing!!!!! A running power supply operates with voltages that are hazardous!!! Another alternative to repairing a power supply is to get a new or used one. The 3/50 for example uses exactly the same power supply, and in fact I used an unrepairable 3/50 as a source for some of the today hard-to-find LSI peripheral chips on the main board.

I have seen so far power supplies from Matsushita and Computer Products been used in 3/60's, and they are compatible both in their mechanical size and electrical ratings. The broken supply was from Computer Products, in the sense that it was completely dead (also known as the 'NADA' effect...). It turned out to be one of the resistors on the primary side that had gone to a state of infinite impedance. This is a common effect for resistors being loaded with high voltages, especially when the designer of the power supply disregards the spec sheet: apart from its maximum thermal loading (i.e. the product of current and voltage), a resistor also has a maximum voltage rating . Depending on the value of the resistor, this may place a much lower limit than the maximum thermal load expressed in watts. For example, a coal film resistor of 330 kOhms and a maximum thermal load of 0.5 watts could withstand over 400 volts before it becomes too hot; a coal film resistor however is typically limited to 250 volts before the electric field leads to sparcs between the windings of the coal film, thus evaporating the coal film and destroying the resistor. The resistor in question was loaded with roughly 300 volts under normal operation, more than allowed for a coal film resistor. Such a situation is typical for power supplies and monitors, and this may work for a long time since the overload is not dramatic. I usually replace the broken resistor with a series combination of two resistors with roughly half the resistance of the original one. This way, every resistor is loaded only with about 150 volts which is fine. After replacing the broken resistor, the power supply worked again, visible by the spinning cooling fan that is powered by the power supply's 12V output (never connect the computer's mainboard immediately to a freshly repaired power supply - check the voltages first!).

I didn't mention that I previously had to revert the acts of vanadalism the previous owner did to get hold of a 7812 voltage regulator on the secondary side: A new regulator had to be soldered in and the missing cooling aluminium sheets had to be replaced: this is the place where some mechanical capabilities come in handy...

4. LSI Chips on the Mainboard

Once the power supply was working again, I could go over to the mainboard. As I said, everything that was socketed was missing. Since I own several other working 3/60's and the chip names are printed on the PCB, I didn't have to find out what goes into the sockets:

You might guess that you have to get the contents for the EPROM and PROM somewhere. The 27512 EPROM contains the Boot PROM Software, i.e. the piece of code that is run immediately after power-up. It checks the machine's hardware, initializes everything and loads the operating system from disk, tape, or network. One might think of it as an equivalent to a PC's BIOS, which is basically true, but the boot PROM of a Sun is far more powerful. It contains a command-line interface to make some general settings (e.g. the boot media and system console), and it contains a complete monitor and debugger. Even while SunOS is running, you can press L1-A to get this command line prompt. You can then examine the memory, the CPU state or hardware and finally press C to continue SunOS as if nothing happened! A good way to get the code for this EPROM is to copy the EPROM from another 3/60 (don't try to copy the EPROM of another type of Sun/3, it doesn't work). The Sun3 Archive also has images. About the legalese: The boot PROM code is still under copyright by Sun, but since the Sun once had a boot PROM with similar contents and Sun now even gives SunOS for Sun/3s away for free, I don't think they will care too much about this (if a Sun official is reading these lines, send me your statement and I will correct this passage appropriately!).

The small PROM is trickier: it is also called the IDPROM because it contains the 'identity' of a Sun. It is a relatively small (32 bytes) bipolar PROM with the upper half being unused. The lower 16 bytes have the following contents in C notation:


struct idprom {
    unsigned char idp_format;         /* constant 0x01 */
    unsigned char idp_machtype;       /* Bit 4..7 = 1 --> Sun/3,
                                      /* Bit 0..3 = 7 --> Sun 3/60
    unsigned char idp_etheraddr[6];   /* MAC address of ethernet interface */
    long          idp_date;
    unsigned char idp_serialnum[3];
    unsigned char idp_checksum;       /* XOR checksum of previous 15 bytes */
};

I took the contents of my broken 3/50 and modified the machine ID and checksum. This way, I still have a unique ethernet address (strictly spoken, it is only necessary that all machines on a single ethernet cable have a unique address). Such a bipolar PROM is difficult to obtain, I burned these 16 bytes into a 2764 EPROM and built a socket adapter with the following layout:

EPROM 2764 PROM 63S080 EPROM 2764 PROM 63S080
Pin 1 (Vpp)
Pin 2 (A12)
Pin 3 (A7)
Pin 4 (A6)
Pin 5 (A5)
Pin 6 (A4)
Pin 7 (A3)
Pin 8 (A2)
Pin 9 (A1)
Pin 10 (A0)
Pin 11 (D0)
Pin 12 (D1)
Pin 13 (D2)
Pin 14 (GND)
Pin 16 (Vcc)
Pin 8 (GND)
Pin 8 (GND)
Pin 8 (GND)
Pin 8 (GND)
Pin 14 (A4)
Pin 13 (A3)
Pin 12 (A2)
Pin 11 (A1)
Pin 10 (A0)
Pin 1 (D0)
Pin 2 (D1)
Pin 3 (D2)
Pin 8 (GND)
Pin 15 (D3)
Pin 16 (D4)
Pin 17 (D5)
Pin 18 (D6)
Pin 19 (D7)
Pin 20 (CS)
Pin 21 (A10
Pin 22 (OE)
Pin 23 (A11)
Pin 24 (A9)
Pin 25 (A8)
Pin 26 (NC)
Pin 27 (PGM)
Pin 28 (Vcc)
Pin 4 (D3)
Pin 5 (D4)
Pin 6 (D5)
Pin 7 (D6)
Pin 9 (D7)
Pin 15 (G)
Pin 8 (GND)
Pin 15 (G)
Pin 8 (GND)
Pin 8 (GND)
Pin 8 (GND)
none
Pin 16 (Vcc)
Pin 16 (Vcc)

This work however turned out to be superfluous, since I found an electronics mail-order service that still has some bipolar PROMs. The Signetics (now owned by Philips) 82S123 is pin-by-pin compatible with the 63S080 originally used by Sun, so the only problem was to find a chip programmer old enough that it could handle bipolar PROMs...

There is also an empty 40-pin socket for an AMD Am9518 data ciphering chip; don't worry if you don't have it or can't get it. This chip anyway wasn't built into non-US models since data ciphering devices are covered by US export restrictions; neither SunOS nor NetBSD need it, and I guess you need special software to use it.

5. The PAL Story

As I stated previously, replacing the PALs was the hardest part of repairing the Sun. For replacement, there are generally two choices: Either you use PALs like Sun did, or you use GALs, a more modern form of programmable logic chips introduced by Lattice Semiconductor. A GAL has a more flexible structure than a PAL and can thus 'emulate' a couple of different PAL types, and it is built in CMOS technology and therefore consumes far less power, so there is a chance that such a Sun runs much cooler than a Sun equipped with PALs. I finally opted for GALs, since they are reprogrammable, i.e. you can erase their contents and program something new if you made an error. PALs are one-time-programmable, e.g. throw them away if something went wrong!

Regardless if you opted for PALs or GALs, the first problem is to get hold of the contents for the logic chips. Logic chips are comprised of a set of fuses, each of which may be programmed or not. The programming specification for all fuses is usually transported in a specially formatted file called a Jedec file. Jedec files are generated by design software for PALs/GALs, and if you read out the contents of a PAL, the programmer's software will write the result as a Jedec file. Reading the contents from the PALs of a complete Sun is therefore an option, but they have an optional fuse for a 'copy protection', so you might not be able to read them (the few 3/60 PALs I checked did not have this fuse burned). The Sun 3 archive also has a complete set of PAL images (the same copyrights as for the boot PROM apply).

If you opt for PALs, you will have to buy the following chips:

CAUTION! There seem to be two versions of the 15xx-? PAL: The -1 form for machines with on-board monochrome video, and the -2 version for machines without. Choose the one you need!!

If you choose GALs, buying becomes simpler, because there are only three different sorts of GALs: The GAL16V8 for all PAL16..., the GAL20XV10 for the PAL20X8, and the GAL20V10 for all other PAL20... . While the 20V8 and 16V8 are commodity parts, the 20XV10 is a bit difficult to obtain. I got 5 samples from Lattice via ELSA AG, my employer. Thank you to both for the cooperation!

Unfortunately, there is no GAL replacement for the 8L14. Since I couldn't find a vendor for a PAL8L14, I finally decided to emulate its function (a rather simple address decoder) with a socket adapter and a couple of TTL logic. The replacement circuit consists of 4 74x138 chips. I used a mixture of ALS and F chips, but the slower LS version may also work. You might ask how I designed the circuit? I took the Jedec file and sent it through a 'PAL disassembler' - a program that converts the Jedec file back into the original logic equations. I used the disassembler contained in the free PALASM package available via http://www.vantis.com. Vantis is AMD's subsidiary company dealing with logic devices.

Below is the circuitry I made, which exploits the fact that output pin 11 is unused (add the OR gate encircled in dotted lines if you need this output):

Replacement for PAL 1589-2

As we were talking about speed: GALs are available in different speeds, ranging roughly from 10 to 25 nanoseconds. I used GALs with speeds of 10, 12, and 15 nanoseconds. Slower ones might work, but remember that a GAL that is too slow might not show up immediately but instead lead to intermittent errors when the machine heats up, so I don't think it's worth experimenting with slower GALs. If you're really out for the cheapest solution: an A PAL is rated at 20 nanoseconds, a B PAL at 15 nanoseconds, and a D PAL at 10 nanoseconds.

An exception seem to be PALs 1578-1 and 1585-1: The Sun did not work reliably if the GALs were too fast, i.e. Sun exploited the devices' internal delays to implement functionalities; a dirty but quite commonplace practice. It turned out that 1578-1 GAL wit 12ns speed did not work, while 15 ns worked. Similarly, a 25ns 1585-1 GAL made the machine work, while a 10ns device made it instable again...

6. RAMs....

The Sun 3/60 uses 30-pin SIMMs organized as 1Mx9 (i.e. with true parity). Those SIMMs used to be commodity parts for PCs a few years ago, so it shouldn't be to difficult go get used modules at a good price (I paid about 3 to 5 DEM per module). Since the 68020 has a 32-bit data bus, you have to insert modules in groups of four. 4 megabytes (the minimum) is enough to see if the machine works, but forget to do serious work with a modern Unix system - a generic NetBSD 1.3.2 kernel itself eats about 1.5 megabytes, and all the standard system processes need far more than the remains. 8 megabytes might be enough for simple tasks if you do not need X11, but since these (used) modules can be had so cheap today, you should get as much as possible. A 3/60 with 24 megabytes is still a nice machine for light interactive work and small program development, even when you run X11.

While the access time of the RAM modules is uncritical (100 nanoseconds is fast enough), there is a hidden pitfall: 1Mx9 SIMMs exist in two different generations: The older ones a made from 9 1Mx9 chips, while newer ones consist of 2 1Mx4 and a single 1Mx1 chip for parity. The higher-density chips on the new modules (also called '3-chip-SIMMs') however need addresses with one bit more to get refreshed properly, which the 3/60 does not deliver. The symptoms of using 3-chip-SIMMs are random crashes and hangs of a machine that otherwise runs correctly. Assure that you use the older 9-chip-SIMMs! While some people report good results using 3-chip-SIMMs, they probably only were lucky up to now...

7. Power-On!

Of course I made some attempt to turn the machine on before everything was done, and depending on what is missing, it either didn't do anything or got stuck at some early point of the self-test.

8. Conclusion

Getting the Sun 3/60 back to work finally turned out to be possible, but it was a quite complex and lengthy job. Since I couldn't work full-time on the project and sometimes had to wait for parts, it took me about 2 months until I saw the first successful boot of NetBSD. I had to survive several 'dead ends' and someone else with less hardware knowledge would probably have given up. It also turned out that having another working 3/60 is extremely helpful for cross-checks...


© 1999Alfred Arnold, alfred@ccac.rwth-aachen.de