The Apple Disk II Controller Card (2021)

3 days ago (bigmessowires.com)

For those who don't know, the Disk II Controller Card is considered by some to be the invention that best demonstrates Woz's genius.

It's also a great early example of the massive win you can get by replacing hardware with software (and "software" -- in the form of a state transition table encoded in a small ROM).

It's also one of the reasons there were so many fascinating and weird copy protections for Apple II software: since so much of the behavior was in software on the computer, it was malleable. (Since it uses the CPU for tight timing loops, the Apple II couldn't really do much else while using the disk.) The write-ups by 4am on IA are fun reading if you're into this kind of thing: https://archive.org/details/apple_ii_library_4am

There are some fun projects to record disks at the level of magnetic flux transitions. I'm mostly familiar with https://applesaucefdc.com by the amazing John Keoni Morris, which came with a new file format too, and some lovely UI software.

  • Agree, that's why I think it is so interesting - but it's also a rule that works in both directions (hardware->software and software->hardware).

    The copy-protection stuff was completely puzzling back when it mattered, but of course makes complete sense now.

    I hadn't seen the applesaucefdc.com stuff, that's great.

The great thing about the whole Apple ][ system was that it was sophisticated enough to actually do stuff but simple enough that a single person could understand it (largely because it was mostly the work of a single person). To this day, my mental model of how a computer works is the Apple ][.

  • Indeed. I have often wondered why university courses tend to use their own made-up machines to teach this stuff, as opposed to using the Apple II (or some of its near-contemporaries).

    • I think some of it is just aligning with more modern computing technologies combined with the people who write the materials have lived rapid evolution of computing technology and decided it was best to use a generic abstraction that better reflects contemporary technology. I’d note that Knuth, in The Art of Computer Programming moved his abstract machine from MIX to MMIX, the latter being a RISC instruction set, the former being more aligned with 60s style machine instructions.

Lots of people are commenting on how unique it was to have a software based disk interface instead of stand alone hardware. And in a sense that is true, but also not.

Around that time there were various iterations of floppy controllers, each having a small microprocessor at their core. Just before the Apple Disk II, NEC released the uPD765 which is contains everything needed in one chip, but actually it's mostly just a small microprocessor taking a very similar approach under the hood in terms of track decoding. In fact the uPD in the part name is a giveaway that the implementation is a microprocessor instead of logic gates (and the command and reply interface). That operates a lot more like the Commodore drive, except it has a parallel interface with the host processor instead of a serial interface.

Sadly, I don't know anybody who's attempted to extract the ROM out of that microprocessor and reverse engineer it, but I'd definitely be fascinated to see that for faithful emulation purposes (at least for my emulator, I just implemented the interface as described in the datasheet).

  • I think the point here is that the Disk II controller did _not_ have a microprocessor or microcontroller. Rather, it was driven by software that ran on the system CPU, requiring minimal additional hardware

Great read. The section about copy protection and being able to step the head motor half tracks and do things like store tracks at half positions, or even store 180 degrees at one position and another for the rest, was very interesting. The disk copiers at the time always seemed pretty sophisticated, but I didn't realize they had to deal with things like this. I bet those were fun to write (and be part of the arms race).

Awesome, awesome. My old copy of "Beneath Apple DOS" is still sitting on a shelf across the room - this brings the memories flooding back.

As zellyn said, Disk II is pure genius writ large.

It's flabbergasting how good Woz's designs were. Almost on a whim, he with the Disk II did something no one anywhere in Silicon Valley—anywhere in the world—was doing. Forget about IBM, HP, Shugart, Tandon. Just within Commodore and Tandy, Apple's direct 1977 competitors, there were abundant human and engineering resources to come up with a fast, inexpensive, and reliable floppy drive and controller; Chuck Peddle at Commodore was certainly no average engineer. And yet, Commodore was still unable to do this in 1984.

Whether one believes in the reality of the existence of the "10X developer", it's hard not to see what Woz did between 1976 and 1978—Integer BASIC, Apple II color graphics, and Disk II—as proof that such a being can exist, even if (as I have written elsewhere) that brilliance straddled the line between optimized and overoptimized. <https://news.ycombinator.com/item?id=41685888>

  • There are few in the same category, perhaps Widlar or Gilbert for pure analog circuit design, or Bill Atkinson in later Mac software? It's a very short list.

  • I mean, in 1978 Tandy used standard drives and a disk controller IC, and still managed to sell a whole 16K TRS-80 system with disk drive for the same price (TRS-80 Level II 16K + Expansion Interface + disk drive = $1786 [0]) as Apple (Apple II + Disk II + drive = $1790 [1]). Plus, the TRS-80 came with a video monitor wheras Apple did not. But the Disk II could hold more data per disk, and I'm sure Apple's margins were better.

    0 - https://ia803203.us.archive.org/9/items/Radio_Shack_TRS-80_S...

    1 - http://www.apple-iigs.info/doc/fichiers/Apple%20Price%20List...

    • If you don't want to believe me that Apple's drives worked and Tandy's didn't, consider why VisiCalc launched on the Apple II in 1979 despite Bricklin and Frankston intending to do so on the Model I,[1] because of the latter's far greater market share.

      [1] Not only that, Dan Fylstra (founder of VisiCalc publisher Personal Software) was among the first people in the world to own the Commodore PET and the Model I, having reviewed both for BYTE

    • > I mean, in 1978 Tandy used standard drives and a disk controller IC, and still managed to sell a whole 16K TRS-80 system with disk drive for the same price

      The Tandy products were utter garbage.

      Controller = Unreliable. Expansion Interface required for the controller = So unreliable that a robust third-party alternative market developed, including Steve Ciarcia's version. TRSDOS = So unreliable that Tandy has the dubious distinction of being the 8-bit system with the most third-party operating systems.

      Reliability greatly improved from the Model III onward, but by then it was too late: Tandy had a) destroyed its reputation (the "Trash-80" nickname did not come out of nowhere) and b) surrendered its colossal market lead to the tiny startup founded by two California college dropouts.

      More at <https://news.ycombinator.com/item?id=44352856>

  • Commodore disk drives (4040 and so on) actually use a very similar approach. There's no FDC controller chip and the 6502 is hooked to the drive (literally the same SA-390 as Apple used) via simple hardware. The only significant difference is that the 6502 (actually two of them) is in a separate enclosure from the Pet , communicating via IEEE-488. Since Commodore manufactured the 6502 presumably it was ok to use them liberally.

    • They were really slow though. It took minutes to boot up a game from the 1541. I never had one but my friends did, and one of them had a "Fast Load Cartridge", which I believe just replaced the software on the drive and on the computer with better software that was something like 5x as fast.

      4 replies →

    • >Commodore disk drives (4040 and so on) actually use a very similar approach. There's no FDC controller chip and the 6502 is hooked to the drive (literally the same SA-390 as Apple used) via simple hardware.

      I disagree that the approaches are similar. The 4040 <https://en.wikipedia.org/wiki/Commodore_4040> is a monstrosity; even the later single-drive models, such as the 1541, are massive. Apple's 1978 floppy drive + Disk II card takes up less space than 1985's 1571 drive (and still significantly faster).

      >The only significant difference is that the 6502 (actually two of them) is in a separate enclosure from the Pet , communicating via IEEE-488.

      Many things are possible when another 6502 is used just for the drives! That Commodore takes this approach is, as I said, no credit to its army of engineers versus one Berkeley dropout.

      >Since Commodore manufactured the 6502 presumably it was ok to use them liberally.

      I acknowledge that, had Apple been the owner of MOS and manufactured 6502s, it might also have been tempted to take the easy way out designwise and built Commodore-style drives, or implement the Disk II with a 6502 on it. But I'd like to think that Woz would have done the "right" thing regardless of available resources.

      2 replies →

    • That's very much missing the point. It's absolutely true that the "approach" was similar (the bit encoding was software-generated in a timing loop and fed to non-ASIC hardware to send to the drive).

      But the Disk II card was 8 chips you could get from Radio Shack, where the 8050 was a monster with a whole CPU/memory/bus (you can see the board appear in this video at 1:15 https://www.youtube.com/watch?v=S3d2cNSAB9A&t=69s).

      And Woz's was faster. And hit market almost two years earlier. There's an aesthetic judgement to be made here too, and... it's not remotely close.