Re: A89: Z80 to 68k??


[Prev][Next][Index][Thread]

Re: A89: Z80 to 68k??






On Sat, 3 Jun 2000, Cassady Roop wrote:

> 
> Converts from Z80 to M68K?  Sounds like either a hoax or a monstrosity. 
> I imagine the code it produces is less than optimal efficiency, to say
> the least.
> 

As this author of this monstrous hoax, I guess I might as well say a
little bit about it:

The program (Source Guru) is *not* a hoax at all.  It is availabe (with
source code, no less) not only on my web page, but also in the ticalc.org
archives.  It was released several months ago, and was mentioned in a
ticalc.org news item.  The complete source code (in C) is included.  It is
supplied only as a DOS executable but should be compilable on other
systems.

As far as efficiency, I would hope that you know the 68K calculators have
faster processors than the Z80 calculators, so it isn't necessary.  The
program is converted using a straightforward algorithm, with only a few
simple peephole optimzations; the result is code that's about 50% as
efficient as native 68K code, which just happens to be nicely offset by
the fact that the 68K is about twice as fast.  Testing the programs on the
calculator shows that this is about true for the TI-89.

It only converts from the TI-85, and has compatibility problems with
self-modifying code (though a few basic types are handled) and computed
jumps.  Also, variables and interrupts aren't supported.  However, the
following TI-85 games are successfully converted with few problems:

Jezzball 2.2
Avenger 1.0
Galaxian 3.0
Lunoid 7.2

There are also many other programs which come close to working with it,
and any simple ZShell program with no tricks in it will probably work (as
without relocation, jump tables/self-modifying code should work
well).  All these converted programs are on ticalc.org (except Avenger,
due to coyright nonsense).  All of these programs worked when I tested
them, and I just now ran the copy of Lunoid from ticalc.org on my TI-89
(AMS 1.00, HW 1, Teos 1.02) and it still runs fine.

As for whether it is a "monstrosity" I suppose that judgment will remain a
matter of opinion.  However, the program is not bloated and it does do
it's intended purpose reasonably well (though there is some work to be
done, at least implementing the last few instructions, and adding
variables, interrupts, and a computer jump system would expand its scope).




Follow-Ups: References: