home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
spectrum
/
jpp
/
jpp1.doc
< prev
next >
Wrap
Text File
|
1992-12-16
|
39KB
|
784 lines
This program emulates a Sinclair Spectrum 48k Z80-based computer
on any PC with at least an 80386SX processor and VGA graphics.
The following Spectrum features are implemented:
- Graphics, nearly perfectly. The border is implemented, but only
PJPP emulates flashing and special effects.
- The keyboard, nearly perfectly.
- Kempston joystick, if you have a PC joystick. Both buttons on
the PC joystick press the single Kempston button.
- Sound, but only one of the versions with the correct pitch.
- Not the tape interface.
Licence agreement
JPP is copyright (c) 1991-92 Arnt Gulbrandsen, except spconv.exe,
which is copyright (c) 1992 Henk de Groot, and specdisc.exe, which
is copyright (c) 1992 Brian Havard.
All rights are reserved, with the sole exception that, as long
as the archive is kept together and no fee is involved, JPP may be
copied by anyone.
It is acceptable for BBSes to charge for general use but not
specifically (additionally) for downloading of JPP.
Disk vendors, user groups, or others who wish to distribute JPP
for a fee may apply for permission. Write to Arnt Gulbrandsen,
Kometv. 8, N-7036 Trondheim, Norway, or agulbra@pvv.unit.no.
Files
spconv.exe Converts snapshots between various formats.
Written by Henk de Groot.
groot.rom A modified ROM.
jpp.cfg The configuration file.
jpp.exe The main emulator.
jpp.txt This file.
js.exe Reports how the joystick behaves.
pjpp.exe The exact-speed version, for very fast machines.
readme.txt A GIF showing, among others, Traci Lords.
specdisc.exe Converts snapshots on MGT disks (48K SNP) to
.SNA format. Written by Brian Havard,
s902150@minyos.xx.rmit.oz.au.
spectrum.rom The Spectrum ROM.
tk95.rom The Micro Digital TK95 ROM (a Spectrum clone).
Usage
JPP will try to interpret any command-line argument as either a
ROM image or a snapshot, and load it.
During execution, the 40 keys which correspond in layout to the
Spectrum keyboard work as you'd expect. There are also a number
of extensions:
- Enter is Enter.
- Backspace is Caps-0.
- Both shifts are Caps-shift.
- Both alts are Symbol-shift.
- 0-9 on the keypad should work.
- +-*/ on the keypad work by 'pressing' Symbol-shift and another
key.
- The cursor keys are Caps-5678.
If you 'press' Caps-shift or Symbol-shift in several ways (eg.
by pressing both DEL and a shift key) the (Spectrum) key will be
released as soon as you release one (PC) key; this is because the
emulator only counts whether a key is pressed or not, not (I know
this sounds meaningless) how many times each key is pressed at
once.
Seven keys between 0-P-L-M and Backspace-Enter-Shift are unused.
Unfortunately there's no way to find out what they characters they
normally send, so JPP can't feed the 'normal' character to the
Spectrum. The key immediately to the right of 0, for instance,
sends - and _ on North American keyboards, but + and ? on my
Norwegian keyboard.
Some function keys are interpreted by the emulator:
- F2 saves a snapshot.
- F3 loads a snapshot.
- F4 loads the snapshot which was saved or loaded last; very handy
if you need to try a difficult part of a game again and again.
- F5 disables the sound. Oh, blissful silence!
- F6 enables the sound.
- F10 and F12 both abort the emulator immediately.
All other keys are ignored, except Ctrl-Alt-Del, which reboots
the computer.
Windows, DV, OS/2 etc
JPP is a real PC program; extremely aggressive towards operating
systems. It locks OS/2 2.0 up without even trying. "Write
down these numbers and call IBM."
If, however, you want to use Windows or something, you should
configure it so that JPP
- gets control of the hardware timers. Without it many Spectrum
games will run at a third of the intended speed.
- won't share the CPU when it's running in the foreground.
- won't run in the background.
- gets access to the sound. If you don't want sound, press F5.
- won't share the screen. Ten points to any straitjacket which
manages to run JPP in a window.
- is allowed to do I/O.
When JPP is brought back to foreground the screen may flicker
wildly. Press F3 then Esc to fix it.
JPP.CFG
This is the configuration file. Presently it can only give the
location of support files, whether the sound should initially be
disabled, and which ROM file is the default.
It is a case-insensitive pure text file. All whitespace and
everything after # on a line is ignored. Each line may be up to
255 characters, and is of the format <option>=<value>.
<option> may be either "sound" or a file specification (which
may include multiple * wildcards).
If <option> is "sound", <value> may be "on" or "off".
If <option> is "default-rom", <value> must be a file name, which
will NOT be expanded according to the redirection rules.
If <option> is a file specification, <value> must be a series of
directories separated by ";". I recommended that the directories
be specified as absolute paths.
Copying games to a PC
I just put in support for reading tapes. It doesn't work for me,
and I won't try to fix it, but you could always try it: First
you use VREC (enclosed with the Soundblaster card) or another
sampler to copy the entire tape to disk. Any frequency should
do. The result should be fairly large, 4 megs or so, and be
called "tape-in.voc". Then start PJPP from the directory where
the sample is and type LOAD "". Oh, and remember to press F2 to
write the snapshot to disk when it's loaded, or you'll have to
keep that 4-meg file. Three points: Since it doesn't depend on
the real tape speed, PJPP can read (no it can't) tapes on any
386/486, even if not in real time. Speedlock, Lenslock and other
loaders that depend on the R register won't work. And, since I
use 32-bit arithmetic, there may be anomalies every 613 seconds.
To be safe, load the game immediately after starting PJPP.
Much easier, if you have a Plus D/Disciple/MGT disk drive, is to
snap the game to it, then use Specdisc to convert it to .sna
format. This has the disadvantage that the game may detect that
the Spectrum has a disk drive and presume that it won't disappear
(which it does once the snapshot is run under an emulator).
Alternatively, a Mirage Microdriver snapshot box may be used to
snap the game, either to Microdrive or to tape. From a Microdrive
it's easy to transfer it to a PC via serial cable. From tape it's
rather hard.
One real hacker rewrote his Spectrum ROM to snap directly to
serial cable; he just triggers an NMI, the game is sent out and in
the other end of the cable a COPY command or something stores the
output directly to a snapshot file. Not for the novice, but very
elegant.
Peter McGavin's emulator can read from tape via a sound sampler,
and uses the same snapshot format as JPP.
Two other PC emulator can read Spectrum tapes via the parallel
port.
The CPU emulation
My Z80 emulation code is 50-100% faster than any other Z80
emulator I've seen on the PC. (Whoops, no, not any more. G. A.
Lunter of the Netherlands has written one which sometimes is
nearly as fast.) The main reasons are that nearly all the Z80
registers are kept in 386 registers and that very little time is
spent on instruction decoding. The design is based on Peter
McGavin's Spectrum emulator on the Amiga.
It is perfectly possible to rewrite JPP to work on a 286, less
than a day's work, but it would run half as fast again on a 286/16
as this version does on a 386SX/16. Too slow to bother, IMHO. If
you only have a 286, get Mr. Lunter's emulator. It won't run fast
enough, but it will run.
The register allocation is as follows:
Z80 386
AF AX F is kept in AH, A in AL
BC CX
DE DX
HL BX