Apple II Disk II Controller - Page 1
Forum section: electronics / general

author: Legion
author_rank: Frequent Contributor
timestamp: March 28, 2014, 03:32:26 pm
content: One of the things that got me interested in electronics was listening to Steve Wozniak talk about designing the first Apple computers. One of the stories that gets told is how he was able to reduce the number of chips used in the floppy disk controller significantly from contemporary designs.Has anyone ever found a technical analysis of the Disk II that examines in detail how he was able to accomplish this? All the articles I find are very high level and qualitative meant for someone unfamiliar with electronics.

author: Orpheus
author_rank: Regular Contributor
timestamp: March 28, 2014, 04:52:19 pm
content: The key was using the CPU to act as a controller for the FDD. By contrast, the FDDs on the later Commodore C64 and Atari 800  had dedicated on-board controllers that were more powerful computing devices (but less suited for floating point math) than the main CPU!He also used Group-Code Recording, which was a Run Length Limited (RLL) scheme that limited the number of "1" bits in a row, and used this limited set of allowable 6-bit chunks (IIRC) to store 4-bit nybbles and 7400 series digital logic to do that conversion. RLL had long been used on data tapes.There was also some advantage in that RLL let him use cheaper soft-sectored disks vs hard sectored, but the details of that escape me. It's been a LONG time.I don't think you'd find anything remarkable in the schematics. I still have some working Apple ][+ computers. I never got around to offloading my extensive notes, records and unfinished novels to a more modern medium. I really should (if the disks are still readable) but I doubt I ever will

author: SeanB
author_rank: Super Contributor
timestamp: March 28, 2014, 06:51:20 pm
content: Another key was that he used 2 ROMs on the board. The first one was the actual code to operate the drive, and the other was used as a replacement for a lot of discrete logic and used a shift register to do the data decode from the disk raw data. As the actual ROM decode logic was mostly on the main board, this saved a lot of logic, enabling the controller to be made with barely more than the 2 ROMs, a few buffers and logic tied to the PROM pins that did all of the work that was not done in software. As well the software controlled the stepper motors and head directly, leaving only the really fast stuff to be done in hardware. Thus the sector layout was initially 13 sectors but later code was optimised and gave 16 sector (IIRC) simply by reducing the dead time between sectors used for the processor to do data handling. The processor had to do all the read and write data prep and give it to the controller directly, but this saved using another processor to offload the work to the drive controller like other systems did. Meant you could do things like having odd track spacings, your own data format and such for copy protection. As well you could step during a write and have the read give good data if you do it at the same time in the code.

