Steve Wozniak Talks Disk ][

The Apple co-founder recounts what he calls one of his proudest accomplishments

Paleotronic was lucky enough to be given the chance to have a chat with Apple co-founder and  engineer-extraordinare Steve Wozniak, who gave us a personal look into the development of the Disk II.

like talking about it, it’s a very interesting story, especially parts that are not so much told. And probably, you’ve read some of the common parts, about how I was in a staff meeting and raised my hand and said, “If we have a floppy disk in two weeks, can we show it at CES?”

I knew you could never design disk drives in less than a half year to a year plan in a company, and I had never been around disk drives, I had never studied nor been near hardware or software. All I knew was maybe my one way to get to Las Vegas wasn’t just to ask and say “Hey, I’ll help you with the marketing”, it was that I might be able to do some engineering – but how do you do it?

Okay, very shortly after that, Steve Jobs got a floppy disk, (one) he’d been looking at before. Shugart was going to move from the 8-inch larger floppies down to a smaller 5-inch, and smaller is more personal, so Steve got me one of those. I opened up the data sheets, and I know how you can, if you record data on to a cassette tape, this is how I – how we had our Apple II working, you would record signals that went up and down in voltage, you play tones into a cassette tape, and when you played it back you got the same thing back, and you could count the timing between pulses and decide if its ones or zeroes.

So I was thinking a floppy disk must be like that somewhere. I studied Shugart’s chips and schematics. They had a set of wires, maybe about ten or fifteen wires that carried data into their chips that then piece-mealed out a byte at a time and a bit at a time, and I looked at their diagrams and the bits were coming out either four microseconds apart or eight microseconds. For example, a zero might be a full eight microseconds before the cassette tape signal – the “floppy tape” signal – actually reversed itself. It might be eight microseconds, but if four microseconds in it flipped, and then four microseconds later it flipped again, the bit was a one. Ah ha!

Okay, that was the understanding I needed, and now, I was well aware that I had a computer, and the ability to put a few chips on it, to actually send data out at my rate. Why go through this big structure that speaks its own little language: “Click, here is a signal for here to record on the disk, here’s a byte, let me know when you’re done.” I didn’t need all that stuff! I just needed to write it, and so I started developing a very tight circuit, took almost nothing, and it was probably only a couple of days before I could write some ones and zeroes on to a disk. (But) I thought, how do you know if you wrote them if you can’t actually read them?

So then, I sat down, “Oh my gosh, how am I going to read these?” and it might have been the weekend by the time I even had a tiny circuit. (I realised) the microprocessor (CPU) would actually have to be involved in the timing. This is bad programming practice in todays very advanced languages, (it’s) very bad to base your timing on the microprocessor timing itself. Every thirty-two microseconds I had to write eight of these little 4 microsecond “chunks”.

Our microprocessor ran at about a megahertz, so that’s about one microsecond is the closest timing you could get, but I wrote code that very carefully timed itself so that every thirty-two microseconds, it put a signal out on the line to my little controller that then made those little four microsecond ups and downs – it made those “shift” out. There was a new chip that I had wanted to use for this, and it sort of inspired my thinking that maybe it could be used for a floppy disk controller some day. It was an eight bit register – you could load in eight bits parallel, and then shift them out serial, or vice-versa. And it was a one dollar chip, it was the normal little low-cost TTL chip, so I used that and now I could write the ones and zeroes. How do I actually read them back?

Of course _I_ could read them back, I could look at an oscilloscope (connected) to the read head and see that the signals are coming back, they are there – how do I detect them? And the solution I came up with there was even more unusual – I look back on my own designs and I have no idea, I had never read a book on it, I’d never done it, I’d never been around anyone who’d done it, I didn’t have anyone telling me, “here’s how you read the data from a disk”. Yes, there was a big chip made, a big expensive chip that could sort-of do the whole job, but that’s not my approach.

So, they’re going to come back in four microsecond and eight microsecond chunks, and I’ve got to tell what’s going on. Normally, you’d put put some signal into a timer that times up four microseconds, and then checks the line to see if its reversed or not – it’s a complicated, many many parts procedure, which is why most floppy disk controllers were still fifty chips. And then I remembered a course I’d had at Berkeley, my junior year, in state machines. I was very good at understanding state machines. You have a number that is the state, it says where I am now in a sequence. It’s kind of like the address of a microprocessor. And then you put in a few more bits of data, for example the one data bit coming from the floppy disk. You put it in, and then when a clock signal comes – clocks come ching, ching, ching ching… seven million times a second, I had clock signals, it decides (based) on my state now, and my state to come, where do I go?

Well, the decision chip was a one dollar chip, called a PROM. 256 by eight-bit PROM, a little PROM. You put in a certain number of inputs into it, and it decides what the output is, and the output goes back to the little register that holds your current state. So if there’s a zero coming, the state might say “hold state fifty”, a zero comes: “hold state fifty”. A one comes: “go to state fifty-one”. You could set up timing so that it could actually determine if things came in four microseconds, if they came in eight – very complicated to take your mind down to those little levels. It’s like programming a four-bit microprocessor – it’s tonnes harder than an eight-bit microprocessor, and this is like a one-bit microprocessor! Very difficult. Somehow, I finally solved it, and i could get the ones and zeroes back, but then I said, but how am I going to tell where the bytes start and stop?

I wasn’t sure I was going to figure out how to do this, and then I realised there were a few of these four and eight microsecond bit codes that weren’t used, that didn’t correspond to any real data bits that could have come, but my method of detecting what’s coming, what’s coming, what’s coming would slip, slip, slip, slip, slip, and eventually, after about six to eight of those little unused (codes) it would slip into line with the bytes. Don’t ask me, it just happened! Total serendipity, I wasn’t sure if I’d solve it or not.

I worked Christmas Day and New Year’s Day and it came time to get to the show – I almost had it! I was working with Randy Wigginton, he was writing the higher level code to say –  see, with a cassette tape, if you wanted to run a program called “checkbook” you’d have to grab a cassette tape, put it in a cassette tape player, let it play some tones for half a minute, and then beep, you’d have a program running. Then you could put another cassette tape in that said “my checkbook data”. You could read it in… slow, slow, slow. We were used to big computer systems where you just said RUN WUMPUS. RUN whatever. I wanted to get to that point where I could type in RUN CHECKBOOK and it would run right off the disk. Or RUN COLOR MATH and it would run our flash card program for kids.

Randy was working with me, and we almost had it done. It was the night of the show, we had to fly to Las Vegas, stayed in this little motel called the Villa Roma. Played some good pranks on their phones. I used to travel with all my kids in those days, they didn’t have any airline security even. Had a lot of fun. I reversed the buttons on one phone, instead of going 1, 2, 3 horizontally, it went 1, 2, 3 vertically so the next person (who stayed) would (dial) what they thought was right…

Also, I had gotten to design the first hotel movie system for a guy in Hollywood when I worked at Hewlett Packard and this hotel, I think – maybe it was a later hotel I got to, but it had movies and I was with Randy – and I said, “Oh, they have to encode your room number somewhere”. I opened up the little box with a screwdriver, and there were some dip switches, and I switched them to another position, and didn’t get billed for the movie.

Anyway, we were at Villa Roma in Las Vegas, and Randy and I started walking along this little section called the Strip – not like today’s Strip, it wasn’t full of resort, resort, resort, it was much smaller places. We walked down to the convention centre with our stuff and we sat their working, trying to get every little sector of ones and zeroes – the right bytes – on every sector on this disk, so when you put it in, you could type RUN – we actually simplified it for the time, you’d type R CHECKBOOK and it would run CHECKBOOK.

We worked all night long and we finally got it totally functional by 6:30 in the morning. The show was going to start and we’d been up all night! I said, “You know, we’d better make one copy of it. It’s time to make a backup, I believe in that.” I only had two floppy disks with me, That’s it, period! I didn’t have any good software to say “copy a disk” yet – we weren’t at that point – so I’d slide a disk in, and I’d type one number into memory, (for example) a one, and then I’d CALL a little routine, and it would read all the data from track one. Then I’d flip the other disk in, I’d type a one in the right place, and then I’d go to a different address and run a program that said “write track one”.

Read track two, write track two… switching the floppies about like the first Macintosh, and when I got all done, I looked at my two floppies – tthey weren’t really labelled – and I realised that I’d copied the bad one on to the good!

So, that ruined that plan. I went to the hotel room – had to get some sleep – woke up at ten o’clock in the morning. By then, it’s all in your head. All of the methods you’ve used are in your head, and you can recreate it accurately in a shorter time, and I managed to get it recreated probably by around noon. I took a floppy disk down to this little table we were at – we just had a table – and put the floppy disk on the computer and there it was running. Oh my gosh!

I also taught Steve Jobs how to play craps that trip, and I also taught Randy Wiggington, even though he was in high school. He won thirty-five bucks! The important things in life are the ones you remember with emotion and fun smiles.

I left out one part. The day before we went to Vegas, I thought why do we have these seven little chips – seven chips because we only had one drive, it would be eight when we shipped it – why do I have seven chips when these competitors have fifty chips _and_ a big one, an expensive one? So I pulled open a manual for a competitor’s floppy, I had got somewhere, (and) I started going through it and reading all the data specs of their chip that would do everything.

I finally realised at the end mine would do more, because I could write software that would modify mine, and in not too long a time after that – half a year at the most – I figured out (that) where i was writing four bits before, there were enough codes left over I could actually write eight bits, and all I had to do was extend the timing to allow four microseconds, eight microseconds or twelve.

So, allowing the twelve caused us a few little analog problems that we worked on (and) had to put in a little corrective part, but boy, that gave us 16 sectors instead of 13 – 16/13 times as much data, by writing programs on the processor, on the host computer (being an Apple II) – it’s software was so involved with the little hardware I’d built (and) with the floppy disk itself, they were just all tied together in my head, it was all one.

I also improved the speed. One of the things is, you had a little head that had to choose a track, that the early floppy disk had thirty-six tracks. You’d be on track one (really zero, that’s where programmers start) and if you wanted to go to track one, *click*, you’d wait 15 milliseconds and it’s there. Then you’d say, go to track ten, and the Shugart drive, with its own circuits which I had ripped out, would go *click* *click* *click*, fifteen milliseconds for each track to make sure it stopped without overshooting.

I said, “Wait a minute…” high-school physics, or anybody’s experience – you push something heavy, you know, a heavy wagon, and it goes faster, if you keep pushing the same it goes faster and faster, and then (you) slow it down. So I got this idea, why don’t I speed up the head that’s moving from track one to track two to track three… speed it up until it’s half-way to the destination – which I know – and then start slowing it down so that it doesn’t overshoot at the end. I made a little table (to calculate the distances) and I love the sound that my disk drive makes!

The disk drives in those days, when they went from track one to track twenty, you’d hear “ennnnnnnnnnnh” – this horrible sound like a buzz-saw. Mine went “shew, shew, shew.” Beautiful sounding, and it did it twice as fast.

Could you please talk a bit more about how you discovered the five-and-three Disk II encoding method?

At first, I would just put out a byte of zeroes and one, and every two bits was two four microsecond slots. So if it was “one zero”, it was a switchover and that meant it was a one (bit), and if it was “one one”, it was just a zero bit. So I would put those out, but then I realised that without screwing out the timing that the disk drive was designed for very much, I will let it get it four microsecond chunks, eight microsecond chunks and twelve.

Engineering-wise you design things to be optimal for four and eight, twelve might have had a problem. I realised I could store “five and three”, that’s what gave me sixteen sectors of data instead of thirteen. The code was so hard to write because I was doing this very bad thing of using the microprocessor timing – how long does our microprocessor take for every single instruction, and you have to count on it always being exact and the same, so far a violation of… actually even good design principles back then would have been more generous. But I made up for it by other parts of the design that were so good. So, what I did was I had this tight code, that has to be in loops to get five bits of data in thirty-two microseconds instead of four bits of data, and always loop back – no matter how many loops it took – to loop back and keep the timing exact.

It was so hard, for about a month I worked on it every single night, starting near the end of the day – figuring out the methodology, the sorts of variables I would have, what they would hold, how they’d be – and then I would start working through the process that was in my head so thoroughly, and I’d get 90% done maybe, by four in the morning, two in the morning, and I’d just be so tired, “I’ll go home and finish it tomorrow.”

And I went close to a month thinking I’d always finish it tomorrow, and finally one night – Steve Jobs kept asking me every day, “Where’s the sixteen-bit code, how’s it coming?”  and so finally I stayed all night, I got near the end, 90% done, and I just worked it through and finished it, didn’t have to start over again the next day. That was tough for me.

After this, there was something that came up that was very important to me. This floppy disk was getting so much notoriety in the company, out of the company, (because it was such an) amazing design – I like engineers to look at my work and say, “How did you ever come up with something such a different way?” I went over to our building where we had some technician groups. They worked with turning designs like mine – I had designed a printer controller code, a serial controller card, Wendell Sanders had designed a modem control card – we would send these control cards over there, and they would work with the company that would make a PC board for it. That was one of the key steps to making a product. Turning a design and wire into a product that can be manufactured, you need a PC board.

So I went over to that group and they said that their PC board company was kind of busy, but one of the technicians, Cliff Houston, said, “Why don’t you do it yourself?” Well, my gosh, sure I can do it! Okay! I just didn’t know where you get the supplies – he had all the supplies. Laid it out on a drafting board. Clear pieces of mylar, and coloured tape that traces out where all the silver traces on the PC (board) will be, and some layouts that match the pins that the chips would plug in at, and I laid it out and I worked every night for at least a week, maybe two weeks.

Late late late, the two Houston brothers, Dick and Cliff, would go home – midnight, one, whatever. I always worked past them, and maybe an hour or two… I was working so close, because I wanted my chips to be as close as possible, the wiring to be as short as possible, it was all in line with my design philosophy, and I wanted to take every (possible moment) to lay every little trace as perfectly as it could be. I got (it) done one night, and Cliff Houston came over, and asked, “How many feed-through holes do you have” – that’s where you have to drill a hole to connect the top wire to the bottom (underside) of the board. Very common. A board that size might even have twenty or thirty of them. I had eight, because I had designed to lay out the chips in the exact optimal order. I might have had thirty if I’d done it otherwise, and nobody cares about it, because it’s just the way you do it.

So he said “Eight, huh?” I said, “Yeah, (but) I figured out that if I had designed the shift register to go left to right instead of right to left” – the shift register was that part that converted eight bits into one and vice-versa – “If I had only designed it the other way, I would’ve had three fewer crossovers,” and he said, “Steve, you mean you’re going to go with less than perfect?” Okay, so that’s a challenge! So what I did is I took it all apart, I ripped off all my little red tapes where the wires would go, thought it out – I redesigned it on paper to be the other way, and then I laid it out – I don’t even know if I ever built one and tested it – and then I laid it out like that and for the next week or two, every night until two to four in the morning.

I came in to a staff meeting, and at the staff meeting Steve Jobs accused me of slacking off for coming in every morning at ten in the morning – he didn’t know I was doing this. You know, that board was so important to me, because it represented myself. So I kind of blew up at that board meeting and explained how late I’d been working every night on a real product. I won that one!

So, because I realised that (with) all of my resources, including the microprocessor, the hardware that was extensible through slots, and some software, I could do the job locally and save an awful lot of this mucky-muss of changing a whole bunch of things and to send out bytes with a one-bit for the data’s coming and wait for a zero to say, okay it got received – I just got rid of all of that junk, I like to get rid of middlemen.

I could have done it on any other small computer with a microprocessor that had at least one slot. The only difference the other two personal computers out at the time that you could just take them out of a box and use them, were the Commodore Pet and the TRS-80, and they didn’t have slots to a microprocessor. They had serial busses coming out, but that means that the microprocessor data has to go on a serial bus at a slower speed, and come out and somehow try to direct a floppy disk what to do, and you can’t keep the metadata – where are the files on the disk? – you can’t keep any of that in your RAM when you do that, so they weren’t open to the subject. Our slots made it possible.

But there were things that called themselves computers before us that weren’t really full computers unless you added so much no person could afford them, and those were like the Altair, and they had slots, and it could’ve been programmed on to a computer like that, or even super-expensive not sold to personal people computers like they had at Intel. I could’ve done the same thing with a floppy disk.

I just thought of it partly because my steps were, (first) I like to minimise everything, get rid of everything you can – I don’t have time for a huge design, to actually build it and construct it and test it and all, and secondly, because I’d never done it before. I just sat down, figuring out that they wanted these four microsecond and eight microsecond chunks – I didn’t know how a floppy disk worked, ever, and then it all started flowing into my head of a trivial way to create it.

I took out twenty chips that Shugart had to do all that stuff, including the chips from them that would do that little fifteen millisecond track one… track two… track three… track four… they had chips (to) do that. In software I can count fifteen milliseconds so trivially and just send the code out, I don’t need any extra chips.

Please consider subscribing to Paleotronic. Subscribers get a full digital PDF edition and an optional glossy full-colour printed copy, and all content is exclusive to subscribers until the following issue is released. Plus, by subscribing you support our efforts to spread understanding of the history and fundamentals of electronics! Thank you.

Be the first to comment

Leave a Reply