Re-Introducing the First, and Fully Functional, Lisa Emulator

From: Ray Arachelian <ray_at_email.domain.hidden>
Date: Wed, 24 Jan 2007 11:55:19 -0500

On January 24th, 1984, the Macintosh announced, but along with that announcement came another that not everyone recalls: The introduction of the Lisa 2.

Reflecting the echoes of that date, I'm announcing the availability of The Apple Lisa Emulator. While there are still some flaws and missing features, to address, I've decided that it was more important to honor the Lisa's January introduction.

You'll be able to download the emulator from here in a few minutes:

Questions about the emulator should be directed here: lisaem_at_email.domain.hidden Bug reports here: lisaem-bugs_at_email.domain.hidden

To use the emulator you will need a copy of the Lisa Boot ROM
(preferably version H) as well as OS software. Please do not ask me to
provide these. If you own a Lisa, you already have legal copies of these.

The emulator currently runs on the following platforms:

The project will also compile and run wherever wxWidgets runs on a unix like platform (with some tweaks), I'll put up more binaries as time permits.

Source code will be released in about a week or two, licensed under the terms of the GNU Public License 2.0. There are parts whose quality of the code isn't as good as I'd want it to be. :-)

Known bugs:

No documentation, at this time there are hooks in the help menu that point to the website, where I'll fill in documentation. Future releases will have built in docs.
The raw keyboard routines aren't quite right. Use the ASCII kb mode for now.
Won't run Xenix - it boots but stops before the shell, likely a VIA bug. Printing works, but isn't yet completed (spits out ugly postscript files only at this time, needs wxWidgets integration which I'm currently working on)
Win32 LibDC42 routines might not be too stable, may cause trouble with Profiles
Sound isn't perfect, although it does beep on most platforms, the "click" is treated incorrectly as a beep. Some of the animation has color issues in some of the BMP's/XPM's - i.e. floppy insertion
Mouse movement under certain environments isn't quite right (I've optimized for Lisa Office System.)
When the emulator quits, on OS X, it segfaults (crashes.) Won't work with Lisa 1 ROMs as there is little support for Lisa 1 HW emulation at this time.

A few tools I intended to write still need to be written.

Why a Lisa emulator?

There are many reasons to this project, and even more for the decisions that shaped it.

The most important goal was to preserve the technology behind the Lisa, and allow future generations to experience a piece of history. If you search the web, you will find lots of articles, pictures, and even videos of Lisa's. But these are second hand information, in that they do not allow you to actually interact with an actual Lisa.

Unfortunately it isn't possible to fully emulate the physical aspects of a computer. You cannot experience the almost imperceptible 60Hz flicker of the display, the not-quite paper white, blueish tints of the phosphor, the yellow glow of the power switch, the heat a Lisa computer gives off, nor the feel of its keyboard, mouse, or see the curvature of the CRT on modern LCD and flat CRT displays. But, you can still get close.

I hope that long after the last functional Lisa is gone from the face of the earth, that my emulator, as well as the documents that David has collected, would survive and allow future generations to go back in time and experience what it was like, to study it, and understand how and why it was built.

In many ways, as I watched Lisa Office System and MacWorks boot up (via trace logs), I saw many glimpses into the software design ideals and practices of the early 80's. I've never been an archaeologist, and don't really know that experience, I can guess at the rush and thrill of discovery. Seeing the machine code of various Lisa OS's fly by has been that experience for me. I could almost understand what the coders that wrote them were thinking, how they designed things, and why. I could easily tell what code was hand written assembly by an expert, or novice, what assembly was generated by compilers.

I don't much expect many to spend more than a few hours with the emulator, but perhaps there will be a few like minded folks who remember the Lisa and want more than a stroll down memory lane, or want to learn what it was about and how it worked who will.

By releasing this as GPL, I'm guaranteeing its future long after I would loose interest in maintaining it. There are many emulators that are closed source, or shareware, or that are outright sold, and thus locked down. These are less likely to survive the ravages of time, and thus are less valuable in the long view. While I cannot presume that the libraries and API's upon which this emulator was built will still exist, I can at least hope that it will be relatively easy to rewrite or port to future platforms.

