Welcome to the Lisa Emulator Project

[Why] [Top] [Lisa Docs] [Lisa Hardware Pics] [Lisa Emulator Status] [Lisa Emulator To do] [Lisa Links]

Status and development history to date:


I think I might have fixed the weird 10201 bug, but I'm unsure... Lisa OS 3.1 gets into another timing loop on the Parallel Port VIA - looks like it's trying to synchronize(???) with the VIA timer. Lisa OS 2.0 tries to access some undocumented I/O space addresses... Possibly something that lived in a Lisa 1 system, an undocumented device, or maybe some other sort of bug.


I managed to get Lisa Test to boot up and show it's menu, but it's not responding to the mouse at all, nor was I able to fake mouse events to get the mouse to work, so it's crashed... Still, it's some progress..


Found some timing issues with the VIA controllers, - I see that LisaOS uses the VIA timers, and also found a big timing loop that might be counting vertical retrace IRQ's...

The HW manual mentions something about an E clock, so I'll have to consult the schematics to find out if there's a difference between the CPU dot clock and the VIA E clock, and also whether the COPS VIA uses the same clock as the parallel port VIA.

Still didn't find the MMU issue, it's likely some sort of MMU cache coherency issue, likely I need to flush the MMU cache more often(?).


Fixed a lot of issues in floppy.c regarding the timing of FDIR/irq/diag_wait firing...

It looks like a new MMU bug has come up. :( Time to do another code review/cleanup cycle...


All the CPU tests have been successfully completed. There are some question about the BCD opcodes' N,V flags. In my tests on the 68040, I see that they are untouched by the opcodes, but the manual defines these flags as "undefined" and other resources on the net claim that they are set according to some algorithm or other. So quite likely we should see a 0.36 version of Generator. :)

In any case, bugs were found and corrected in the following opcodes:

abcd, aslb, asll, aslw, asrb, asrl, asrw, divs, divu, lsrb, lsrl, lsrw, nbcd, sbcd.


Looks like I've let this web page stagnate for quite some time. Many new improvements were made to the emulator that are not listed here.
It can now start to boot, but crashes before the OS starts. I'm currently building a CPU tester to see if there are any bugs in the Generator core that need fixing. You can read about it here in the post I've sent to the Generator mailing list.
I've also done some work on reverse engineering the Lisa File System - I'll publish more details soon.

. . .: . . .


XO, my ISP, informed me that this coming weekend there will be some outages. If you miss Sunder.net, don't worry, they've assured me it'll be back.


Too many UI bugs, had to roll back to an older version as I painted myself in a corner so to speak.
Compiling and linking in generator 0.15 CPU. Still have to write functions to call it and test the memory access functions.
After that, we attempt to load and execute the Lisa ROM.
After that, a whole lot of debugging.
Then comes the beer..


Finalizing UI and Skins file format. All is good.
I still have to come back and finish code for 24 and 16 bit displays, but I'll do that after most of the emulator is done. Next: Slapping together a quick button bar JPG (Here's where I get to show off my [total lack of] artistic talent.)
Then: Integrating the CPU module with generator.


UI is a lot happier now that the bugs out of the X jpeg code are fixed. There may be bugs at depths other than 8 (256 colors), so I'll have to find a 24 bit frame buffer to play with... If you want to see what it looks like, go here:
The emulator screen. The white area is the Lisa's display.
The emulator screen with the toolbar active The thing above the screen is the toolbar. Icons and text of actions such as "Insert a Floppy, power on, etc." will go there.
Be warned, these are huge .jpg files (1152x900) of screen captures off my SPARC, whose display is unfortunately not big enough to display the Lisa's entire bezel and show the floppy drive.
If you'd like to help design some 'skins' for the emulator, email me.


Last night I got it to stop dumping core, and got the UI up. Woo! The UI is butt ugly and needs cleaning up, that I'll do next. Then, it's on to generator. baby!


Now that I've switched jobs again, and have time after work and during weekends, I'm back to building again. The SPARCbook is a nice platform to develop on. :)
So now I've turned on all the warnings in gcc and am compiling debug versions of the code, and taking a close look at all the warnings. I suppose I'll need a copy of lint soon also.


