home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / Chip_1998-03_cd.bin / hry / Sinclair / SimDOS2 / Z80FAQ.DOC < prev   
Text File  |  1996-11-10  |  14KB  |  335 lines

  1. Sinclair ZX Spectrum Emulator 'Z80' v3.05  -  11/11/96  -  by G.A. Lunter
  2.  
  3.  
  4.  
  5. ────────────────────────────────────────────────────────────────────
  6.  
  7. Z80 - Frequently Asked Questions
  8.  
  9.  
  10. 1  - How to print the diagram of the tape-interface
  11.      as shown in DIAGRAM.Z80, or make other screendumps.
  12. 2  - How to LLIST and LPRINT to a printer
  13. 3  - How to build the tape-interface
  14. 4  - What to do if the Zandbergen joystick doesn't work correctly
  15. 5  - How to contact the author
  16. 6  - Manic Miner and Jetset Willy run too fast!
  17. 7  - How to save a .SCR snapshot to tape or .TAP file
  18. 8  - Printing problems with Tasword 128
  19. 9  - What to do about an IN 0 crash?
  20. 10 - I have a .TAP file, but it doesn't work
  21. 11 - Z80 complains about lack of memory
  22.                             
  23. ────────────────────────────────────────────────────────────────────
  24.  
  25.  
  26.  
  27. ad 1. How to make a screen dump on a printer
  28.  
  29.  
  30. When the Interface 1 appeared, it was possible to attach a serial printer
  31. to the RS232 port of the Interface 1.  The emulator can redirect the RS232
  32. to the serial port of the PC, a file or a parallel (printer) port.
  33.  
  34. The SamRam can make a screen-dump on a dot-matrix printer. It is programmed
  35. for a Star SG-10.  The Spectrum 128's COPY command sends its output to the
  36. "p" printer channel, also an RS232 channel.  This will work for
  37. Epson-compatible printers.  The ZX Printer's COPY output can be translated
  38. into graphics data understandable for Epson and HP-PCL compatible printers,
  39. and finally, the DISCiPLE has also on-board screen dump routines.
  40.  
  41.  
  42. Example 1: Screen dump for Epson or HP-PCL compatible printers, via
  43.    the standard COPY command.
  44.  
  45.    Select the printer port to use for output with -XL 2 for example, to
  46.    select LPT2 for output.  Select Epson or HP-PCL output format with -0e
  47.    or -0h.  Then simply type COPY (in 48K or SamRam mode, not in 128K
  48.    mode, and neither in DISCiPLE mode; it works in +D mode though).
  49.  
  50.  
  51. Example 1: Screen dump for Star SG-10 compatible matrix printer using
  52.    the SamRam.
  53.  
  54.    Redirect the Spectrum Interface 1 RS232 output to LPT1 by pressing F4,
  55.         O, L, 1.
  56.    Load a .Z80 file, and wait for the picture you want to print to appear.
  57.    Switch to SamRam mode by pressing F10, H, 3, CTRL-ENTER, and generate an
  58.         NMI by pressing X, N.  If you're already in SamRam mode you can
  59.         simply press F5.
  60.    Press P, then 1 to print the screen.
  61.  
  62.  
  63. Example 2: Screen dump for EPSON compatible matrix printer using the
  64.    COPY command of the Spectrum 128
  65.  
  66.    Redirect the RS232 output to LPT1 by pressing F4, O, L, 1.
  67.    Load a .Z80 file, and wait for the picture you want to print to appear.
  68.    Save it as a .SCR screendump by pressing F10, X, S, name
  69.    Switch to Spectrum 128K mode (F9, 5, ENTER)
  70.    Choose '128K BASIC' from the menu, and type PAUSE 0:COPY, and press
  71.         ENTER once.
  72.    Press F10, X, L, name, to load the screen snapshot back into memory.
  73.    Go back to the emulator (ESC, ESC) and press any key to start printing.
  74.  
  75.  
  76. Example 3: Screen dump for all other printers, using DOS utilities
  77.  
  78.    Follow the steps from example 2 up to the saving of the .SCR
  79.         screen snapshot.
  80.    Leave the emulator.
  81.    Run CONVERT on the .SCR file to generate a .GIF or a .PCX file, for
  82.         example
  83.                 CONVERT b g screen.scr screen.gif,   or
  84.                 CONVERT b x screen.scr screen.pcx
  85.    Find another program that can print the .GIF or .PCX file
  86.  
  87.  
  88. Example 4: Screen dump for Epson or HP PCL compatible printers using
  89.    the routines of the DISCiPLE
  90.  
  91.    Redirect RS232 output to LPT1.
  92.  
  93.    Switch to 48K + DISCiPLE mode (or 128K + DISCiPLE) and select the ROM
  94.         with the pre-loaded D.O.S. for Epson or HP PCL compatible printers
  95.    Type COPY SCREEN$ 1 for a small screen-dump (black/white but with regard
  96.         to colors)
  97.    Type COPY SCREEN$ 2 for an A4 dump with dithered grey-tones.
  98.  
  99.  
  100. Example 5: Screen dump for Epson or HP PCL compatible printers using
  101.    the ZX Printer emulation and the ordinary COPY command
  102.  
  103.    At startup, use a combination of the switches -xl, -xj, -0e, -0h and
  104.    -0f to select the proper set-up for your printer configuration.  These
  105.    switches are best defaulted in Z80.INI.
  106.  
  107.    Make sure the emulator is in a 48K mode, SamRam is OK, or in a 128K mode
  108.    but 48K BASIC, and make sure the Disciple is not turned on (+D is fine
  109.    though).  Then, the ordinary COPY command works.
  110.  
  111.  
  112.  
  113. ────────────────────────────────────────────────────────────────────
  114.  
  115. ad 2. How to LLIST and LPRINT to a printer
  116.  
  117.  
  118. There are several ways to print things.  The standard ZX Printer output can
  119. be converted to graphics output in Epson or HP-PCL format; for this, select
  120. output port with -xl and output mode with -0e or -0h, then simply use
  121. LPRINT, LLIST and COPY to output to the "p" stream (on 48K Spectrum or
  122. SamRam; not on the Spectrum 128K).
  123.  
  124. Note that (without the -xj switch) when the actual printer goes off-line or
  125. out-of-paper or whatever, Z80 will report to the Spectrum program that the
  126. ZX Printer is non-existent.  This will prevent programs from trying to
  127. print things - some print without being asked to.  However, when this
  128. happens during printing, Z80 will try to finish its job.  The program
  129. appears to hang, but pressing the space bar once causes Z80 to stop waiting
  130. and report the ZX Printer as non-existent.  When the printer goes on-line,
  131. the ZX Printer will appear again.
  132.  
  133. All output to the Interface I's RS232 channel "b" and "t" (for raw and text
  134. output respectively; use "t" for listings) and the Spectrum 128's RS232
  135. channel "p", and the DISCiPLE/+D's centronics "p" channel can be routed to
  136. the printer port, a serial port or a disk file.  Thus, by OPEN #3,"b", "t"
  137. on the 48K Spectrum with Interface 1, or OPEN #3,"p" on the Spectrum 128,
  138. all data sent to channel 3 (i.e. printed by LPRINT or LLIST) can be routed
  139. directly to a printer.  The menu that controls this is accessed by F4, O.
  140.  
  141. The normal ZX Printer "p" channel is automatically (by an interrupt
  142. routine) converted into the DISCiPLE/+D parallel printer output channel.
  143. The DISCiPLE rom's in ROMS.BIN are set to Centronics interface by default,
  144. so LPRINT works straight away.  When a +D ROM is used, POKE @11,0 may be
  145. necessary.  The +D's "p" channel can be reset to ZX Printer output by
  146. typing POKE @11,1.  In principle, this is also possible with the DISCiPLE,
  147. but the ZX Printer port #FB is used by the DISCiPLE already, and the
  148. emulated ZX Printer will not respond to it in DISCiPLE mode.
  149.  
  150. The following POKE @'s are useful: POKE @6,0 to switch on control code
  151. conversion, POKE @8,1 to have CR's converted to CR/LF's, POKE @10,0 to
  152. switch off automatic conversion into graphics of some ascii characters.
  153.  
  154. As said above, you have to redirect the output of the Interface 1 RS232.
  155. As on a real spectrum with Interface 1, if you want to print to the
  156. Interface 1 RS232, you have to open the #3 channel.  In Spectrum Basic,
  157. type: OPEN #3,"b"  (or OPEN #3,"t" for basic listings).  Press SHIFT-ALT 4
  158. for OPEN #.
  159.  
  160. In this way you can print anything as long as your spectrum program
  161. supports printing to the Interface 1 RS232 and your printer type, or to the
  162. ZX printer.  For example, it is perfecty possible to print a textfile on
  163. your printer with Tasword 3, or make a printout with Art Studio.
  164.  
  165.  
  166. ───────────────────────────────────────────────────────────────────
  167.  
  168. ad 3. How to build the tape interface.
  169.  
  170.  
  171. The diagram of the tape interface is in the program DIAGRAM.Z80. It is easy
  172. to build, and inexpensive, since only passive components are used.
  173.  
  174. If you do not want to build the interface yourself, you can order one for
  175. BP 14.50 with B G Services.  For the address, see the Registering section
  176. in the documentation file, or the REGISTER.DOC file.
  177.  
  178.  
  179. ───────────────────────────────────────────────────────────────────
  180.  
  181. ad 4. What to do if the Zandbergen joystick doesn't work correctly
  182.  
  183.  
  184. The Zandbergen joystick interface did not work at all in version 2.01.  It
  185. works properly in V3 again.  Sorry to have kept you waiting so long...
  186.  
  187. To a fully implemented pc-joystick port, two analogue joysticks can be
  188. attached (on one plug!).  A number of multi-io cards can handle only one
  189. analogue joystick.  However, the Zandbergen joystick needs a fully
  190. implemented joystick port. If only two directions (out of four) work, your
  191. joystick port is not usable.  Use an analogue pc-joystick instead.
  192.  
  193. The joystick port of a Sounblaster is fully implemented and ok to use.
  194.  
  195. If you have more than one joystick port in your pc, you have to disable
  196. one.
  197.  
  198.  
  199. ───────────────────────────────────────────────────────────────────
  200.  
  201. ad 5. How to contact the author.
  202.  
  203.  
  204. You can contact me by normal post:
  205.  
  206.  
  207. Postal address:
  208.  
  209.         Gerton Lunter
  210.         P.O. Box 2535
  211.         9704 CM  Groningen
  212.         The Netherlands.
  213.  
  214. If it is REALLY urgent you can Email:
  215.  
  216. z80help@bgserv.demon.co.uk
  217.  
  218. Any queries which require my help will be forwarded to me.
  219.  
  220.  
  221. ───────────────────────────────────────────────────────────────────
  222.  
  223. ad 6. Manic Miner and Jetset Willy run too fast!
  224.  
  225.  
  226. True. Most of the time these games are either producing sound or executing
  227. an LDIR instruction to update the screen. Since this instruction can be
  228. emulated with a single REP MOVSB instruction of the 8086, emulation is
  229. suddenly very fast. Without sound, Manic Miner and Jetset Willy were two of
  230. very few games that were actually playable on a 8 MHz PC, and of course I
  231. don't want to slow down the emulator on slow machines!
  232.  
  233. If you turn the LDIR emulation switch on, the LDIR instruction will behave
  234. somewhat differently, important for well-protected programs. As a side
  235. effect, it will then also run at the right speed.
  236.  
  237.  
  238. ───────────────────────────────────────────────────────────────────
  239.  
  240. ad 7. How to save a .SCR snapshot to tape or .TAP file
  241.  
  242.  
  243. First make the appropriate choises in the tape menu, F7.  Then type SAVE
  244. "name" SCREEN$.  Press ENTER, and then press F10 in the one second gap
  245. between header and data block.  When saving to tape you can easily see it;
  246. when saving to disk, after pressing ENTER give the emulator a split second
  247. to save the header to disk before pressing F10.
  248.  
  249. Now load the .SCR snapshot into memory, and continue saving.
  250.  
  251.  
  252. ───────────────────────────────────────────────────────────────────
  253.  
  254. ad 8.  Printing problems with Tasword 128
  255.  
  256.  
  257. Tasword 128 does not print correctly via the "p" channel; at least, my
  258. version of Tasword 128 doesn't.  The problems can be circumvented easily by
  259. opening stream 3 for output to channel "b", i.e. OPEN #3,"b", instead of
  260. using channel "p".  A better solution is to remove the bug.  Load Tasword
  261. 128, turn on Microface 128 emulation, hit NMI (F5), choose T, then H for
  262. Hex, address 9DD3, and poke the values 01 FD 7F ED 79 32 5C 5B FB C9 into
  263. the respective addresses (pressing ENTER twice after each value); then Q
  264. and R.
  265.  
  266.  
  267. ───────────────────────────────────────────────────────────────────
  268.  
  269. ad 9.  What to do about an IN 0 crash?
  270.  
  271.  
  272. The Interface I often crashes if the 'Microdrive Data' port is accessed
  273. when the microdrive is not running.  Entering PRINT IN 0 in Basic will
  274. usually hang the Spectrum.  So, if a program reads from the 'Microdrive
  275. Data' port when it shouldn't, the emulator lets the user know that an
  276. ordinary Spectrum would have crashed at that point.
  277.  
  278. Some programs did indeed crash if an Interface I was attached; JetSet Willy
  279. is an example (just wait until it pauses, then press a key).  To use these
  280. programs, simply select the hardware mode 48K (or 128K) Spectrum without
  281. Interface 1.  In this mode the emulator won't bother about programs reading
  282. from port 0.
  283.  
  284.  
  285. ────────────────────────────────────────────────────────────────────
  286.  
  287. ad 10.  I have a .TAP file, but it doesn't work
  288.  
  289.  
  290. Could be different things.  The Warajevo emulator uses a tape file format
  291. different from Z80's, but uses files with the same .TAP extension.  Check
  292. this first.  Wavajevo comes with a utility to translate its .TAP format to
  293. Z80's.
  294.  
  295. Some programs need the R register emulation to be switched on.  Some
  296. programs will not load with an Interface 1 emulated.  Some programs are
  297. Spectrum 128K programs without saying so when loaded in an 48K machine.
  298. Switch to 128K mode (without Interface 1 to avoid troubles there) and try
  299. again.
  300.  
  301. Some programs use the standard format on tape, but use their own load
  302. routine.  Because Z80 traps the ROM and does not emulate the bips and
  303. clicks of the data, this will not work.  Convert the .TAP file to a .VOC
  304. file using TAP2VOC, and play this file back to the emulator.
  305.  
  306.  
  307. ───────────────────────────────────────────────────────────────────
  308.  
  309. ad 11.  Z80 complains about lack of memory
  310.  
  311.  
  312. Z80 itself suggests using -xt or -xu to reduce the amount of memory.  Using
  313. -xt reduces execution speed only slightly in some situations, so if this
  314. works, you might as well put -xt in the Z80.INI file as a permanent
  315. solution.  Most probably shelling to DOS will not work in this case, as DOS
  316. needs quite a bit of free memory.
  317.  
  318. The switch -xu disables Hi-res color emulation, which can be undesirable.
  319.  
  320. Z80 needs far less conventional memory if EMS memory is present.  In a
  321. Windows (95) DOS box the amount of EMS memory available can be pre-set.
  322. Use the PIF editor (Windows 3.1) or go to Properties, Memory, to set the
  323. amount of available EMS memory to about any non-zero value (Z80 needs less
  324. than 256 Kb).  This will most probably solve your memory problem in DOS
  325. boxes.
  326.  
  327. If this still doesn't work, then most probably resident programs take up
  328. much space and leave very little conventional memory to ordinary programs.
  329. See your autoexec.bat file and remove unneccessary programs.  If you do
  330. need them, try using e.g. Quarterdeck's QEMM to load as much as possible
  331. resident programs into high memory.
  332.  
  333.  
  334.  
  335.