12/21/2005: "Folklore"
Last year at about this time, I spent a day or so reading through Andy Hertzfeld's site at Folklore.org, which contains more than a hundred anecdotes on the design and creation of the Macintosh computer. Most of the stories are set between 1980 and 1985, a time when the men wore short shorts and the women had poofy hair. The stories themselves are engrossing in the extreme; each focuses on a nibblet of the development of the Macintosh. Favorites of mine include Busy Being Born, about the development of the Mac and Lisa UI, Calculator Construction Set, which gives a glimpse of Steve Jobs's fanatic perfectionism, The Grand Unified Model, about the Finder's birth, and The Times They Are a-Changing, about the Macintosh launch event. Every story on the site is worth reading, and it's a perfect way to spend an afternoon, lost in the spirit of adventure and wonder that pervaded the Macintosh division of Apple at the beginning of the 1980s.
Reading some of the stories, especially the more technical ones like Apple II Mouse Card or We're Not Hackers!, hammered into my head just how freaking smart these guys were, because of how much they were doing with such mind-bendingly limited resources. We tend to take the power of our computers today for granted and even complain when it takes more than a few seconds to open up a web page or send an e-mail, but reading something like this really draws me up short:
I talked to Burrell about the problem, which basically came down to making a peripheral card for the Apple II that included a 6522 VIA chip on it. Burrell came back the next day with a brilliant two chip design, just the VIA and a tiny dual flip-flop chip to synchronize it.
To move the mouse cursor without flickering, both the Mac and the Apple III code used a vertical blanking interrupt, which drew the cursor during the time interval when no video was being painted. Unlike the Mac and Apple III, the Apple II didn't have a vertical blanking interrupt. The most brilliant part of Burrell's design involved how it synchronized with the video, without running a wire to pick up the video signal.
The 6522 chip had a timer which could generate an interrupt at a specified interval. The problem was synchronizing it with the video, since the video generation was not accessible to the processor. Burrell solved the problem by wiring up the spare flip flop to the low bit of the data bus, using it to latch whatever data the video was displaying so the processor could read it.
To synchronize with the video, Burrell had me fill the Apple II's frame buffer so the low bit was on most of the time, but set off at the end of the last scan line. I wrote a routine to sit in a tight loop, reading the latch. When the low bit changed, we would know the vertical blanking interval had just begun.
The Apple II wasn't fast enough to keep up with its own frame buffer. A new byte of video data flew by every microsecond, which was only one processor cycle. It took at least 10 processor cycles to iterate through a loop, so we ran the risk of never seeing the low bit change. Burrell had a way around this, though - if the loop time was relatively prime to the display frequency, it eventually had to slip into place. I wrote a 17 microsecond loop that fit the bill, and we were delighted to see it work perfectly.
Bill Atkinson had told Steve that you couldn't pull off a decent graphical user interface on the Apple II because of the weakness of its 6502 processor and the complexity of Woz's convoluted frame buffer. But, after a little more work on the software, we had a cool little GUI for the Apple II, with a proportional text word processor, in the summer of 1981. We thought that we had had a potentially valuable product on our hands.
Or, in summary, We thought this might work, so we totally created a solution out of spare parts and lo, it worked.. The entire site is filled with stories of ingenuity and brilliance--so much so that it's a wonder we aren't all using Macs today.
I wonder what the Andy Hertzfeld and Burrell Smith and Bud Tribble from 1983, or any of the rest of the team, would have said at the time if they could see a modern top-of-the-line PC or Mac, with gigaflops of processing power, gigabytes of RAM, nearly a terabyte of internal disk space, 3D-accelerated graphics--not to mention all the programming tools and IDEs and libraries that are taken for granted today. I don't know if they'd faint with awe or slap us for not having created truly amazing software to keep up with the hardware, with the same bare-metal wizard coding that they regularly whipped out.
[Previous entry: "Expletives"] [Return...] [Next entry: "Upgrade"]