Newsgroups: comp.sys.sinclair
Path: ulke.hiMolde.no!trane.uninett.no!nac.no!ifi.uio.no!sics.se!eua.ericsson.se!cnn.exu.ericsson.se!convex!cs.utexas.edu!howland.reston.ans.net!pipex!uknet!comlab.ox.ac.uk!imc
From: imc@comlab.ox.ac.uk (Ian Collier)
Subject: Re: Speccy Emulation on the SAM (was: What are the Spectrum compatibles ?)
Message-ID: <5980.imc@uk.ac.ox.prg>
X-Local-Date: Monday, 30th January 1995 at 2:01pm GMT
Originator: imc@msc4.comlab
Organization: Oxford University Computing Laboratory
References: <9501180827.AA04252@hvsag01> <3fisq3$9d9@picasso.ecs.soton.ac.uk>
Date: Mon, 30 Jan 1995 14:01:25 GMT
Lines: 52

For your information...

In article <3fisq3$9d9@picasso.ecs.soton.ac.uk>, tsp93@ecs.soton.ac.uk (Tim Paveley) wrote:
>                                                               To achieve
>emulation, you needed to load a "shadow Rom" supplied by MGT, this would
>intercept any calls to the ROM made by a speccy program, and perform the
>necessary code. (That bit may be wrong, I'm not a very technical person)

The MGT Spectrum emulator contains a code file called skelt.bin which
has various bits of the Spectrum ROM in it.  This is used to install a
"skeleton ROM" which is a bit like a Spectrum ROM with lots of holes in
it.  I presume they did this to avoid copyright problems.

>However, this didn't work as well as MGT would have liked, and most people
>found that the best emulation came from actually loading a (slighty
>modified) 48k Speccy Rom, and Running this in place of the Sam's ROM, hence
>literally turning your SAM into a Speccy. (again, this could be complete
>rubbish, but that's how I mentally picture it)

Since the Sam can have RAM in all 64K of its memory map, and it can have a
mode 1 display in any page of memory, it is a simple matter to page the
Spectrum ROM in at 0-16383 and have the mode 1 (i.e., Spectrum compatible)
display at 16384-23295, and voila a spectrum.  This method is the same as
that used by the MGT emulator except that a full ROM instead of a skeleton
one is being used.

I believe the MGT emulator contains a code file (can't remember its name)
which fiddles the timing constants in the Spectrum ROM's SAVE and LOAD
routines so that they work at the right speed.  It also contains a code
file called snapt.bin which installs an NMI routine into the Spectrum
ROM so that you can snapshot a game while it is running.

>The Best form of emulation actually required you to have access to a
>speccy, which was the Messenger (discussed in previous threads), which
>basically took a complete copy of the Speccy memory, and transferred it to
>the SAM. 

From what I gather (and having seen a copy of the Messenger ROM) there is
no difference between a game running under Messenger and a game running
with a Spectrum ROM as described above.  However, the Messenger does
help with loading the game in the first place (since you load it on a
real Spectrum), which is commonly the most difficult operation.

Ian Collier - Departmental Lecturer (and perpetual postgrad student) -
imc@comlab.ox.ac.uk - Oxford University Computing Laboratory, Wolfson
Building, Parks Road, Oxford OX1 3QD - WWW Home Page (including Spectrum
section): http://www.comlab.ox.ac.uk/oucl/users/ian.collier/index.html

New to this group?  Answers to frequently-asked questions can be had from
http://www.nvg.unit.no/spectrum/ .
>New< - Visit the Sam Coup FAQ at:
http://whirligig.ecs.soton.ac.uk/~tsp93/Coupe/FAQ.txt .