I purposefully built the emulator on what some would consider exotic hardware. (i.e. DEC Alpha) to force me to write portable code. At various times, I also had it running on the SPARC, PowerPC and Intel chips. (i.e. a range of 32 and 64 bit CPU's with different designs.) Although I cannot vouch for it running on SPARC or Alpha at this moment in time, by building it on varied platforms, I avoided locking myself into a particular CPU with specific endian issues, and thus exposed more bugs. While I've only compiled the emulator under variations of GCC from 2.x to 4.x, I suspect that it will work with other compilers after some tweaking.

There is some history to this emulator. A synopsis for those who aren't yet bored of reading this rant:

This project started in February 1998, when one day I attempted to power on one of my two Lisa's, and it no longer turned on. I realized that as with all retro computers, that replacement parts would over time become scarce to obtain and that repairs would be more and more difficult. In the interest of preserving the historical significance of these machines, I thought that an emulator would be one way to preserve them.

Having been inspired by projects of the time such as Executor and vMac, I naively assumed that this would be an easy project, taking only perhaps a year or two.

The Lisa is a far more complex creature than I imagined. Luckily, I managed to find David Craig's contact information, and obtained a ton of Lisa documentation from him. Most of the Lisa documentation out there on the web exists because David had carefully collected and cataloged it over the years. Without his efforts, neither this emulator, nor any of the spin off emulators would been possible. I would also say that without his efforts a great deal of Apple history would have been lost to the ravages of time.

Perhaps a large portion of the remaining Lisas would not be repairable without this type of information information. (This is why I've spent a lot of time distilling David's documentation and the knowledge of LisaList in building the LisaFAQ.)

While I was, at best familiar with the C language, and knew some 68000 assembly, there were a lot of things that I had to teach myself. I've learned a lot more than I could possibly list here (C, Unix programming, Xwindows, wxWidgets, deep 68000 coding techniques, low level operating system stuff, postscript, PCL, anti-aliasing, reverse engineering, optimization techniques, and so on.) So there was great benefit to me beyond the emulator itself.

There were many wrong turns taken throughout the lifetime of the project. Most notably, I originally wrote my own 68000 CPU core, but scrapped after the generator ( ) core was recommended by Richard Bannister.

I originally wrote the emulator directly for the XWindow System. Yes, that's right, raw xlib calls without a toolkit. Writing your own UI in XLib is quite the exercise in masochism. I didn't replace the xlib UI with wxWidgets until late 2006. (In 1998, Motif was the main toolkit out there, but as it was commercial, and since Tk was sort of obsolete, with not too much else was available, or portable to all platforms. Xlib seemed to be the right choice. Over time, I stuck with xlib because I didn't care as much about the UI as much as getting the emulator working.)

I must have rewritten the MMU subsystem at least three times. In hind sight, I probably over-engineered the last iteration in an effort to cache the MMU tables, but it works very well.

I probably have spent too much time on sysadmin duties (that is setting up environments for myself to develop in.) After all, system administration is my day job. This project was originally born on a DEC Alpha Multia running on OpenBSD 2.3 or such. I moved it to an old SPARC running Solaris 2.5.1, then a sparcbook running 2.6, then Cygwin under w2k, then coLinux under w2k. I now have it running under Ubuntu, coLinux, win32 and OS X.

As I'm told, there was talk of a Lisa emulator before 1998, but no actual project had been started. I released my crufty 0.00 version of the source code back in 98, hence "The World's First" is accurate enough. As far as I know, this is the only Lisa emulator that is capable of running the Lisa Office System, hence "fully functional."
(Some would argue this because it doesn't yet run Xenix, but that's less
important to me.)

Of course, all of the documentation I had scanned, and put online attracted others who wanted to build their own emulators. Unsurprisingly, they did have some success, but not with Lisa Office System.

I was disappointed with the competing project, but kept quietly on working on my own throughout the years. I hid my actual progress since the emulator wasn't working yet, and besides, it would have only fed the competition valuable information. I thought he had the advantage, since he had the whole of the MESS team and library of code for various devices, while I was writing and rewriting nearly everything from scratch.

It surprises me to this day that despite all of my perceived fumbling, that he hasn't overtaken me yet! (I suspect that in a few days, or perhaps weeks, - i.e. sometime after I release my sources, we'll see the other two competing projects gain the capability of running LOS as well.)

I intentionally let the website look dead to give the impression of abandonment, while I redoubled my efforts. This became a fun cloak and dagger kind of game: I only decloaked once, when I though that I was very very close. One day in May of 2006, I found the secret magic to make the MMU work. I got the Lisa Office install disk to boot, and everything started falling into place. I then furiously debugged the VIA code, and then the ProFile code, and it started to all work. The SCC came next, along with other fun stuff. I rewrote the imagewriter code twice over. (Once again, this week, for wxWidgets printing/output, which isn't in today's release.)

Towards the end of 2006, I purchased the wxWidgets book and reworked the UI. It'll probably be a few more months before the emulator would be perfect in my opinion but that would miss the January 19th announcement anniversary, so early, buggy, release it'll have to be. :-)

I would like to thank the following folks for their numerous contributions:

David T. Craig for the wealth of Lisa information which he allowed me to scan in, for the many contacts with Lisa developers and faithfully listening to status reports over the ages, James MacPhail for all of the hardware help with the Lisa and many suggestions as to what and how to test, for helping me with the logic analyzer, for the 68000 help, for the schematics help, for helping me repair my dead Lisa, for the help with the ProFile protocol, and many other things I could fill a book with.
James Ponder for his wonderful Generator project, one of the better Sega Genesis emulators out there, whose CPU core is the heart of the LisaEm project.
Adam Firester for providing the many years of bandwidth for the project website,
Steve Hatle for providing Lisa Office documentation, Xenix help, encouragement, and beta testing,
Brian Foley for beta testing, profiling, and debugging help with OS X, and fixing nasty display bugs in wxWidgets on OS X, Chris McFall for advice on the Lisa file system, Natalia Portillo whose file system work inspired me to build the Lisa FSH Tool, and later libdc42,
Patrick Schaefer for providing the protocol transitions graphs of the Profile, which at a glance proved far clearer to interpret than the official documentation,
Andy Hertzfeld for his amazing website for the numerous fun stories about the birth of the Lisa and the Mac, The wxWidgets folks, whose project I wish I made use of a lot earlier, who have made my life a lot easier,
especially Stefan Csomor who found an early bug in my display routines, Steven Stengel of for the Lisa image used as the icon in the Mac OS X version.
Raphael Nabet, for disassembling and documenting the I/O ROM, which shaved about a month off of reverse engineering on my part, even if he did write a competing emulator. :-)
Gilles Fetis for being the third person to use my dc42 routines. :-)
(Gilles, If you thought those were cool, wait till you see libdc42!)
To all of the folks who have wished for a Lisa emulator, whose requests and encouragement over the years pushed me to complete this project.

Most importantly, to all of the people at Apple, who worked on the Lisa over the years, and remember it fondly.

Lisa, Lisa Office System, and the Macintosh were trademarks of Apple Computer, Inc, now Apple, Inc. w2k/XP are Microsoft's trademarks, etc. Genesis is trademark of Sega, etc. Received on 2007-01-24 11:55:20

This archive was generated by hypermail 2.4.0 : 2020-01-13 12:15:14 EST