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).