Deja IIx: AppleWorks Classic on Mac OS X

Wednesday, July 26, 2006

JMP $48B4

I have managed to load APLWORKS.SYSTEM into memory and execute the first instruction (again). There are still some pieces not fleshed out in the ProDOS handling, but you got start somewhere.

More importantly, I'm finishing up the work on a new debugger which will allow me to step through the Apple II instructions, set breakpoints, view memory and disassemble the code. The Apple II debugger code is about 80% complete. The Apple II debugger is a necessary part to validate that everything is working (and track down the code if it is not).

Also, I was having some inconsistencies with the 65c02 emulator code I found, so I reverted back to the more stable 6502 emulator (I'll add the needed 65c02 instructions myself).

Two steps forward, one step back.

Saturday, July 22, 2006

Product-name

Even though the code-name is "Phoenix, the Rebirth", there is still a need to come up with name/version for the final product.

Would it be?

"Deja ][ 2.0"
"Deja ][ vX"
"Deja ][ 10.0"
"Deja ][ X"

No, no, no, no. After much contemplation, the name I went with is:

"Deja //x"

Much like Apple ][ became Apple //e, Deja ][ becomes Deja //x. The "//" hints at the more modern variation and the "x" suggests Mac OS X support.

Friday, July 21, 2006

ProDOS

Progress continues on Phoenix 2, but it is a much bigger project than I originally envisioned.

Obviously the file system is an important piece as AppleWorks cannot even load itself without it. Deja ][ relied on a native ProDOS emulation which actually reads the files via the Mac OS in response to the ProDOS commands. This allows files to simply reside on the Mac OS hard drive (no funky disk images to deal with). This will continue.

Unfortunately, the ProDOS support code needed a major overhaul. Most of the Mac OS system routines used by Phoenix are now deprecated. I'm now in the process of revamping all the Prodos file handling code to use the more modern OS X APIs.

This brings us one step closer to the first AppleWorks Classic launch under Phoenix 2.

Tuesday, July 11, 2006

A Brand New CPU

One of the changes in "the Rebirth" is a brand new CPU emulator. This emulator was originally written by Marat Fayzullin and Alex Krasivsky. Marat has written several CPU emulators and his design shows. The design already incorporates the issue of Big vs. Little Endian Host vs. Emulated CPU.


Unfortunately, their CPU is only a 6502 emulator. I figured that I would have to make up the difference (As I recall, AppleWorks 5 requires a 65c02). Luckily Steve Nickolas and Holger Picker took the M6502 emulator and added the 65c02 opcode changes.


Will this result in improved performance? It is hard to tell at this stage.


It also adds some additional work. The tight coupling to the CPU in the native routines has to be changed to use accessors (so it doesn't have to directly know what the CPU or memory looks like).


Monday, July 10, 2006

Renovation

Much like in the world of construction, renovation is a lot trickier than the initial construction. All the plumbing and electrical is already in place and you have to work around that.


Phoenix 1 was essentially "grown". Each piece was built and tested little by little. Contrast this with "the Rebirth", where everything is already inter-connected and it all has to converted at the same time, before even the first line of code can be truly tested.


One of the changes is to more loosely couple the code pieces where possible, so the pieces are more often connected through an intermediary. It doesn't have a performance penalty, but does more easily allow pieces to be swapped in.

Thursday, July 06, 2006

Introduction

Phoenix was the code-name for Deja ][, a specialized emulator designed to run AppleWorks (Classic) on a Macintosh.

Deja ][ was originally published in 1995 and later, the source code was made available.

Feeling a bit nostalgic, I decided to update Deja ][ for the new millennium. Plus, Howard was egging me on.

And so comes Phoenix, the Rebirth.

Join me on this journey and let the nostalgia begin!