BMOW title
Floppy Emu banner

Finally!

The new Floppy Emu prototype is up and running at last! Today I was able to boot a Mac Plus from the new emulator board for the first time. It’s still rough around the edges, but it works. Copy a Macintosh disk image to your SD memory card, then plug the Floppy Emu board into your Mac’s external floppy port, and presto: instant disk drive. Your vintage Mac never even knows it’s not the real thing, so everything runs just like it would with a real external floppy drive.

It’s hard to believe it was nearly five months ago that I set out to replace my first ball-of-wires breadboard prototype with something better. The changes seemed simple enough: switch to a more powerful microcontroller from the same family, substitute a different brand of CPLD, add a few more buttons and connectors, and mount the whole thing on a small circuit board. But then I let the project gather dust for a few months, and when I returned to it, almost everything that could possibly go wrong did. Seemingly minor changes to clock speeds and interrupt configurations led to all kinds of head-scratching failures. They’re not interesting enough to detail, but you can imagine a string of long evenings filled with me pounding my fist on the desk and shouting rude things at the monitor.

One of the coolest features of the new board is that the microcontroller can program the CPLD via JTAG, using the XSVF player code that I discussed in my previous post. Copy a firmware.xvf file to the SD card, reset the Floppy Emu board while holding down both PREV and NEXT, and the CPLD will be updated with new firmware in about 20 seconds. That means an external Xilinx programmer isn’t needed at all, which is a huge win. I hope to later implement bootloading of the microcontroller from the SD card too. If I ever reach the point of selling assembled units, that means end users could update both the CPLD and the MCU just by copying the necessary files to the SD card, without any programming hardware at all.

There’s still a lot left to do. I haven’t yet tested write emulation with the new prototype, so that’s the first task. It should work, but it took me so long to get read emulation working that I wanted to savor the success for a while before enabling and testing the write emulation code. Then I’ll look at some new buffering schemes for write emulation, using the extra RAM found in the ATMEGA1284P microcontroller that the new prototype uses. That should hopefully make write emulation more reliable than in the first prototype. At some point, I also need to add support for 400K and 1.4MB floppies, since the current emulator is 800K only.

The user interface needs improvement too. I’d like to add a nicer way to trigger CPLD programming, and a menu to select from among many disk images on the SD card. It would also be nice to add features like an auto-insert option, to insert a particular floppy image into the virtual drive immediately when Floppy Emu is first powered on.

Two features that you probably won’t see are emulation of more than one floppy drive at a time, and emulation of disks larger than 800K (or 1.4MB on those machines that support it). Those limitations come from the Macintosh floppy driver code in ROM, so to change them I’d need to write a new driver, and find a way to load it using the built-in driver so that the new driver replaces the built-in driver after loading. In fact, I’d probably need to write a new driver for every Macintosh model, since they don’t all access the floppy hardware the same way. It’s all theoretically possible, but would be a major software project that I’d prefer to leave to someone else to attempt.

To my friend Tom who keeps hounding me asking when Floppy Emu will be ready, here you go. Your Mac 512K can now live again!

 

Read 16 comments and join the conversation 

16 Comments so far

  1. Buddy April 10th, 2012 11:58 pm

    Woohoo!! Hope the write emulation “just works” when you get up the nerve to try it..

  2. Steve Chamberlin April 12th, 2012 10:27 am

    OK, basic write operations (Finder copy, MacWrite file save, etc) are working. That means the new prototype is now caught up to where the original prototype was last December. Whew!

  3. Steve Chamberlin April 12th, 2012 11:01 am

    The drive motor LED is working now too. So for the first time, I have a visual cue for when the Mac is accessing the emulated disk. Maybe I should hook up some simulated whirring and clicking noises…

  4. tcdev April 12th, 2012 4:18 pm

    Re: gathering dust

    At work we call that “bit-rot”! 🙂 Without fail, if you leave a project long enough, when you return to it, it simply won’t work. Even if you don’t change anything!!!

  5. JAG April 13th, 2012 2:42 pm

    I really hope you turn this into a board that we can buy.

    So many people have old 128k or 512k that they are collecting, but can’t get a 400k floppy to use to boot it.

    And even if you do have boot floppies, eventually all those old 400k floppies will die, but these machines can live on with this device.

  6. Adam Renie April 26th, 2012 5:20 am

    Congratulations! Is there a noticeable speed up in disk access with the emulator versus the real thing?

  7. Steve Chamberlin April 26th, 2012 5:49 am

    Actually the real thing is slightly faster. The data transfer rate is the same (and is fixed by the Mac hardware), but the order in which sectors are presented by the emulator seems to result in less efficient seek performance than a real floppy. I need to look into that further.

  8. Micki Kaufman May 19th, 2012 2:19 pm

    WANT! Congratulations and I am sure you have enjoyed seeing it come to fruition – imagine how we feel!!!

    Looking forward to the first production run for purchase.

  9. Joel May 28th, 2012 9:14 pm

    I imagine it would require only software changes to implement the Hard Disk 20, Apple’s first hard disk for the Mac, 20 MB accessible through the floppy port. I imagine there are a lot of Mac 512K(e) owners out there that would love such a thing.

    http://en.wikipedia.org/wiki/Hard_Disk_20

  10. Steve Chamberlin May 29th, 2012 6:12 am

    I think you’re right, but as far as I know the Hard Disk 20 interface was a closely guarded secret and was never documented.

  11. Micki Kaufman May 29th, 2012 2:31 pm

    What an amazing achievement.

    Steve, please let us know when we can put in our orders – this will make my restoration of a few old Macs MUCH easier and I’m looking forward to getting my hands on one 🙂

  12. makerimages June 29th, 2012 4:41 am

    Hi, could you give some tips for a beginner electronic`st on how to get started, i know the parts and how to use them in basics, but i havent been able to find any projects online. mim looking for a computer-ish thingy to make.

  13. zxxyz July 11th, 2012 1:56 pm

    Can this work with Apple IIGS?

  14. jebug29 July 14th, 2012 10:23 am

    This is awesome! I can’t wait until we’re able to buy this thing. And I also hope you’ll be able to emulate bigger images like a 20mb image too.

    You are working for the better of Mackind.

  15. Ben August 8th, 2012 11:52 am

    You might consider totally removing the AVR and instead using a softcore, though depending on the CPLD and core chosen that could be an issue. If it’s not an AVR core it could also mean a significant rewrite.

  16. makerimages August 20th, 2012 11:25 pm

    how the heck do you come up with these ideas, plz respond

Leave a reply. Comments may not be monitored regularly. For product support questions, visit the Contact page.