home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / x128v05.zip / x128.txt < prev    next >
Text File  |  1996-07-01  |  44KB  |  1,147 lines

  1. X128 Spectrum 128 Emulator V0.5.
  2.  
  3. X128 is a Spectrum 128 Emulator for a Unix based machine running X-Windows,
  4. it supports 8-bit (256 colour) and monochrome screens.
  5. X128 for DOS is the MS-DOS version for the PC, a 486DX+ is recommended.
  6.  
  7. NOTE : THIS VERSION DOES NOT COMPILE CORRECTLY UNDER BORLAND C!!!!!!
  8. It does compile but produces a faulty executable (under BC V3.1 anyway).
  9.  
  10.  
  11. FIRSTLY:
  12. --------
  13. Firstly I know little about Unix.
  14.  
  15. The Unix version is supplied with a Makefile.
  16. It is recommended that these #defines are done through the Makefile, which
  17. has them in a nice easy way to fiddle.
  18.  
  19.  
  20. However there are a number of #define s that you may have to change...
  21. These are located at the top of the file x128_t.c except for LSB_FIRST.
  22.  
  23. #define LSB_FIRST
  24.  
  25. NOTE : Place this at the top of x128_end.c
  26. If your machine has LSB first memory then define this, if you don't know
  27. then you could just try compiling it both ways!
  28. NOTE : Intel processor = LSB.
  29.  
  30. #define MITSHM
  31.  
  32. This applies to the X-Windows version only.
  33. No need to change, it will autodetect, but if the autodetect is substandard,
  34. then you can switch off mitshm completely (causing even slower running).
  35.  
  36. #define Verbose 1
  37.  
  38. This applies to the X-Windows version only.
  39. Set this to 0 if you want rid of the startup messages.
  40.  
  41. #define SCALE2
  42.  
  43. This applies to the X-Windows version only, don't even think about trying
  44. it on the DOS version.
  45. What this does is double the X and Y dimensions of the window from 320x192
  46. to 640x384, this will inevitably run slower, so use this if you have a
  47. really hot machine!
  48.  
  49. #define LINUX
  50.  
  51. This is a type of Unix for the PC, and this allows some of the things that
  52. the DOS version has to be used, namely the PC internal speaker for the
  53. Spectrum internal speaker, and Adlib for the AY-3-8912.
  54. This is done using I/O, not through any C library, so if you are not running
  55. a PC based Unix then DON'T USE THIS OPTION!!  The routines write to ports
  56. 0x61, 0x388 and 0x389, these could be anything at all on other types of
  57. machines and could really mash things up, so don't do it.
  58.  
  59. If you are running another type of PC Unix, then it won't work, so don't do
  60. it.
  61.  
  62. The Adlib routine has not been tested very much, it is possible that you may
  63. have to be 'root' to get the sound to work but I don't know.
  64.  
  65. These routines were tested on the Slakware Linux V1.1.18 release.
  66. Sometimes the sound will not start, I don't know why, but when you go back
  67. to DOS you find that nothing else will make noise either!  In my case with
  68. a Sound Galaxy NX Pro card, I have to run \sgnxpro\utility\sg2 (and test the
  69. FM output) from DOS then run (of all things) Z80 before I can be sure that I
  70. can go into Linux and get Adlib output to work.
  71. This maybe due to either old version of Linux, SG card has slight differences
  72. to normal SB or maybe Linux just doesn't like you inning and outting.
  73. It is notable that whenever the startup of Linux says 'OPL2' then the sound
  74. works, and if it says 'OPL3' then it won't.
  75.  
  76.  
  77. #define OVERSCAN
  78.  
  79. All previous versions of x128 have had overscan as the default, Without
  80. overscan a 50Hz timer interrupt is used rather than t-state counting to
  81. determine screen update and interrupts, this leads to worse compatibility,
  82. no ability to deal with fancy screen effects, and flickery bits in some
  83. games.  But AY music sounds are played at a constant speed.  I don't really
  84. like this option, it is a bit of a backward step, which doesn't have any real
  85. benefits.  I didn't have time to remove it, as I was sticking to a deadline,
  86. and it doesn't work under Unix, so don't do it!  The DOS version comes with
  87. the usual x128 (with overscan) and the cornily titled x128lite (no overscan).
  88.  
  89.  
  90. LEAVE THE OTHER #defines ALONE!
  91.  
  92.  
  93. COMPILATION - UNIX:
  94. -------------------
  95. The Unix version now comes with a Makefile.
  96.  
  97. To compile, just type 'make'.
  98.  
  99. If you are short of memory try removing the -O3 option from the Makefile.
  100.  
  101. The -l... options are libraries, you should have the X11 and Xext libraries
  102. around somewhere, otherwise you can't compile this.
  103. If you have some funny X11 libraries then put them in instead, the
  104. -I option should point to where you have your include files.
  105.  
  106. If you want to have the double sized window, then I recommend you add the
  107. #define via the Makefile, so that the line in the Makefile looks like
  108. this:
  109.  
  110. CFLAGS=...... -O3 -DSCALE2
  111.  
  112. The same goes for the Linux option:
  113.  
  114. CFLAGS=...... -O3 -DLINUX
  115.  
  116. And you can do more than one:
  117.  
  118. CFLAGS=...... -O3 -DLSB_FIRST -DLINUX -DSCALE2
  119.  
  120. Using gcc is recommended, I have tried CC under Linux and it worked, but I
  121. cannot guarantee it on other machines which do not have gcc.
  122.  
  123.  
  124. COMPILATION - DOS:
  125. ------------------
  126. A Watcom C compiled EXE is supplied, so you don't have to compile it.
  127.  
  128. This has been designed to be compilable(?) on Borland C and Watcom C, it
  129. has been tested on Borland C V3.1 and Watcom C (I can't remember what
  130. version).  Note that by using Watcom C it uses the 32-bit memory model,
  131. which seems to result in a much faster EXE (or maybe it just optimises
  132. better).  Do not worry about this if you own a DX2-66 or above, because you
  133. won't notice the difference - it will still run at full speed.  In fact, on
  134. a 486SX-25 Borland does it too slow and Watcom does it a bit too slow.  It
  135. is possible that it will be acceptable on a 486SX-33 but I haven't been able
  136. to find a machine that is faster than SX-25 and slower than DX2-66.
  137. Note that the quality of video card will make a large difference to the
  138. execution speed, eg Trident = Slow.  Anything seems to be faster than this.
  139.  
  140. Anyway!
  141.  
  142. If using Watcom:
  143.  
  144. Rename makefile.wc into makefile, then do 'wmake'.  It should compile
  145. happily.  This is the recommended compiler.
  146. Note : If (when recompiling) the PC locks up, then reset the PC, delete all
  147. .PCH files then 'wmake' again, it should now work.
  148.  
  149. If using Borland:
  150.  
  151. Rename makefile.bc into makefile, then change the library path and include
  152. file path in the makefile to that of your Borland C setup, then type 'make'
  153. and it should go fine, providing that you have supplied the correct paths.
  154.  
  155. If using other:
  156.  
  157. If you are using Turbo C, then try putting #define __BORLANDC__ at the start
  158. of x128_t.c and hope for the best.
  159. If you are using Visual C, then you will probably have to fiddle with the
  160. code a bit, which will require some knowledge of Visual C - only x128_t.c
  161. should require alterations (unless outp() in AY8910.C is not allowed).  Or
  162. unless you need to change the memory allocation near the bottom of
  163. s128_def.c (grab_mem and free_mem).  The file selector code may need
  164. modification also.
  165. Also consider that a word must be 16 bits wide, this is declared in
  166. x128_end.c , but different compilers can interpret 'unsigned int' as either
  167. 16 bits or 32 bits.  If your int is 32 bits then you will have to use
  168. 'unsigned short'.  Watcom and gcc use 'short', whereas Borland uses 'int'.
  169. You can also only use a version of Visual C that can produce DOS EXE files,
  170. unless you are planning on a major alteration!  If you get this to work in
  171. Visual C then tell me about the changes.
  172.  
  173.  
  174. EASY GUIDE TO SPECTRUM FILES YOU CAN USE
  175. ----------------------------------------
  176. file.z80 : Use F5 to load.
  177. file.sna : Use F5 to load.
  178. file.slt : Use F5 to load.
  179. file.voc : Use F7 to select, then type load "" or use tape loader.
  180. file.tap : Use F7 to select, then type load "" or use tape loader.
  181.  
  182. If you get a .z80 file with other files called .dat then these will be
  183. dealt with automatically, just load the .z80 as described above, and if the
  184. filenames of the .dat files are wrong then the file selector will appear and
  185. you will have to select the correct DAT, or press ESCAPE.  If you downloaded
  186. it then this should not be the case.  If the file is a SLT format file
  187. (which has still been named .z80 at the end) then this emulator deals
  188. with it automatically.
  189.  
  190. file.dsk : This cannot deal with +3/CPC disk files.
  191. file.mdr : This cannot deal with microdrive cartridges.
  192.  
  193. Any other file type you come across cannot be handled in this version of
  194. the emulator.
  195.  
  196.  
  197. TROUBLESHOOTING - UNIX:
  198. -----------------------
  199. SYMPTOM : Compile failed with 'out of memory' style error.
  200. CAUSE   : Try removing the -O3 option and try -O2 then -O1 all the way down
  201. to -O0, this will result in faster compilation, but will cause a slower
  202. emulation.  Each one is progressively slower.  Or, if you are the head
  203. cheese of the system, then setup a bigger swapfile.
  204.  
  205.  
  206. SYMPTOM : Compile failed with a 'couldn't find' type of error.
  207. CAUSE   : Probably the X11 and Xext libraries.  If you don't have them then
  208. I don't know how I can help you.  If you have them somewhere else, then you
  209. could try messing about with the -I option to direct the compiler to the
  210. right place.  Or -l.
  211.  
  212.  
  213. SYMPTOM : The screen is all full of mush.  And no BASIC or any snap will
  214. work, but you can load stuff in using the F-keys.
  215. CAUSE   : Your machine could be the opposite endian compared to how this
  216. was compiled, try using #define LSB_FIRST or if it is defined then delete it
  217. and compile again.
  218. CAUSE   : Your display is not 8 bits per pixel (256 colour) or 1 bit per
  219. pixel (monochrome).  These are the only screen modes I have written drivers
  220. for, all you can do is see if you can alter the screen mode on your terminal
  221. to one of these values.
  222.  
  223.  
  224. SYMPTOM : On a colour screen, the colours are wrong, or are missing.
  225. CAUSE   : There is a limited number of colours allowed on screen, you may be
  226. running another application that is reserving the palette for itself, so
  227. you could try quitting x128 then closing all the other applications then
  228. try running x128 again and see if it works.
  229. CAUSE   : I did see a message somewhere from someone who said they had a
  230. 16 colour screen (4 bits per pixel), if you do then it won't work anyway
  231. as I have not written a 16 colour screen driver, and if I had it would be
  232. unlikely that I could snatch every palette colour available.
  233.  
  234.  
  235. SYMPTOM : The emulation is too slow.
  236. CAUSE   : Try removing other background processes that could be taking up
  237. CPU time, also try running x128 on a mono terminal as there is less graphic
  238. data to move about.  If you compiled without the -O3 option then re-compile
  239. using this - if your machine allows it.  If you are running on a terminal
  240. that does not use MIT shared memory then try and find one that does.
  241. Alternatively all you can do is get a faster machine or hope that a future
  242. release of this is more efficient.  Or you could try using the frame skip
  243. menu option to cause less screen output.
  244.  
  245.  
  246. SYMPTOM : The emulation is too fast.
  247. CAUSE   : You are obviously using a hot Unix workstation, so what you can
  248. do is select the menu option 'Alter Slow Down' which is a value between
  249. 0 and 65535.  The higher the number the greater the delay, 0 is no delay
  250. and 65535 is a lot!  Don't set it to a ridiculously high value, or you'll
  251. get stuck.
  252.  
  253.  
  254. SYMPTOM : The window opens up but then closes and some sort of error message
  255. appears.
  256. CAUSE   : Possibly the wrong LSB/MSB setup (see above).  Or it could be that
  257. you are running on the wrong type of screen, see if there is anyway of
  258. altering the screen mode of the terminal to 256 colour or monochrome modes.
  259.  
  260.  
  261. SYMPTOM : I exited the emulator, and now the key autorepeat is turned off!
  262. CAUSE   : The emulator turns off the autorepeat for its emulation, if you
  263. kill the window by clicking on the top left of the window and shutting the
  264. process down then the exit routine will never be reached and autorepeat
  265. will remain off (unless you kill the window while the fileselector is on,
  266. in which case the autorepeat is turned on).  You may be stuck by the number
  267. of function keys on your terminal though, since F10 is quit and I have seen
  268. some Unix machines that have only 8 function keys...  In this case use the
  269. F1 or Help keys, then you can choose any function key option from the
  270. little menu.
  271.  
  272.  
  273. SYMPTOM : The file selector will not open.
  274. CAUSE   : Desperate shortage of memory!  Close some other windows.  There
  275. is a line in x128_t.c which says:
  276. #define FSL_BUFF UNIT_SIZE*2048
  277. The 2048 is the number of files in a directory, so you could change this to
  278. something less and recompile.
  279.  
  280.  
  281. SYMPTOM : Some of the function keys don't work.
  282. CAUSE   : Some X-windows managers like to steal the function keys for its
  283. own purposes.  As long as F1 or Help work, then you can pick any option.
  284. CAUSE   : Unix terminals tend to have different numbers of function keys
  285. on their keyboard.  Use F1 (or Help key) to select any of the options.
  286.  
  287.  
  288. SYMPTOM : Linux is returning no sound.
  289. CAUSE   : You did not compile with -DLINUX in the Makefile, or you did but
  290. the compiler used the old object files, so make sure that -DLINUX is in the
  291. Makefile and delete the *.o files.
  292. CAUSE   : You do not have an adlib card.
  293. CAUSE   : You do not have permission to access the I/O ports, so try this
  294. as root instead.  (Unless someone else is root!)
  295. CAUSE   : The sound is toggled off, press F11 or select the option from
  296. the help menu (F1).
  297. CAUSE   : Sometimes the Adlib card likes to produce no sound when you get to
  298. Linux, try running an Adlib test program before x128 to try and reset the
  299. soundcard into working order again, even if this means using a DOS program
  300. then going into Linux.
  301.  
  302.  
  303. TROUBLESHOOTING - DOS:
  304. ----------------------
  305. SYMPTOM : The emulation is too slow.
  306. CAUSE   : Try running this in DOS, if you are using a Windowed environment,
  307. If you compiled this then try re-compiling with more optimisations (varies
  308. depending on compiler).
  309. Alternatively all you can do is get a faster machine or hope that a future
  310. release of this is more efficient.  Or use the frame skip option, see near
  311. the top of this document on how use this option.  Another option is to get
  312. your hands on a much faster video card.
  313.  
  314.  
  315. SYMPTOM : The emulation is too fast.
  316. CAUSE   : You must be using a Pentium or DX4 processor, or you have a very
  317. fast video card.  What you can do is select the menu option 'Alter Slow
  318. Down' which is a value between 0 and 65535.  The higher the number the
  319. greater the delay, 0 is no delay and 65535 is a lot!
  320.  
  321.  
  322. SYMPTOM : The EXE supplied will not run.
  323. CAUSE   : Make sure you are using a 386 or above, if you compiled with a
  324. 16-bit memory model then make sure you have about 500K base memory or more.
  325. CAUSE   : DOS4GW returns an error.
  326. Oh dear.  Try the following things:
  327.  
  328. set DOS16M=+  (this tries to fix problems with funny memory).
  329.  
  330. or, for example:
  331.  
  332. SET DOS16M=@2M-4M  (this will force DOS4GW to use the memory 2Mb to 4Mb)
  333.  
  334. Otherwise try and get a 16-bit compiled EXE.
  335.  
  336.  
  337. SYMPTOM : The Borland C makefile will not compile the emulator.
  338. CAUSE   : Make sure that the library path and include file path in the
  339. makefile have been set correctly, as in the Borland C IDE (Alt-O then D).
  340. CASUE   : Since V0.4 I have not managed to get it to work either!
  341.  
  342.  
  343. SYMPTOM : The file selector will not open.
  344. CAUSE   : Desperate shortage of memory!  Free up some memory before running.
  345.  
  346.  
  347. INSTRUCTIONS:
  348. -------------
  349. Once you have typed 'x128' to run the emulator and the 128 BASIC screen
  350. has appeared (hey, monochrome users can't see the menu bar!) then the
  351. following function keys are available:
  352.  
  353.  
  354. F1 - HELP
  355. ---------
  356. This brings up a list of the functions keys available, on the Spectrum
  357. window, press ESCAPE to go back to the emulation.  This can also be brought
  358. up by the 'help' key on some Unix keyboards.
  359. Now when you bring up this option, you can select the function of any
  360. other function key from the menu that appears, by using cursor up/down and
  361. return to select.  The selected option will have a > beside it.  When you
  362. have completed the selected option, you will return to the emulator, not
  363. the help screen.
  364.  
  365. Options available here that aren't available anywhere else are:
  366.  
  367.  
  368. Alter ULA Delay:
  369.  
  370. This controls the lining up of overscan bits (see F8 and F9 keys), the
  371. max. value is 255.
  372.  
  373.  
  374. Alter Frame Skip:
  375.  
  376. This allows you to set up the screen update, 1/1 is full update, 1/255
  377. updates the screen once every 255 times.  1/0 is effectively 1/256.
  378. Note that most other emulators have 1/2 as the default whereas x128
  379. usually starts as 1/1 screen update.
  380.  
  381.  
  382. Alter Slow Down:
  383.  
  384. I've got a for loop in the code that is executed every Z80 instruction,
  385. this causes a slowdown for the benefit of fast machines, the upper bound
  386. is determined by this value (which can be between 0-65535).  0 is no
  387. delay, indeed the for loop is not even executed.  65535 is a huge delay,
  388. where you can see the display build up a line at a time (but on Unix
  389. you'll just get stuck if you set it too high).
  390.  
  391.  
  392. The values can be changed by moving the cursor to the option and pressing
  393. left (-1), right (+1), page up (-10) or page down (+10).
  394. Remember that Page up/Page Down is -/+ on the keypad for some Unix
  395. machines.
  396. The values will wrap round if you try to pass 0 or its maximum value.
  397. These options don't return to the emulator when you select them, you have
  398. to press Escape.
  399.  
  400.  
  401. Keyboard Issue:
  402.  
  403. Press return to toggle between issue 2 and issue 3, where issue 3 is by
  404. far the most common.  Occasionally a program will need this option to be
  405. set to 2 (usually an old program) otherwise the keys won't respond.
  406. A .Z80/.SLT file will change this value when you load it.
  407. Note that all 128K Spectrums were issue 3 and some Spectrum 48K were
  408. issue 2, but not that many.
  409.  
  410.  
  411. Note that options like load snap, save z80, joystick select, memory mode,
  412. etc return to the help menu, so that you can load in a snap and resave it
  413. with changed settings.
  414.  
  415.  
  416. F2 - NMI (M128)
  417. ---------------
  418. Yes, the Multiface 128 by Romantic Robot, all you need is the ROM!  It has
  419. to be called mf128.rom and be 8192 bytes long.  Without it, this will crash
  420. the Spectrum when you press F2.  This ROM is such a hot ware, that I am
  421. risking my life just by talking about it!  If you can get the Genie 128
  422. software then you have a push button disassembler on your hands.
  423.  
  424. Note that pressing the button more than once causes a crash, just like the
  425. real thing!
  426.  
  427.  
  428. F3 - RESET/MEMORY MODE
  429. ----------------------
  430. From here you have a little menu that you can select reset to 48 or 128
  431. mode, or you can try to swap modes with no reset, note that from 128 to 48
  432. no reset mode that ram page 0 will be slotted in regardless of what ram
  433. was actually paged in.
  434. You can use cursor up/down to move, return to select and escape to abort
  435. selection.
  436.  
  437. You are on your own trying to work out the keywords in 48K Basic.
  438.  
  439.  
  440. F4 - JOYSTICK SELECT
  441. --------------------
  442. This will map one of 4 joystick possibilities (Kempston, Sinc 1, Sinc 2 and
  443. Cursor onto the cursor keys and TAB for fire.
  444.  
  445. You will see the 4 options and a > which points to the current option.  To
  446. select one use cursor keys up and down then press return to select.  To
  447. abort and use current option, press ESCAPE.
  448.  
  449. You can press left or right to toggle caps on/off for cursor keys.
  450.  
  451. Note that .Z80 files set the joystick configuration when loaded.
  452. Whether cursor has caps shift included is not stored in a .Z80 and you
  453. may have to change this yourself.
  454.  
  455.  
  456. F5 - LOAD SNAP FILE
  457. -------------------
  458. Yes, this will allow you to load, at any time, a V1, V2 or V3 .z80 file in
  459. 48K or 128K mode (it will automatically pick the correct mode for the snap).
  460. This also allows loading of .sna files and .slt files.
  461.  
  462. These files are exactly the same format as those used by the famous Z80
  463. Spectrum emulator for the PC.  Note that any hardware like Interface 1,
  464. SamRam or MGT will be stripped off and ignored, if that piece of hardware
  465. was paged in at the time the Z80 was saved, then it might not work.
  466. But this is not usually the case.
  467.  
  468.  
  469. F6 - SAVE Z80 V2/SLT FILE
  470. -------------------------
  471. This allows you to save the whole of memory to a snapshot file.  It can
  472. save in 48K or 128K mode and will decide by itself what memory it has to
  473. save.  The resulting file can be loaded back in using F5, or can be loaded
  474. in by another emulator that supports Z80 V2 files.
  475. This option is good for cheating at games.
  476.  
  477. A little window will pop up containing the full path of the last Z80 file
  478. loaded, you can type the name you want, and you can use backspace or delete
  479. to ... delete a character, you can choose the directory to save to by
  480. altering the path.  If you decide that you didn't want to save after all
  481. then press ESCAPE.  The code will try to be clever and determine whether you
  482. have typed .z80 at the end of the line, and append it as necessary, but you
  483. could still confuse it by calling a filename a.a or whatever.
  484. If the file you are trying to save already exists then you will be given
  485. the message 'Overwrite(Y/N)?'.  You can reply 'y' to overwrite, 'n' to abort
  486. and ESCAPE to abort also.
  487. If you are saving a .SLT file, then the level data will be appended to the
  488. newly saved file (which will have .SLT as its extension), however try to
  489. make sure that you have space on your drive otherwise it is possible you
  490. could create difficulties.  Let me elaborate:
  491.  
  492. If there is no permission to create the temporary file (dump.tmp), then
  493. the save will be aborted with no difficulty.
  494.  
  495. If there is no permission to create the final completed file, then you
  496. will be left with 2 separate files which you will have to merge from the
  497. command line.  (If you were trying to overwrite then you have probably
  498. lost data.)
  499.  
  500. So you would have to exit the emulator, then (after clearing space),
  501. you will have to do:
  502.  
  503. DOS:
  504. copy /b file.z80 dump.tmp new.slt
  505.  
  506. Unix:
  507. cat file.z80 dump.tmp >new.slt
  508.  
  509. (I think).
  510.  
  511. Note that dump.tmp will always be saved in the directory you were in when
  512. you started the emulator, so make sure you have write permission to that
  513. directory!
  514.  
  515.  
  516. F7 - SELECT TAP/VOC FILE
  517. ------------------------
  518. You want multiload games on emulator, yes?  Well, this allows it to happen
  519. by being a file containing a string of just the important data from saves.
  520.  
  521. These TAP files are the Z80 compatible files, NOT the Warajevo emulator
  522. ones, they won't work at all.
  523.  
  524. Firstly select the file from the file selector.
  525.  
  526. To load a file you must either:
  527.  
  528. Use the 128 BASIC Tape Loader (just press return).
  529. In 128 BASIC (type load Meta-P Meta-P Return).
  530. In 48 BASIC (type J Meta-P Meta-P Return).
  531.  
  532. (Meta is the diamond shape, you can also use ALT).
  533. (On the DOS version use CTRL).
  534. (You can now use SHIFT-' for ")
  535.  
  536. Note for monochrome users: when you start up the invisible bar is on the
  537. Tape Loader option.
  538.  
  539. A VOC file is a Creative Voice Sample File, ie a multimegabyte-sized sample
  540. of your Spectrum cassette, you will have to make this on your own using
  541. some sampler and whatever.
  542.  
  543. The VOC file emulation is pathetic, some games that work on Z80 will not
  544. work on this, I have no idea why, when you are making the VOC you need
  545. perfect, and I mean PERFECT conditions.  Good tape, good deck, Azimuth screw
  546. lined up and Volume on SB input set to high.  Out of 5 games I managed to
  547. get 1 to work (SDI, Speedlock 3 or 4).  The same 4 that didn't work, would
  548. not load in Z80 either, but they did get further.  Also there is the problem
  549. of bad sampling software that likes to save bits to disk while it should be
  550. listening to the tape!  Also I have not emulated the 'silence block' that
  551. some samplers will try to save.
  552.  
  553.  
  554. F8 - VOC OPTIONS
  555. ----------------
  556. 'VOC OPTIONS' is not a very catchy name, it is also not a very good use of
  557. an entire F-key, with a couple of fiddly options no-one will ever use.
  558.  
  559. Threshold : The data in the VOC file is stored as a char with 128 as its
  560. centre, the value 128 is total silence and the rest represent positive
  561. and negative sound values (with 255 and 0 being the loudest), so the
  562. threshold is added to and subtracted from 128 to determine what is silence
  563. and what is noise, after all, a Spectrum tape will not be saved with
  564. CD-quality sound, there will be tiny amounts of fuzz and noise that must be
  565. ignored.  On a really noisy tape you might want to increase the threshold
  566. to ignore more of the noise, on a ridiculously quiet tape you could reduce
  567. the treshold.
  568.  
  569. No_of_t_vary : More of a debug option for me than a usable option for you,
  570. quite simply, setting this to a value 1-127 is useless.
  571. Setting it to 128-255 (where 255 is -1 and 254 is -2 etc) may do something,
  572. it will load the VOC slightly faster (but not noticeably) and may on some
  573. occasion cause the VOC to work better, the value 230 is the most useful.
  574.  
  575.  
  576. SHIFT-F8 - INCREMENT ULA DELAY
  577. ------------------------------
  578. T-States are a tricky business.
  579.  
  580. The Spectrum +2A manual says that there are 228 t-states in a screen line.
  581. Z80 Emulators documentation says 224.
  582. (It turns out that the Spectrum 48K uses 224*312 and the 128K uses 228*311
  583. which is now supported).
  584. Games that you try say 'Any number, all different'.
  585.  
  586. This adds a value to the number of t-states counted at the end of every
  587. screen line (192 of them).
  588. So you can use this option to help align up that nice overscan bit on the
  589. screen.
  590.  
  591. This option usually moves overscan bits DOWN the screen.
  592.  
  593. Now, 4 t-states are added to the counter every time you try to write to
  594. memory between 16384-32767 while the screen is being updated by the ULA,
  595. this lines up the effect in Agent X 2 nicely.  (But you don't have to do
  596. this anymore).
  597. It starts at 0, if you move too far, the emulator performance will start
  598. to be unusual, as this will affect the number of instructions between
  599. interrupts.
  600. The ULA Delay is reset to 0 every time you reset or load a snapshot.
  601.  
  602.  
  603. F9 - NO FUNCTION
  604. ----------------
  605. Ah!  Future development!  I expect that I will put the advanced SLT options
  606. here, you should have the ability to view the loading screen, instructions,
  607. pokes and scanned JPGs of the cover (no chance).
  608. At the moment it does the same as SHIFT-F9.
  609.  
  610.  
  611. SHIFT-F9 - DECREMENT ULA DELAY
  612. ------------------------------
  613. See above for information.
  614.  
  615. This option usually moves overscan bits UP the screen.
  616. Once you reach 0, it will not go into negative numbers.
  617.  
  618. The ULA Delay is reset to 0 every time you reset or load a snapshot.
  619.  
  620.  
  621. F10- QUIT
  622. ---------
  623. This will quit the emulator and close the window and all that sort of thing,
  624. and yes it does remember to de-allocate the memory and close the TAP file.
  625. On exit you will be told what ULA Delay you had.
  626.  
  627.  
  628. F11- SOUND OPTIONS
  629. ------------------
  630. You see three useful options:
  631.  
  632. Sound is On/Off : Press left/right to toggle this.
  633.  
  634. Create/Close PSG File : This allows you to log the OUTs to the AY-3-8912
  635. sound chip, you will be asked for a filename, it will automatically have a
  636. .psg extension, the files are then playable using the utility PSGPLAY, which
  637. comes with the Unix version of fMSX (/dev/dsp or /dev/audio), a DOS PSGPLAY
  638. doesn't exist yet (I think).  Note that all interrupt marks are 0xFF and the
  639. multiple marks are not used.
  640.  
  641. White Noise On/Off : I have added some really pathetic emulation of the white
  642. noise of the AY-3-8912 through the Adlib card, using the snare drum channel,
  643. so I have included this option to turn it off.
  644.  
  645.  
  646. MULTIFACE 128
  647. -------------
  648. By pressing F2 the M128 menu will appear, if you have the ROM.
  649.  
  650. The ROM:
  651.  
  652. mf128.rom 8192 bytes long, and is a dump of the values of the Spectrum from
  653. 0-8191 AFTER the mf128 rom has been paged in.
  654.  
  655. It is also tightly entombed within the file ROMS.BIN that comes with Z80.
  656.  
  657. The MF128 pages in 16K, of which 8K is ROM and 8K is RAM:
  658.  
  659. 0-8191     ROM
  660. 8192-16383 RAM
  661. 16384+     Usual Spectrum memory.
  662.  
  663. The memory is paged in and out like so:
  664.  
  665. IN A,(191) Pages MF128 in.  Returns 127 if the normal Spectrum screen is
  666. visible, or returns 255 if using the 128K second screen in RAM 7.
  667. IN A,(63)  Pages MF128 out.
  668.  
  669. When the MF128 is paged in, OUTs to 32765 still work, so that you can access
  670. all RAM, but for ROM the OUT to 32765 dictates which ROM will be visible
  671. after you page the MF128 back out.
  672.  
  673. The NMI goes like this:
  674.     iff2=iff1;
  675.     iff1=halt=0;
  676.     push(pc.W);
  677.     pc.W=102;
  678.     in(191); /* This bit for MF128 only */
  679.  
  680. Also t_state may increase by 11 and the R-reg may go up but this is
  681. uncertain.
  682.  
  683. The fact that half is ROM and half is RAM presents the problem of having to
  684. write-protect an 8K area, which means you have to rethink your memory
  685. structure and change it to 8K blocks.
  686.  
  687.  
  688. USING THE FILE SELECTOR
  689. -----------------------
  690. Use the cursor keys to move up and down, the file selected is the one at
  691. the top (with the inversed colours).
  692.  
  693. Directories are Magenta and Black with a slash preceeding the name.
  694. File are Blue and White.
  695. Drives (PC) are Cyan and Black.
  696.  
  697. You can change directory/drive by pressing return while it is being pointed
  698. to, the listing of that directory will then appear for you to view.
  699.  
  700. Keys:
  701.  
  702. Up/Down : Move Up 1 file/Down 1 file.
  703. Page Up/Page Down : Move up 22 files/down 22 files.
  704. Home/End : Move to the top/bottom of the list.
  705. Return : select the file/drive/directory.
  706. Escape : leave the file selector without loading anything.
  707.  
  708. Note that I couldn't get page up/down or home/end to work on the Unix
  709. keyboard, so page up and down is now replaced by - and + on the keypad.
  710. - is page up and + is page down.  Look at the keypad, the + is below the -,
  711. this will soon become instinctive!  Page Up and Page Down do work on
  712. Linux though.
  713.  
  714. Another feature is the file search by typing letters, so if you press 'b'
  715. the pointer will be moved to the first file (not directory) that starts
  716. with 'b' (case insensitive).  If the search was successful, then when you
  717. type another letter you will be searching for the 2nd character position
  718. and so on, if a search fails, (in which case the pointer will not move) the
  719. next attempted search will begin with the first character again.
  720. If you move the pointer with cursor keys, page keys or home/end then the
  721. next search will be on the first character.  Also included in the term
  722. 'letters' are numbers and some punctuation symbols.
  723.  
  724.  
  725. COMMAND LINE OPTIONS
  726. --------------------
  727. You can get x128 to do things from the command line by adding the following
  728. parameters:
  729.  
  730. x128 /?
  731. Shows all the command line options available.
  732.  
  733. x128 /48
  734. Resets to 48K mode on startup.
  735.  
  736. x128 /128
  737. Resets to 128K mode on startup (default).
  738.  
  739. x128 /quiet
  740. This starts up the emulator with the sound off, it can still be switched
  741. back on by F11 or the help option.
  742.  
  743. x128 /delay <number>
  744. This sets the slow down delay (0-65535), eg x128 /delay 30000
  745.  
  746. x128 /frame <number>
  747. This sets the frame skip value (0-255), eg x128 /frame 4
  748.  
  749. x128 /ula <number>
  750. This sets the ULA delay (0-255), eg x128 /ula 30
  751.  
  752. NOTE: With all these numerical options, entering non numbers, or numbers
  753. that are too large will cause confusion.  Generally it will decide that
  754. the value should be set to 0, but in the case of /frame this is
  755. effectively 1/256 so you will get a big delay before the screen updates,
  756. so don't enter bad numbers!
  757.  
  758. x128 <filename>
  759. If the filename is a sna or z80 then it will automatically load (and /48
  760. and /128 will be overridden by the type of snap loaded).  This will work
  761. for slt files as well.
  762. If the filename is a tap then it will be selected, but you will still have
  763. to load it via the tape loader or by typing load "".
  764. I suppose this means that x128 can now be used in this 'play spectrum games
  765. across the web thingy'.
  766.  
  767.  
  768. SLT FILES & UTILITIES
  769. ---------------------
  770. The .SLT file is a new file format, it is best described as 'exactly the
  771. same as the DAT file idea, but all in the one file for ease and space
  772. saving'.
  773.  
  774. Two utilities are supplied DAT2SLT and SLT2DAT.
  775.  
  776. DAT2SLT, use this to squash all the files of a Z80 and DATs into a single
  777. SLT file (you must use a V2 or V3 .Z80 as the main part of the file, if
  778. the main file is a .SNA or a V1 .Z80 then convert it to a V2 .Z80 by using
  779. the help menu load and save options within the emulator.)
  780.  
  781. Usage:
  782.  
  783. dat2slt robo robot
  784.  
  785. This will squash robo.z80 and robo*.dat into the file robot.slt .
  786.  
  787. dat2slt roborobo roborobo /dos
  788.  
  789. This will squash the roborobo.z80 and roborobo*.dat into the file
  790. robo.slt , but the filenames of the .dat files that are searched for will
  791. be in the DOS format, ie only 8 letters, for example, under Unix if you
  792. are looking for level 1 of roborobo, then the name of the DAT is:
  793.  
  794. roborobo1.dat
  795.  
  796. but for DOS it is:
  797.  
  798. roborob1.dat
  799.  
  800. So use /dos if you are dealing with DOS style DATs under Unix, of course
  801. you do not have to do this if you are running it on a PC.
  802.  
  803.  
  804. SLT2DAT, use this to undo all the files.
  805.  
  806. Usage:
  807.  
  808. slt2dat robo bog
  809.  
  810. This turns robo.slt into bog.z80 and bog*.dat , you can use /dos if you
  811. wish (default for PC version) this can also be used as an easy way to
  812. rename a set of DATs.
  813.  
  814.  
  815. When overwriting a .slt file within the emulator (for example, you are
  816. regularly saving your progress through a game) the emulator will try to
  817. append all the level data of the old .slt onto the new one.  Exactly
  818. what will happen if the space on your drive is too low is best described
  819. as 'undefined'.  The emulator will spawn the dat2slt and slt2dat
  820. utilities so make sure they are in the same directory as the emulator.
  821. This will mean that a large number of files will be around during the
  822. saving, basically you will require approximately 2 or 3 times the size of
  823. the original SLT file of space on your drive.
  824.  
  825. The loading screen option now included, means that once the SLT has loaded,
  826. the screen is read from the SLT file and displayed before the SLT starts, you
  827. then press a key to start the SLT, this allows lazy-boys to add loading
  828. screens to bad quality snaps with no programming knowledge required.  All you
  829. have to do is have the 6912 byte long loading screen called <name>.scr in
  830. the directory along with all the other <name> files then run dat2slt as
  831. usual.
  832.  
  833.  
  834. GOOD BITS:
  835. ----------
  836. Emulation of all known opcodes.
  837.  
  838. Emulation of undocumented opcodes, even the ones between ED40-ED7F that
  839. are listed in Z80.DOC which never get used.
  840.  
  841. Runs on 8-bit or mono terminal and autodetects (Arnolds bit).
  842.  
  843. Autodetect MITSHM (Arnold again).
  844.  
  845. Careful timing of screen output to allow screen accuracy of 8x1 pixels and
  846. border accuracy of one colour per line.
  847.  
  848. Ability to line up overscan bits on the screen, as it seems that different
  849. games and different Spectrums had slight speed differences, this is often
  850. as much fun as the game itself.
  851.  
  852. Some emulation (on DOS) of AY-3-8912 soundchip, this part by Marat
  853. Fayzullin & Alex Krasivsky.  Now with added shoe cleaning noise.
  854.  
  855. Joysticks (as seen in Z80) are mapped onto the cursor keys.
  856.  
  857. Load ANY type of Z80 file, and play!
  858.  
  859. Gauntlet is now playable on a 486SX-25 (with good video card)!
  860.  
  861. Option (at compile time) to have a double size window in X-Windows, the
  862. window is 640x384 pixels.
  863.  
  864. ED FB level loader trap supported.  It will try .dat first then .DAT before
  865. saying it can't find it.  Also will try the DOS style then the Unix style
  866. filenames before admitting defeat.
  867.  
  868. Hot file selector!
  869.  
  870. Save Z80 V2 snap files in 48 or 128 mode.
  871.  
  872. SLT format files are supported, load, save and also includes the additional
  873. loading screen as seen in the advanced specification.
  874.  
  875. Alter keyboard issue, caps (with cursor), ula delay, slow down and frame
  876. update within the emulator dynamically at any time.
  877.  
  878. VOC file loading.
  879.  
  880.  
  881. BAD BITS:
  882. ---------
  883. Speed : Not bad at all!  The DOS version still runs faster?  But....
  884. The speed is very up and down, causing irregular AY playing, but this tends
  885. to even out on a faster PC (a bit).
  886.  
  887. No support for any terminals that use 2, 4, 16, 24 or 32 bits per pixel.
  888.  
  889. Overscan in some demos, is off line and cannot be fixed with F8 and F9
  890. fiddling (Although the new ULA delay/memory cycle is closer than before).
  891.  
  892. AY sound is incomplete, and some sounds are now played at a fixed volume due
  893. to the fact that envelopes aren't emulated.
  894.  
  895. The Overscan Demo.  It times the Spectrum to determine which model it is,
  896. and if it doesn't like the timing it will refuse to put any colour on the
  897. screen!
  898.  
  899. Look:
  900.  
  901. 33339 ei
  902. 33340 halt (interrupt jumps to 32512)
  903. 32512 ld (33154),hl (redirects interrupt to jump to 33348)
  904. 32515 ei
  905. 32516 inc bc
  906. 32517 jr 32516 (this is exited by interrupt)
  907. 33348 .....
  908.  
  909. (I=128, points to 33153, all in uncontended memory)
  910. (SP=33280, in uncontended memory)
  911.  
  912. This is the code used in Overscan Demo, it is entered with bc=0 and the
  913. interrupt routine just a jp 32512, ld (33154),hl sets the
  914. jp to 33348 which is the comparing routine.
  915.  
  916. Consider that 33345 and 33346 take up 18 t-states, and that there are 70908
  917. t-states in the 128Ks interrupt cycle.  70908/18=3939 so that bc should
  918. equal approximately 3939.
  919.  
  920. x128 has bc=3937,
  921. A real Spectrum 128 has the value bc=3185 !!!
  922. Z80 V3.02 gives the value bc=2803 (I have no idea where it gets this from).
  923. Z80 V3.03 has the value bc=3212 which is a bit unlucky because it just
  924. falls outside the timing required:
  925.  
  926. This is the timing desired by the comparing routine:
  927.  
  928. 3115-3131 Spectrum 48K
  929. 3177-3193 Spectrum 128K/+2
  930. 3608-3624 Spectrum +2A/+3
  931.  
  932. Note that Z80 V3.03 in 48K mode produces bc=3155, which is unlucky again!
  933.  
  934. The reason for this is the slowdown caused by the code executing below
  935. 32768 (contended memory), as a result - the loop is executed less times
  936. than usual before the interrupt occurs.
  937.  
  938. When you think about it, if you want to get the emulator to return 3185
  939. as the value then:
  940.  
  941. (19 = IM 2 setup time, 16 = ld(NN),hl, 4 = ei)
  942.  
  943. 70908 - 19 - 16 - 4 = 70869 (slowdown ignored in this case)
  944.  
  945. 70869/3185 = 22.251 t-states
  946.  
  947. If you want to assume full slowdown then,
  948.  
  949. (19 = IM 2 setup time, 28 = ld(NN),hl, 8 = ei)
  950.  
  951. 70908 - 19 - 28 - 8 = 70853 (assume 4 extra t states per mem read)
  952.  
  953. 70853/3185 = 22.245 t-states
  954.  
  955. In other words, 'inc bc' and 'jr -3' must be set up to take about 22.25
  956. t-states for the Overscan Demo to detect properly.
  957.  
  958. But, 22 or 23 is not good enough,
  959.  
  960. (first 70869 t's then 70853 t's)
  961.  
  962. 22.0 would give bc=3221 or bc=3220 (illegal)
  963. 23.0 would give bc=3081 or bc=3080 (illegal)
  964. 22.1 would give bc=3206 or bc=3206 (illegal)
  965. 22.2 would give bc=3192 or bc=3191 (legal)
  966. 22.3 would give bc=3177 or bc=3177 (on the limit, probably outside)
  967.  
  968. So there you go, it is impossible to get the overscan demo to work without
  969. introducing tenths or indeed hundredths of t-states.
  970.  
  971. And how would the time lag on the loop be split up??
  972. You have 4.25 t-states to split up between three contended memory reads
  973. this doesn't work too well on integer numbers, and the .25 is too important
  974. to cut off.
  975.  
  976. As a result, overscan demos that have auto-calibration will not work, as
  977. I have given up the mem read delay (unless someone comes up with some good
  978. ideas), the auto-detect routines in these demos use the mem read delay,
  979. but the actual overscan routine will often be more dependent on the mem
  980. write delay (which I have included, as a 4 t-state delay) so things with
  981. non-calibration will look better.
  982.  
  983. Aquaplane is dependent on both read and write delay, due to the way it has
  984. it's code in contended memory, and as a result is off line.  You will have
  985. to use ULA delay to line it up.
  986. If you want to run the Overscan demo, then set ULA delay to 30, then press
  987. return then break (to get back to 'you have incompatible...') and when you
  988. press return again, you should have a nice mess on the screen, which you
  989. can partially line up with ULA delay, but not perfectly.
  990.  
  991.  
  992. FUTURE IMPROVEMENTS:
  993. --------------------
  994. Top and bottom borders, at least 24 pixels worth either side.
  995.  
  996. Speed : Ever Better.
  997.  
  998. Shading for the double sized window on mono screens.
  999.  
  1000. Maybe the ability to save taps.
  1001.  
  1002. I don't see how I could do sound, surely all machines are so different?
  1003. (Well, proper sound).  Ah!  Use a 'dsp'.
  1004.  
  1005. Better t-state timing for overscan demos.
  1006.  
  1007. Emulator figures out what speed it is going at, and allows you to enter
  1008. a percentage rather than a number for the slow down delay.
  1009.  
  1010.  
  1011. HOW TO GET GAMES:
  1012. -----------------
  1013. Check ftp and www sites for files, Norway seems to have a lot.
  1014. There are some on ftp://altair.komkon.com (good for USA)
  1015. Try ftp://ftp.nvg.unit.no
  1016. Most sites will be in Europe.  Try doing a web search for 'Sinclair' or
  1017. 'Spectrum' if you have plenty of spare time that is.
  1018. You could register Z80 and get a tape interface and plusd file copier.
  1019.  
  1020.  
  1021. CREDITS:
  1022. --------
  1023. James McKay : me : Author of the big (getting less) rubbish bit of the code.
  1024.  
  1025. e-mail com40014@paisley.ac.uk
  1026. Until June/July when I will probably become a bin man.
  1027.  
  1028. Marat Fayzullin : Wrote the original Unix/X drivers for VGB and fMSX, and
  1029. I used these in x128.  Also his source gave the idea about how to access a
  1030. variable as bytes and words at the same time.  Also the AY emulation is
  1031. written by Alex Krasivsky and him.
  1032.  
  1033. http://www.freeflight.com/fms/
  1034. ftp://altair.komkon.com
  1035. e-mail fms@freeflight.com
  1036.  
  1037. Arnold Metselaar : Wrote improved Unix drivers for fMSX, I tore this to
  1038. pieces to make the mono screen for x128.
  1039.  
  1040. e-mail metselr@fys.ruu.nl
  1041.  
  1042. ALSO:
  1043. -----
  1044. Gerton Lunter : His Z80.DOC that came with his emulator, was a very useful
  1045. technical reference.  Maybe if I get V3.04 it will be an even better one.
  1046. Spectrum +2A Manual by Amstrad.
  1047. Master Machine Code On Your Amstrad CPC 464 And 664 by Jeff Naylor and
  1048. Diane Rogers.
  1049. Understanding Your Spectrum by Dr. Ian Logan.
  1050. My Spectrum 128 with it's dodgy keyboard.
  1051.  
  1052.  
  1053. HISTORY OF DEVELOPMENT:
  1054. -----------------------
  1055.  
  1056. V0.0 Date (UK DD/MM/YY) : 02/02/96
  1057. V0.1 Date (UK DD/MM/YY) : 08/02/96
  1058. V0.2 Date (UK DD/MM/YY) : 26/02/96
  1059. V0.3 Date (UK DD/MM/YY) : 19/03/96
  1060. V0.4 Date (UK DD/MM/YY) : ??/05/96
  1061. V0.5 Date (UK DD/MM/YY) : ??/06/96
  1062.  
  1063.  
  1064. V0.4 Bugs Fixed:
  1065.  
  1066. * Checksum calculated properly in situations where less bytes are requested
  1067. than are available (in a TAP), so Frank Bruno now works.
  1068.  
  1069. * You can now save Z80 files!  A bug meant that it tried to save SLT files
  1070. all the time.
  1071.  
  1072. * Some SLTs would not load (any one with a level 0) this has been fixed.
  1073.  
  1074. * Any channel with volume governed by the envelope generator would not play
  1075. at all, now it plays at a fixed value.
  1076.  
  1077. * Kempston now read from any port that has bit 5 (32) reset, so that Command
  1078. Quattro etc works properly, thanks to information from Rui Ribeiro.
  1079.  
  1080.  
  1081. V0.5 Improvements:
  1082.  
  1083. * New method of write-protecting ROM allows for faster memory writes.
  1084.  
  1085. * Now saves PSG files.
  1086.  
  1087. * For the second time, I have been unable to find any Z80A bugs.
  1088.  
  1089. * SLT file format now includes Loading Screen from Additional Specification.
  1090.  
  1091. * DAT2SLT and SLT2DAT now handle a single .SCR file for one part of the
  1092. advanced SLT spec.
  1093.  
  1094. * Keyboard emulation changed slightly so that caps is not switched off after
  1095. using shifted keys like <>?:"_+ these.
  1096.  
  1097. * Multiface 128 emulation, if you have the ROM!
  1098.  
  1099. * VOC file loading, but not very well.
  1100.  
  1101. * White noise through Adlib card, not very good though, so I included the
  1102. following option.
  1103.  
  1104. * Ability to switch off the poor white noise emulation via a menu.
  1105.  
  1106.  
  1107. KNOWN BUGS:
  1108. -----------
  1109. Konami Ping Pong (released by Imagine) has corrupted bats, this is caused by
  1110. this (near the top of x128_def.c):
  1111.  
  1112. #define spokeb(oset,bpval) \
  1113.     mwtemp=oset>>13; \
  1114.     SRAMW[mwtemp][oset&0x1FFF]=bpval; \
  1115.     if((CONTENDED[mwtemp]) \
  1116.     &&(!(t_state>>7))&&(vline&192)) t_state+=4;
  1117. /* The 'if' is Spectrum specific, if you are using this code for
  1118. another Z80 thingy, do not include that line.  It is an attempt at
  1119. emulating the mem write delay in ULA contended memory */
  1120.  
  1121. If you want to play Ping Pong properly you can remove the last two lines of
  1122. the #define, this will cause Hostages 128 to crash though....  And Dos users
  1123. will be unlikely to get to recompile it.
  1124. This problem proves that my t_state timing is running on luck rather than
  1125. accuracy.
  1126. But look at the line above the two!  See how it causes write protection of
  1127. the ROM area without an 'if' to slow down access!
  1128.  
  1129.  
  1130. HELP!!!
  1131. -------
  1132. If anyone can solve the following problems then don't hesitate to contact me
  1133. (e-mail address above, but will be out of date):
  1134.  
  1135. 1.  STAT problem.
  1136. After 128 stat's are done on an uncached CD things really slow down a lot,
  1137. such that 319 files takes 27 seconds!!!!  This may also happen on other types
  1138. of drive, but I don't have a situation where that happens, also this might
  1139. only happen on DOS (maybe).  My current solution is to use some Watcom
  1140. specific code which speeds it up nicely, but I would prefer a stat fix.
  1141.  
  1142. 2.  Adlib - Linux problem.
  1143. For some reason, the Adlib card likes to produce no noise in Linux unless
  1144. you run some DOS noisy things first (see way up for details), yet even when
  1145. it is refusing to make noise, the timers work and the card is detected.
  1146. Maybe this is a SB Pro mixer chip problem?
  1147.