Archives

Good news, Floppy Emu fans: 800K 3.5 inch disk emulation for Apple II is now working! More good news: it doesn’t require any adapter or other hardware, and it looks like the planned 5.25 inch and SmartPort hard disk emulation for Apple II won’t require an adapter either, save for one case as described below. Just plug your Floppy Emu board into the Apple II, load the new firmware, and go.

The new Apple II firmware supports Apple 3.5 Drive emulation of 800K ProDOS disks, and so is primarily of interest to Apple IIgs owners, though it should also work on an older Apple II with the appropriate disk controller card (not common), or the rare Apple IIc+. It works when the Emu board is plugged directly into the Apple II, making it drive #1. My IIgs machine “Gary” is now happily booting GS/OS directly from the Floppy Emu.

Apple 3.5 Drive

The Apple 3.5 Drive uses the same 800K Sony floppy mechanism as the early Macintosh models. Because Floppy Emu already supported emulation of 800K floppies for the Mac, I was fairly sure it would be possible to do it on the Apple II as well, but the details eluded me for a while. Inside the Apple 3.5 Drive, there’s an extra board called the daisy chain board that’s not found on the Mac, and it was this board that made things difficult. My previous posts on this topic mentioned semi-mysterious signals called /EN3.5 and WRPROT that don’t exist on the Mac.

As it turns out, the only change that’s strictly necessary is that the drive’s RD output (pin 16 on the 20-pin ribbon connector) should also be connected to pin 20. That’s it. On a Mac, pin 16 is internally connected to both the RD and SENSE inputs on the logic board’s IWM chip. But on an Apple IIgs, pin 16 connects to RD and pin 20 to SENSE, so they must be tied together externally when emulating a 3.5 drive.

For Floppy Emu, I can’t physically tie pins 16 and 20 together, but I can alter the firmware to output the same value on pin 20 and on pin 16, and it works perfectly for the Apple II. But for a Macintosh, pin 20 is the PWM output used to control the drive’s variable rotation speed. This leads us to the first commandment of Apple II firmware for the Floppy Emu:

Warning: Do not connect a Floppy Emu board to a Macintosh while it’s running the Apple II firmware. First connect the Emu board to your Apple II, then install the new firmware. When you want to switch back, reinstall the Macintosh firmware, then move the Emu back to your Mac. Though I believe the risk is low, running Apple II firmware on the Mac has the potential to damage the Emu and/or the Mac.

If you connect a Macintosh to an Emu board that’s running Apple II firmware, both the Mac and the Emu will attempt to drive pin 20. This will cause the output drivers of the two chips to fight each other, possibly damaging them. In the name of science, I tested it for several minutes and didn’t observe any ill effects, but please don’t do it on purpose. A future revision of the PCB will add an inline resistor here to protect against “whoops”, but for now be careful when moving your Emu board between an Apple II and a Mac.

To be clear, this output fighting only happens if you mess up, and use the Apple II firmware on a Mac. There’s no output fighting when using the correct firmware for the correct computer. Even using Mac firmware on the Apple II is fine (though it won’t work). I’m just trying to make things as idiot-proof as possible.

Daisy Chaining

In previous posts, I mentioned a signal called /EN3.5. This signal appears on pin 4 of the 20-pin ribbon connector, and is used to enable the 3.5 inch drives in an Apple II daisy chain. But on the Macintosh, as well as on 5.25 inch drives, pin 4 is just an additional GND connection. Both the Emu board and the DB19 to 20-pin extension cables that I sell have pin 4 internally hard-wired to GND. That means there’s no way for Floppy Emu to read the state of the /EN3.5 signal.

“But wait”, you say, “isn’t it bad if the computer’s /EN3.5 signal is connected to an external GND?” Actually it’s fine, and there’s a 470 ohm inline resistor on pin 4 on the logic board or disk controller to cover this exact issue. Remember, 5.25 inch disk drives also have pin 4 hard-wired to GND, and work fine with the Apple II.

“But wait”, you say again, “how can the Floppy Emu emulate a 3.5 inch Apple II drive if it can’t read the state of the /EN3.5 signal?” Ah, good question. The /EN3.5 signal is normally used to deactive the 3.5 drives, so the computer can talk to SmartPort drives or 5.25 drives further down the chain. But since Floppy Emu doesn’t have a daisy-chain out anyway, the /EN3.5 signal is irrelevant. The Emu acts as if /EN3.5 is always asserted. In practice, this means the Emu will also try to respond to any queries for 5.25 drive #1, but its response isn’t valid and is ignored by the Apple II. GS/OS and ProDOS both show that no 5.25 drives are present, which is perfect.

The only case in which an Apple II adapter is needed for Floppy Emu is when daisy chaining it behind a real Apple 3.5 Drive, and configuring it to emulate Apple 3.5 Drive #2. The Apple 3.5 Drive’s daisy chain board uses a little trick to check if pin 4 is GND on the next drive in the chain. If yes, then it assumes that drive isn’t a 3.5 drive, and won’t forward on 3.5 drive control signals from the computer. A small “Apple 3.5 Drive #2 Adapter” board with built-in logic for /EN3.5 and the /DRIVE2 enable signal would fix this, and I plan to offer such an adapter in the future. For now, if you absolutely must have your Floppy Emu configured as 3.5 drive #2, you can remove the daisy chain board from a “donor” Apple 3.5 Drive, and connect Floppy Emu to its internal drive connector, in place of the Sony floppy mechanism.

Apple II Firmware

In addition to simply getting emulation working for the Apple II, I added a few other firmware improvements:

2MG image file support! Most 800K Apple II disk images are in 2MG format, though some are Disk Copy 4.2. Now both are supported. 2MG worked on the first try too, which pretty much never happens. 🙂

