home *** CD-ROM | disk | FTP | other *** search
/ 64'er / 64ER_CD.iso / spec_emu / jpp.txt < prev    next >
Text File  |  1995-03-30  |  39KB  |  784 lines

  1. This program emulates a Sinclair Spectrum 48k Z80-based computer 
  2. on any PC with at least an 80386SX processor and VGA graphics.
  3.   The following Spectrum features are implemented:
  4. - Graphics, nearly perfectly.  The border is implemented, but only 
  5. PJPP emulates flashing and special effects.
  6. - The keyboard, nearly perfectly.
  7. - Kempston joystick, if you have a PC joystick.  Both buttons on 
  8. the PC joystick press the single Kempston button.
  9. - Sound, but only one of the versions with the correct pitch.
  10. - Not the tape interface.
  11.  
  12.  
  13.  
  14.                        Licence agreement
  15.  
  16. JPP is copyright (c) 1991-92 Arnt Gulbrandsen, except spconv.exe,
  17. which is copyright (c) 1992 Henk de Groot, and specdisc.exe, which 
  18. is copyright (c) 1992 Brian Havard.
  19.   All rights are reserved, with the sole exception that, as long 
  20. as the archive is kept together and no fee is involved, JPP may be 
  21. copied by anyone.
  22.   It is acceptable for BBSes to charge for general use but not 
  23. specifically (additionally) for downloading of JPP.
  24.   Disk vendors, user groups, or others who wish to distribute JPP 
  25. for a fee may apply for permission.  Write to Arnt Gulbrandsen, 
  26. Kometv. 8, N-7036 Trondheim, Norway, or agulbra@pvv.unit.no.
  27.  
  28.  
  29.  
  30.                              Files
  31.  
  32. spconv.exe     Converts snapshots between various formats.
  33.                  Written by Henk de Groot.
  34. groot.rom      A modified ROM.
  35. jpp.cfg        The configuration file.
  36. jpp.exe        The main emulator.
  37. jpp.txt        This file.
  38. js.exe         Reports how the joystick behaves.
  39. pjpp.exe       The exact-speed version, for very fast machines.
  40. readme.txt     A GIF showing, among others, Traci Lords.
  41. specdisc.exe   Converts snapshots on MGT disks (48K SNP) to
  42.                  .SNA format.  Written by Brian Havard,
  43.                  s902150@minyos.xx.rmit.oz.au.
  44. spectrum.rom   The Spectrum ROM.
  45. tk95.rom       The Micro Digital TK95 ROM (a Spectrum clone).
  46.  
  47.  
  48.  
  49.                              Usage
  50.  
  51. JPP will try to interpret any command-line argument as either a 
  52. ROM image or a snapshot, and load it.
  53.   During execution, the 40 keys which correspond in layout to the 
  54. Spectrum keyboard work as you'd expect.  There are also a number 
  55. of extensions:
  56. - Enter is Enter.
  57. - Backspace is Caps-0.
  58. - Both shifts are Caps-shift.
  59. - Both alts are Symbol-shift.
  60. - 0-9 on the keypad should work.
  61. - +-*/ on the keypad work by 'pressing' Symbol-shift and another 
  62. key.
  63. - The cursor keys are Caps-5678.
  64.   If you 'press' Caps-shift or Symbol-shift in several ways (eg. 
  65. by pressing both DEL and a shift key) the (Spectrum) key will be 
  66. released as soon as you release one (PC) key; this is because the 
  67. emulator only counts whether a key is pressed or not, not (I know 
  68. this sounds meaningless) how many times each key is pressed at 
  69. once.
  70.   Seven keys between 0-P-L-M and Backspace-Enter-Shift are unused.  
  71. Unfortunately there's no way to find out what they characters they 
  72. normally send, so JPP can't feed the 'normal' character to the 
  73. Spectrum.  The key immediately to the right of 0, for instance, 
  74. sends - and _ on North American keyboards, but + and ? on my 
  75. Norwegian keyboard.
  76.   Some function keys are interpreted by the emulator:
  77. - F2 saves a snapshot.
  78. - F3 loads a snapshot.
  79. - F4 loads the snapshot which was saved or loaded last; very handy 
  80. if you need to try a difficult part of a game again and again.
  81. - F5 disables the sound.  Oh, blissful silence!
  82. - F6 enables the sound.
  83. - F10 and F12 both abort the emulator immediately.
  84.   All other keys are ignored, except Ctrl-Alt-Del, which reboots 
  85. the computer.
  86.  
  87.  
  88.  
  89.                      Windows, DV, OS/2 etc
  90.  
  91.   JPP is a real PC program; extremely aggressive towards operating 
  92. systems.  It locks OS/2 2.0 up without even trying.  "Write 
  93. down these numbers and call IBM."
  94.   If, however, you want to use Windows or something, you should 
  95. configure it so that JPP
  96. - gets control of the hardware timers.  Without it many Spectrum 
  97. games will run at a third of the intended speed.
  98. - won't share the CPU when it's running in the foreground.
  99. - won't run in the background.
  100. - gets access to the sound.  If you don't want sound, press F5.
  101. - won't share the screen.  Ten points to any straitjacket which 
  102. manages to run JPP in a window.
  103. - is allowed to do I/O.
  104.   When JPP is brought back to foreground the screen may flicker 
  105. wildly.  Press F3 then Esc to fix it.
  106.  
  107.  
  108.  
  109.                             JPP.CFG
  110.  
  111. This is the configuration file.  Presently it can only give the 
  112. location of support files, whether the sound should initially be 
  113. disabled, and which ROM file is the default.
  114.   It is a case-insensitive pure text file.  All whitespace and 
  115. everything after # on a line is ignored.  Each line may be up to 
  116. 255 characters, and is of the format <option>=<value>.
  117.   <option> may be either "sound" or a file specification (which 
  118. may include multiple * wildcards).
  119.   If <option> is "sound", <value> may be "on" or "off".
  120.   If <option> is "default-rom", <value> must be a file name, which 
  121. will NOT be expanded according to the redirection rules.
  122.   If <option> is a file specification, <value> must be a series of 
  123. directories separated by ";".   I recommended that the directories 
  124. be specified as absolute paths.
  125.  
  126.  
  127.  
  128.                      Copying games to a PC
  129.  
  130. I just put in support for reading tapes.  It doesn't work for me,
  131. and I won't try to fix it, but you could always try it:  First
  132. you use VREC (enclosed with the Soundblaster card) or another
  133. sampler to copy the entire tape to disk.  Any frequency should
  134. do.  The result should be fairly large, 4 megs or so, and be
  135. called "tape-in.voc".  Then start PJPP from the directory where
  136. the sample is and type LOAD "".  Oh, and remember to press F2 to
  137. write the snapshot to disk when it's loaded, or you'll have to
  138. keep that 4-meg file.  Three points:  Since it doesn't depend on
  139. the real tape speed, PJPP can read (no it can't) tapes on any
  140. 386/486, even if not in real time.  Speedlock, Lenslock and other
  141. loaders that depend on the R register won't work.  And, since I
  142. use 32-bit arithmetic, there may be anomalies every 613 seconds.
  143. To be safe, load the game immediately after starting PJPP.
  144.   Much easier, if you have a Plus D/Disciple/MGT disk drive, is to 
  145. snap the game to it, then use Specdisc to convert it to .sna 
  146. format.  This has the disadvantage that the game may detect that 
  147. the Spectrum has a disk drive and presume that it won't disappear 
  148. (which it does once the snapshot is run under an emulator).
  149.   Alternatively, a Mirage Microdriver snapshot box may be used to 
  150. snap the game, either to Microdrive or to tape.  From a Microdrive 
  151. it's easy to transfer it to a PC via serial cable.  From tape it's 
  152. rather hard.
  153.   One real hacker rewrote his Spectrum ROM to snap directly to 
  154. serial cable; he just triggers an NMI, the game is sent out and in 
  155. the other end of the cable a COPY command or something stores the 
  156. output directly to a snapshot file.  Not for the novice, but very 
  157. elegant.
  158.   Peter McGavin's emulator can read from tape via a sound sampler, 
  159. and uses the same snapshot format as JPP.
  160.   Two other PC emulator can read Spectrum tapes via the parallel 
  161. port.
  162.  
  163.  
  164.  
  165.                        The CPU emulation
  166.  
  167. My Z80 emulation code is 50-100% faster than any other Z80 
  168. emulator I've seen on the PC.  (Whoops, no, not any more.  G. A. 
  169. Lunter of the Netherlands has written one which sometimes is 
  170. nearly as fast.)  The main reasons are that nearly all the Z80 
  171. registers are kept in 386 registers and that very little time is 
  172. spent on instruction decoding.  The design is based on Peter 
  173. McGavin's Spectrum emulator on the Amiga.
  174.   It is perfectly possible to rewrite JPP to work on a 286, less 
  175. than a day's work, but it would run half as fast again on a 286/16 
  176. as this version does on a 386SX/16.  Too slow to bother, IMHO.  If 
  177. you only have a 286, get Mr. Lunter's emulator.  It won't run fast 
  178. enough, but it will run.
  179.   The register allocation is as follows:
  180.  Z80  386
  181.   AF  AX       F is kept in AH, A in AL
  182.   BC  CX
  183.   DE  DX
  184.   HL  BX       In BX since BX can access memory
  185.   SP  BP
  186.   PC  SI
  187. IX, IY, I, R and the alternates are kept in memory.  DI is used as 
  188. scratch register.  DS points to the Spectrum address space, ES 
  189. points to a special bookkeeping table, FS and GS to a 128k table 
  190. of decoded instructions.  (FS and GS don't exist on the 286.)
  191.   All the other emulators I've seen (except Peter's) decode each 
  192. instruction every time it is used.  I avoid that by storing the 
  193. address of the emulation routine for each address in a special 
  194. 128k table.  FS points to a 64k segment which contains the entries 
  195. for the even Z80 addresses, GS  - blah blah - odd.  Each opcode 
  196. knows how long it is and whether it is located on an even or odd 
  197. address so it can jump through the correct table.
  198.   In order to work with self-modifying code the decoding of an 
  199. address must be invalidated whenever it is written to.  Another 
  200. 64k table (ES) keeps track of which decodings must be invalidated 
  201. when an address is written to.  Bit N at address M is set if the 
  202. decoding of address M-N depends on address M, for N<4.  Bits 4..6 
  203. are unused (0) and bit 7 is set if the address is write protected.  
  204. Thus, an opcode which writes to eg. [di] need only
  205.     test [byte ptr es:di],255  ;rom, or previously decoded?
  206.     jnz fix_write_di           ;any bit set -> go fix it (slow!)
  207.     jmp [word ptr fs:si]       ;[word ptr gs:si-1] if si is odd
  208.   Each opcode must be emulated twice, 192K RAM must be used for 
  209. extra tables, and the code won't run on anything smaller than a 
  210. 386SX since so many segment registers are used, but!  It is twice 
  211. as fast as anything else (except the Dutch emulator, more about 
  212. which later).
  213.   The only way to speed it up further is to compile and optimise, 
  214. which could eliminate a lot of flag handling (many instructions 
  215. affect several flags, at most one of which is actually used) and 
  216. concatenate some instructions (eg. ld a,e; add a,7; ld e,a).  One 
  217. possibility is to translate the Z80 code to a simple 2-register 
  218. language, optimise the resulting code and finally interpret it.  
  219. But would the optimised code be fast enough to offset the time 
  220. taken to optimise it?
  221.   To return to reality, there are some known bugs:
  222. - The H processor flag is set incorrectly by 16-bit arithmetic 
  223. instructions (it is the carry/borrow between bits 7 and 8, not 11 
  224. and 12).
  225. - The two 'unused' bits in the Z80 F register may be corrupted by 
  226. some instructions on some processors.  The 386 seems ok but future 
  227. Intel processors may not.
  228. - Interrupts are delayed until directly after a CALL, JR, JP, RET, 
  229. RETI, RETN and HALT instruction.
  230. - LDIR may turn off the write protection of a few bytes at either 
  231. end of the ROM (it resets bit 7 in ES of up to five bytes before 
  232. the start if the destination block and one byte after its end).
  233. - R is not quite perfectly emulated.  LD A,R loads bits 0..6 of A 
  234. from 8253 timer 0 and bit 7 from R (set by LD R,A).
  235.   There also is at least one (more) bug, which I am having trouble 
  236. tracking down.
  237.   Mr. Lunter's emulator does things mainly like JPP, but uses BX
  238. for instruction decoding, puts DE in RAM, doesn't use the three 
  239. extra segments used by JPP, and has some other, less important
  240. differences.
  241.   JPP emulates most documented and undocumented opcodes, the 
  242. exceptions being IND, INI, INDR, INIR, OTDR, OTIR and the shift- 
  243. with-autocopy instructions.  Instructions which aren't recognised 
  244. abort the emulator.
  245.   Starion uses OUTI and International Karate OUTD so they are now 
  246. partially emulated.  B and HL are modified, but the flags aren't 
  247. set and the port isn't written to.
  248.  
  249.  
  250.  
  251.                      The graphics emulation
  252.  
  253. JPP (now) runs in 320*240 16-colour mode.  Flashing is emulated by 
  254. changing the bytes in the PC video memory rather than by changing 
  255. the palette.
  256.   DESQview and other programs which try to manage the screen 
  257. generally don't restore it properly when JPP is brought back to 
  258. foreground.  If you have this problem, press F3 then Esc.
  259.   The fast version updates the entire PC screen from the Spectrum 
  260. screen every 3rd interrupt (ie. the refresh frequency is 16.67Hz).  
  261. The exact-speed version (PJPP) updates as many lines as there is 
  262. time to before each interrupt (ie. the refresh frequency is at 
  263. least 2.08Hz, at most 50Hz).
  264.  
  265.  
  266.  
  267.                       The sound emulation
  268.  
  269. The Spectrum sound system, as you probably know, is simple.  The 
  270. processor controls the loudspeaker level, and by raising and 
  271. lowering it at regular intervals can make tones.
  272.   The PC system is, for practical purposes, exactly the same.  So 
  273. emulating the Spectrum sound system should be simple?
  274.   No, because the PC has to sample the joystick and update the 
  275. screen as well.  Both require rather long time slices.  Also, 
  276. unless the instructions take exactly as long as on the real 
  277. Spectrum, the delay loops won't work and the tones will be thrown 
  278. off.
  279.   The standard JPP ignores timing and just outputs the sound as 
  280. the Spectrum program does.  Hopefully it'll sound much as 
  281. intended.
  282.   PJPP is intended to do better, but still has to sample the 
  283. joystick and update the screen.  The method I've chosen is to try 
  284. to get the correct interval between clicks except when this is too 
  285. long (frequencies below 160Hz) or when there's an overflow of some 
  286. sort (between sounds, generally).  There is a limit to how high 
  287. PJPP can go (roughly proportional to the CPU speed) and a limit to 
  288. how accurately it can match the intended frequency (more or less 
  289. constant).
  290.   Since sound output requires extremely accurate timing the screen 
  291. output is more or less suspended while the sound is being made.  
  292. Currently the refresh frequency may be as low as 2.08Hz, but it 
  293. would be easy to increase that limit.
  294.  
  295.  
  296.  
  297.                           Peripherals
  298.  
  299. The Spectrum has very little in the way of peripherals, and JPP 
  300. emulates even less.
  301.   On ports XXFEh, JPP emulates the keyboard (and PJPP the tape 
  302. too) on input, and the speaker and border on output.
  303.   On ports XX1Fh, JPP emulates a Kempston joystick on input and 
  304. nothing on output.  If the PC doesn't have a joystick the Kempston 
  305. always is in the neutral position.
  306.   On port XXFFh, JPP returns FFh during Spectrum vertical retrace, 
  307. else ((n+1) mod 256) where n is the previous value returned.  The 
  308. Spectrum vertical retrace occurs 50 times a second, the real 
  309. retrace usually has a frequency of 60-75Hz.
  310.   On all other ports JPP returns FFh on input and ignores output.
  311.   Since reading the PC joystick position is inordinately slow, JPP 
  312. reads it every 0.02 second (starting when the Spectrum program 
  313. first accesses the Kempston) and feeds the value read to the 
  314. Spectrum whenever the Spectrum program reads the Kempston.  The 
  315. button status is read whenever the Spectrum program wants to.
  316.  
  317.  
  318.  
  319.                          General Notes
  320.  
  321. There is a not very active mailing list for the Spectrum, mail 
  322. mauricio@mozart.aero.ufl.edu to be added.  New versions of JPP 
  323. (hah! none!) will be announced on the list.
  324.   You may have wondered about the name JPP.  Try typing J 
  325. Symbolshift-P Symbolshift-P on a Spectrum; I was feeling rather 
  326. sentimental when I named the emulator.
  327.   This document is based on the documentation Peter McGavin wrote 
  328. for his Spectrum emulator.  I am extremely grateful to Peter for 
  329. all his help.
  330.   Henk de Groot has fixed the Spectrum ROM bugs, but at least one 
  331. game breaks on his ROM.  Unfortunately his email address is likely 
  332. to change in the near future; Mauricio or I will know what it is.  
  333. He has also written a program, "convert.exe", to convert snapshots 
  334. between various format.  This program is enclosed.
  335.   The joystick emulation uses a routine which should work no 
  336. matter how fast the processor is.  If the 558 in your joystick 
  337. interface is clocked faster or slower than mine (the neutral 
  338. position is off-centre), tell me!
  339.   There may be some linguistic errors in this document.  Sorry 
  340. about that, but please bear in mind that English is not my first 
  341. language.
  342.   The speed indicator (the little bar to the right of the display) 
  343. is the average number of clock cycles JPP emulates relative to how 
  344. fast I think the real Spectrum is, averaged over the last half 
  345. second.  It occasionally dips over 100%, which is quite right, 
  346. during HALT and large LDIRs JPP does work faster than the real 
  347. Spectrum.
  348.   The differences between the two executables are that PJPP:
  349.   - counts clock cycles and makes sure that 3500000 are emulated 
  350. each second.
  351.   - allows LDIR to be interrupted.
  352.   - does tape emulation, of sorts.
  353.   - shows the relative speed of the emulator on the right of the 
  354. screen.
  355.   - emulates the border properly, including striped loading.
  356.   - uses a variable-frequency graphics update.
  357.   - HALT works perfectly.  JPP just guesses.
  358.   Both versions share the following faults:
  359.   - R isn't properly emulated.
  360.   - Tape output isn't supported.
  361.   - Rainbowing isn't emulated.
  362.   - Port 255 may be used to find the vertical retrace, but not to 
  363. sync with specific colours on-screen.
  364.   - The two unused flag bits seem to be corrupted by some 
  365. instructions.
  366.   The FTP/FSP site wuarchive.wustl.edu has some Spectrum files in 
  367. /systems/sinclair.  South African users should use the mirror site 
  368. ftp.sun.ac.za, directory /pub/msdos/zx.
  369.  
  370.  
  371.  
  372.                         Other emulators
  373.  
  374. I have about six other emulators, and there are several that I 
  375. don't have.  All, except where noted, are PD and available for 
  376. anonymous FTP and FSP at wuarchive.wustl.edu, somewhere below 
  377. directory /systems/sinclair.
  378.  
  379. PC:
  380.   VGASPEC.EXE, originally by Alfonso Olloqui.  Needs 286+VGA, runs 
  381. at less than half the speed of JPP.  A later version by another 
  382. author seems to be better, but I haven't tested it yet.  The newer 
  383. version has some tape support.  This is the one with the doc file 
  384. I can't read.
  385.   SP.EXE, untested, I've consistently forgotten to bring it home.  
  386. CGA, I think, and a built-in debugger.
  387.   Brian Havard wrote, but didn't release, an emulator.  Simple and 
  388. short, slow, not developed very far since it was so slow.
  389.   G. A. Lunter has written an excellent emulator.  Unfortunately 
  390. the docs and on-screen prompts are in Dutch, so it's not too 
  391. usable.  Version 1.30 adds a short summary in English.  Versions 
  392. from 1.41 on support full tape input and output.  This is the only 
  393. emulator which approaches the speed of JPP.
  394.   IRISH.ZIP, buggy and slow.
  395.  
  396. Amiga:
  397.   Spectrum, by Peter McGavin.  Very good, JPP is based to a large 
  398. extent on it.  Needs about a 25MHz machine to run at full speed.  
  399. Has tape support.
  400.   KGB.  I haven't seen it.  A bit slower than Peter's, and the 
  401. version Peter saw wouldn't work on the Amiga 3000.
  402.   An Italian emulator which I don't know the name of.  Excellent 
  403. compatibility, rather fast.  May be shareware.
  404.   Dirk Akkerman wrote one; he says it's good but I haven't seen it.
  405. I'm sure it will appear on wuarchive shortly.
  406.   Several unreleased emulators.  Peter knows more about them.
  407.  
  408. Atari ST/TT:
  409.   One, called Spectrum.  Don't know anything about it, but the doc 
  410. file is written in quite the worst English I've seen.  Available 
  411. by anonymous ftp from terminator.cc.umich.edu.
  412.  
  413. Acorn Archimedes:
  414.   A company called Arxe wrote one, intended to be commercial but 
  415. never released because Amstrad wouldn't permit Arxe to enclose the 
  416. ROM.
  417.   Someone called D. Lawrence wrote another, or maybe the same.  
  418. This one is floating around but nobody has any documentation.  I 
  419. don't know what its status is.  Runs at about 70% of Spectrum 
  420. speed on an ARM2, not quite perfect graphics emulation.
  421.  
  422. Commodore 64:
  423.   The Whitby Software Spectrum simulator is a rewrite of the 
  424. Spectrum Basic.  It will not run machine-code programs.  I don't 
  425. know whether it's PD, shareware, or commercial.
  426.  
  427.  
  428.  
  429.                     The snapshot file format
  430.  
  431. This format (filetype .SNA) is the format used by the Mirage 
  432. Microdriver "Dump" command.  It is also used by Peter McGavin's 
  433. Spectrum emulator for the Amiga.
  434.  
  435.  Byte offset    Contents
  436.  
  437.     0          i  register
  438.     1          l' register
  439.     2          h' register
  440.     3          e' register
  441.     4          d' register
  442.     5          c' register
  443.     6          b' register
  444.     7          f' register
  445.     8          a' register
  446.     9          l  register
  447.    10          h  register
  448.    11          e  register
  449.    12          d  register
  450.    13          c  register
  451.    14          b  register
  452.    15          iy low register
  453.    16          iy high register
  454.    17          ix low register
  455.    18          ix high register
  456.    19          bit 2 contains iff2
  457.    20          r register
  458.    21          flags register
  459.    22          a register
  460.    23          sp low register
  461.    24          sp high register
  462.    25          interrupt mode (0, 1 or 2)
  463.    26          border colour (0..7).
  464.  27..49178     48 kbytes ram dump
  465.  
  466. When the registers have been loaded a RETN command is required to 
  467. start the program.
  468.   IFF2 is short for interrupt flip-flop 2, and for all practical 
  469. purposes is the interrupt-enabled flag.  Set means enabled.
  470.   Since Peter's emulator stores rubbish in byte 26 JPP sets the 
  471. border to black if byte 26 is larger than 7.
  472.  
  473.  
  474.  
  475.          List of working programs (and some that don't)
  476.  
  477. I haven't tested them very thoroughly, most games bore me very 
  478. quickly, but at least the title screen and the start of the first 
  479. level work.
  480.   This list was produced by `ls */*.sna', so it's not more correct 
  481. that my directories were tidy.
  482.  
  483. 10frame.zip    dambust.zip    horiza2.zip    mugsyii.zip    split.zip
  484. 10indian.zip   dan2.zip       horiza3.zip    mutant.zip     sportsh.zip
  485. 180.zip        dandy.zip      horiza4.zip    necropol.zip   spray.zip
  486. 1942.zip       darkstar.zip   horiza5.zip    nederlan.zip   sprinter.zip
  487. 2112ad.zip     dbltake.zip    horiza6.zip    nemesis.zip    spyhunt.zip
  488. 2guntrtl.zip   dchase.zip     horizb1.zip    newterm.zip    spyvspy.zip
  489. 3descap.zip    deathcha.zip   horizb2.zip    nflite2.zip    ssprint.zip
  490. 3dluna.zip     decath-1.zip   horizb3.zip    nifty.zip      st-berna.zip
  491. 3dtank.zip     decath-2.zip   horizb4.zip    nipper.zip     stainste.zip
  492. 3weeks.zip     defender.zip   horizb5.zip    niteshde.zip   stanley.zip
  493. a_mole1.zip    deus_1.zip     horizb6.zip    nod_ysod.zip   star-rai.zip
  494. a_mole2.zip    deus_2.zip     horizb7.zip    nomad.zip      starbike.zip
  495. acrojet.zip    devpac.zip     horizb8.zip    nosferat.zip   starion.zip
  496. adastra.zip    dictator.zip   horizb9.zip    octagon.zip    starmap.zip
  497. advent-8.zip   dmouse2.zip    horizons.doc   olli.zip       starquak.zip
  498. advent_a.zip   donkey.zip     howhero.doc    olympiad.zip   starship.zip
  499. advent_b.zip   doomsday.zip   howhero1.zip   omega.zip      starstr2.zip
  500. advent_c.zip   dragontc.zip   howhero2.zip   ometron.zip    starstrk.zip
  501. advent_d.zip   drats.zip      hpascal.zip    orbiter.zip    startrek.zip
  502. ageddon.zip    draughts.zip   hskiing.zip    orbix.zip      stonkers.zip
  503. ahdiddum.zip   dreadngt.zip   hulk.zip       pacland.zip    supchess.zip
  504. airwolf.zip    driller.zip    hunch2.zip     pacmania.zip   superstr.zip
  505. alchemis.zip   druid.zip      hunchbck.zip   painter.zip    survivor.zip
  506. alien8.zip     dukes.zip      hunter.zip     panama.zip     sweevo.zip
  507. alienh.zip     dundarac.zip   hypaball.zip   panza.zip      system15.zip
  508. aliens.zip     dustin.zip     hyperact.zip   paperboy.zip   talk-che.zip
  509. america.zip    dwarrior.zip   hypsport.zip   paravia.zip    talk.zip
  510. android2.zip   dwing.zip      i_karate.zip   paws.zip       tanx.zip
  511. ant-atta.zip   dynadan1.zip   id.zip         pedro.zip      tapper.zip
  512. antattak.zip   dynadan2.zip   imask.zip      penetrat.zip   tarzan.zip
  513. antics.zip     eaglenes.zip   imposbal.zip   penta.zip      tasword.zip
  514. anything.zip   eagles.zip     impsball.zip   ph_tomb.zip    tau_ceti.zip
  515. aquaplan.zip   editamon.zip   indidemo.zip   pharaoh.zip    tcresta.zip
  516. arabian.zip    elevator.zip   invaders.zip   phenix.zip     ted.zip
  517. arc_ysod.zip   elite.zip      is-chess.zip   pigeon.zip     tempest.zip
  518. arcadia.zip    embassy.zip    jackbean.zip   pimania.zip    temple.zip
  519. arkanoid.zip   empire.zip     jason.zip      pinball.zip    termolin.zip
  520. artist2.zip    enduro.zip     jeroen.zip     pingpong.zip   terra.zip
  521. ashes.zip      enigma.zip     jetman.zip     pioneer.zip    tetris.zip
  522. asterix.zip    equinox.zip    jetpac.zip     pitman7.zip    tfdemo.zip
  523. atf.zip        eric.zip       jetset.zip     planet.zip     tformers.zip
  524. aufmonty.zip   escape.zip     jetset2.zip    planets.zip    thanatos.zip
  525. automani.zip   eskimo.zip     jetsetw3.zip   platoon.zip    thing.zip
  526. b17intro.zip   esmerald.zip   jfever.zip     pogo.zip       thingbb.zip
  527. backgamm.zip   europe.zip     joeblade.zip   pontoon.zip    think.zip
  528. barrybox.zip   evolutn.zip    johnreb.zip    pool.zip       thuncats.zip
  529. baseball.zip   exodus.zip     jsw.zip        popeye.zip     thunder.zip
  530. basicod3.zip   exolon.zip     jsw2.zip       position.zip   time.zip
  531. basil.zip      express.zip    jumbly.zip     postpat.zip    timegate.zip
  532. basket.zip     factory.zip    jump-j1.zip    progolf.zip    tirnanog.zip
  533. batman.zip     fairlght.zip   jumpjack.zip   projectf.zip   tll.zip
  534. battle17.zip   fairlgt2.zip   k_tyme.zip     pshotdem.zip   toadrun.zip
  535. batty.zip      fb_year.zip    kanga.zip      pssst.zip      tomahawk.zip
  536. bazooka.zip    files.bbs      karnov.zip     psyche.zip     tomatoes.zip
  537. bcquest.zip    finance.zip    ket.zip        psytron.zip    topgun.zip
  538. bdash.zip      findkeep.zip   knight.zip     pulsar7.zip    toymaker.zip
  539. bearbovr.zip   finhours.zip   knot3d.zip     pyjamara.zip   train-ga.zip
  540. betbasic.zip   firelord.zip   kobayasi.zip   pyramid.zip    transam.zip
  541. bgammon.zip    fist.zip       kokotoni.zip   quazatrn.zip   trantor.zip
  542. bhead.zip      fistii.zip     kong.zip       quill.zip      tranzam.zip
  543. bhead2.zip     flag.zip       kong2.zip      rack-it.zip    trapdoor.zip
  544. biggles.zip    flashp.zip     kosmic.zip     radix.zip      trashman.zip
  545. birdy.zip      flashpnt.zip   krakatoa.zip   raiders.zip    tribble.zip
  546. blackbrd.zip   flintstn.zip   krakout.zip    rambo.zip      trivial.zip
  547. blagger.zip    fltsim.zip     lazerzne.zip   rasputin.zip   tron.zip
  548. blckjack.zip   football.zip   lcycle.zip     rastersc.zip   ttracer.zip
  549. blind.zip      force.zip      leadbord.zip   rcoaster.zip   tttdoor.zip
  550. bluemax.zip    forth.zip      lees.dit       redhawk.zip    ttwins.zip
  551. bluethun.zip   fox.zip        lifeline.zip   redmoon.zip    tunnel.zip
  552. bmx.zip        fp.zip         lightfor.zip   renegade.zip   turtldem.zip
  553. boa.zip        fpcomp.zip     lmagic.zip     reversi.zip    twister.zip
  554. bobby.zip      fpilot.zip     lode-1.zip     revolutn.zip   ugh!.zip
  555. bobslgh.zip    fred.zip       lode-2.zip     riddlers.zip   under.zip
  556. boggit-1.zip   freezbee.zip   lordring.zip   river.zip      underwld.zip
  557. bombjac2.zip   frenzy.zip     lordsofm.zip   robin.zip      unihero.zip
  558. bombjack.zip   frogger.zip    lordtime.zip   rocket.zip     uridium.zip
  559. booty.zip      froggy.zip     lread1.zip     rocky.zip      v.zip
  560. bored-1.zip    fruitmac.zip   lread2.zip     roodkapj.zip   valhalla.zip
  561. bored-2.zip    full-thr.zip   lread3.zip     roomten.zip    valkyrie.zip
  562. bored-3.zip    future.zip     lread4.zip     rratrace.zip   vampire.zip
  563. bouncer.zip    g-force.zip    lunar.zip      rriot.zip      vectron.zip
  564. bounder.zip    galaxian.zip   m-chess.zip    rupert.zip     velnor.zip
  565. bounzai.zip    galvan.zip     macadam.zip    rygar.zip      veracrz1.zip
  566. boxchamp.zip   gazeteer.zip   mailstro.zip   saboteur.zip   veracrz2.zip
  567. brainspo.zip   gbaret.zip     makechip.zip   sabotr_2.zip   viewkill.zip
  568. brave.zip      gd.zip         manic.zip      sabre.zip      viking.zip
  569. bravesta.zip   geo1.zip       manic2.zip     sai.zip        virus.zip
  570. brianaxe.zip   geo2.zip       manicmin.zip   sam-spad.zip   voicechs.zip
  571. brucelee.zip   ghostbst.zip   manmin2.zip    sam-stoa.zip   vu3d.zip
  572. btlships.zip   ghosts.zip     marsport.zip   samfox.zip     vu3dxmp.zip
  573. bugaboo.zip    gilligan.zip   martha.zip     scooby.zip     vufile.zip
  574. buggy.zip      gladiatr.zip   masterfl.zip   scrabble.zip   w-cauldr.zip
  575. bugsy.zip      glass.zip      match.zip      scuba.zip      wally.zip
  576. cabaldem.zip   glider-e.zip   matchday.zip   seiddab.zip    war.zip
  577. caesar.zip     glider.zip     matchpoi.zip   sentinel.zip   warlord.zip
  578. cars.zip       gobblema.zip   math.zip       sfcobra.zip    wartoad.zip
  579. castdoom.zip   gordella.zip   matlucas.zip   shadowsk.zip   westbank.zip
  580. catchy.zip     grail.zip      maxhead.zip    shawk.zip      wheelie.zip
  581. cauldron.zip   gremlins.zip   mazegold.zip   sherlock.zip   whodunit.zip
  582. cavelon.zip    groucho.zip    maziacs.zip    sherwood.zip   wild.zip
  583. cclash.zip     ground.zip     mctutor0.zip   shockway.zip   wiledemo.zip
  584. cct.zip        gryzor.zip     mctutor1.zip   short_1.zip    willow.zip
  585. cdebris.zip    gulpman.zip    mctutor2.zip   short_2.zip    winter1.zip
  586. centiped.zip   gun.zip        mctutor3.zip   shuttle.zip    winter2.zip
  587. chchase.zip    gunfrite.zip   mctutor4.zip   sidewize.zip   wizard.zip
  588. chess.zip      gunstar.zip    mdraw.zip      sirfred.zip    wthasea.zip
  589. chimera.zip    gyron.zip      meltdown.zip   skiing.zip     xevious.zip
  590. chuckegg.zip   gyroscop.zip   messiah.zip    skool.zip      xword.zip
  591. chuckie.zip    hacker.zip     meteor.zip     skooldaz.zip   yahtzie.zip
  592. chuckman.zip   hacker2.zip    mikie.zip      skyfox.zip     yie-ar-2.zip
  593. classic.zip    hampstd.zip    million.zip    sleuth.zip     yie-ar.zip
  594. claws.zip      happy.zip      minedout.zip   slippery.zip   zaxxan.zip
  595. cobra.zip      harrier.zip    mininfor.zip   slord.zip      zeus.zip
  596. combat.zip     havoc.zip      mission.zip    smudge.zip     zigzag.zip
  597. combatsk.zip   head.zip       mndstone.zip   snakepit.zip   zip
  598. commando.zip   headball.zip   molar.zip      snowball.zip   zipzap.zip
  599. cookie.zip     headroom.zip   molecman.zip   snowman.zip    zolyx.zip
  600. cpforth.zip    heartl.zip     mon.zip        soldier.zip    zolyx_f.zip
  601. crtcmass.zip   heathrow.zip   monopoli.zip   solomon.zip    zombie.zip
  602. crystal.zip    heavy.zip      monty.zip      sorderon.zip   zombies.zip
  603. cyberrat.zip   hellfire.zip   mordon.zip     space7.zip     zub.zip
  604. cyberun.zip    herbert.zip    moscow.zip     spacehrr.zip   zxforth.zip
  605. cycle.zip      hero.zip       movie.zip      spacerac.zip   zynaps.zip
  606. cyclone.zip    hhorace.zip    mrcopy.zip     spacezeb.zip   zythum.zip
  607. cyrus.zip      highway.zip    mrwimpy.zip    spectres.zip   zzoom.zip
  608. czone.zip      hijack.zip     mshadow.zip    spellbnd.zip
  609. daktil4d.zip   hobbit.zip     mspacman.zip   spiders.zip
  610. daley-d1.zip   horace.zip     mssion91.zip   spinads.zip
  611. daley-d2.zip   horiza1.zip    mugsy.zip      splat.zip
  612.  
  613.   The games that don't work either use an unknown opcode,
  614. non-emulated hardware, are faulty snaps (Scumball, probably),
  615. require too close emulation of peripherals or fail for some other
  616. reason.  I believe there still is at least one emulation bug,
  617. probably in a memory store instruction.
  618.  
  619.  
  620.  
  621.                      The other executables
  622.  
  623.   Spconv.exe converts snapshots between various formats.  There
  624. are two different .sp formats of which spconv handles one.
  625. Spconv takes two arguments, eg. "spconv jsw.sp jsw.sna" or
  626. "spconv jsw.sna .z80".  Spconv also can convert straight RAM
  627. dumps (save "name" code 16384,49152) to .sna; I don't know 
  628. anything about that.  Ask Henk if you want to know, his email 
  629. address is groot@idca.tds.philips.nl.
  630.   Specdisc reads files off Disciple/MGT/+D disks, optionally 
  631. converting 48K SNP files to .sna files.
  632.   JS is a small ditty to check if your joystick behaves like mine.  
  633. It prints six numbers, minx miny x y maxx maxy, of which x and y 
  634. are the current coordinates of the joystick and the others are the 
  635. minimum and maximum values read.  The minima should close to 0 and 
  636. the maxima to 2000.  In neutral position x and y should be between 
  637. 600 and 1300, preferably between 900 and 1000.  If you get maxima 
  638. of 64000 or so, Ctrl-Break and try again, it's a bug I haven't 
  639. cared to fix.  (I know how to, but it's too much bother.)  If your 
  640. values are different from what I've said, tell me.
  641.  
  642.  
  643.  
  644.                             History
  645.  
  646.   Beta 1
  647.   First release available via anonymous FTP.
  648.  
  649.   Beta 2
  650.   New joystick routine which doesn't need calibration.
  651.   New joystick autodetect, modeled after Info+ v1.50.
  652.   LD A,R randomises the lower 7 bits of A after loading R into A.
  653.   The two unused flag bits are preserved during RLC (IX+d).
  654.   All jump destinations are placed on even addresses; supposed to 
  655. be slightly faster on the 386SX.
  656.   The border colour is read correctly from snapshots.
  657.   JPP aborts if run on a 286 or smaller.
  658.   "convert.exe" added.
  659.  
  660.   Beta 3
  661.   Partial OUTI emulation added to make Starion run.  Full 
  662. emulation would be too slow.
  663.   "extract.exe" added.
  664.   Backtracking added, but disabled due to strange crashes.
  665.   "Out of memory" handled gracefully.
  666.   IN {B,C,D,E,H,L},(C) store the result in the correct register, 
  667. not in A.
  668.   Switched to 16-colour mode; flicker-free and slightly faster.  
  669.   The normal colours have been brightened slightly.
  670.   A Kempston is always emulated, but on PCs without a joystick it 
  671. always is in the neutral position.
  672.   Some idiot (me) made the 386 stack pointer point to the Spectrum 
  673. ROM a very short while.  Not any more.
  674.   JPP now doesn't use any 386-specific instructions until it has 
  675. checked that the processor actually is a 386.
  676.   "specdisc.exe" added.
  677.  
  678.   Beta 4
  679.   Changed to a different CPU test; the old one crashed on at least 
  680. two systems.
  681.   Reenabled VGA-present test; the old CPU test made it crash.
  682.   Carved backtracking completely out of the code.
  683.   Fixed another bug in IN r,(C); carry and the two unused flag 
  684. bits are preserved.
  685.   Fixed a bug which prevented more than 50% of the screen from 
  686. flashing at the same time.  Speeded up the flash routine.
  687.   Fixed a truly horrible bug.  A routine was declared near but 
  688. called far, and so left two bytes on the stack after each 
  689. invocation, eventually overflowing the stack.  Bad shit.
  690.   *Really* fixed IN r,(C); the previous fix cancelled the one 
  691. before.
  692.   Finally wrote the exact-speed version.  No tape support yet and 
  693. it's horrible on my machine (a 16Mhz 386SX), but it may work on 
  694. fast enough machines.  Or again it may not.
  695.   Fixed a bug whereby SLA (HL) rotated a random bit into bit 0.
  696.   Fixed a bug in PJPP HALT; the clock counters weren't updated.  
  697. Now the counters are updated and the normal speed control systems 
  698. handles the HALTing.
  699.   Rewrote the sound frequency control system; I stupidly made the 
  700. sound at the correct spot in the 50Hz time slice, wasting time 
  701. until it arrived.
  702.   Added a hack to update the whole screen immediately whenever an 
  703. LDIR has destination 4000h or 5800h.
  704.   Added OUTD (partially) so International Karate will run.
  705.   Changed startup code slightly.
  706.   Added register and memory dump when the emulator aborts.
  707.  
  708.   1.0
  709.   Added support for port 255 (undocumented, returns 255 during 
  710. retrace, not 255 else).  Topgun still doesn't work.
  711.   Increased the joystick dead zone, moved the centre slightly.
  712.   JS.EXE added.
  713.   F10 now exits from JPP; not absolutely all 386es have 102-key 
  714. keyboards.
  715.   The emulator would hang if either of the last (bottom right) two 
  716. squares of the screen was flashing, due to a fencepost error.
  717.   Yet another undocumented Z80 feature!  In interrupt mode 2 all 8 
  718. bits of the supplied byte are used, not (as at least two Z80 
  719. references state) the top 7 bits with lsb 0.  Thus the interrupt 
  720. table has space for exactly 128½ addresses.  JPP now emulates it 
  721. correctly and Chequered Flag runs.  Locomotion crashes later than 
  722. it did.
  723.   Slightly changed the arithmetic/logic opcodes in the range 80 to 
  724. C0 to avoid one branch in approx. 50% of the cases.
  725.   Slightly changed {inc,dec} {b,c,d,e,g,h,a} to avoid one branch 
  726. in close to 100% of the cases.
  727.   Made the joystick presence test stricter.
  728.   Removed the automatic screen updating which followed LDIR to 
  729. 4000h or 5800h.
  730.   Changed the PJPP sound delay logic.  Shouldn't work better, but 
  731. it seems to do.
  732.   Now resets the VGA registers when the flash-colours change, to 
  733. restore mode X properly when JPP is switched back to foreground by 
  734. eg. DESQview.
  735.   Added a speed indicator to PJPP (to the right of the Spectrum 
  736. display).
  737.   Changed the interrupt system so PJPP responds to F-keys at once.
  738.   Fixed a speed control bug which I'm never going to admit I 
  739. perpetrated.  I think PJPP works properly now. *blush*
  740.   Changed the adc, add, cp, sbc and sub macros to save memory.
  741.   Improved the handling of port 255.
  742.   Changed the speed control constants to 3.5MHz from 4.0MHz.
  743.   Removed the code which I intended to restore the video after DV 
  744. fucks it up; it didn't work at all.  Use F3+Enter.
  745.   Added 'perfect' border emulation to PJPP.  The screen may 
  746. flicker a bit when the border is stripey, if it does your video 
  747. card is no good.
  748.   Added some wimpy menu stuff to the snapshot loading.  Had to put 
  749. the main dialogue in a window to work around a library bug.
  750.   Added tape support to read via the Soundblaster.  Probably 
  751. doesn't work yet.
  752.   Fixed one-character error in tape support so int 21h gets called 
  753. with ax=3f00 rather than 003f.
  754.   Added an extra delay to the sound output.  Some very fast 
  755. machines wouldn't make sound without it.
  756.   Fixed a bug in the load-snapshot routine.  It would crash with 
  757. 'divide overflow' message if it found no snapshots.
  758.   Added 50 line feeds to the initialisation, so the cursor is left 
  759. at the bottom of the screen.
  760.   Renamed JPP-486 to PJPP (for Perfect JPP) and changed this doc 
  761. accordingly.  Changed 'PJPP' in the previous sentence back to 
  762. 'JPP-486'.
  763.   Renamed PATH.JPP to JPP.CFG.  Added my own indirection module.
  764.   Added options in the config file to enable or disable the sound 
  765. and to specify the ROM file name.
  766.   Really fixed that bug in the menu code; it shouldn't divide by 0 
  767. or deference NIL pointers now.
  768.  
  769.  
  770.  
  771.                               Todo
  772.                  (don't seem to ever get done)
  773.  
  774. - Implement disk support by breakpointing the ROM save/load 
  775. routines.
  776. - Label the function keys along the top of the screen.
  777. - Implement a help screen on F1 with a picture of a Spectrum 
  778. keyboard.
  779. - Rewrite the debugger.
  780. - NMI on ESC.
  781.  
  782. These will _not_ get done.  Ever.  I'm done with JPP.
  783.  
  784.