Hello,
My project is to run an old 68k code (this 68k code ran on an old board with a 68020 processor)on a power pc board. So, I can't change the 68k code. The idea is to have a 68k code interpreter(simulator) in order to run the old 68k code on the new power pc board like in Power PC Macintosh(it uses a 68k emulator in order to run old 68k software). I'd like to use 68k emulation parts of Basilisk II(UAE) but source code isn't very explained.
Can you help me to know how 68k emulation works?
Is there source code documentations or general emulation documentations?
Best regards,
Guillaume
68k emulator of basilisk II
Moderators: Cat_7, Ronald P. Regensburg
-
- Apple Corer
- Posts: 271
- Joined: Mon Sep 23, 2002 6:53 am
The PPC CPU has no built-in 68K emulator. Only Apple and Connectix provided 68k emulators as core components of the OS. Read: MacOS depends a lot on 68k code, so a 68k emulator was the first step to get to native code.The Balance Of Judgement wrote:The PPC CPU has a built-in 68K emulator and if the team that makes SheepShaver didn't include that in the cpu model, you can always purchase Connectix Speed Doubler which has an improved system for emulation of 68K on PPC.
Note that first generation 68k emulators available in former PowerMac ROMs were slow as they followed a simple fetch-decode-execute loop. It was fully optimized in ppc asm though. Initially generated code then tuned. Next generation 68k emulators from Apple (and Connectix) were DR (dynamically recompiling, aka JIT) variants. You can have some details about their first generation emulator in some US patent. DR variants are described (very slightly) in an Apple Technote and Eric Traut wrote some articles for BYTE magazine. There is also a BYTE article describing the MAE DR 68k emulator.
Ah, I am remembering another 68k emulator that was generously commented: the Musashi 68k core used in MAME. It's not fast but he has a nice coding style.