The Macintosh World

The PCjr lasted me through college, at which point I moved from Toledo to Chicago to attend the University of Chicago.The Word Processor I had in college. I was not equipped with a computer, but rather had received a dedicated word processor as a graduation gift. I decided this was probably for the best, since easy access to a computer could easily impact my studies.

Once there, however, my eyes were opened to the Macintosh world. UChicago was a heavily Mac-oriented campus at the time. Prior to this, my only experience with a Mac had been ooing and aahing at the fine DPI on the original black & white Mac Plus at the local Abacus One computer store. In the intervening years, Macs had gotten way cooler.

A Mac IIcx with portrait displayThey now had 256 color displays standard, and looked significantly better than PCs of the era. They also had support for odd monitor sizes, like the portrait display that graced the desk of one of my dorm mates. A full page document on screen all at once!

Powering that amazing display down the hall was a Mac IIcx running at a blazing 16MHz, with 8MB (megabytes!) of RAM and an 80MB hard drive. With easy access to such great computing hardware, I was sorely tempted to try my hand at Mac programming.

However, I was there to learn physics, and decided not to get involved with programming so that I could focus on my studies. I did, however, get involved with the owner of the Mac IIcx, a lovely girl from Rochester, NY.

I stuck to my self-imposed moratorium for 2 years. I didn’t do any programming, took no computer courses, and fell deeply in love with the girl from Rochester. Since we spent a lot of time together, I ended up using her Mac for a lot of non-programming tasks: getting familiar with the internet, playing games, writing the occasional paper, etc.

Then she informed me that she was going to study in Paris for a year. I was crushed. We had been joined at the hip since the first few weeks of freshman year, and now we were going to be apart for a year. What was I going to do with myself?

Mac Programming 101

It was the need to distract myself from the fact that she was gone that led to my teaching myself Macintosh programming on her computer, which she conveniently left behind for me to care for during her year overseas.

I soon found that most Mac software was written in either Pascal or C. Since I already knew Pascal, I decided that it would be useful to learn C instead. Fortunately it wasn’t too hard to pick up after using Turbo Pascal on my PCjr and Modula-2 on the Amiga in high school.

My JPEGView postcard collection

In a nice bit of serendipity, Apple released the first version of QuickTime at the end of 1991, and I was curious to know what it could do. I soon discovered it had a built-in JPEG codec, and decided that one of my first C programs would involve displaying JPEG images on the screen.

A couple months later, I had a minimally complete program and decided to release it on the Internet as JPEGView, which I billed as a simple, fast image viewer.

One of JPEGView’s key innovations was that it automatically scaled images to fit your screen, rather than displaying them at 100% and forcing you to scroll around. It may seem dead obvious now, but at the time it was unheard of, mostly because scaling could be slow.

The first version of JPEGView was released in 1991 as “postcardware”. I simply asked people to send me a postcard if they liked the software. By the time I released the last version in 1995, I had received over 5,000 from all over the world.

Shortly after releasing JPEGView a strange thing happened: I was in the right place at the right time. The internet was really starting to take off. Web pages were just starting to appear. The ability to view images was quickly becoming very important, and JPEGView was there to fill the void.

The JPEGView manual

Because of the automatic scaling, plus the simple, uncluttered interface (and the fact that it was effectively free), early web browsers like NCSA Mosaic adopted JPEGView as their default image viewer. If you wanted to browse the web on a Mac in the early 1990’s, you probably had a copy of JPEGView on your system somewhere.

I was starting to offer site licenses (a lot of businesses had problems with it being free software, go figure) and sell nice bound manuals to users who registered. I probably could have made some decent cash off of the endeavor, but I was honestly far happier to see it being used all over the place.

New York City Baby

My JPEGView credentials ultimately helped me to land my first “real” job after I graduated: Lead Macintosh Programmer at Cornell University Medical College. The medical college, unlike the university proper, was located in New York City, so we packed our belongings into a U-Haul and traveled across the country.

