BMOW title
Floppy Emu banner

Apple II (Emulation) Forever

a2-edna

On the road to Apple II floppy disk emulation, I’ve picked up a couple of new members for my retrocomputing collection. Above is a classic Apple IIe – let’s call her Edna. The eBay seller didn’t believe much in bubble wrap or other packing materials, so Edna suffered a cracked corner and bent bottom plate during shipping, but she still works just fine. Below is a boxy fellow I’m calling Gary, an Apple IIgs with ROM revision 01. I also picked up an Apple 3.5 Drive and a 5.25 Drive, and some blank double-density disks. None of the computers or drives came with any bootable disks, though – a fact that would soon create trouble.

a2-gary

 
Apple II Video Out

When powered up, both computers beeped and seemed to be working OK, but without a monitor I was working blind. The IIgs has an RGB video port that looks like the video connector on a Macintosh II, but none of my Mac video adapters could get any picture from it. I later learned it’s an analog RGB signal at TV frequencies, not VGA frequencies, and is unlikely to work with anything but a true IIgs monitor or a few other CRTs from the 80’s. That meant I was stuck with composite video for both machines – that yellow RCA plug that harks back to the days of Nintendo NES.

What do you connect a composite video signal to in 2015? I tried my living room TV and it worked fine, but I wanted a desk-sized monitor instead of a 40-something inch HDTV. I tried the composite video input on my Dell 2007WFP LCD monitor, but got nothing but a blank screen. Hmmm. After doing some reading, I learned that the composite video output from the Apple IIs isn’t quite NTSC standard, and the 2007WFP rejects marginal video signals like the Apple’s. The similar Dell 2001FP LCD monitor was reported to work well with Apple IIs and other vintage computer equipment, though, and I was lucky to find someone local selling an old 2001FP. Success! Now, anybody want to buy a used Dell 2007WFP?

 
Bootstrapping with No Disks

With working video, I could boot Edna and Gary, hit control-reset, and have fun typing “STEVE IS GREAT” programs in BASIC. But to really do anything interesting, I needed some disks. For the IIgs, I discovered that you can download a Disk Copy 4.2 image file of IIgs software, use a vintage Mac to write the image to a 3.5″ disk, and the IIgs will happily boot from it. That was great, but it still left me without an easy way of transferring or making 5.25″ disks, or any way of making disks directly with Edna.

Fortunately there’s an excellent piece of software called ADTPro, that can be used to bootstrap an Apple II computer without any other hardware. It works by connecting to the Apple’s cassette in port or serial port, and transfers disk images from a server on a modern PC. Less fortunately, the IIgs doesn’t have a cassette input port, and Edna didn’t come with a serial card. I also didn’t have a Mini-DIN-8 to DB-9 serial cable for making a serial connection to Gary, so that left a cassette port connection to Edna as the only option.

To make a long story short, the ADTPro cassette audio method didn’t work. The first part of the bootstrap process went fine, and I could load the ADTPro client on Edna using the cassette link. But to actually transfer any disk images required two-way communication using two audio cables: one from the PC’s headphone out to the Apple’s cassette in, and another from the Apple’s cassette out to the PC’s microphone in. I’ve only got one PC that even has an analog audio input, and the line level was too low for the ADTPro software to hear the data coming from the Apple. No amount of config changes or level boosting seemed to help. After reading about it, this appeared to be a common problem.

I finally broke down and hand-built a Mini-DIN-8 to DB-9 serial cable for the IIgs, using an Imagewriter II printer cable and a DB-9 cable. It was a lot of fiddly soldering and beeping out wires and swearing at burnt thumbs, but I eventually got it to work. Of course, I learned later that I could have just bought a pre-made cable that’s designed for use with ADTPro. Oh well. With a working serial connection, I can now transfer both 3.5″ and 5.25″ disk images to Gary using ADTPro, and make 5.25″ disks with Gary that will work with Edna. Yes!

 
Floppy IIGS

The point of all this Apple II business is to get Floppy Emu working on Apple II systems. Floppy Emu has a 19-pin D-SUB connector and can emulate 800K disks, and the IIgs has a 19-pin D-SUB connector and can read 800K disks. So maybe you can just plug it in, load a IIgs disk image, and it will work? Sadly, it’s not that easy, and a direct plug connection to a IIgs doesn’t work. I’m not entirely sure why, but it’s something I’ll be investigating closely.

