[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GS Emulator
In article <1994Jul12.182703.12985@k12.ucs.umass.edu>,
Nathan Raymond (Phillips Academy 94) <nraymond@k12.ucs.umass.edu> wrote:
>>They only rewrote the often-used parts of code. They're rewriting more and
>>more of it slowly, and a lot of extra emulated code is supposed to be
^^^^^^^^ OOOPS!
I meant native.
>>coming with System 8.
>>There could be an option to turn off some of the softswitch/interrupt
>>emulation so that the emulator could run faster. You could also try to
>>intercept jumps to ROM vectors and emulate parts of the ROM through PPC
>>instructions. A clean ROM that runs faster as well, but I don't know if the
>>FTA demos would still work...
>
>An alternative to developing "clean room" IIgs ROMs that would take MUCH
>less time to implement would be to map the IIgs ToolBox calls to the Mac
>Toolbox, since they are so close (exactly how close, I don't know exactly,
>and there are differences such as the way scroll bars are a part of WDEFs on
>a IIgs and they are seperate CDEFs on a Mac). I'm sure these two Toolboxes
>are closer than the Mac emulator they did a year or two ago for UNIX
>workstations that mapped the Mac Toolbox to Motif (or a similar UNIX GUI).
>This alternative should at least be explored.
This could possibly be added as another preference (it would probably
speed up normal IIgs toolbox code, but do the FTA demos use the toolbox?)
Actually, a preference wouldn't be needed. You would have the clean,
partially-native ROM which would jump into routines inside the emulator.
You could also do native toolbox emulation by using ToolXXX files inside
the System/Tools folder on the IIgs disk image that would jump into the
emulator natively for Toolbox calls.
Now, how would you jump into the emulator? There's -one- semi-unused
opcode, the WDM opcode ($42). Originally reserved for expansion of the
instruction set in future generations of the 65816 chip, it just does a
two-byte NOP on the 65816 itself, and it was not supposed to be used by
anyone on the IIgs itself (the NOP instruction did the same thing). In
the emulator we could redefine this instruction so that it could pass
data to and jump into the emulator's native code.
[Followups to comp.emulators.apple2]
--
barryn@netcom.com