5 ms·
The Apple Disk II Controller Card (2021)
- zellyn 3mo agoFor 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 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 https://applesaucefdc.com by the amazing John Keoni Morris, which came with a new file format too, and some lovely UI software.
- stmw 3mo agoAgree, 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.
- TMWNN 3mo agoAs 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 https://news.ycombinator.com/item?id=41685888>
- dboreham 3mo agoCommodore 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.
- TMWNN 3mo ago>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 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.
- RachelF 3mo agoYes, at the time the Commodore drive was jokingly referred to as "the Cadillac of disk drives" - long and slow.
- II2II 3mo agoWe need to be careful with our comparisons here. Even though the Disk ][ was significantly faster than the 4040, the 4040 was significantly faster than the 1541. Apparently the difference was largely due to a bug in the controller used for the Commodore serial bus. Commodore's 8-bit micros also used IEEE-488 (or a serialized form of IEEE-488) for their floppy drives, rather than a dedicated expansion card that was connected to a bus with direct access to the CPU and RAM. While the expansion bus on the Apple II was fast enough to control the drive directly, the most Commodore could do was send and receive a stream of data to the drive. The drive had to have the smarts to interpret that stream of data. The drive electronics was going to be more complex than Apple's even if Commodore assigned amazing engineers to the task. Finally, Commodore's approach had its own advantages. Since the drive accepted and handled commands, the CPU could be freed up for other tasks. I don't know how useful that was in general, but the classic example involved two drives autonomously copying floppies. (You could literally remove the cable between the computer and the drives after the operation was setup.) I also recall hearing about classroom setups where multiple computers would share a drive (PET era). It also allowed more drives to be connected to the same bus. Apparently 8 drives were supported. In contrast, the Apple II would support two drives per expansion slot.
- sgerenser 3mo agoIf this kind of stuff interests you, you might want to check into the upcoming “Designed in California” podcast about Apple’s history (still on kickstarter but I think the campaign is over): http://designed.fm http://designed.fm. I’ve listened to a few of their preview episodes already, here’s the first one: https://www.youtube.com/watch?v=OsOVyuc1v_w&t=4s https://www.youtube.com/watch?v=OsOVyuc1v_w&t=4s
- dhosek 3mo agoThe 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 ][.
- stmw 3mo agoIndeed. 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).
- dhosek 3mo agoI 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.
- jakzurr 3mo agoAwesome, awesome. My old copy of "Beneath Apple DOS" is still sitting on a shelf across the room - this brings the memories flooding back.
- jonjacky 3mo agoHere's a simulation in Lisp: https://josephoswald.nfshost.com/circuit-sim/woz-machine-hw-sim.lisp https://josephoswald.nfshost.com/circuit-sim/woz-machine-hw-...
- musicale 3mo agoI just have to say when I saw BMOW 1 I was delighted. Also Magic-1, another homebrew CPU, also made out of 74LS TTL chips from the 1970s. Fantastic trend, really. https://www.bigmessowires.com/bmow1/ https://www.bigmessowires.com/bmow1/ https://homebrewcpu.com https://homebrewcpu.com (Of course it's a lot easier [but still quite fun] to make your own homebrew CPU/system on an FPGA.)
- gblargg 3mo agoGreat 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).
- ralferoo 3mo agoLots 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).
- brontitall 3mo agoI 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