Porting Mac OS X to the DEC Rainbow

There appear to be a significant number of iMacs out there with good logic boards, but dead video or crippling rebooting behaviour. At least one company sells kits to allow owners of dead iMacs to transplant their logic boards into rack-mountable cases, and a number of web sites describe how to mount an iMac logic board in an alternative case and power it using a PC ATX power supply. Here's another one. I bring working 350Mhz rev E. board soft-boot and an ultra-hip (or ultra-dork, depending on your perspective) 1985 DEC Rainbow 100 case to the table.

Disclaimer: Don't try this if you're not familiar with discharging CRT tubes and capacitors and stuff. Seriously. I've never personally been killed by a CRT, but others have. The CRT anode does not have to be touched for you to be electrocuted. Just brushing against a flyback transformer wire with cracked or cruddy insulation can do it too. CRTs and nearby parts can kill the unsuspecting or unknowing, especially in these post-9/11 times. Death, doom, despair, and destruction abound. Now, on to the fun stuff!


My instructions here are pretty rough, I confess that these are more along the line of notes that I made to myself as I tinkered with this. Here's a great site that has tons more info about this kind of conversion: http://www.applefritter.com/node/10574 (Thanks Simon!)


Soft Boot, or letting the iMac turn the ATX power supply on and off:

1. Supply +5 volts trickle power to the logic board.

My rev. E board did not have a 3-pin header at J9 (just above the battery)
so I had to carefully solder one in.  I used a 12-watt pencil soldering iron
for that.  J9 pin 3 (the pin closest to the battery) is where you want to
attach the +5 trickle voltage line (from the +5VSB purple lead of an
ATX supply) to the logic board so that it's awake enough to monitor
the keyboard's power button.


+5 trickle J9 pin 3 -------------------------------- ATX +5VSB (purple)



2. Locate the low-to-high Power On signal from the iMac logic board.

PC motherboards ground the ATX supply's green wire when they want
the ATX supply to power up.  iMac logic boards provide a signal
that goes from ground to +5 volts when they want the power supply to
turn on.

Rev. A and B boards used pin 23 of the power connector for this.
I couldn't find any mention on other sites of where the signal had been
moved to on the rev. E boards.  I reasoned that it had to exist on either
the video connector or the small 5-pin connector that goes to the
analog/power board.  To find it, I appled trickle power and made a list
of all the pins that were held at ground.  Then I went back over each of
them and hit the power button and looked for the one that went from
ground to +5 and back again.  I eventually found it on pin 12 of the
logic board's video connector header, which comes out on pin 11 on the
14-pin video connector cable end.

I am taking the iMac Power On signal from pin 11 (small green wire)
of the 14-pin white connector on the interconnect cable that goes
between the logic board and the video board.  The video board is
plugged right on the back of the display tube, and must be removed
to disconnect the video side of this cable.



3. Convert the iMac Power On signal to the ATX PWR_ON signal.

Thanks to http://www.radiomods.co.nz/imactoatxconversion/ for this
idea:  Use a 2N3904 transistor (almost any small NPN transistor should
work) to switch the ATX PWR_ON green wire to ground using the iMac
Power on signal as the control line.  Tie the iMac Power On signal to
the transistor base via a resistor to limit its current draw when it
goes high.

                                                      ____ ATX PWR_ON (green)
Power On from iMac                                   /
video connector                                    |/
logic board pin 12 ------- 1.5K ohm resistor ------|     2N3904 transistor
or cable 14-pin                                    |\
connector pin 11.                                    \
                                                      |
                                                   ground

4. Connect the ATX Ground (black), +5 (red), +3.3 (orange), and +12 (yellow)
   to the logic board's power connector.
   
To do that, I desoldered the 24-pin power connector from the downconverter
and used it to fabricate a little board that I soldered all of the ATX leads
to.  To make the board, I used a little piece of single-sided copper clad,
marked it up with a pen, drilled a bunch of holes, and then used a dremel to
mill out some channels.  I put the transistor and resistor onboard so that
all the ATX wires I needed went to that one board.  I put two small header
pins on the power board, one to be connected to the iMac's low-to-high
Power On signal, and one to be connected to the iMac's always-on +5 volt
trickle J9 pin 3.

With this setup, soft-boot works!  During initial testing, I could power
the iMac logic board on and off using the attached USB keyboard's power
button.  When the button was hit, the logic board raised its Power On
signal and waited to see if it gots power or not.  If not, it dropped it
about a second later.  Otherwise, it kept it high.  When the keyboard power
button was pressed again, it went low and the system powered off.  I performed
those tests first with only the keyboard and ATX supply attached, and no drives.
With no RAM, I got the "boop" sound, and with RAM installed, I get the
startup "bong" sound.  Later, after I added the video connector and drives,
everything worked great.  Keyboard power-up and software shutdown worked
flawlessly.