I’d heard from a couple of people that Floppy Emu did work with the IIgs, if you used part of an Apple 3.5 Drive to make the connection. If you open up an Apple 3.5 Drive, inside is a standard Sony 800K floppy drive (identical to those used in early Macs), and another small board called the daisy chain board. The daisy chain board is what’s actually connected to the computer. The board has an internal private connection to the Sony drive, as well as another 19-pin D-SUB where a second daisy-chained drive can be connected. The photo below shows a partially disassembled Apple 3.5 Drive, with the daisy chain board tucked inside, just behind the actual floppy drive mechanism.

a2-apple-3.5-drive

With a screwdriver and some gentle tugging, I was able to further disassemble the drive, separating the daisy chain board from everything else. On the underside of the daisy chain board, not pictured, are some electronics and a custom controller chip of some kind. What does it do? Hmmm.

a2-daisy-chain

I took the newly-liberated daisy chain board, and connected it to the IIgs using a 19 pin D-SUB to 20 pin ribbon cable – basically the same cable that I sell in the BMOW store. Then I attached the internal drive connector to a Floppy Emu, running the normal Macintosh floppy firmware.

a2-emu-with-daisy-chain

And it worked! I was able to boot GS/OS from an emulated disk on the Floppy Emu with no troubles. I did notice one oddity, however. After accessing the disk, the IIgs always left the disk motor on. Even when the computer wasn’t doing anything, the status LED on the Floppy Emu board continued to flash, and the LCD said “read”. I’m not sure if this is some quirk of my setup, or an issue with the Macintosh floppy firmware being not quite 100% IIgs compatible.

 
The Mysterious Daisy Chain Circuit

So what does this daisy chain board actually do, that allows the Floppy Emu to work on the IIgs? A detailed answer will have to wait for a future post, but as best as I can tell, it’s just some lightweight interface circuitry that helps identify the drive to the computer, and enable it at the correct time. Other than that, it doesn’t seem to get involved with the actual control of the drive or the data transfer in any way. There’s a schematic of the daisy chain board here: page 1 shows the whole board, and page 2 shows whatโ€™s inside of the โ€œDSICโ€ box on page 1.

a2-daisy-chain-schematic-small

It looks like pin 4 of the 19-pin D-SUB (pin 7 of the 20-pin ribbon connector) is used as an extra enable signal, for selecting between 3.5″ and 5.25″ disks on the daisy chain. The drive’s RD line is connected both to the computer’s RD line as well as the computer’s WRPROT line. Then there’s some complex-looking enable circuitry involving a 74LS123 one-shot. As far as I can figure, its behavior is this: if the computer enables the drive by asserting /DRIVE1 and /EN3.5IN, then it can afterwards de-assert /DRIVE1 and the circuit will keep the drive enabled for about a second. But if the computer de-asserts /EN3.5IN, or asserts /DRIVE2, then the drive will be disabled immediately. I have no idea why that behavior is important, but there it is.

About half the schematic is related to the daisy-chain circuitry and the eject button, neither of which I need. (Here’s an edited version of the schematic with all the daisy-chain and eject logic removed.) The enable circuit with the one-shot is confusing, but the rest looks like it might not be too difficult to duplicate. Then I could make a little adapter board that allows the Floppy Emu to plug into a IIgs without sacrificing an Apple 3.5 Drive. Maybe even build the necessary circuitry into future versions of the Floppy Emu. Now I need to set out my tools and get to work!

Read 13 comments and join the conversation 

