Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.sinclair > #4137

Re: How does a Spectrum emulator work?

From "Brian Gaff" <briang1@blueyonder.co.uk>
Newsgroups comp.sys.sinclair
Subject Re: How does a Spectrum emulator work?
Date 2016-04-02 21:17 +0100
Organization A noiseless patient Spider
Message-ID <ndp96b$k9t$1@dont-email.me> (permalink)
References <cb4d972b-4829-4377-b4f1-ce90924d0c7d@googlegroups.com>

Show all headers | View raw


Not sure what you are asking. Many moons ago there was a dos program that 
emulated the z80 chip on other chips. Once this core is done then you 
presumably need to emulate the hardware of the target machine assuming it 
uses a z80..
To me this was always the hard bit, especially inside windows which tended 
to stop direct calls to the pc hardware completely.
 Its been a long time since I looked at any code, but a lot of it was 
written in other languages, depending on the  machine and hardware. C is a 
common choice of course.
 Direct assembler has to run on the emulated chip of course.
 Brian

-- 
 -----  -
This newsgroup posting comes to you directly from...
The Sofa of Brian Gaff...
briang1@blueyonder.co.uk
Blind user, so no pictures please!
<bit-naughty@hotmail.com> wrote in message 
news:cb4d972b-4829-4377-b4f1-ce90924d0c7d@googlegroups.com...
.... I remember having a small discussion with Gasman about this right here 
(and btw, Gasman, I'm still looking to get in touch with you, if you're 
reading this, please post here!), but I got to thinking about it, and..... 
how is it done?

How do you actually *send* a stream of hex to your CPU? (I'm talking about 
the machine your emulator is running on,.. that is to say, in general, 
Mister Intel...) I mean, figuring out the Z80 code, and figuring out what 
it's Intel equivalent will be is obviously the *main* task of an emulator, 
and hard enough by itself, but... once you know what instructions you want 
to *send* to Mr. Intel, .... how do you do it?

I once heard or read somewhere of a trick where you put an instruction on 
the stack (like, the hex code), and then do, essentially, a POP EIP (I'm 
using 32-bit terminology), but then what do you do if that instruction is a 
JMP? What is the actual _essence_ of emulation....? :)

...And of course THEN there is the question of how the actual *conversion* 
is done....I'm emphatically NOT a C programmer, so please don't tell me to 
read FUSE code or something, to figure out how THAT's done.... :) 

Back to comp.sys.sinclair | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How does a Spectrum emulator work? bit-naughty@hotmail.com - 2016-04-02 09:40 -0700
  Re: How does a Spectrum emulator work? Guesser <alistair@zxnet.co.uk> - 2016-04-02 18:14 +0100
    Re: How does a Spectrum emulator work? jbkoelman.sp@gmail.com - 2016-04-02 12:43 -0700
      Re: How does a Spectrum emulator work? "Brian Gaff" <briang1@blueyonder.co.uk> - 2016-04-02 21:22 +0100
        Re: How does a Spectrum emulator work? jbkoelman.sp@gmail.com - 2016-04-02 13:49 -0700
        Re: How does a Spectrum emulator work? Leiradella <aleiradella@gmail.com> - 2016-04-02 14:01 -0700
  Re: How does a Spectrum emulator work? "Brian Gaff" <briang1@blueyonder.co.uk> - 2016-04-02 21:17 +0100
  Re: How does a Spectrum emulator work? Leiradella <aleiradella@gmail.com> - 2016-04-02 13:56 -0700
  Re: How does a Spectrum emulator work? Andre Majorel <cheney@halliburton.com> - 2016-04-06 11:56 +0000
    Re: How does a Spectrum emulator work? Tyrell <on4ssc@gmail.com> - 2017-01-28 15:59 +0100
      Re: How does a Spectrum emulator work? AndyW <Andy@nojunqmail.com> - 2017-01-30 07:33 +0000

csiph-web