Power board close up

From 12" away

+5V trickle to mobo

To reconnect the relocated CD ROM and hard drive to the logic board, I used a standard 50-pin SCSI ribbon cable, split it between pins 10 and 11, and clamped a 40-pin IDE connector onto the cable.

To adapt the iMac logic board's 20 pin video out header to a standard 15-pin VGA connector, I salvaged the cable that came in the iMac and soldered some of its wires to the pins of a connector desoldered from an old PC VGA card.

The video cable that connects the iMac logic board to the iMac video board on the back of the CRT has a 20-pin header on one end, and on the other end has two small white plastic connectors, a 6-pin connector with the Red, Green, and Blue signals and their ground leads, and a 14-pin connector with the Vertical Sync, Horizontal Sync, Sdata, Sclock, and Power On signals.

I soldered the Red, Green, and Blue wires from the 6-pin connector to pins 1, 2, and 3 of the VGA connector, and soldered their respective ground leads to pins 6, 7, and 8 of the VGA connector. From the 14-pin connector, I soldered the pin 2 orange ground wire to VGA pins 5 and 10, the pin 1 black Sclock signal to VGA pin 15, the pin 3 yellow Sdata signal to VGA pin 12, the pin 4 white Vertical Sync signal to VGA pin 14, and the pin 6 black/white-stripe Horizontal Sync signal to VGA pin 13. Finally, I routed the green pin 11 Power On signal to the power board's ATX Power On signal inverter.

http://www.webdrive.jp/mac/iMIU03e.htm has some video connector pin tables with the pin numbers on the main logic board (which wasn't very useful to me since I used the video cable, although I was able to double-check my connections against these with an ohmmeter).

VGA               iMac
1 red video   --- 17
2 green video --- 15
3 blue video  --- 13
5 gnd         --- 3
6 red rtn     --- 18
7 green rtn   --- 16
8 blue rtn    --- 14
10 gnd        --- 3
12 S data     --- 1
13 hsync      --- 9
14 vsync      --- 11
15 S clock    --- 2

From http://pascal.monte.free.fr/imac/video.html, pins from little white
14-pin connector on video board end of salvaged video cable to VGA connector:
1  black  SCL       to VGA pin 15
3  yellow SDA       to VGA pin 12
4  white  vsync	    to VGA pin 14
6  blk/wt hsync     to VGA pin 13
2  org	  ground    to VGA pins 5 and 10

11 grn    Power On  to power board's signal inverter


I made this diagram and referred to it as I soldered, looking at the pins
on the back of the VGA connector:

  1
      r  g  b  o  G
6   rr gr br  o  G
      o  sd hs vs sc
 11

One minor problem with the iMac video is that the video signal strength or timing appears to have been designed without much headroom, perhaps due to the fact that the engineers knew that their video cable only had to be about 6 inches long between the logic board and the CRT. I tried several different standard VGA LCDs and monitors with the new iMac external VGA connector, and found that the length of the monitor cable can be a problem. LCDs with 6 foot cables could not sync perfectly, and I got an annoying single-pixel horizontal jitter per scanline, most noticable on the left side of the screen and on high contrast borders. Analog monitors with 3 foot cables looked great, but analog monitors with 5-6 foot cables suffered from ghosting. I didn't have any LCDs with short cables to test with.

Apple doesn't exactly go out of their way to make it really super clear that not doing the firmware update BEFORE installing OS X can destroy an iMac. They don't appear to explain anywhere what the actual problem is, either. Perhaps they don't know. The theory that makes the most sense to me as to why all these iMacs are dying is that an OS X install sets the video resolution to something that the analog/power board cannot handle. Sometimes it destroys that circuitry and sometimes it doesn't. With an increased scan rate, current draw goes up, and thermal overload protection in the power supply may be causing it to shut down if you're lucky or burn up if you're not.

There are a number of suggestions floating around on the web to do things like reset parameter ram, get into open firmware and reset nvram, pull and reinsert the battery, unplug hard drive and CD to lower current demands and see if machine stays up long enough to try some of the above... sometimes they'll work and sometimes they won't, depending on degree of aforementioned damage. It does appear that physical damage is possible, however, so my recommendation would be to power the iMac up as few times as possible when trying these things.