Integrating the new experimental X ui code into the Lisa Emulator tree. The whole thing compiles but segfaults quite nicely. :) Getting closer. Once I clean this up, the next step is to get the Generator core in. Some of that is already done.


More Debugging X ui, cleaning up some obsolete/incorrect code. The experimental X Window code almost compiles now, but I need to write some more initialization functions.


Debugging X ui some more.


Added sound routines to the rc files. (i.e. Floppy/Twiggy drive working, insert, eject, imagewriter printing, beeps, etc.) These are along with the JPG files make up the "Skins" settings of the emulator. Anyone up for designing iLisa skins, like the iMac's? :)


Created a new generator core, as James Ponder released a new version of Generator (0.15). Pick it up from the downloads page.


More integration. Added conf file (aka rc file) links for serial number, connection of serial ports to: local devices, files, pipe to program, null, and to the imagewriter emulator.


Integrated rc file parser into main.c, Need to write the code that copies the user's settings to the actual variables that the program uses. i.e. the serial number needs to be copied to the variable that holds it, etc. Also need to write some more "skins" handling code.


More work on the rc file parser - almost done. I've debugged it and it works, now I have to integrate it into main.c.
Looking at mailing list software so that we can have a few discussion lists on sundernet about the Lisa and the emulator.


Writing an rc file parser. LisaEM will have customizable settings which will be controlled by configuration files. On startup, it will look for a lisaem.conf in /etc, /etc/opt, and /etc/local. If it finds it, it will read in the settings from there. In order to allow multiple users to use LisaEM, it will also look for a .lisaem.conf file in the home directory of the user running. This settings file will control things such as appearance (skins), which disks to use, etc.


Done separating the 68000 core from generator. The core is available for downloading here.. Note that it still links to an executable file called generator. You'll have to change the Makefile.in to have it link to your own program, and you'll have to rewrite the memory initialization routines, etc. But you can remove the src/generator.c file as it's just a stub file. This software is still under James's copyright, etc...


Separating the 68000 CPU core code from James Ponder's Generator. Will build this into the Lisa Emulator after that. I'm using the 0.12 release of Generator as the 0.13 has added SVGA support, so there's just that much more code to delete. I'll track changes to the CPU core code should they occur.


More Xlib UI code... added an icon, and other minutia. Have to add code to display bezel and button bar. Got the jpeg lib stuff to decode jpegs, just have to allocate an image and write the X code to display/refresh it... Then I'm gonna have to rip generator'sCPU core out and merge it.


Added some logic for the User Interface to properly center and size the emulator's windows, etc, and made it flexible enough to be able to double the Lisa's screen on displays that are large enough. LisaEm should look really nice on a 1600x1200 display. :)


Incase you've been wondering why no updates since November: I've started work on another emulator for fun. Working on just LisaEm has been too boring, and besides, so far most of the code is helping build the Lisa Emulator as well.
In terms of the Lisa, the X user interface is almost done. At one point, I considered being lazy and using Motif libraries to make the development go faster, but that would break compatibility with Linux and *BSD. (Commercial systems such as Solaris have Motif libs, but the others don't.) I'd rather not force people to compile lesstif either... So it's all Xlib which makes it harder, but more compatible.


Oops! Looks like I accidentally deleted the source to lisaem-0.00. It's now back where it belongs. Sorry!"


Added LisaGraph this morning to the books. Two more left (Project and List.)


Added two more books: LisaWrite and LisaDraw. Three more left from the Office System to scan in.


Added two more books: LisaTerminal and LisaCalc.


Didn't do much so far, however, I've decided to release the source code.. It however is non functional, so don't bother downloading it unless you understand C very well.


Added Lisa 2 Owner's Guide to the Lisa books page. Enjoy, but keep in mind that the books are huge and take lots of time. Thanks to Steve Hatle for loaning me his copy.


Phew! After much thrashing, www.sunder.net (aka lisa.sunder.net) is back online. The machine which hosted it got the plug pulled because the guy to whom it belonged gave a generous two month's notice, but his asswipe employer (whose old initials literally stood for NOT A FUCKING THING) showed him the door on the spot. Heh.

But it's back now, at a cost of $200/month. Ouch. I guess I'll be eating less restaurant dinners and drinking less single malts. By the way when I gave notice back in October of 98 that I would be going elsewhere, that same asswipe employer tried to sue my next employer. Funny thing was that I knew how shitty these guys were, and I lied about where I would go to. Talk about egg on the face for them. Heh.

Back on topic: I'm probably not going to touch lisaem until the end of September. Sorry, but personal life tends to get in the way. :)

One more thing. This web server isn't all that stable - one of its hard disks just recently died on me, so if you noticed the weird up/downs, that's why. I hope it will stay up and running... Stay tuned.


As of last night I got the @#$%^&&!# libjpeg example to compile.

I really wish there was an autoconf script and the Makefile would install a real libjpeg.so into /usr/local/lib so I could just link to it rather than have to include their entire library source code in my distributions... (Or whatever their license says to do...). Maybe I'll include a Makefile that will do that rather than bloat my own code... we'll see...

So it looks like the LisaEm "skins" will be jpg images. :) With any luck one of the Lisa's fans would be a graphic artist and might make a few more skins for it... Maybe even a Bondi-Blue® semi-see through iLisa skin... Heh... I've also spoken to an old net acquaintance who has 7/7 and will help me get scans of the 7/7 flops so that the emulator will display them and allow you to pick them as well as animate inserting them into the floppy drive...


