BMOW title
Floppy Emu banner

Apple IIgs ROM 03 Headaches

Apple_IIgs_002

I’m still chasing an explanation for why some Apple IIgs computers won’t play nicely with Floppy Emu’s new 800K 3.5 inch Apple II disk emulation. I described the symptoms in my previous post – ProDOS and GS/OS disk images boot straight up on my IIgs without problems, and on most other IIgs systems, but for a couple of people it just hangs forever in the READ state on track 0. Both people who reported this have the relatively rare ROM 03 version of the IIgs, so I’m assuming it’s a compatibility problem between ROM 03 and the more common ROM 01. But what’s the problem exactly? And how can I fix it?

The biggest obstacle at the moment is lack of information. I don’t have a ROM 03 machine, and I can’t find one anywhere, so I can’t troubleshoot this myself. I’ve exchanged emails with two ROM 03 owners who are willing to help, but so far I’ve only gotten detailed information from one, and one data point isn’t enough to draw any conclusions. What seems like a compatibility problem might just be a hardware issue with one specific computer or Emu board.

Despite working mostly in the dark while trying to solve this, I have some theories about what might be going wrong.

 
Crazy WRPROT Circuits

There are documented incompatibilties between ROM 03 and some real Apple 5.25 inch floppy drives, although the details are fuzzy and sometimes seem contradictory. According to this section of the Apple 2 wiki, ROM 03 is not compatible with the Apple UniDisk 5.25 or DuoDisk. The explanation seems muddy, with two paragraphs that appear to offer two unrelated explanations, but one of them is related to the circuitry behind the drive’s WRPROT (write protect) signal. This is the signal that indicates whether the disk in the drive has the write-protect notch covered – remember those? According to the wiki, “incompatible drives on these models will just spin at startup.” Sounds a lot like what’s happening with Floppy Emu.

There’s also this Apple Tech Info document about ROM 03 and DuoDisk, with a symptom that sounds similar: “The DuoDisk LED for drive #1 will turn on, but the system will not start.” It doesn’t give an explanation, but mentions that booting from a write-protected disk works normally. Again, something about ROM 03 and write protection.

Check out this partial functional diagram of the Disk II 5.25 drive. Notice anything odd about the write protect signal?

DiskII_Functional_Diagram

There’s a tri-state buffer for the WRPROT output, controlled by the drive’s ENABLE input. Behind that is a pull-up resistor, and the switch that senses the notch in the disk. But instead of ultimately terminating at GND, the write protect circuit is connected to the drive’s PHASE1 input. When the computer sets PHASE1 to 0, it can then read the WRPROT state as 1 = write protected, 0 = not write protected. But if the computer sets PHASE1 to 1, it effectively disables the whole write protect circuit, and WRPROT will always be 1.

My theory is that ROM 03 has some 5.25 inch drive detection code that sets PHASE1 to 1 in order to disable the circuit, and then waits for WRPROT to go to 1. But if the disk drive has its write protect circuit terminated directly to GND instead of PHASE1, it won’t be disabled, so WRPROT will never go to 1 and the computer will wait forever, unless the disk is actually write protected. My hunch is that the DuoDisk is built this way, which explains why it doesn’t work with the ROM 03 IIgs.

 
Floppy Emu’s Identity Crisis

Now what does any of this have to do with Floppy Emu’s 800K 3.5 inch Apple II disk emulation? After all, it’s emulating a 3.5 inch disk, where WRPROT behaves completely differently and this issue presumably isn’t relevant. Remember in my last post, when I described how the current design lacks connections for some enable signals used to distinguish between 3.5 inch and 5.25 inch drives? I had sort of dismissed it as not a problem, but my theory is it’s causing Floppy Emu to be identified as a 3.5 inch drive and a 5.25 inch drive. And when it’s identified as a 5.25 inch drive, WRPROT is not going to respond to PHASE1 in the expected way, which may cause a bootup hang on ROM 03 just like with the DuoDisk. My guess is that ROM 01 sees a misbehaving 5.25 drive and ignores it, but ROM 03 sees a misbehaving 5.25 drive and hangs forever, before ever attempting any 3.5 drive access.

The solution is simple, if annoying – use some external circuitry to handle all the enable signals, so Floppy Emu isn’t accidentally detected as a 5.25 inch drive. My last post sketched out a circuit to do this job, and I’m going to build some PCBs to test it. Meanwhile, using the daisy chain board removed from an AppleDisk 3.5 (A9M0106) floppy drive should accomplish the same thing.