Pressing the NEXT button will eject the current floppy.

The ProDOS disk name is parsed from the disk image data, and displayed on the Emu’s LCD.

You can download this version of the Floppy Emu Apple II firmware here: Apple II 0.1A-F1. Remember the caution mentioned above, and don’t connect the Emu to a Macintosh while it’s running the Apple II firmware.

What’s Next

3.5 inch disk emulation is step 1 of 3 in my Apple II plans. Soon to come, I hope, will be 5.25 inch emulation for 140K disks. The Emu can be connected either to the DB19 port on the IIgs, IIc, and Apple 5.25 drive controller card, or to the 20-pin ribbon connector on the original Disk II controller card. Following that, I hope to add SmartPort emulation, making it possible to emulate one or more hard drives of 32 MB each. There are no guarantees, but I’ve looked into the details of both 5.25 and SmartPort emulation, and they’re fairly well-documented and seem within the capabilities of the Floppy Emu hardware.

When I’m done, I hope to have a single device that emulates Apple II 5.25″ floppies (140K), 3.5″ Apple II floppies (800K), SmartPort block devices (like an Apple II hard disk, up to 32MB), Macintosh 400K, 800K, and 1.44MB floppies, Lisa 400K/800K floppies, and the Apple HD20 hard disk up to 2GB. That would make it a real Swiss Army knife of Apple disk emulation!

11 Comments so far

Just a quick note. I have absolutely no need for your products, but I’ve found all of your writeups to be very useful and entertaining. Thanks.

Martin April 1st, 2015
8:12 pm

Steve,

This project is truly amazing. Your tenacity and dedication is to be admired. I have two floppy emus and also have Apple iis, IIe and IIgs machines as well as vintage Macs. Firmware to do both with the same device would be amazing. I am amazed at how far you have evolved this project.

I personally think you are giving Steve W a run for his money 🙂

Keep up the excellent work.

Cheers, Martin…

Bryan April 2nd, 2015
2:41 am

Many IIGS users still want the ability to daisy chain the 5.25 drive to the Floppy Emu. Of course, one can install a 5.25 drive controller into another slot, but it would still be great if that can be avoided. A daisy chain adapter would still be a great to the Floppy Emu.

Also, what was the cause of the Floppy Emu always being in read mode when connected to the IIGS?

If you need to daisy-chain a 5.25 floppy behind the Floppy Emu, the best solution is to use a daisy-chain board removed from an Apple 3.5 Drive (A9M0106), then connect the Emu in place of the Sony floppy mechanism. I might offer my own version of that board in the future, but it would be fairly complex and require two of the rare DB19 connectors, and so would probably be more expensive than just taking one from an A9M0106.

The Macintosh explicitly turns off the drive motor before disabling the drive, but the IIgs doesn’t seem to do the same. I changed the firmware so that disabling the Floppy Emu drive will also implicitly turn off the motor, and that fixed the “endless read” behavior you might have seen earlier.

Herb April 3rd, 2015
6:28 am

Apple II’s can read/write to 1.44MB floppies if equipped with an Apple II 3.5 Drive Controller as well. However I do not believe any software was published on 1.44MB disks. But out of curiosity, do you think the Floppy Emu when connected to such a controller will read HD floppies? The IIGS with that controller can also read HFS & MS-DOS formatted floppies as long as the respective FST’s are installed.

SteveP April 3rd, 2015
6:31 pm

I have need for both Mac and Apple II support. This is fabulous! If I read the above correctly, some future version will have a resistor inline to avoid the possibilty of damage… But couldn’t that be put inline in the cable on the right pin for those who want one of the existing versions? 🙂 I don’t want to wait, and who knows when that would make it into production.LoL But when you have the 140K floppy support, and then icing on the cake would be the HD support, this would be even more incredible!

If you’re waiting for “next version” for a resistor, don’t – pay attention when swapping between Mac and Apple II, and use the proper firmware, and you’ll be fine. It will probably be 6 to 12 months before I can do a new PCB revision anyway. Yes, you could make a custom cable or adapter that has a resistor for extra safety – maybe I could offer those if there’s sufficient interest – but IMHO it wouldn’t be worth the cost.

I did a brief test of a 1.44MB image on the IIgs, but it didn’t work. I’m not sure why not, but since I don’t think there’s really any 1.44MB software for the IIgs anyway, it’s a low priority. I may come back to it after looking at 5.25 disks and SmartPort, if I haven’t gotten sick of the whole project before then. 🙂

Herb April 4th, 2015
2:52 pm

The IIGS does not have the SWIM chip, so it cannot natively recognize 1.44MB disk, so I imagine a 1.44MB image would have the same limitation? To read an HD floppy on an Apple II, you need an Apple II 3.5 Drive Controller which has the SWIM chip on board.

Ah, I misunderstood your first comment. As it stands now, I would expect Floppy Emu Apple II 1.44MB emulation to work if you have an appropriate controller card for the IIgs. However, I’ll likely have to remove that support when I work on SmartPort and 5.25 disk emulation, because there’s limited logic space available in the CPLD.

techknight April 5th, 2015
6:00 pm

Hey Steve, Feature request: Disk-scripting? Basically with Mac system install disks, etc.. there are always multiple disks in a set. of course. Would be nice if there was a feature that we could load a disk script along with its disk images on the SD card. Mount the disk script, so when the mac “ejects” each disk, the floppy emulator auto-mounts the next disk listed in the script file. until the end of course. This would drastically speed up/automate multi-floppy system installs. 🙂

thoughts?

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

name

email (
will not be shown )

website

Notify me of followup comments via e-mail. You can also subscribe without commenting.