Incase you're wondering "What the fuck is taking this guy so long?" here's a brief: I'm learning X. I hacked up a small ui program as a prototype. It opens up a window and quits after a mouse click. The window contains a subwindow inside it which is supposed to be the Lisa's display. The problem is that I need some code to splat the bezel in the main window and to refresh it. That's simple XCreateImage and XDisplayImage. So far also good. What I was wading through over the weekend was figuring out which graphics format the image should be in.

GIFs are out unless I use libungif due to UniSys's ratfucked patents on lzw.
The best so far is libjpeg, but it's not easy to learn, nor use as it's not a distinct library, that I could just link to and include, but rather a bunch of .c files, so when I compile it, it's a pain to figure out which of the damned files I'll need.
The other option is libpng which I've yet to figure out.

All I need is a simple example of say using libjpeg or libpng to simply open an image file, do whatever black magic it does, and return back an XImage which I can splat on the main window. Is that too much to ask for? Argh! (That and a $2.50 will get me a cup of Harbuck's TM Crappuccino®... :^)

And yes, don't forget that as soon as I get a version that so much as just compiles and starts up the Generator core, I will post sources. So if you've got some X programming knowhow with jpg's, please, please email me.


Started work on the XWin user interface. Idea is to make this emulator a lot like a real Lisa in look and feel. To this end, I've popped off one of my Lisas' front bezels and put it on my flatbed scanner and make a few images. It wasn't easy as the bezel is a lot bigger than my scanner, but through the magic of Enhance! (A Mac image editor that's as powerful but less expensive than Photoshop) I managed to merge sections of it. I've also scanned in one with a floppy in the floppy slot. I plan to use these to simulate the look and feel of a real Lisa - but you'll need a realy high resolutiond display to view it all... maybe something 1600 wide... For smaller displays you'll just have to live with only the screen and no bezel, but you'll at least need 800x600 to fit the Lisa's 768x384 screen.
Other UI things include not only an animation of a floppy being inserted/ejected but sounds that match it, sounds of an ImageWriter printing when printing happens, etc...
Click here to see it without a floppy, and here to see it with a floppy. However, these are gigantic GIF files (645Kb) so don't blame me if your browser crashes!


Added glue code for memory interface between Generator and the Lisa MMU code. Need to add in the irq code and strip out uneeded Genesis code. Need to finish UI as well... I also hacked a resurection of the Lisa Books Page.


Too busy until this date with other matters, but will resume work on the emulator after it.


Fixed linkage problems between zilog8530.c, imagewriter.c, and vars.c/vars.h.

(Project Fenris - added more opcodes and definitions. Added sign extened macros for anything upto 32 bits..)


Wrote some rather primitive sound routines to play the .au files of a real Lisa, and also some to produce the square waves the Lisa made using the VIA6522 chip.

Why do the sound now you ask? Well the damned binary wasn't going to link without it and I thought putting in dummy sound functions was cheating, so I wrote the real McCoy's.

