BMOW title
Floppy Emu banner

Sad Mac

I’m working with my Xilinx Spartan 3A FPGA board for the moment, and I’ve finally made some visible progress. I’ve never been so happy to see a Sad Mac! A boot failure may not seem very exciting, but I’m thrilled that it’s actually doing something recognizably Macintosh-like. That means it’s actually running 68000 code from the Mac ROM, which is drawing stuff to the screen buffer, which is getting read by the video module and displayed to the VGA screen. From here it will be a long, slow road of implementing replacements for the VIA, SCC, IWM, and other components.

Using a FPGA dev board for initial development makes it much easier to get started than it would be with a pile of discrete ICs. All the other “hardware” is actually synthesized inside the FPGA: a 68000 soft-CPU (TG68 core from, 32K RAM, and 8K ROM. The synthetic RAM/ROM sizes are much too small for a Macintosh, but are all that would fit inside the FPGA. They’re enough to create a screen buffer and run the initial boot code from ROM, anyway.

I have an Altera DE1 dev board on the way, which has real external SRAM and Flash ROM that I can use instead of the synthetic RAM/ROM. (The Spartan 3A board has DDR RAM that I could never figure out, and ROM that can only be programmed through a serial port.) I haven’t yet decided whether to add a real 68000 to the DE1 on an expansion card, but given how easy it was to get the TG68 soft-CPU working, I’ll probably stick with that.

Eventually I’ll need to construct an expansion card for the Altera DE1 board, containing a microcontroller and some other things, but I should be able to get pretty far with just the DE1. The DE1 is an “educational” board with all kinds of miscellaneous gizmos. My long-term goal is to make an all-custom Plus Too board that contains only the parts actually needed, as well as vintage connectors for a Mac keyboard, mouse, and floppy.

The Sad Mac is appearing because the ROM checksum test failed. That’s not surprising, considering I only implemented the first 8K of the 128K ROM. It’s trying to play a sound, too, by streaming some data through the sound buffer. With some more work to pull bytes from that buffer at 22 KHz, I could hear the glorious boot beep!

Read 13 comments and join the conversation 

13 Comments so far

  1. FPGA Mac « adafruit industries blog - September 15th, 2011 6:38 am

    […] the project over to an Altera De1 dev board to get things going. The complete post can be found on Big Mess o’ Wires. Filed under: fpga — by kgroce, posted September 15, 2011 at 10:37 am Comments […]

  2. ScottInNH - September 15th, 2011 10:54 am

    Very neat! It’s so cool to see these old systems being migrated (restored?) to FPGA.. old parts are becoming scarce.

    Of related interest is the Atari Coldfire Project, an entire Atari ST in FPGA:

  3. Recreating the Mac Plus with an FPGA - Hack a Day - September 16th, 2011 1:05 pm

    […] [Steve] over at Big Mess O’ Wires has never been so happy to see the “Sad Mac” icon. […]

  4. Anonymous - September 17th, 2011 8:33 am

    Apparently this means it crashes at ROM reading.

    That’s not bad!

  5. Steve - September 17th, 2011 10:37 am

    Yup– see the last paragraph. The first two digits of the sad mac code are the test number that failed. After switching to the real external ROM with the entire 128K ROM image, it’s now dying at test #2 (RAM test) instead of #1 (ROM test). Switching to the real external SRAM should fix that.

  6. Steve - September 17th, 2011 12:35 pm

    Got the RAM working. Now it successfully passes the self-tests, and shows the familiar 50% gray Mac desktop background with the rounded corners, then just sits there. I think I need to implement timers and interrupts next for it to get further.

  7. Wherehouse - September 17th, 2011 5:43 pm


    Linked to here from Hack a Day. Awesome work. I don’t know much about this stuff, but sticking with the soft CPU sounds like a better option all round (fewer chips!) Congrats on getting the frame buffer working.

  8. […] [Steve] over at Big Mess O’ Wires has never been so happy to see the “Sad Mac” icon. […]

  9. Blog » Blog Archive » FPGA Mac - September 20th, 2011 12:55 am

    […] Mac – [Link] Tags: FPGA, Mac, Spartan, Xilinx Filed in Mcu | 1 views No Comments […]

  10. Michael - September 22nd, 2011 3:33 pm

    Great progress, I’m impressed!

    The VIC20 FPGA implementation on fpgaarcade contains a VHDL 6522 which you might be able to use:

  11. tissit - October 10th, 2011 10:28 am


    Of course, a Mac is the most useless possible thing to run, but that’s still interesting.

  12. carpinteyroohk - December 2nd, 2012 9:08 pm

  13. book of ra su - April 1st, 2014 12:45 am

    Peccato solo che a dire il vostro articolo è sorprendente
    . La chiarezza per la vostra pubblicazione è semplicemente fantastico e che ho potuto presumo che sei un esperto
    in materia . Bene insieme con il vostro permesso mi permettono di afferrare il tuo feed
    per rimanere sempre aggiornati con avvicinarsi posta. Grazie un
    milione e vi prego di portare avanti il ​​lavoro
    gratificante .

Leave a reply. For customer support issues, please use the Customer Support link instead of writing comments.