30th Anniversary Macintosh
It is a truth, universally acknowledged, that an engineer in possession of an antique computer must be in want of hacking it. Last year I reverse engineered the Easter Egg photographs from a Mac SE that I found on the side of the road and that machine has been sitting idle since then, so I took inspiration from NYCR founder Dave Clausen’s six year old 24th anniversary Mac project and turned my old SE into a “30th anniversary Macintosh” with a new ARM motherboard running Linux. Unlike Dave, I was able to interface with the original 9″ CRT thanks to the programmable hardware in the Beaglebone Black.
The CRT was still in good shape and the m68k motherboard would startup (although we have no media or OS for it) so it was fairly easy to reverse engineer the pinout and waveforms for the combination power-supply and video connector. The all-in-one Macs shared a common power-supply for the monitor, analog board, motherboard and drives, so the same cable carries video, hsync, vsync, +5, -5, +12 and -12 Volts.
With these timing measurements I was able to write a software video card that runs inside the BeagleBone Black’s PRU to display a user-space framebuffer, and then used Xvfb to render X11 into a shared memory buffer that could be exported to the PRU’s memory. Working with a bare CRT like this can be scary — the monitor is not even remotely multisync and vsync a few percent off from its desired 60.1 Hz refresh rate generates very bad buzzing sounds.
You can enjoy the dithered 1-bit cat videos above and relive the era with monochrome visuals for xeyes and other classic applications. If you want to build your own and see the specifics of the design, there are more details on my website, trmm.net/Mac-SE_video.
UPDATE 2014-02-09: Original ADB Keyboard and mouse support is now working. adb2usb source code for a Teensy 2.0.
So, any hope of getting a detailed set of instructions on how you built the frame buffer? For the Macintosh Classic I have gathering dust, I keep vacillating between replacing the original CRT with a small flat panel LCD and trying to do something like this.
Definitely try to save the B&W CRT! There are some more wiring details for the Macintosh SE at http://trmm.net/Mac-SE_video#Wiring
Based on photos I’ve seen of the Classic motherboard, it appears to have the same 14-pin connector as the SE, although there might be a different pinout. The original and Plus used a 12-pin connector described here http://home.earthlink.net/~gamba2/images/plus_analog.PDF with similar Video, !HSYNC, and !VSYNC. Does your motherboard work? If so you can use it to reverse engineer the pinout and timing diagrams.
The “frame buffer” is purely in user-space memory; the PRU hardware in the BeagleBone Black reads it from RAM and clocks it out the signal to the CRT analog board. For my first attempt I just jammed the wires into the BBB’s headers. It would be a pretty simple board to make if there were any market for replacement motherboards for these machines.
Here is a similar project I did for the Raspberry Pi. No interface necessary, it directly connects to a Classic II analog board with one resistor change. It also has links to timing diagrams from Apple.
https://sites.google.com/site/7w0n0d3/home/applepi
That is an awesome hack with the PWM and audio output to generate the sync! I also encountered the retrace issues; it seems that modern LCD outputs don’t reset the data pins to idle during HSYNC and VSYNC, so in one version of my board I added a NAND to force the video pin high if either !HSYNC or !VSYNC were asserted.
Is it possible to modify the driver to output a greyscale signal instead of a 1-bit black and white? I know the CRT itself doesn’t support it, but I know how to design the circuit so it does.