On an unrelated note, over the weekend I did some work on the next emulation project... (Project: Fenris). Will likely start going full metal packet on it after the Lisa - which I hope/expect is sometime in June or July(???)


  • Started integrating the IW emulator in the LisaEm guts. Started writing the main.c "user interface" for Solaris. This will be very sparse for now with real UI's added in later.
  • Over the weekend I started digging in Generator source code. As Tom Gaffney would say "Nice, Nice!" As Pinky would say "Narf!"
    Might use this as the M68000 core very soon.
  • Except for the hosts/main.c file, the makefile successfully compiles all the source files - not that this means much more than a lack of typos.
  • As soon as I get a core, either UAE or Generator linked and compiled successfully, I promise to make source code available for download so that whomever wishes to start working on ports may do so.
  • apropos nothing - I found a Commodore 1540 disk drive that someone had thrown on top of some recycler bags today. They for some reason ripped off all the "Commodore" labels from the drive... Bastards! The joke around the office is that I'm going to use it as a file server...


The ImageWriter emulator Beta 2-Public is available here. Shift-Click on this and say "Save As"
Fixed a few more bugs in the IW core. Fixed some more Xlib code. Now it auto adjusts the DPI to match your screen size... Works a lot better, but I've yet to get a solid bit of output from the Lisa. I think it's getting corrupted or something off my Lisa as I'm getting things like ESC NUL and ESC ESC sequences and characters in the middle of nowhere... Fixed the output bugs that were showing up in the Windows output (C-Itoh 8510 = ImageWriter). At least it prints perfectly from NT. Ugh. :) Wish I was sure of the serial port dumps I got off my Lisa...


Tax Day. Pay your Uncle Sam 'till it hurts. Ouch!
Fixed PCL output, it works now...


Haven't yet tested the PCL code, but I added in Xlib support so that way I wouldn't have to render to PostScript and waste time running GhostScript, etc. Now I can view the IW output directly. Fixed the command line options. You can now specify -ps for postscript, -pcl for HP pcl, -xlib for an X window... I ran a few of the Lisa IW outputs and they don't render right at all... more bugs to squash I guess. :)


Hooked up my Lisa via serial cable to my sparc. Dumped many ImageWriter printouts to and captured them. Started adding HP PCL support to the IWEMU's output side. Gotta test it all... I wonder if there's a PCL Viewer like there's Ghostview... sure would be nice...


Good News: The ImageWriter Emulator is now in first Beta. Since it currently still sucks turds, it's not a public beta, so if you want a copy, email me and I'll email you back a tarball. You'll neet some flavor of unix and unless you want to waste reams, a copy of GhostScript and GhostView. Now if only someone would email me an .au or .wav of a real IW printing. :) Likely by next week I'll be going back to the Lisaem...


7:39pm EST Yet another bug squashed! Now it prints graphics too, although badly, it's legible!!!!
6:30pm EST I found the bug that prevented the IWEMU from printing straight text. It was a one line fuckup in the font array itself.

0x000,0x061,0x051,0x049,0x045,0x043,0x000,0x000, // 1 :0x5A Z
0x070,0x029,0x024,0x022,0x024,0x029,0x070,0x000, // 1 :0x5B [
0x000,0x03D,0x042,0x042,0x042,0x042,0x03D,0x000, // 1 :0x5C \
0x000,0x03C,0x041,0x040,0x041,0x040,0x03C,0x000, // 1 :0x5D ]

Note the backslash after the line ending in 0x5c. It means Join the next line to me (ignore the EOL marker.) Well it did and shifted every bitmap after it one down. Now working to fix the other bugs that prevent the printing of graphics. As I get more bugs out, I will put the Beta source code online so ports can begin...


The Lisa Emulator is done and ready to be downloaded! (April Fools! Ha!) The ImageWriter emulator is actually almost done. Needs debugging.... But it does (sort of) spit out text. The PostScript works nice


Sunder.NET is back online. Many thanks to Marko, ASH, and Alanh! Bookviewer application isn't yet available. Needs to be recompiled...


Finished code to read in fonts, still studying PostScript. ETA: Should have postscript output by early next week and go into Alpha Testing.