While I was at CUMC I worked on several Macintosh-based technologies centered around video conferencing with CU-SeeMe. We developed plug-ins for CU-SeeMe that would allow two doctors to exchange slides and consult remotely. This would allow a general practitioner in a small town to consult with a far-away specialist over the internet.

In order to exchange slides, we ended up using these crazy $20,000 Kodak DCS digital cameras to take “high resolution” images. We’re talking just 1.2 megapixels. But this was extremely new technology for the time, and even dealing with images of that size required the camera to have its own internal hard disk. Images were downloaded over a SCSI bus.

My other duties at CUMC involved exploring the recently released Apple Newton, developing prototype software for doctors to use on their rounds. Unfortunately, I just hated hated hated writing Newton software because it all had to be done in NewtonScript, which to me combined all the worst features of C and Pascal and scripting languages into one abhorrent package.

In my spare time, I continued to work on improving JPEGView, releasing several more versions. I improved the standard Floyd-Steinberg dithering algorithm on 256-color displays to reduce odd color pixels. I also made sure that JPEGView was one of the first free utilities that shipped with a native PowerPC binary.

In 1994, I received an Apple “Cool Tools” award for my work on JPEGView: a new Power Macintosh 7100. And in 1996, I received the MacUser Rising Star Editor’s Choice (“Eddy”) award, which is an impressive hunk of metal still sitting on my bookshelf.

I also began writing some other MacOS utilities. My second semi-well-known program was called uuUndo. Its purpose was take uuencoded emails and Usenet postings, sort them, stitch them together, and decode them into binary files. The primary use of this tool was as a companion to John Norstad’s NewsWatcher newsreader.

As an amusing a very good stress test, he and I would test our programs together by going to a popular, um, risqué binary newsgroup, selecting all the articles, and then extracting all binaries there. The command key shortcuts for those two actions were Cmd-A (select all) and Cmd-B (extract binaries). We jokingly called it the “All Bods” command sequence.

Back to the Hacks

In 1994, Apple released their first PowerPC-based Macs. An interesting thing about the new Macs was that they still ran most existing 68000 code by emulating it. In fact, most of the operating system was still written in 68000 code. Unfortunately, so were a lot of other programs, including games.

Around that time, LucasArts Entertainment Company released the game Rebel Assault for DOS, and shortly thereafter released a Mac port. Sadly, it was all written in 68000 code, and therefore ran emulated (and sluggishly) on my nice new Power Macintosh 6100/60.

Given my past experiences fixing up PC games to work on the PCjr, I thought to myself, surely I can figure out a way to hack in some PowerPC optimizations into this code.

Sure enough, after poking around in the 68000 code, I found huge unrolled blitter loops, all in 68000 assembly. I had been learning a lot about how the Mac’s “mixed-mode” architecture worked, and knew that if I rewrote the blitter loops in PowerPC assembly, I could insert them into the code. Turns out it wasn’t all that hard, and it made a huge difference.

I was so excited by this that I immediately whipped together a patching utility and put it out on the internet for all to share. Apparently, it didn’t take too long for LucasArts to learn of its existence. Perhaps putting it up on the net wasn’t such a good idea after all.

I learned later that they were trying to decide whether to sue me or hire me. Fortunately, their lead Mac porter was interested in moving on to bigger and better things, and they were looking for a replacement. Soon I was flying out to San Rafael, California and interviewing for my dream job as a game programmer.

At the time I was living in New York City; before then, I had lived as a student in Chicago. So, for the past 5 years or so, I had not needed to drive a car at all. In fact, I had never actually owned one.

But on my trip out, I had to fly into San Francisco Airport, drive through the city, across the Golden Gate Bridge, and into Marin County. Well, with the fog and everything, I almost made a wrong turn on the highway, veered off at the last second, and impaled my rental car on a sawed-off signpost on the “V” between the highway and the exit ramp.

I thought things were okay until I noticed the engine start to overheat. I pulled into a gas station and found that I had ruptured something underneath the car. I managed to score a replacement, but then succeeded in locking the keys in that car just one hour before the interview. With all the bad karma I had getting there, I was due for a good interview!

I got the job.