13 Comments so far

  1. acheron - March 25th, 2015 10:37 am

    So //e = Edna, //gs = Gary… that I understand. How did your Mac Plus earn the name “Lonely”?

    http://www.bigmessowires.com/flopemu9.jpg

    The poor thing. ๐Ÿ™

  2. Steve Chamberlin - March 25th, 2015 11:15 am

    Ha, you have a good memory! The person who sold me the Plus had made a funny ad for it: a little drawing in Mac Paint with a sad face saying “I’m so lonely”. http://www.bigmessowires.com/lonely.jpg

    At the time I also had a second Plus with some major problems that I named “Smelly” when it gave off smoke.

  3. Keith Kaisershot - March 25th, 2015 3:06 pm

    I figured it was a reference to the names of the first two revisions of the Plus ROMs– “Lonely Hearts” and “Lonely Heifers.” ๐Ÿ˜‰

  4. Charles - March 25th, 2015 5:54 pm

    let me know if you want that IIc, and jigs monitor… You can name both of them Yeller.

  5. rj - March 27th, 2015 11:42 am

    Some modern monitors can accept 240p (15.7kHz) RGBHV input (e.g. at least the acer g215h I have; there have got to be others)… You might be able to build something or tap the composite sync signal and separate it into hsync and vsync and get the IIgs to work there.

  6. Ernesto - March 29th, 2015 4:51 am
  7. Steve Chamberlin - March 29th, 2015 7:44 am

    RJ, how do you connect the 15.7 kHz video to your Acer monitor? Just plug it straight in to the VGA input, or have you built some kind of adapter?

    Wow, that RGB2VGA project looks awesome, and has a really great detailed write-up. Too bad it’s not sold as a pre-built module. I’m surprised something like this isn’t already available as a commercial product, or maybe it is and I’m just not aware of it.

    I have half a mind to attempt designing something like that myself, trying to use simpler and cheaper parts. The Altera DE0-Nano that’s used in the RGB2VGA is a sweet board, but I think most of its capabilities aren’t used in this project. 640 x 240 x 8bpp framebuffer only needs 150K of RAM, not the 32MB found on the DE0 board. The DE0’s accelerometer, USB, and other features aren’t needed for this project either. And I’d guess that its Cyclone IV FGPA is a much more powerful FPGA than is really needed here, especially if the 32 MB SDRAM could be replaced with a 256K SRAM, so the SDRAM controller functions could be eliminated. I don’t mean to criticize the project, since the author likely already had a DE0 board available for experimenting. But if you were designing something from scratch specifically for this purpose, I think it could be made simpler, and hopefully cheaper. I would ask the author about it, but I don’t see any contact information on the site, or any way to leave comments. ๐Ÿ™

  8. Steve Chamberlin - March 29th, 2015 7:49 am

    Is the IIgs RGB video the same thing as CGA video, found on old PC’s? If so, there are a few commercially-available adapters that look like they’d work: http://www.arcadeshop.de/Audio-Video-Converter-CGA-to-VGA_778.html?osCsid=9pi5d808g4q2hbgoen7n1vaiq5

  9. Rich - March 29th, 2015 3:11 pm

    About the IIgs video…
    Here is how I got mine to work with a modern flat screen monitor
    http://carnationsoftware.com/carnation/RSS/Apple_II/Apple_IIgs_Monitor.html

  10. Steve Chamberlin - March 29th, 2015 9:51 pm

    How is the image quality, compared to a real GS monitor? I did some searching and found a few other boards similar to the Sainsmart you used, some of which don’t seem to need any modding for the sync signal. I’ll probably just suffer with composite video for now, since I’m really only using the machine for floppy research and not for pretty pictures, but it’s still fun to learn more about how the video works.

  11. Rich - March 30th, 2015 4:25 am

    Steve,
    I no longer have a real GS monitor, so I cannot compare.
    But the video quality using the Sainsmart is quite good.

    Rich

  12. Bryan - March 30th, 2015 11:43 pm

    Here’s an adapter that works with the Sainsmart board, and doesn’t require soldering: http://www.ebay.com/itm/131472553597

  13. rj - March 31st, 2015 7:59 pm

    What I’ve got is a purely passive device, just hook up 0.7Vpp red, green, and blue to the monitor. CGA/EGA is 5V out, but voltage dividers work there. The only tricky? thing is that CGA/EGA support separate sync, but the IIgs is composite sync, and that’s less frequently supported.

    The IIgs is also analog (12bpp) out, and I don’t know what voltage range. Given that this random youtube video: youtu.be/xtB8IOfAOxQ shows non-saturated color, just hsync failure, it’s probably the standard 0.7Vpp. I bet that’s a straight-through thing.

    Shouldn’t be any need for a active converter like the Carnation/Sainsmart adapters, if the monitor accepts 240p input in the first place.

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