Finished Graphics ESC V, (repeating bitpattern), ESC F, fine position printhead escape codes. (Page 76 - of IW User's Guide, Part I Reference -- this is the last page before the appendix, and looking past it, there's nothing left to be included). Now I need to write code that does actual "printing" to bitmap and positioning, loads the font file I scanned/typed in.


Finished Graphics ESC S, ESC G,ESC g codes. Upto page 72 of the IW book. Not too much left. Will start beta testing of spitting out raw grayscale graphics soon, then it's off to write a PostScript and an HP GCL converter. Metallica's Garage Days Revisted helped as usual.


Did programable fonts, next are the raw/repeatable graphics.


No work done until 3/9 due to illness.


Continued work on vertical tabs. Done.


More work on vertical tabs.


Start working at new job. Being employed again is an interesting change from being a bum :) Hope to get sunder.net live again soon...


Did more IW work - upto page 59 (image 15) of ImageWriter refrence -- got ESC( ESC), ESC u done for setting and clearing horizontal tabs. Next are vertical tabs.


Got z8530scc.c to compile - still needs some work. Resurected lisaem development environment at home. More work on ImageWriter code.


Made tentative arangement for new colo of sunder.net and a possible mirror site. Let's hope both will work out. Also mailed CD's to Tom Stepleton and David T. Craig.


sunder.net down due to loss of colocation facility. (Stupid ex-employer - what can I say?) :)


Got 27 more pages of the IW manual to implement before IW emulator will be done...


Scanned in ImageWriter fonts from samples printed in by DTC, wrote program to extract bits from the PICT's so that I can convert them to something my ImageWriter emulator code will be able to print with. Got the bits into a text file with each pixel as either a space or an asterisk. I now need to hand-correct the scanner noise, then turn them into binary form, and of course finish the IW emulator.


Happy New Year. Time to drink lots of single malt 20+yr old scotch... None of that cheap assed 10 year old swill.

Got a bit more flesh on the ImageWriter.c code done. This is very cool. Soon the world will not only have a Lisa emulator, but also an ImageWriter emulator. I bet that'll be real useful... heh...


Fixed typos in via6522.c, profile.c, floppy.c: all now compile. Need to finish writing z8530.c and imagewriter.c. Then I will be able to link in the 68k core.

I found the Parallel port card info from the back of the Parallel Port manual. The 2K ROM starts at 0x0000, 0x4000, 0x8000 from the Expansion Slot I/O address. The ROM appears in the low bytes of each 16-bit word. The Lisa's Boot ROM then copies the ROM to RAM so that it is properly addressed and executes the boot or test routines.

The two 6522A's are offset at 0x0000 and 0x0800 (selecting the lower or upper VIA) from the slot address of 0x2000, 0x6000,0xa000. The VIA registers are offset from this, as 0x00, 0x09, 0x11, 0x19, 0x21, 0x29, 0x31, 0x39, 0x41, 0x49, 0x51, 0x59, 0x61, 0x69, 0x71, 0x79 reflecting registers 0-15.


Fixed typos in cops.c, it now also compiles. Working on via6522.c


Debugged include files headers.h, vars.h so as to be able to compile mmu.c which now compiles. Question as to actual location of VIA's on Parallel Port cards. Are the registers in odd locations on every other byte? I suppose I'll have to test it once the emulator works. I'm assuming they're like VIA2: on every other odd address from the VIABASE.


Merry Christmas. Updated this page and others.


Wrote a Makefile for the emulator. Nothing fancy, but it's a begining... Started trying to compile... lots of errors...


I'm considering using Generator's CPU core versus the UAE core. Currently, I've installed both cores on my sparc and am going to see how easy it is to install it in the source code. Afterwards, I'll move the code over to my OpenBSD box and try compiling it there to make sure it's portable. (Thanks to Richard Bannister for the suggestion about Generator.)


cleaned up include's and headers... starting selection of CPU core...


Mailed Fred a CD full of Lisa docs and the code.


Mailed Paul a CD full of Lisa docs and the code.


Started scanning in lots of Lisa docs from DTC. Put most online, and started burning CD's for LisaWorks team.


Switched jobs - hectic time. No work done on this project. LisaWorks folks were also very busy. Gave up on writing my own core. Considering UAE's core.