author: Macbeth
author_rank: Super Contributor
timestamp: March 28, 2014, 10:52:41 pm
content: Quote from: SeanB on March 28, 2014, 06:51:20 pmI do love Woz - he is a big fluffy happy bearded genius, a true engineer.The last time I got to play with an original Apple ][ with monitor and disk drives was playing Lode Runner (Broderbund software?) back in the early 80's in the local computer shop. The software developers found a way to use hardware interrupts to cycle the "bell" piezo transducer for proper sound FX. Sound didn't seem to be a consideration back then, but developers found a way around it.Too expensive for me though. A friend got a chinese cloned version in a vile silver case, then I think there was some rip off abomination called the Micro Professor.

author: VK3DRB
author_rank: Super Contributor
timestamp: March 29, 2014, 01:02:54 am
content: I once bought a rotten Apple in the early 80's. It was built by a couple of crims using a chair seat as a desk at the infamous Golden Centre in the seedy Tsim Sha Tsui district in Hong Kong. According to The Bulletin magazine, the second floor of the Golden Centre had the world's biggest commercial software piracy going on - including pirating mainframe software. The place was run by Chinese crime syndicates. The cops used to raid the place every so often, but a tip off would come in and the crooks would all close up shop.There was one shop there called "IBN" with the eight IBM bars logo, with the words: "Improved Business Nohow"The switch mode power supply in the rotten Apple said "Made in Japan". Almost every component was underrated and I had to rebuild it ground up. The workmanship was terrible, definitely not of the high standard of Japanese manufacturing and design.At the Golden Centre I saw Ashton Tate's dBase II software for a CPM card, complete with manual for $2. Printed inside the front cover in Chinese and English were the words, "Reprinted with permission from Ashton Tate". $2 was a lot cheaper than $695 recommended retail price.

author: JonnyBoats
author_rank: Regular Contributor
timestamp: March 29, 2014, 08:03:27 pm
content: Inhttp://twit.tv/show/triangulation/144with Steve Gibson talks about reverse engineering this controller and then discussing it with Woz.

author: lchvdlch
author_rank: Newbie
timestamp: December 15, 2014, 04:13:56 pm
content: I found a good explanation about its inners:http://www.metafilter.com/114962/jmp-TRIGSPIKES#4301468which seems pretty complete (at least for me).

author: TerraHertz
author_rank: Super Contributor
timestamp: December 16, 2014, 05:42:24 am
content: I loved the Apple II disk system too. At the time it came out I was working in the first store in Sydney to import Apple (I & II), and I bought the second Apple II that came to Australia (so far as I know.)When the disk system became available I got one of those too. But for some reason the guy (Rudi Hoess) who ran Computerland took a long time, like about a year, to get around to importing any manuals for the disk drives. So I didn't have any manual, or the schematic.I commonly had to service other more traditional floppy disk drives and controllers, so to me the ultra-low parts count was really amazing. Without any manuals or schematics the curiosity was killing me. So I reverse engineered the entire thing, including disassembling the core of the Apple-DOS code that interfaced to the drive.Ha ha... and found that the very inner-most part of it, that did the bit-banging when reading/writing to the drive, could be sped up a lot by unrolling the inner loops. This allowed a considerably higher data density on the disk. Which I got working.I was a young service tech in a computer store, and didn't understand concepts like 'time critical commercial value'. I did nothing with it. Except mentioned it to one of the regular store customers, who got *very* interested. He asked for a copy of all my notes and code, which I was happy to give him. After which I heard he went to USA. Not so long after that, Apple Pro-DOS came out, which had the increased floppy disk data density about the same as my improved version.I've always wondered if there was some connection, and if I should be shot for gross stupidity and naivety. Or if the better way of coding it was just obvious enough to be inevitable.Still have all my notes and stuff from back then. Someday, if I every get a break from current chores I should write up that story, with pics and code.

author: SeanB
author_rank: Super Contributor
timestamp: December 16, 2014, 06:26:28 am
content: I think you got done over.......But the notes and pics would be interesting though. Need any dead disk controllers? I have some around.

author: TerraHertz
author_rank: Super Contributor
timestamp: December 16, 2014, 07:25:00 am
content: Quote from: SeanB on December 16, 2014, 06:26:28 amMaybe, maybe not. I'm pretty sure it would have occurred to others to do that too. Not like I was the only kid in the world who could disassemble 6502 code.QuoteA few months ago I dug out the boxes of my 'early projects' including that Apple II stuff, meaning to do a writeup for my noblog thing of my early years electronics stuff. They're sitting in a corner...What I really do need is some way to read Apple II disks to a PC. Web searches tell me there are now ways to do this, but I haven't pursued it yet. So many more urgent things.Not sure if those old floppies would be readable still. Being so low density, maybe. But I do have stacks of printouts and notes on paper.I'll try to find time. Ha ha. I still didn't get to that Nebushadnezzar/odd music synth thing yet. Stuff likehttp://everist.org/no-rezone/has kind of pushed most other things down on the stack. Dammit.

author: Macbeth
author_rank: Super Contributor
timestamp: December 16, 2014, 07:27:41 am
content: TerraHertz - looks like you were stitched up like a kipper. I know the feeling... Unless you go on and tell me you replaced the disks with tinfoil that is

author: TerraHertz
author_rank: Super Contributor
timestamp: December 16, 2014, 08:31:57 am
content: Quote from: Macbeth on December 16, 2014, 07:27:41 amErr... aren't you mixing metaphors? "replaced the disks with tinfoil" doesn't make sense, even as a backhanded dig. Anyway, I can't recall if I gave that guy any disks. What I know I gave him was paper printouts of the code changes, and photocopies of the handwritten notes. Oh wait, no, I lent him the original notes, and he photocopied them. At least he gave the originals back.And I think it's really very unlikely my notes ended up being the basis for Apple Pro-DOS.

author: Unknown
author_rank: Unknown
timestamp: December 16, 2014, 09:17:23 am
content: This site might be of interest:http://mysite.du.edu/~etuttle/math/apple.htmIt does contain a lot of technical information (and not specifically about the disk drive) but still an interesting read. I just bought myself an Apple IIe from eBay for $200 with a bunch of accessories. You can still find bargains out there if you're patient.

author: 6E5
author_rank: Regular Contributor
timestamp: December 16, 2014, 09:45:25 am
content: I have a Commodore 1571 disk drive, so that's more powerful than the 8Mhz z80 inside my 128? Why does the floppy disk drive need more power than the actual computer?

author: Stonent
author_rank: Super Contributor
timestamp: December 16, 2014, 03:33:45 pm
content: http://www.c64-wiki.com/index.php/VIC-1571

author: jaxbird
author_rank: Frequent Contributor
timestamp: December 16, 2014, 04:17:17 pm
content: Quote from: 6E5 on December 16, 2014, 09:45:25 amDon't think so.But, a cool (unintentional I guess) feature of a C64 with the 1541 drive was that you could actually execute code on the 1541's 6502 in parallel with the C64's 6510. Not sure if that is possible with the 1571.

author: Kevman
author_rank: Regular Contributor
timestamp: December 17, 2014, 05:16:21 pm
content: Quote from: 6E5 on December 16, 2014, 09:45:25 amMeh, probably not. But that's because the 128 is a very late 8bit computer.The Commodore 1541 used a 1Mhz 6502. And the C64 used... A 1Mhz 6502. Some Commodore disk drives used a 2Mhz 6502.Some people interested in Disk Drive design may find this interesting...http://www.linusakesson.net/programming/gcr-decoding/index.php

author: jaxbird
author_rank: Frequent Contributor
timestamp: December 17, 2014, 05:24:05 pm
content: Quote from: Kevman on December 17, 2014, 05:16:21 pmNah, it was a MOS 6510 is the C64, a slightly extended version of the 6502. But you are right that the 1541 used a 6502, also used in the Vic20.

author: Rasz
author_rank: Super Contributor
timestamp: December 18, 2014, 02:02:40 am
content: speaking of 6502

author: miguelvp
author_rank: Super Contributor
timestamp: December 18, 2014, 03:31:39 am
content: He seems to have gone his research via google.Pretty unsure presentation with very unsure facts nor non factsI do like the 6502, but Z80 was my first love and the 8080 was there first and Motorola killed them all with the 68000 later on, but even if the Amiga was the best, as Microsoft has often proven and now Apple, you don't have to be the best, just the best known.

author: Rasz
author_rank: Super Contributor
timestamp: December 18, 2014, 08:42:34 am
content: Quote from: miguelvp on December 18, 2014, 03:31:39 amMicrosoft proved that all it takes is for your mother to know CEO of IBM ;-)

author: george graves
author_rank: Super Contributor
timestamp: December 18, 2014, 09:58:11 am
content: Quote from: Orpheus on March 28, 2014, 04:52:19 pmThis would be a fascinating video on the topic!

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: December 18, 2014, 10:53:02 am
content: Quote from: Orpheus on March 28, 2014, 04:52:19 pmHm, how would a MOS 6510 qualify for floating point math? And why should it be in any way better for this than a MOS 6502? Heck, the 6502/6510 didn't even have an integer multiplication in hardware.

author: woodchips
author_rank: Frequent Contributor
timestamp: December 18, 2014, 06:50:04 pm
content: Must have read the Motorola application note AN764 describing the 8" floppy disc interface for the Exorciser development system.This is one of the cleverest pieces of hardware and software design I have come across, how to read and write an 8" floppy with no interleave using a 1MHz 6800. Based around the 6852 synchronous serial interface chip. App note on bitsavers under 6800 and exorciser.With that in front of you doing the same with a 5.1/4" disc, half the data rate, is easy, well easish anyway. But the hard work has been done. Congratulations to Larry A Parker.