#: 13989 S1/General Interest
18-Jan-92 10:13:57
Sb: #13980-#Fast 6809 emulator!
Fm: John Semler 70324,633
To: Kevin Darling 76703,4227 (X)
Am I happy to see it running? Yes! This program has been simmering over the
stove on low heat for a little over a year - definitely long term project.
Almost all of the 6809 opcodes have been implemented. The exceptions are
"sync", "daa", "abx", "rti", "cwai", "swi", "swi2" (the real kind), and "swi3".
Have not encountered them yet and I'm lazy.
Almost none of the OS9 system calls have been implemented. Just enough to get
"ALMANAC" running for the timing studies. Had to fake out the "I$GetStt" call,
the one which returned a 32 byte path option packet. Otherwise, it seems
relatively easy to map OS9/6809 I/O calls with OS9/680X0 calls.
Currently the emulator is running under OS9/68K. I plan to port the assembly
code over to Aztec C which, I believe, has a decent macro assembler that can
build huge code. I believe a decent CoCo2 simulator that runs OS9 Level One is
possible and may attempt the CoCo3 simulator if the effort proves to be
successful.
Unfortunately, this emulator is sprinkled profusely with 68020 machine language
idioms. The most common 68020 idioms that I use are "bfextu" (bit field
extract unsigned) and "bfins" (bit field insert). I use them to repair the
emulated 6809 condition code bits when the 680X0 instructions doesn't simulate
them correctly. But I am interested in making this emulator run under 68000
systems.
I was wrong about the half carry flag calculations taking up a significant
fraction of the time. It looks like the emulator will never do significantly
better than a CoCo2 when running under the MacIIcx. Also discovered that
MAC-OS9 disables the instruction and data caches on bootup. I re-enabled the
caches under the Mac environment and noted that the run times were reduced by
7.5% (execution times within a stone throw of the CoCo2!).
Maybe in 6 months I will have something to upload. I am a graduate student and
Spring semester has arrived. Darn!
John
There is 1 Reply.
|