SteveP, one of the ROM 03 owners I’ve been corresponding with, tested this theory. He used the A9M0106’s daisy chain board to connect Floppy Emu to his ROM 03 IIgs. And it worked! Sort of. The computer no longer hung at track 0 while attempting to boot. He was able to boot successfully into ProDOS. And he could begin to boot into GS/OS, but then it would fail with errors like “Unable to load START.GS.OS file. Error=$002E” or “UNABLE TO LOAD PRODOS”. So is there another ROM 03 compatibility issue at work here, or does he just have some flakey hardware or some other unrelated problem? With only this one report to go by, I can’t say, but I’ll keep digging.

Read 11 comments and join the conversation 

11 Comments so far

  1. Jason Galarneau - April 12th, 2015 2:21 pm

    I can lend you a ROM 3 machine if you would like. I’ll pay shipping to you and back when you’re done.

  2. Steve Chamberlin - April 12th, 2015 2:44 pm

    Thanks, that’s very generous of you! Will send you a follow-up email.

  3. Tim Buchheim - April 13th, 2015 5:49 pm

    Do you have a copy of the Apple IIgs Hardware Reference, 2nd Edition? ISBN 0-201-52389-2

    It includes the schematics for both GS models. I can email you copies of the schematics if you’d like. (I could also send you the section of the text about the drive controller, but it’s basically just a description of the registers on the IWM, which I imagine is the same as the IWM found in Macs of the time period. (Note: There are a number of typos in that section of the text. My copy is filled with penciled-in corrections, although I can’t remember where I got the corrections, so I’m not sure of their accuracy.)

    Unfortunately I don’t think I have a copy of the GS/OS Device Driver reference, which would presumably cover the AppleDisk3.5 driver. (I do have the main GS/OS Reference, but all the driver information was in a separate volume.)

    I also have a ROM 3 machine. It hasn’t been turned for a few years, but I’ve been planning to set it up again and I was thinking about buying a Floppy Emu once you get it all working. 🙂

  4. Steve Chamberlin - April 13th, 2015 6:58 pm

    No, I don’t have the IIgs Hardware Reference book. I think I might have seen some version of it on the web, or maybe I’m thinking of a different book. If it’s not too much trouble, the schematics of the IWM and SmartPort stuff from both versions might be handy. My hunch is it’s actually a functional difference in the ROM code that matters, though, and not something that would be visible in the schematics.

    For sure I’m doing one thing wrong with my handling of the enable signals, and hopefully the adapter board I designed will be enough to resolve that. There may be other ROM 03 issues lurking, hidden by that one, but I’m not sure yet.

  5. SteveP - April 15th, 2015 7:54 am

    Hi Steve…

    That Hardware Reference manual can be found here as well:

    http://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/hardware/machines/Apple%20IIgs%20Hardware%20Reference.pdf
    (or hires)
    http://mirrors.apple2.org.za/ftp.apple.asimov.net/documentation/hardware/machines/Apple%20IIgs%20Hardware%20Reference_HiRes.pdf

    In that same directory you can find the IIgs Firmware Reference manual which has some notes about the Smartport interface. Might be helpful?

  6. Alex - April 20th, 2015 1:10 pm

    Steve,

    I believe that I have a spare ROM 03 IIgs that you can have. Let me know if you are still looking, and I’ll ship it to you.

    I will have to check it to make sure it’s not a ROM 01, but a quick trip to my storage unit should confirm.

  7. Steve Chamberlin - April 20th, 2015 4:30 pm

    Thanks for the offer, but Jason has already hooked me up with a ROM 03 machine.

  8. Tim Buchheim - April 21st, 2015 11:34 am

    I took pictures of the disk-related parts of the schematics. It looks like the only hardware difference is a few 22 ohm resisitors on the ROM 3 version of the hardware.

    http://www.cs.hmc.edu/~tcb/GS/

  9. Tim Buchheim - April 21st, 2015 12:02 pm

    (oh, and if you’re curious, the lines labelled 3.5DIK and HDSEL.H are connected to the VGC chip. Same on both models. (VGC is the video graphics controller, but also has a few other duties such as handling the real-time clock and some interrupt sources. It seems like it handles whatever didn’t fit into the Mega II.)

  10. Andrew Witte - March 23rd, 2021 4:20 pm

    Was this ever resolved?
    I’m looking at maybe getting a ROM 3 Apple IIGS but want to make sure FloppyEmu isn’t going to be an issue.

  11. Alex Cat3 - March 23rd, 2021 4:55 pm

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