Good news: Paul Lunga's team from emulation.net/lisaworks has joined my project (or have I joined them???) and now has my sources. They're currently reviewing it and will work it with me, so this will speed up the completion of this project.


Started writing the Motorola 68000 emulator (a couple of opcodes a day.)


Zilog 8530 SCC (serial controller chip) and some ImageWriter code


Floppy controller code (6504 state machine.)


Profile hd controller code and restructuring code into subdirs based on real Lisa instead of flat directory structure.


COPS controller code and keyboard tables


VIA6522 code.


XWindows routines for displaying the Lisa vidram to a port. (Thanks to O'Reiley's Xlib book)


MMU and internal system latches


Response from Tom Stepleton.


Got dumps of my Profile disk and some RAM (used a Mac app written in ZBasic to peek all memory, used Xenix's dd command to get a disk dump.) Profile5 dumps from my Lisa to my sparc at 9600 took about 24hrs!


David T. Craig responded and started mailing me lots of info..


Started hunting down people with Lisa internals info.


Got a bug up my ass about building this emulator because after trying one of them I found it wouldn't power on.


Built a hackintosh: Mac IIcx motherboard, 8 bit video card, Quantum disk, 286 case and power supply. Stopped using the Lisas.


Got my first Lisa, then the two broken Lisas. Mostly used them in MacWorks mode.

[Why] [Top] [Lisa Docs] [Lisa Hardware Pics] [Lisa Emulator Status] [Lisa Emulator To do] [Lisa Links]

To do/finish:

(Note this text is very outdated. See above entries for progress.)

Implement vertical retrace irq,
implement clock timer interrupt (sigalarm) and handler...
Implement code to handle triggermessages and call a fn each time it's set
          rather than waiting.
Also check Profile and Via code for leftovers.
add floppy controller calls to MMU code!
Do VIA1 & 2 Interrupts properly using new code
finish SCC loopback test code.

Project Status:


100%    MMU CODE
95%     VIA1     (needs interconnects to COPS and Profile to be done, plus
                  support for Parallel Port Card VIA's.)
96%     VIA2
100%    COPS
100%    Profile 
100%    Floppy
75%     SCC
100%    Contrast
75%     Volume
75%     Sound tone
100%    Serial ROM # 

35% Imagewriter
    AppleTalk (might do applenet card sim if I can get specs later...)

CPU Emulator:
99% 68000 opcode refrence templates
70% CPU Generator code done.
0%  opcode refrence to code emulator, assembler/disassembler compiler
10% Disassembler/Debugger (use symbols from ROM code and code from ROM in
10% 68000 Code Emulator
35% IRQ Handler

X Windows/OpenBSD Code.

80% Display
    Endian issues
    SCC to serial port tty's
    Mouse Handler
    Keyboard Handler
    Fancy options: (toolbar, box o'floppies, animations, etc...)
    Ports to:
     OpenBSD i386
     Irix 5.x, 6.x
     HPUX  10
     Linux VGALib ???
     SunOS / Solaris, etc...

MacOS Emulator Port
    SCC to serial ports
    Fancy options: (toolbar, box o'floppies, animations, etc...)    
    local floppy access to 400k and 800 lisa disks.

Win32 Emulator Port + (Intel 95/NT + Alpha NT port)
    SCC to serial ports
    Endian issues,
    Fancy options: (toolbar, box o'floppies, animations, etc...)    

Newton 2000 port - maybe... still considering it... will do if I can
    get a C compiler or Newt soup code translator...  would be cool

I've organized my code thusly:

/ - lisaem
/debug     <-code for built in 68k debugger
/utils     ><-utilities and support tools (disk imagers, etc.)
/host      ><-host machine dependancies (xwin, MacOS, Win32, etc.)
/hw        ><-hardware emulator code
                /cpu    cpu board - cpu emulator + support chips
                /io     z8530scc serial, via6522 parallel code, cops 421
                /mem    (custom mmu code)
                /video  (video driver + video state rom)
         /floppy         6504 emulator
         /slots          via emulators
   /printer    ><- imagewriter code
   /profile    ><- profile driver emulating 5, 10mb profiles


[Why] [Top] [Lisa Docs] [Lisa Hardware Pics] [Lisa Emulator Status] [Lisa Emulator To do] [Lisa Links]