Round Rects Are Everywhere!
May 1981
Steve inspires Bill by pointing out something about the real world
Bill Atkinson worked mostly at home, but whenever he made significant progress he rushed in to Apple to show it off to anyone who would appreciate it. This time, he visited the Macintosh offices at Texaco Towers to show off his brand new oval routines, which were implemented using a really clever algorithm.
Bill had added new code to QuickDraw (still called LisaGraf at this point) to draw circles and ovals very quickly. This was difficult to do on the Macintosh because the math for circles usually involved taking square roots, and the 68000 processor in the Lisa and Macintosh didn’t support floating-point operations. But Bill had come up with a clever way to perform the circle calculation using only addition and subtraction.
Bill’s technique used the fact that the sum of a sequence of odd numbers is always the next perfect square—for example, 1 + 3 = 4, 1 + 3 + 5 = 9, 1 + 3 + 5 + 7 = 16, etc. So he could figure out when to bump the dependent coordinate value by iterating in a loop until a threshold was exceeded. This allowed QuickDraw to draw ovals very quickly.
Bill fired up his demo and it filled the Lisa screen with randomly sized ovals faster than you’d think possible. But something bothered Steve Jobs. “Well, circles and ovals are good, but how about drawing rectangles with rounded corners? Can we do that now, too?”
“No, there’s no way to do that,” Bill said. “In fact, it would be really hard to do, and I don’t think we really need it.” I think Bill was miffed Steve wasn’t raving over the fast ovals and still wanted more.
Steve suddenly got more intense. “Rectangles with rounded corners are everywhere! Just look around this room!” And sure enough, there were lots of them: the whiteboard and some of the desks and tables. Then he pointed out the window. “And look outside, there are even more practically everywhere you look!” He even persuaded Bill to take a quick walk around the block with him and pointed out every rectangle with rounded corners he saw.
When Steve and Bill passed a no-parking sign with rounded corners, it did the trick. “OK, I give up,” Bill pleaded. “I’ll see if it’s as hard as I thought.” He went back home to work on it.
Bill returned to Texaco Towers the following afternoon with a big smile on his face. His demo was now drawing rectangles with beautifully rounded corners blisteringly fast, almost at the speed of plain rectangles. LisaGraf called the new primitive “RoundRects.” Over the next few months, RoundRects worked their way into various parts of the user interface, and soon became indispensable.
Apple II Mouse Card
June 1981
We hook up a mouse to the Apple II
Burrell’s Macintosh design was elegant and clever and strove to use minimal hardware resources for maximal value. The mouse interface was a typical example. It used just a fraction of the general purpose 6522 VIA chip Burrell had incorporated. The mouse was hooked up to the Versatile Interface Adapter (VIA), an input/output chip on the digital board, so it generated an interrupt each time the mouse moved an increment horizontally or vertically, with an additional one-bit line to read the mouse button. That was it; the rest of the cursor positioning and rendering was done in software.
Mousepaint
Meanwhile, my good friend Bill Budge, an amazing Apple II games programmer, came up with an incredibly fast way to draw proportional text on the Apple II graphics screen using seven preshifted tables. He also wrote a very fast BitBlit routine (BitBlit was the most important graphics primitive in GUIs). It was crying out for a way to interface the mouse. An interface to the mouse would enable a complete graphical user interface on the Apple II.
Bud Tribble had written the initial code to drive the mouse on the Macintosh, but I had to maintain it and was familiar with how it worked. The Apple III had a 6522 chip that I’d programmed the previous year to shift bits out to the Silentype thermal printer. I realized that all that was required to interface a mouse to the Apple III was to make a simple connector to route the appropriate signals to the proper pins.
I asked Dan Kottke to wire up a connector. Once that was finished, it took only a few hours to write cursor routines and a driver. We had the beginnings of a full graphical user interface going on the Apple III, with no additional hardware required.
It was exciting enough that I started helping Bill Budge flesh out the program, careful to work on it only after regular hours so it didn’t compromise my other work. Before long we had pull-down menus working, and then a simple proportional-text word processor. The only problem was that Apple IIIs weren’t selling very well; we really needed to get it running on the Apple II somehow.
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 that included just the VIA and a tiny dual flip-flop chip to synchronize it.
In order to move the mouse cursor without causing the screen to flicker, 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 was how it synchronized with the video without running a wire to pick up the video signal.
Bill Budge in 1982
The 6522 chip had a timer that could generate an interrupt at a specified interval. The problem was synchronizing it with the video, because the video generation was not accessible to the processor. Burrell solved the problem by wiring the spare flip-flop to the low bit of the data bus, and using it to latch whatever data the video was displaying so the processor could read it.
To synchronize with the video, Burrell had me write software to fill the Apple II’s frame buffer so the low bit of each byte was on most of the time except at the end of the last scan line. I wrote a routine to sit in a tight loop and read 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. However, Burrell had a way around this: 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.
Apple II mouse card prototype
Bill Atkinson had told Steve a decent graphical user interface on the Apple II wasn’t possible 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, including a proportional text word processor, in the summer of 1981. We thought we had a potentially valuable product on our hands.
We were reluctant to show it to Steve, knowing he would want to commandeer it, but he heard about it from someone and demanded to see it. We showed it to him, and, unfortunately, he loved it. But he also insisted that Apple owned all the rights to it, even though we had developed it in our spare time.
Steve couldn’t insist that Apple owned all of it, though, because Bill Budge wasn’t an Apple employee at the time. But Steve could claim complete ownership of the interface card, which he said was developed with Apple resources. Burrell and I were pretty upset because we did it on our own time and thought we should be compensated. But it was really hard to argue with Steve, especially about money.
We ended up turning over Burrell’s design to the Apple II division, but they didn’t think the Apple II could deal with interrupts properly even though we had demonstrated that it could. They ended up adding tons of hardware with more than a dozen chips. Steve made a deal with Bill Budge that eventually resulted in MousePaint, a MacPaint clone for
the Apple II that was bundled with the mouse card. Burrell and I got over it quickly, but a bit of bitterness lingered, and the whole episode whetted our appetites for eventually working on our own.
The mouse card prototype, with note
Diagnostic Port
July 1981
Burrell tries to sneak in some hardware expandability
Expandability, or the lack thereof, was far and away the most controversial aspect of the original Macintosh hardware design. Apple co-founder Steve Wozniak was a strong believer in hardware expandability, and he endowed the Apple II with luxurious expandability in the form of seven built-in slots for peripheral cards configured in a clever architecture that allowed each card to incorporate built-in software on its own ROM chip. This flexibility allowed the Apple II to be adapted to a wider range of applications and quickly spawned a thriving third-party hardware industry.
But Jef Raskin had a very different point of view. He thought slots were inherently complex, and that they were one of the obstacles holding back personal computers from reaching a wider audience. He thought hardware expandability made it more difficult for third-party software writers since they couldn’t rely on the consistency of the underlying hardware. His Macintosh vision had Apple cranking out millions of identical, easy-to-use, low-cost appliance computers. Because hardware expandability would add significant cost and complexity, it was therefore avoided.
Apple’s other co-founder, Steve Jobs, didn’t agree with Jef about many things, but they both felt the same way about hardware expandability: it was a bug instead of a feature. Steve was reportedly against having slots in the Apple II back in the days of yore, and felt even stronger about slots for the Mac. He decreed that the Macintosh would remain perpetually bereft of slots, enclosed in a tightly sealed case, with only the limited expandability of the two serial ports.
Mac hardware designer Burrell Smith and his assistant Brian Howard understood Steve’s rationale, but they felt differently about the proper course of action. Burrell had already watched the Macintosh’s hopelessly optimistic schedule start to slip indefinitely, and he was unable to predict when the Mac’s pioneering software would be finished, if ever. He was afraid that Moore’s Law would make his delayed hardware obsolete before it ever came to market. He thought it was prudent to build in as much flexibility as possible, as long as it didn’t cost too much.
Burrell decided to add a single, simple and inexpensive slot to his Macintosh design that made the processor’s bus accessible to peripherals. He worked out the details and made a proposal at the weekly staff meeting, but Steve immediately nixed it. He stated there was no way the Mac would even have a single slot.
Original Macintosh digital board
But Burrell was not easily thwarted. He realized the Mac was never going to have something called a slot, but perhaps the same functionality could be called something else. After talking it over with Brian, they decided to start calling it the “diagnostic port” instead of a slot, arguing that it would save money during manufacturing if testing devices could access the processor bus to diagnose manufacturing errors. They didn’t mention that the same port would also provide the functionality of a slot.
This was received positively at first, but after a couple weeks, engineering manager Rod Holt caught on to what was happening, probably aided by occasional giggles when the diagnostic port was mentioned. “That thing’s really a slot, right? You’re trying to sneak in a slot!” Rod finally accused us at the next engineering meeting. “Well, that’s not going to happen!”
Even though the diagnostic port was scuttled, it wasn’t the last attempt at surreptitious hardware expandability. When the Mac digital board was redesigned for the last time in August 1982, the next generation of RAM chips was already on the horizon. The Mac used 16 64 Kbit RAM chips, giving it 128K of memory. The next generation chip was 256 Kbits, giving us 512K bytes instead, which made a huge difference.
Burrell was afraid the 128 Kbyte Mac would seem inadequate soon after launch. On top of that, there were no slots for the user to add RAM. He realized he could easily support 256 Kbit RAM chips by routing a few extra lines on the PC board, allowing adventurous people who knew how to wield a soldering gun to replace their RAM chips with the newer generation. The extra lines would only cost pennies to add.
But once again Steve Jobs objected because he didn’t like the idea of customers mucking with the innards of their computer. He also wanted them buy a new 512K Mac instead of buying more RAM from a third party. But this time Burrell prevailed because the change was so minimal. He just left it in and no one bothered to mention it to Steve, much to the eventual benefit of customers who didn’t have to buy a whole new Mac to expand their memory.
Shut Up!
July 1981
The first demo of the Macintosh for Microsoft
Apple had already learned the value of having a thriving third-party software market with the Apple II, whose sales increased more than ten-fold when VisiCalc, the spreadsheet program developed by a tiny company called Software Arts, caught on in the business market. Apple intended to replicate the success of the Apple II with the Macintosh as an industry standard platform, so it was very important to bring third-party developers into the picture as soon as possible.
Microsoft was an obvious choice as one of the first companies to talk to. Both companies were started during the infancy of the personal computer industry, and a business relationship already existed because Apple licensed Microsoft’s Applesoft Basic for the Apple II. Bill Gates and Steve Jobs were born in the same year and shared a similar vision for the potential of personal computers. Each one thought he was smarter than the other, but Steve generally treated Bill as someone who was slightly inferior, especially in matters of taste and style. Bill looked down on Steve because he couldn’t actually program.
Steve had mentioned the Macintosh project to Bill at an industry conference in April, which led to a meeting in Seattle in June where Steve spun an intriguing vision of pumping out Macintoshes by the millions in an automated factory. The plan was for Microsoft to develop a series of applications for the Macintosh that would be ready at launch. Things went well enough to schedule a meeting in Cupertino in July, where we promised a demo of the actual machine.
Unfortunately, there was one small snag. We were using the Lisa as the development machine for writing the software for Macintosh, and we hadn’t yet reached the point where the Macintosh could run as a standalone machine. The Macintosh needed to be hooked up to a Lisa in order to download software from it. But the Lisa group was writing all of its own applications for Lisa and made us promise we wouldn’t let Microsoft see the Lisa.
We finally came up with a solution: we’d use a 25-foot cable and keep the Lisa in a different room—one the Microsoft guys weren’t allowed to enter. I would start up the programs on the Lisa in the other room and Bud Tribble would operate the Macintosh. I would then run into the main room to see their reaction.
Steve generally treated Bill as someone who was slightly inferior, especially in matters of taste and style.
Bill looked down on Steve because he couldn’t actually program.
Bill Gates showed up in the early afternoon with three colleagues: Charles Simonyi, who had recently joined Microsoft from Xerox PARC, Jeff Harbers, who would manage the Macintosh development team, and Mark Matthews, who was to be the technical lead on the project. They crowded around the prototype, and we started to run our various demos for them, with Steve doing most of the talking.
Bill Gates was not a very good listener; he couldn’t bear to have anyone explain how something worked to him. He kept leaping ahead instead and guessing how he thought the Mac worked.
We showed him how the Macintosh mouse cursor moved smoothly in a flicker-free fashion.
“What kind of hardware do you use to draw the cursor?” he asked. Many current personal computers had special hardware to draw small bitmaps called sprites, and he thought we might be doing something
similar.
Of course, the Macintosh didn’t use any special hardware at all. It did everything in software, which was more flexible anyway, during the vertical blanking interval to eliminate the possibility of flicker. In fact, Burrell and I had recently gotten a mouse to run smoothly on an Apple II using a similar technique (see “The Apple II Mouse Card” on page 47).
“We don’t have any special hardware for it!” I blurted out, probably with a proud sneer in my voice. “In fact...” I was about to mention that we got it running on an Apple II, which had one-tenth the processing horsepower of a Macintosh, when Steve guessed what I was about to say.
Bill Gates, Mitch Kapor, and Fred Gibbons: early third-party developers
“Shut up!” he yelled as loud as he could, looking directly at me. He yelled it again, possibly trying to drown me out in case I kept on going. But I understood what he wanted and changed what I was going to say. “In fact, doing it in software is better anyway,” I concluded.
Bill Gates in the early days
The rest of the demo went pretty well, and both teams shared their excitement about how the Macintosh was going to take the industry to another level. We went to dinner at a fancy restaurant in Los Gatos to celebrate working together and agreed to a framework of a deal where we would give Microsoft a standalone Mac prototype to develop with in the fall. We were very excited to be working with a third-party company that seemed to understand and appreciate what we were doing.
Donkey
August 1981
We discover who wrote an awkward game for the PC
Revolution in The Valley [Paperback] Page 6