Re: It has been done before
- From: "Dunny" <paul.dunn4@xxxxxxxxxxxx>
- Date: Sun, 29 Jan 2006 19:31:59 GMT
Alex McDonald wrote:
> Machine translation of x86 assembler to another platform is
> much more complex than outputting equivalent code sequences, and
> approaches and even exceeds the effort necessary to write a compiler.
I have been approached by a number of people asking for a win32 version of
Sinclair Spectrum games. This involves either of two methods:
1. Add the "game" as a stub to an emulator, effectively pre-filling the
emulated z80 registers and memory model.
2. Convert the z80 assembly to x86.
Option 1 is trivial, but requires quite a large amount of bloat, as the
emulation engine is attached to each executable. It's simpler to load your
game into a regular emulator.
Option 2 is a lot harder than it sounds. The x86 being a (distant) relative
of the z80, the flags register is largely the same with opcodes almost
mapping 1:1 in some cases. However, there's not just the processor to
consider - the screen display utilised a rather odd mapping which would have
to be taken into account, and the sound was produced either as a square wave
or with an AY-3-8912 chip. This would also have to be translated into PCM
sounds, which introduces all sorts of timing and interrupt issues - aside
from the lowly 50hz interrupt needed to get a decent reproduction of the
original code running. It's not *just* the original processor - the rest of
the hardware involved needs to be taken into account. I don't know what's
involved in setting up a 50hz interrupt in Windows, but I suspect it's
non-trivial.
In short, we gave up at the planning stage. We've already written a couple
of emulators, and don't feel that the work involved in translating z80 to
x86 is worth the end result.
Just my 2p :-)
D.
.
- Follow-Ups:
- Re: It has been done before
- From: Charles A. Crayne
- Re: It has been done before
- References:
- It has been done before
- From: Charles A. Crayne
- Re: It has been done before
- From: Alex McDonald
- It has been done before
- Prev by Date: Re: It has been done before
- Next by Date: Re: LOL and behold
- Previous by thread: Re: It has been done before
- Next by thread: Re: It has been done before
- Index(es):
Relevant Pages
|