home *** CD-ROM | disk | FTP | other *** search
/ Freesoft 1999 February / Freesoft_1999-02_cd.bin / Recenz / Emulator / Joystick / JOYEMU.TXT < prev    next >
Text File  |  1997-12-02  |  67KB  |  1,436 lines

  1.  
  2.                       @@@             @@@@@@
  3.                       @@@             @@@@@@
  4.                       @@@  @@@  @@ @@ @@@    @@ @@ @@ @@ @@
  5.                       @@@ @@ @@ @@ @@ @@@@@@ @@@ @@ @ @@ @@
  6.                    @@ @@@ @@ @@ @@ @@ @@@    @@  @  @ @@ @@
  7.                    @@@@@@  @@@   @@@  @@@@@@ @@  @  @  @@@@
  8.                      @@@        @@@   @@@@@@
  9.                                @@@
  10.  
  11.                                  Version 4.1
  12.  
  13.                     (C) 1996-97 Simone Zanella Productions
  14.  
  15. INDEX
  16. _____
  17.  
  18. 1   DISCLAIMER AND LEGAL STUFF
  19. 2   FILES IN THE PACKAGE
  20. 3   BEFORE START
  21. 4   WHAT IS JOYEMU
  22. 5   CURRENT FEATURES (v4.1)
  23. 6   UPGRADING FROM VERSIONS BEFORE 4.0
  24. 7   HOW TO USE JOYCP
  25. 8   HOW TO USE JOYEMU/JOYEM
  26. 9   TROUBLE SHOOTING
  27. 10  WHAT TO DO IF...
  28. 11  A NOTE FOR WINDOWS 95 USERS
  29. 12  COMPATIBILITY
  30. 13  HISTORY
  31. 14  TECHNICAL SPECIFICATIONS
  32. 15  CREDITS
  33.  
  34.  
  35. 1  DISCLAIMER AND LEGAL STUFF
  36. _____________________________
  37.  
  38. This product comes with no warranty. It is freeware, but use it at your
  39. own risk; the author takes no responsibilities of any sort related to
  40. the use of this product.
  41.  
  42. Everyone that receives a FULL copy of this package (see section
  43. "FILES IN THE PACKAGE") can freely install, duplicate and distribute the
  44. package, as long as:
  45. - FULL, unmodified package is duplicated;
  46. - no additional fee is requested, apart from the cost of the media
  47.   necessary for the copy;
  48. - the package is not distributed with other software or hardware.
  49.  
  50. Any WEB/FTP site can freely distribute this package as long as FULL,
  51. unmodified package is downloadable in a single, compressed file (any
  52. archiver will do).
  53.  
  54. The user acquire the right of using the package, but he can not alter,
  55. disassemble or sell the software and the documentation that comes with it.
  56.  
  57. Simone Zanella retains intellectual property and copyright over the whole
  58. package.
  59.  
  60. Written permission is required from Simone Zanella if you want to:
  61. - sell this package;
  62. - distribute this package together with other software;
  63. - include this package in a compilation of software;
  64. - bundle this package with any hardware device (especially joysticks,
  65.   joypads, mouse and hardware interfaces).
  66. The concept of 'written permission' applies also to digitally signed text,
  67. i.e. a plain text that I'll send through e-mail, signed with my
  68. private PGP key.
  69.  
  70. Simone Zanella reserves the right to charge money for releasing said
  71. permission.
  72.  
  73. Inclusion of this package in shareware/freeware collections follows this
  74. special policy: a written permission will be granted as soon as a full and
  75. detailed list of the programs that will be distributed with this package
  76. is received by Simone Zanella; the author of the collection is bound to
  77. send a copy of the collection for which permission was granted to Simone
  78. Zanella at the address written at the end of this document (CREDITS section)
  79. or to another address stated in the permission as soon as the collection
  80. becomes commercially available. Simone Zanella reserves the right to deny
  81. or revoke said permission at his will.
  82.  
  83. Any other form of distribution must be previously agreed upon with Simone
  84. Zanella and requires a special, written license, which can be subject to
  85. payment.
  86.  
  87. REMEMBER:
  88.  
  89. You may distribute this package only in its integrity (see section
  90. "FILES IN THE PACKAGE").
  91.  
  92. Under no circumstances you can charge money for this product, unless a
  93. reasonable amount to cover copying and handling (mass distribution is
  94. NOT covered by this point).
  95.  
  96. This package cannot be distributed with other software/hardware unless a
  97. written permission for the distribution has been previously obtained from
  98. Simone Zanella.
  99.  
  100.  
  101. 2  FILES IN THE PACKAGE
  102. _______________________
  103.  
  104. JCMPTST.EXE               Test compatibility of JoyEmu with your system
  105. JOYCP.EXE                 Control panel for JOYEM/JOYEMU
  106. JOYEMU.EXE                TSR for emulation (with hot keys)
  107. JOYEM.EXE                 TSR for emulation (without hot keys)
  108. CONVKS.EXE                KS file upgrader (3.1+ -> 4.x)
  109. JOYCP.ICO                 Icon for JOYCP (Windows 95/Windows 3.1)
  110. JOYEMU.TXT                This file
  111. WHATSNEW.TXT              Features added in the current release
  112. MOUSE.JS                  File to be used if you don't have any joystick
  113. JOYEMU.FAQ                Frequently asked questions about JoyEmu and JoyCP
  114. FILE_ID.DIZ               Short package description
  115.  
  116. The original archive is AV certified and all the programs are virus free.
  117.  
  118.  
  119. 3  BEFORE START
  120. _______________
  121.  
  122. JoyEmu uses a special feature which is common to most modern bioses to fake
  123. key presses. Unfortunately, 'most' is not 'all'; before reading this
  124. (long) document that explains in details how to use JoyEmu, you can quickly
  125. determine if your system is compatible with it.
  126. The program JCMPTST.EXE is provided for this purpose; all that it does
  127. is printing 'joyemu' (or 'JOYEMU', depending on the state of caps lock)
  128. by stuffing keys to the keyboard buffer with the same method used by
  129. JoyEmu when emulating keyboard. If, after running it, you don't see this
  130. string appearing on the Dos prompt, your system is not compatible with
  131. JoyEmu. You may consider trying fiddling with the bios settings (especially
  132. the shadowing of the paragraph F000-FFFF) or updating/replacing your
  133. current bios, if your motherboard has flash bios support. Be aware, though,
  134. that I can't help you on this matter: you are on your own.
  135.  
  136.  
  137. 4  WHAT IS JOYEMU
  138. _________________
  139.  
  140. JOYEMU and JOYEM are keyboard emulators for joystick and mouse: they are two
  141. TSR programs that let you use your input devices with software that accepts
  142. only keyboard input, or with those programs that have weak support for
  143. other kind of input.
  144.  
  145. JOYEMU and JOYEM are essentially the same program, but JOYEM lacks hot key
  146. support. Hot keys let you change on the fly many parameters of the
  147. emulation, but are not strictly necessary -- both JOYEMU and JOYEM accept
  148. command line parameters to update the status of the resident emulator;
  149. moreover, JOYCP can be used to change all the settings of TSR emulator.
  150.  
  151. JOYEMU and JOYEM can be easily uninstalled and reinstalled as needed
  152. (read section "A NOTE FOR WINDOWS 95 USERS" to learn how to use the emulators
  153. with Windows 95 native programs).
  154.  
  155. To configure the emulators for you system, JOYCP must be used.
  156.  
  157. JOYCP replaces the original utilities JOYSET and KEYSET, which are
  158. no longer necessary.
  159.  
  160. JOYCP is by far more flexible than the older utilities; it can be used to:
  161. - calibrate your joystick(s) and define common emulation parameters such as
  162.   the number of fire buttons, joystick sensibility and interface read mode;
  163. - set mouse tolerance for both axis;
  164. - define emulated keys (i.e. keys associated with joystick directions and
  165.   fire buttons), autofire and repeat delay for each fire button and various
  166.   other settings that depend on the application to run in foreground
  167.   (hold mode, force break mode, shift mode, 8 way mode, sampling delay,
  168.   switch keys);
  169. - swap emulated keys between the two joysticks;
  170. - create separate configuration files and load them as needed;
  171. - update resident emulator with new settings;
  172. - and much more..
  173.  
  174. Special care has been taken to ensure great compatibility and robustness;
  175. both emulators could be cut down in size and made faster if I removed all
  176. the checks and workarounds that I left to make them work on as many hardware
  177. configurations as possible. Neverthless, it is possible that these programs
  178. don't work on your system -- I'm sorry if they don't, but I really don't
  179. know what else I could change to make them more compatible. If you have
  180. troubles, read the TROUBLE SHOOTING section and the JOYEMU.FAQ and, if you
  181. don't solve the problem, try messing around with BIOS settings for the
  182. keyboard (but ONLY if you know what you are doing!!).
  183.  
  184. JOYEMU was inspired from an original utility with the same name written by
  185. Pin Fei Sun (version 1.01); this program, however, is completely different
  186. and was rewritten from scratch; no part of the actual code resembles the
  187. source written by Pin Fei.
  188. This is not to say the original code wasn't noteworthy: it really helped
  189. me in developing this package and was the spring that made me start this
  190. project -- this is the reason why I kept the original name for the
  191. emulator (despite the fact that now it is no more limited to joystick input).
  192. I wish to thank once more Pin Fei for sharing his efforts with the
  193. Internet community -- without him, you wouldn't be reading this notes.
  194.  
  195. JOYCP was written from scratch by me, to create a modern interface both easy
  196. to use and pleasant to see.
  197.  
  198. JOYEMU takes up about 27K of memory while resident; JOYEM about 26K.
  199.  
  200.  
  201. 5  CURRENT FEATURES (v4.1)
  202. __________________________
  203.  
  204. * Up to TWO digital and/or analogue joysticks are supported (2 buttons)
  205. * Support for joysticks with FOUR buttons
  206. * Support for a single joystick with SIX or EIGHT buttons
  207. * Up to TWO SWITCH BUTTONS, which change the keys stuffed by all other
  208.   buttons and directions; with an 8-button joypad, you can now stuff 56
  209.   different keys (40 different keys with a 4-button joypad, 24 keys
  210.   not counting diagonals)!
  211. * Support for MOUSE INPUT: 4 direction movements, 3 fire buttons, autofire
  212.   individually set for each button; the mouse can be used alone or together
  213.   with one or two joysticks
  214. * Capability of emulating all NORMAL AND EXTENDED keystrokes (arrow keys,
  215.   Ctrl, Alt, Shift ..)
  216. * Emulation of SHIFTED KEYS, i.e. keys combined with Ctrl, Alt, Shift
  217.   (both left and right)
  218. * TWO joystick reading modes (full or timed), to match your hardware
  219. * AUTOFIRE AND REPEAT DELAY individually set for each fire button
  220. * HOLD MODE setting, for games that require to hold directional keys
  221.   instead of pressing and releasing them
  222. * SHIFT MODE setting, to enter single keystrokes or allow shifted keys
  223. * SELECTIVE KEY STUFFING: you can set to "none" the key stuffed by a
  224.   certain direction/button (e.g. for games which don't require fire buttons)
  225. * 8 WAY MODE to have different keys stuffed when joystick is moved in diagonal
  226.   (instead of stuffing keys for the two directions)
  227. * Two SEPARATE CONFIGURATION files: one keeps joystick calibration, number
  228.   of buttons, sensibility and read mode (usually set once and for all);
  229.   the other keeps key settings, sampling interval, force release mode, hold
  230.   mode, shift mode, diagonal mode, switch keys, mouse tolerance for both
  231.   axis and autofire settings, which are subject to change depending on the
  232.   application to run
  233. * Configuration files (JOYSET.JS and KEYSET.KS) are searched first in
  234.   current directory and, if not found, in the DIRECTORY OF THE EMULATOR
  235. * While JOYEMU IS RUNNING, through hot keys you can:
  236.   - increase/decrease joystick sensibility
  237.   - increase/decrease joystick sampling interval
  238.   - increase/decrease tolerance for each mouse axis
  239.   - switch 'force release mode' on/off
  240.   - switch autofire on/off for each joystick and for mouse
  241.   - switch hold mode on/off
  242.   - turn the emulation on and off
  243.   - reload key settings from file in current directory
  244.   - uninstall the emulator, if no other TSR was loaded on its top
  245. * Support of COMMAND LINE PARAMETERS to:
  246.   - display an on-line help (both hot keys and command line parameters)
  247.   - detect resident emulator (for batch processing)
  248.   - uninstall TSR
  249.   - set emulation on/off
  250.   - reload key settings (from a file in current directory or from a specified
  251.     file)
  252.   - reload joystick settings (from a file in current directory or from a
  253.     specified file)
  254.   - set key associated with a direction/fire button (normal or switched)
  255.   - set hold mode for directional keys
  256.   - set joystick sensibility to a specified value
  257.   - set 'force release mode' on or off
  258.   - set 'shift mode' on or off
  259.   - set '8 way mode' on or off for each joystick
  260.   - set autofire on/off and repeat delay for each button of every joystick
  261.   - set sampling interval to a specified value
  262.   - turn hot key support on or off
  263.   - set number of switch keys
  264.   - set button corresponding to a switch
  265.   - set tolerance for each mouse axis
  266.   - turn on/off mouse keyboard emulation
  267. * Command line parameters can be used to INSTALL EMULATOR WITH SPECIFIED
  268.   SETTINGS or UPDATE RESIDENT EMULATOR (same syntax)
  269. * JOYEM, a version of JOYEMU without hot keys, is also provided, to better
  270.   compatibility, speed up keyboard response and spare a little memory
  271. * Errors and confirmations signaled through different sounds from INTERNAL
  272.   SPEAKER
  273. * JOYEMU/JOYEM can be easily UNINSTALLED, freeing up its memory
  274. * Greatly improved COMPATIBILITY AND ROBUSTNESS
  275. * Works under DOS (real mode) and WINDOWS 95; Windows 3.1 is untested
  276. * JOYCP, a control panel for both emulators, let you change ALL the parameters
  277.   for resident emulator, create and manage configuration files using
  278.   Windows 95 long names, uninstall the emulator, swap key settings, all
  279.   through an intuitive interface with repositionable windows that allows the
  280.   use of both mouse and keyboard
  281.  
  282. ".JS" configuration files are compatible with those created with version 3.1;
  283. ".KS" files are NOT compatible and must be converted from previous versions
  284. (or use JOYCP to recreate them for each configured application).
  285.  
  286. JOYSET.JS and KEYSET.KS must exist in current directory or in the same
  287. directory of the emulator when it is installed; KEYSET.KS must be located in
  288. the current directory or in JOYEMU's directory when you press Shift-F8 to
  289. change emulated keys. Both configuration files are created by JOYCP
  290. (read on for further information).
  291.  
  292.  
  293. 6  UPGRADING FROM VERSIONS BEFORE 4.0
  294. _____________________________________
  295.  
  296. '.JS' configuration files for version 3.0+ are compatible with version 4.x;
  297. '.KS' files for version 3.1+ (before 4.0) must be converted with CONVKS for
  298. use under version 4.0+. CONVKS is useful only to users of JoyEmu 3.1+.
  299.  
  300. CONVKS takes a single parameter: the name of a '.KS' file in version 3.1+
  301. format; it upgrades in place the file to version 4.x, i.e. the old file
  302. is overwritten with the new configuration. CONVKS checks that the file is
  303. actually in 3.1+ format before upgrading; files already in 4.x format or files
  304. in format previous to 3.1 are left unchanged and a warning message is issued.
  305.  
  306. The difference between 3.1+ and 4.x format lies in the new switch buttons
  307. and mouse support, that require additional key bindings.
  308. Converted configuration files have no switch keys and all related keys set
  309. to 'none' by default.
  310.  
  311.  
  312. 7  HOW TO USE JOYCP
  313. ___________________
  314.  
  315. Type JOYCP to setup emulation parameters.
  316.  
  317. JOYCP is structured in various menus; at any time, just one menu is
  318. active and its window can be positioned anywhere on the screen by clicking
  319. on the frame, moving the mouse and releasing the button; JOYCP remembers
  320. the position for each window between different sessions; for this reason,
  321. it modifies its executable (be aware of this if you use antivirus packages
  322. that check file integrity by calculating CRCs on executables).
  323. You can move the windows also by using arrow keys combined with Ctrl.
  324.  
  325. These are the keys recognized:
  326. - enter, space, right: select option;
  327. - up/down: change option;
  328. - esc, left: previous menu;
  329. - home, end, pag up, pag down: navigate the menu.
  330.  
  331. You can select an option also by clicking on it with the mouse or by pressing
  332. highlighted letter; unselectable options are automatically grayed out,
  333. reflecting your selections and TSR status. Right mouse button does the same
  334. as the Esc key.
  335. When an option is highlighted, a one-line help text is printed on the
  336. bottom of the screen that explains what the option means/does.
  337.  
  338. JOYCP's main menu has 6 submenus:
  339. - Joy settings: for calibrating joystick(s), setting read mode, sensibility
  340.   and number of fire buttons;
  341. - Mouse settings: to turn on/off mouse keyboard emulation and to set
  342.   tolerance for each mouse axis;
  343. - Key settings: for setting keyboard mode, emulated keys, autofire settings,
  344.   sampling delay, shift mode, 8 way mode, switch buttons;
  345. - TSR settings: to force detection of resident emulators and connected
  346.   joysticks; to switch on/off: emulation, autofire and hot key support;
  347.   to uninstall TSR and get information about resident program;
  348. - Configuration: for switching on/off auto-detection of JoyEm/JoyEmu on
  349.   startup, change path to emulators and initial path for configuration
  350.   files, switch auto update mode on/off;
  351. - Exit: to return to Dos (same as pressing Esc).
  352.  
  353. On startup, JOYCP will search JOYEM and JOYEMU in the Dos path and in its
  354. directory (or in the directory specified in the Configuration section), and
  355. warn you if it cannot find them. JOYEM and JOYEMU must be reachable to let
  356. JOYCP determine the presence in memory of the emulator.
  357.  
  358.  
  359. The "Configuration.." submenu is used to specify default paths and TSR
  360. detection on startup.
  361.  
  362. If you want to keep JOYEM/JOYEMU in a separate directory, switch "Use Dos
  363. path" to "Off" and change "Executables path..".
  364.  
  365. Upon start, if an emulator is resident, JOYCP will load its configuration
  366. and set menus accordingly; if it isn't, JOYCP will search default configuration
  367. files (JOYSET.JS and KEYSET.KS) following this order:
  368. 1) JOYCP directory;
  369. 2) current directory, or directory specified as "Config files path.."
  370.    (when "Use current dir" is "Off").
  371. If no file is found or loading fails (files corrupted or not accessible),
  372. JOYCP set parameters to default values.
  373.  
  374. Every time you have to enter a path or a pathname, a standard window pops up;
  375. besides the usual keys and mouse functions, the following keys are active:
  376. - shift-tab: self complete name in the edit section (Unix like);
  377. - alphanumeric keys: moves the highlight bar to the first file satisfying
  378.   the typed letters.
  379. If you have to choose a path (not a file), when you press "OK" the string
  380. after "Path:" will be accepted.
  381.  
  382. To avoid detecting resident emulators on startup, in the same menu you can
  383. turn off "Check JoyEm" or "Check JoyEmu".
  384.  
  385. The "Auto update" option is very useful if you keep the emulator resident
  386. and change on the fly parameters as needed; when auto update is on, as soon
  387. as you change the value of each parameter the resident emulator is updated
  388. accordingly. Because of program design, ALL parameters of the same group
  389. are actually updated, that is: all joystick settings, all key settings
  390. (including mouse features) or all TSR settings, depending on the position
  391. of modified parameter in the menu tree.
  392.  
  393. With the last option ("Config files path..") you can enter the initial path
  394. for configuration files: this is the path in which ".JS" and ".KS" files are
  395. saved/loaded, if not changed explicitly.
  396.  
  397.  
  398. The "Joy settings.." submenu must be used to calibrate joystick(s).
  399.  
  400. Before running the calibration, you must choose if you want to adopt the
  401. timed or full reading mode for joysticks. Timed reading is the default --
  402. you should switch to full reading ONLY if you have a very fast machine AND
  403. you experience directional lock-ups. If you change reading mode, you must
  404. recalibrate the joysticks; you will not be able to save/update TSR until
  405. all joysticks detected are calibrated with the SAME reading mode.
  406. Auto-update takes place ONLY when joystick(s) are calibrated and reading
  407. mode is set to the same value under which joystick(s) were calibrated.
  408.  
  409. For each joystick you can set:
  410. - status: enabled/disabled; when disabled, joystick will not be read during
  411.   emulation (disable both joysticks, for example, if you need only keyboard
  412.   emulation via mouse);
  413. - fire buttons: 2, 4, 6 or 8 for first joystick, 2 or 4 for second joystick;
  414.   select 2 even if the joystick has just one fire button; if you select 6/8-
  415.   button mode, the options for the second joystick will be disabled;
  416. - sensibility: from 2 to 7; 2 is VERY hard and 7 is VERY sensible:
  417.   typical values are 5 for a digital joystick and 3 or 4 for an analogue one.
  418.  
  419. The calibration is very simple: for each joystick, center the stick and press
  420. fire button 1 or 2; then, move the stick to upper left and press fire; at
  421. last, move the stick to lower right and confirm with fire.
  422. For 6/8 button joysticks, there is an additional procedure: you will be asked
  423. to press fire button 5 together with 3 or 4 and then fire button 6 with 3 or
  424. 4; this is necessary since fire buttons 5 and 6 are connected to direction
  425. lines for the second joystick, which do not return digital (0-1) values.
  426. The same procedure will be repeated for fire buttons 7 and 8, if necessary.
  427. If TSR emulation is active, you won't be able to calibrate joysticks until
  428. emulation is turned off: see "TSR settings.." submenu.
  429.  
  430. As a rule of thumb, select timed reading mode, 2 buttons and enter 5
  431. for sensibility.
  432.  
  433. Use:
  434. - "Load settings..", to load joystick calibration from a saved file;
  435. - "Save settings..", to save current joystick configuration to disk;
  436. - "Import from TSR", to update menu values from TSR settings;
  437. - "Update TSR", to update TSR settings from current menu values.
  438.  
  439.  
  440. The "Mouse settings.." submenu is used to setup mouse parameters.
  441.  
  442. All the parameters in this menu are saved together with the key parameters
  443. (see "Key settings" menu).
  444.  
  445. "Mouse emulation" sets on or off keyboard emulation with mouse input
  446. when emulator is started; you can manually turn on or off only this part
  447. of the emulation by running JOYEMU with the command line parameter 'M'.
  448.  
  449. To start JOYEMU, you MUST specify a JS configuration file, even if no joystick
  450. is connected; if you don't have any joystick, use the file MOUSE.JS
  451. enclosed in the package.
  452.  
  453. WARNING! JOYEMU does not do any check for the presence of the mouse driver;
  454. it presumes it exists, since you have specified so. You could get unexpected
  455. results if no mouse driver is loaded and you activate mouse emulation.
  456. Moreover, compatibility here is directly connected to the quality (and speed)
  457. of the mouse driver; if the driver is very complicated and takes too much time,
  458. emulation will be slow or you could even experience lock-ups (NOT under
  459. Windows 95, anyway).
  460.  
  461. JOYEMU does not change the mouse handler; using an interrupt driven approach
  462. revealed that it worked worse than a polling one. This means that JOYEMU
  463. is perfectly safe under Windows 95; be aware, though, that when mouse
  464. emulation is active you won't be able to use the mouse as usual in Windows:
  465. so, it is a good idea to activate and de-activate keyboard emulation via
  466. mouse only through batch files.
  467.  
  468. "X tolerance" and "Y tolerance" set the value of this feature for X and
  469. Y axis. You can enter any value between 1 and 20; the lesser the value,
  470. the quicker will be the mouse response (higher sensibility).
  471. Usually, the Y tolerance should be half of the X tolerance, to compensate
  472. for the display shape.
  473.  
  474.  
  475. The "Key settings.." submenu is used to setup keys for emulation.
  476.  
  477. "Sampling delay" let you enter sampling interval for joystick and mouse
  478. readings; a value of 0 means continuous probing; higher values (2, 3) helps
  479. in a few games which are VERY time critical; you should probably leave this
  480. value to 0 if you have a fast machine or if you don't experience slow downs
  481. during emulation. Higher values COULD help if you have a slow machine
  482. (but you'll get the impression of playing via satellite!).
  483. Sampling interval can also be changed while JOYEMU is running by using
  484. Shift-F3 (increase) or Ctrl-F3 (decrease), or updated by running JOYEMU with
  485. parameter S (read on).
  486.  
  487. There are three switches that control how keys are stuffed during emulation:
  488.  
  489. - "Hold mode": if you activate hold mode, when you push the stick or the
  490.   mouse in a direction the associated key will be pressed and when you
  491.   re-center the device it will be released; if hold mode is off, as long as
  492.   you keep the device off centered the corresponding key will be stuffed to
  493.   the keyboard buffer. This setting depends on how the user is supposed to
  494.   enter data in the application in foreground; if you experience slow downs,
  495.   activating hold mode could solve the problem; the default should be hold
  496.   mode ON - use Shift-F7 in JOYEMU to switch hold mode on/off;
  497.  
  498. - "Force break": this switch determines if JOYEMU should force release before
  499.   each keypress; forcing release is more compatible, but since a higher number
  500.   of scan codes is stuffed to the keyboard buffer it COULD slow down the
  501.   emulation on slower machines; this setting depends heavily on your
  502.   particular hardware; the default should be force release mode ON -
  503.   use Shift-F4 in JOYEMU to switch force release mode on/off;
  504.  
  505. - "Shift mode": when shift mode is on, if configured keys are actually
  506.   combinations of a key with shift keys (alt, ctrl, shift) these other
  507.   keys are also stuffed to keyboard buffer; if shift mode is off, only
  508.   single keys are stuffed - you should turn off shift mode if key combinations
  509.   are not needed.
  510.  
  511. The "switch keys" are special buttons (available only for a single joystick
  512. AND when only the first joystick is enabled) that, when pressed, change the
  513. keys stuffed by every other button and direction; there can be zero, one or
  514. two switch buttons.
  515.  
  516. Each switch button can be a toggle switch or a shift switch.
  517. 'Shift switch' means that the effect of the button disappears as soon as you
  518. release the button itself (think at the keys Ctrl and Alt on the keyboard).
  519. 'Toggle switch' means that when you press the button once you activate its
  520. function and you must press it again to remove its effect (think at the keys
  521. Caps Lock and Num Lock on the keyboard).
  522. You can have one shift and one toggle switch, two toggle switches or two
  523. shift switches; it is up to you to determine what is better for the particular
  524. program in foreground.
  525.  
  526. The "Fire switch 1" and "Fire switch 2" options let you select which button
  527. should act as a switch key.
  528. When you have one switch key, you have TWO complete sets of keys, each
  529. with 4 directions, 4 diagonals (if 8 way mode is activated) and up to 7
  530. fire buttons; with two switch keys, you have FOUR complete sets of keys:
  531. one used when no switch key is pressed, two used when one switch key is
  532. pressed (but not the other) and one used when both switch keys are pressed.
  533. The grand total of distinct keys that can be stuffed is reported by these
  534. tables:
  535.                     +------------+-------------------+
  536.                     |    ONE     |    # of buttons   |
  537.                     |   SWITCH   |                   |
  538.                     |            |  2    4    6    8 |
  539.                     +------------+----+----+----+----+
  540.                     | 4 way mode | 10 | 14 | 18 | 22 |
  541.                     +------------+----+----+----+----+
  542.                     | 8 way mode | 18 | 22 | 26 | 30 |
  543.                     +------------+----+----+----+----+
  544.  
  545.                     +------------+-------------------+
  546.                     |    TWO     |    # of buttons   |
  547.                     |  SWITCHES  |                   |
  548.                     |            |  2    4    6    8 |
  549.                     +------------+----+----+----+----+
  550.                     | 4 way mode | 16 | 24 | 32 | 40 |
  551.                     +------------+----+----+----+----+
  552.                     | 8 way mode | 32 | 40 | 48 | 56 |
  553.                     +------------+----+----+----+----+
  554.  
  555. With the switch keys you can, for example, play Quake without using the
  556. keyboard, or play Robotron with a single fire button (very nice - try it!).
  557.  
  558. NOTE: when any switch key is pressed, keyboard emulation via mouse is
  559. suspended.
  560.  
  561. For each joystick there is a separate submenu that let you select keys to be
  562. emulated and autofire settings; there are 4 directions (+ 4 diagonals) and 4,
  563. 6 or 8 fire buttons to be configured (read on to understand why), and the
  564. same keys must be configured for each additional switch state (if any).
  565.  
  566. For the mouse, you can enter the keys for the 4 directions, one key for
  567. each button (left, right and middle) and corresponding autofire.
  568.  
  569. You can set directions and buttons even for joysticks that won't be connected:
  570. it doesn't matter, since keys configured for non-existent devices are simply
  571. ignored during emulation.
  572.  
  573. IMPORTANT! If you don't want to stuff any key at all for a certain button/
  574. direction, select the option with the SPACE BAR, that is:
  575. - move selection bar to highlight desired direction or button;
  576. - press the space bar.
  577. If you select the option with return, right arrow or left mouse button,
  578. you will set the key to be stuffed as usual, by pressing any key on the
  579. keyboard (the key can be the space bar as well).
  580.  
  581. All keys are supported: shift keys (Shift, Ctrl, Alt), as well as other
  582. special keys (as CapsLock and NumLock) and key combinations with shift keys
  583. (ctrl, alt, shift).
  584.  
  585. If your joystick has 6 or 8 fire buttons, remember to set this parameter in
  586. the joy settings menu, before entering the key settings; thus, the menu will
  587. change to include the two or four additional fire buttons (both for assigned
  588. key and autofire rate).
  589.  
  590. You might ask why up to 8 buttons are requested for each joystick; the
  591. reason is that there are PC controllers available that have more than 2 fire
  592. buttons; buttons 3 and 4 use the lines in the interface for buttons on the
  593. other joystick, buttons 5..8 use direction lines for the second joystick.
  594. If you are going to connect two joysticks via a Y-adapter, you will probably
  595. use traditional models with two buttons.
  596.  
  597. NOTE: the key assignments for fire buttons 5..8 are stored in place of key
  598. assignments for the buttons 1..4 of the second joystick; this is done
  599. both to spare memory and because one 6/8-button joystick uses all the lines
  600. available in the joystick interface, so you cannot connect any other device.
  601.  
  602. I don't know if 8-button joysticks are actually being produced (I mean
  603. joysticks with 8 DISTINCT fire buttons, not controllers with duplicated turbo
  604. or autofire buttons), but you can easily build such a beast and that's the
  605. reason why I put in this feature.
  606. This is a simple diagram that shows how to build this kind of joystick
  607. from two standard 2-button joypads; Fx means fire button x, U/L/R/D stand
  608. for up, left, right, down.
  609.  
  610.                 U                        F6
  611.  
  612.                 |                         |
  613.             L --+-- R    F1  F2      F5 --+-- F7    F3  F4
  614.                 |                         |
  615.  
  616.                 D                        F8
  617.           |                     |   |                     |
  618.           +----------+----------+   +----------+----------+
  619.                      |                         |
  620.                      |                         |
  621.                      +------------+------------+
  622.                                   | to PC game port
  623.                                   |
  624.  
  625. Join the lines so that, in a single PC game connector, you have the control
  626. signals from both joypads (you'll need to get a more detailed diagram for
  627. that, this is just to give you the idea).
  628.  
  629. One thing that you must keep in mind is that fire buttons 5 and 7 (as well as
  630. 6 and 8) are mutually exclusive; the reason is very simple: they share the
  631. same direction line and just as you can't go up and down at the same time,
  632. you can't press buttons 6 and 8 simultaneously. So what's the deal in
  633. having 8 fire buttons when I can use only 6 distinct buttons at a time,
  634. you might ask? Well, there are many cases in which this is useful; for
  635. example, to activate functions rarely used but needed (a start or select
  636. button in a console emulator), or when the mutually exclusive nature
  637. is implied by the situation (e.g. a character that can use two weapons,
  638. but only one at a time).
  639.  
  640. The "Diagonals.." submenu let you (de)activate 8 way mode and set keys to be
  641. stuffed for diagonals. When 8 way mode is on, you can stuff different keys
  642. for, say, up, left and up + left; if 8 way mode is off, a diagonal is
  643. translated as two keypresses, corresponding to the two directions.
  644. You must activate 8 way mode in the first key submenu to enter diagonal
  645. key setting in the switched keys submenu.
  646.  
  647. In the "Autofire rate.." submenu, for each button enter 0 for repeat delay if
  648. you don't want autofire (default), or a value between 1 and 18.
  649. Lower values (except 0) mean faster repetition, since these numbers refer to
  650. the repeat delay, that is the number of joystick pollings after which a
  651. keypress is generated if a fire button is held down.
  652. If 'force break' is active, settings should be >= 2, since 1 = 2 (one delay
  653. state is necessary for releasing the button); in this mode, at most 9 keys per
  654. second are stuffed in the buffer. The autofire values are valid also for all
  655. switched fire buttons.
  656. Use Shift-F5 and Shift-F6 to turn on/off autofire for ALL buttons of joystick
  657. 1 or 2, respectively.
  658.  
  659. Important: SET ALL REPEAT DELAYS TO 0 TO SPEED UP EMULATION.
  660.  
  661. The option "Swap buttons 1 and 2" let you exchange keys bound to fire 1 and 2;
  662. this is usually quicker than re-selecting keys and can be useful if the buttons
  663. on the joystick are in different positions (if one of the buttons is a switch,
  664. the keys cannot be swapped).
  665.  
  666. The option "Swap key bindings" exchange all keys, autofire rates, diagonal
  667. and 8 way mode settings between joystick 1 and 2; this is useful if you have
  668. two different joysticks and want to try which is best without desconnecting
  669. cables. If you have just one joystick, this option can be used to have two
  670. full configurations on line, which can be swapped as needed.
  671.  
  672. As a rule of thumb, enter 0 for sampling interval, activate hold mode and
  673. force break mode and de-activate shift mode and 8 way mode.
  674.  
  675. Note that if you change sampling interval you will probably want to change
  676. also autofire settings, since now the key generation subsystem is invoked
  677. less frequently.
  678.  
  679. Use:
  680. - "Load settings..", to load key configuration from a saved file;
  681. - "Save settings..", to save current key configuration to disk;
  682. - "Import from TSR", to update menu values from TSR settings;
  683. - "Update TSR", to update TSR settings from current menu values.
  684.  
  685.  
  686. The "TSR settings.." submenu is used to change general TSR switches and to
  687. manually detect emulator in memory (if "Check JoyEm" and "Check JoyEmu"
  688. options are turned off in "Configuration.." menu), or to detect currently
  689. connected joysticks if you have disconnected/reconnected devices.
  690.  
  691. Use:
  692. - "Force detection", to check for the presence of JOYEM/JOYEMU in memory and
  693.   to detect connected joysticks;
  694. - "About TSR" to show information about detected TSR (type and version);
  695. - "Hot key support" to switch on/off hot key support (only when JoyEmu is
  696.   resident);
  697. - "Autofire x/mouse", to switch on/off autofire for all buttons of joystick x
  698.   or mouse;
  699. - "Emulation", to (de)activate keyboard emulation;
  700. - "Import from TSR", to update menu values from TSR settings;
  701. - "Update TSR", to update TSR settings from current menu values;
  702. - "Uninstall TSR", to remove from memory resident emulator.
  703.  
  704.  
  705. JOYCP has also a special 'query mode' which is activated when you run
  706. the program with '?' as the only parameter:
  707.  
  708.   JOYCP ?
  709.  
  710. While in this mode, JOYCP displays a 6 digit hexadecimal number for each key
  711. pressed; this number can be used with the E parameter of JOYEMU/JOYEM (read on
  712. for further details) to set the key emulated by a certain direction or a
  713. fire button; press Esc to return to Dos.
  714.  
  715.  
  716. 8  HOW TO USE JOYEMU/JOYEM
  717. __________________________
  718.  
  719. Type JOYEMU to install the emulator in memory - hot keys available once
  720. installed are:
  721.  
  722.  Shift-F1    increase sensibility for joystick 1
  723.  Shift-F2    increase sensibility for joystick 2
  724.  Ctrl -F1    decrease sensibility for joystick 1
  725.  Ctrl -F2    decrease sensibility for joystick 2
  726.  Shift-F3    increase sampling interval
  727.  Ctrl -F3    decrease sampling interval
  728.  Shift-F4    switch autofire on/off for mouse
  729.  Shift-F5    switch autofire on/off for joystick 1
  730.  Shift-F6    switch autofire on/off for joystick 2
  731.  Shift-F7    switch 'hold mode' for directional keys on or off
  732.  Ctrl -F7    switch 'force release mode' on/off
  733.  Shift-F8    reload keystrokes to emulate from the file KEYSET.KS
  734.              (which must reside in the current directory or in
  735.              JOYEMU's directory)
  736.  Shift-F9    turn on/off the emulation
  737.  Shift-F10   unload JOYEMU from memory; this is possible ONLY IF
  738.              no other TSR was loaded on the top of it
  739.  Shift-F11   increase mouse tolerance for X axis
  740.  Ctrl -F11   decrease mouse tolerance for X axis
  741.  Shift-F12   increase mouse tolerance for Y axis
  742.  Ctrl -F12   decrease mouse tolerance for Y axis
  743.  
  744. It is a good idea to use these keys ONLY on Dos command line and not while an
  745. application is running. Moreover, keys Shift-F10 and Shift-F8 are disabled
  746. during Dos internal operations so if they don't work the first time keep
  747. pressing them until you hear the confirmation beep.
  748. To turn off hot key support, use parameter 'Y-' (see below); hot key support
  749. is on by default at startup.
  750.  
  751. JOYEMU sounds the internal speaker to inform the user if requested operation
  752. was completed successfully or not: you will easily distinguish an error beep
  753. (lower) from a confirmation beep (brighter). If command line parameters are
  754. used to change settings, only errors are acoustically signaled.
  755.  
  756. It is possibile to change parameters of resident JOYEMU by running JOYEMU
  757. with the following command line options:
  758.  
  759. JOYEMU [ ?[1|2|3] | D | U | [K[filename]] [J[filename]] [+] [-] [Sjx] [Ix]
  760.        [F[-]] [H[-]] [T[-]] [Xj[-]] [Rjbx] [Aj[-]] [Ejbk] [Y[-]] [Nn] [Wnb[+]]
  761.        [M[-] [Myt] ]
  762.  
  763. ?     display corresponding page from on-line help
  764.  
  765. D     exit setting errorlevel to 0 if emulator is NOT installed
  766.  
  767. U     unload resident JOYEMU
  768.  
  769. K     have resident JOYEMU load key settings from KEYSET.KS;
  770.       if a pathname is present after K, settings are loaded from
  771.       specified file
  772.  
  773. J     have resident JOYEMU load joy settings from JOYSET.JS;
  774.       if a pathname is present after J, settings are loaded from
  775.       specified file
  776.  
  777. +/-   enable keyboard emulation/disable keyboard emulation, but keeps JOYEMU
  778.       in memory (use U to remove it)
  779.  
  780. Sjx   set joystick sensibility for joystick j (1 or 2) to x, which must be
  781.       between 2 and 7
  782.  
  783. Ix    set sampling interval to x; x can be between 0 and 9
  784.  
  785. F     switch on 'force release mode'; if 'F-', switch it off
  786.  
  787. H     switch on 'hold mode'; if 'H-', switch it off
  788.  
  789. T     switch on 'shift mode'; if 'T-', switch it off
  790.  
  791. Y     switch on 'hot key support'; if 'Y-', switch it off (JoyEmu only)
  792.  
  793. Xj[-] switch on (or off, if '-') 8 way mode for joystick j (1-2)
  794.  
  795. Aj    switch autofire on for device j (1-2 joystick, 3 mouse); if 'Aj-',
  796.       switch it off
  797.  
  798. M     turn on keyboard emulation via mouse; if 'M-', turn it off
  799.  
  800. Myt   set mouse tolerance for axis y (X/Y) to t (1-20)
  801.  
  802. Nn    set the total number of switch keys to n (1-2)
  803.  
  804. Wnb   set button b (see below) as switch n (1-2); button is a shift switch
  805. Wnb+  set button b (see below) as switch n (1-2); button is a toggle switch
  806.  
  807. Rjbx  set repeat delay for device j (1-2 joy, 3 mouse) and button b (see
  808.       below) to x, which can be 0 (no autofire) or 1 (fast) - 18 (slow)
  809.  
  810. Ejbk  set key emulated by device j and button b to key k, which is
  811.       a 6 digit hexadecimal number (AKA "magic number") that can be found by
  812.       using 'JOYCP ?'. Warning! Magic numbers have changed from version 2.0!
  813.       The following tables show values for b and j:
  814.  
  815.       Values for j:   1/2   joystick 1/2
  816.                       3     mouse
  817.                       4/5   keys when switch 1/2 is pressed
  818.                       6     keys when both switch 1 and 2 are pressed
  819.  
  820.       Values for b:   8 fire buttons                 directions
  821.  
  822.       (button # - 1)  1 2 3 4 5 6 7 8          C  9  E         9
  823.                       v v v v v v v v            \│/           │
  824.                       0 1 2 3 4 5 6 7          8 -J- A    8 -Mouse- A
  825.                                                  /│\           │
  826.              Mouse:   L 0   R 1   M 2          D  B  F         B
  827.  
  828.  
  829. Warning! Syntax for parameters 'R' and 'E' has changed from version 3.3.
  830.  
  831. If JOYEMU is not in memory and parameters are specified (except '?', 'D' and
  832. 'U'), then JOYEMU goes resident and change settings according to parameters
  833. specified.
  834.  
  835. e.g.   JOYEMU - Y-          Install JOYEMU with emulation disabled and
  836.                             without hot key support, or turn off emulation
  837.                             and hot key support for resident emulator
  838.  
  839.        JOYEMU KMYKEYS.KS    Install JOYEMU with specified key settings,
  840.                             or set emulated keys for resident emulator
  841.  
  842.        JOYEMU H F T-        Install JOYEMU with specified switches,
  843.                             or change settings for resident emulator
  844.  
  845. Pay attention to the syntax of each parameter; the internal command
  846. line interpreter should be safe, but it does not perform many checks (since
  847. the code had to be very tight to save memory).
  848.  
  849. Remember that by reloading key configuration (Shift-F8 in JOYEMU, command
  850. line parameter K in both JOYEM and JOYEMU) you will also set sampling
  851. interval, force release mode, hold mode, shift mode, 8 way mode, mouse
  852. tolerances and emulation status, diagonal and autofire settings to the
  853. respective values stored in the configuration file. For this reason,
  854. remember to put J and K parameters at the beginning.
  855.  
  856. JOYEM works exactly as JOYEMU, but it lacks hot key support.
  857. However, it has a few advantages:
  858. - the keyboard response is faster, since the handler does not search for
  859.   hot keys at each keypress (the speed is the same if you disable hot key
  860.   support with parameter 'Y-' in JoyEmu);
  861. - it uses less memory;
  862. - it can be used to avoid troubles with programs in which the hot keys
  863.   have a special meaning or are used to enter data (problem overcome in
  864.   JoyEmu by using 'Y-').
  865. Command line parameters works exactly as in JOYEMU (except parameter 'Y',
  866. which makes no sense here).
  867.  
  868. You must use JOYEM to update a resident JOYEM and JOYEMU to update a resident
  869. JOYEMU; you can NOT set resident JOYEM with JOYEMU and vice-versa.
  870.  
  871.  
  872. 9  TROUBLE SHOOTING
  873. ___________________
  874.  
  875. JoyEmu seems to have problems with PCs equipped with Mr. Bios.
  876. I was told, also, that on some machines you need to shadow the F000-FFFF
  877. paragraph of the bios for the emulator to work.
  878. Read the paragraph "BEFORE START" for more information.
  879.  
  880. NEVER disconnect a joystick while the emulator is in memory and is active;
  881. this would lead to a continuous stream of keys stuffed into keyboard buffer,
  882. that would prevent the use of the PC; in this case, always disable emulation
  883. (by Shift-F9 or parameter -) or unload emulator (by Shift-F10 or parameter U)
  884. before operating.
  885. Moreover, disconnecting hardware while your PC is powered on is not very
  886. healthy for both the attached device and your computer.
  887.  
  888. If you want to change on the fly the joysticks connected, there are several
  889. ways of doing it; this is the suggested method -- replace JOYEMU with JOYEM
  890. if you prefer using the version without the hot keys:
  891.  
  892.   AFTER THE EMULATOR IS INSTALLED IN MEMORY:
  893.  
  894.   1)  use:
  895.  
  896.       JOYEMU -
  897.  
  898.       to momentarily turn off emulation;
  899.  
  900.   2)  disconnect and reconnect joystick(s) as needed;
  901.  
  902.   3a) calibrate joystick(s) through JOYCP;
  903.  
  904.   3b) if you prefer, you can calibrate them once and for all and save
  905.       configuration to MYJOY2.JS, for example;
  906.  
  907.   4)  now update resident emulator with the new configuration and turn on
  908.       emulation; example is given for user selected configuration:
  909.  
  910.       JOYEMU JMYJOY2.JS +
  911.  
  912.       Always put '+' as the last parameter!
  913.  
  914. If you disconnect/reconnect your joysticks very frequently, you can automate
  915. this sequence by writing a batch file.
  916.  
  917. Of course, the same operation can be accomplished entirely through JOYCP:
  918.  
  919.   1)  select "TSR settings..";
  920.       switch off "Emulation" and select "Update TSR";
  921.  
  922.   2)  disconnect and reconnect joystick(s) as needed;
  923.  
  924.   3a) select "Joy settings.." and calibrate joysticks as needed;
  925.  
  926.   3b) if you prefer, you can calibrate them once and for all and save
  927.       configuration to MYJOY2.JS, for example;
  928.  
  929.   4)  select "Update TSR" in the "Joy settings" submenu;
  930.       select "TSR settings.."; switch on "Emulation" and select "Update TSR".
  931.  
  932. You don't need to "Update TSR" if "Auto update" is on.
  933.  
  934. If you are simply desconnecting one of the joysticks, you can do it by turning
  935. emulation off, removing the device and then turning emulation on; in fact,
  936. the number of joysticks connected is checked every time that TSR emulation is
  937. turned on.
  938.  
  939. Remember that repeat delay for autofire is directly connected to sampling
  940. interval; if you increase sampling interval, you might want to decrease
  941. repeat delay and vice-versa. That's because repeat delay should be interpreted
  942. as 'NUMBER OF JOYSTICK POLLINGS after which a fire key should be stuffed in
  943. the keyboard buffer while joystick fire button is kept pressed'.
  944.  
  945. Many programs (especially games) chain the keyboard handler to get faster
  946. response and to filter unwanted keys; while these programs are running,
  947. JOYEMU's hot keys may not be accessible. Moreover, it is safer to use the hot
  948. keys on Dos command line.
  949.  
  950. You can't uninstall JOYEMU/JOYEM if one or more TSR programs have been
  951. installed after it; unload the other TSRs in reverse order of installation,
  952. then uninstall the emulator.
  953.  
  954.  
  955. 10  WHAT TO DO IF...
  956. ____________________
  957.  
  958. - you don't have any joystick;
  959. + use the supplied MOUSE.JS file; you need to specify a '.JS' file to
  960.   install the emulator;
  961.  
  962. - joystick readings seem uncorrect:
  963. + try activating full read mode;
  964.  
  965. - autofire does not work correctly or you get directional lock-ups:
  966. + turn on force release mode; to speed up key stuffing (up to 18 keypresses
  967.   per second), turn off force release mode;
  968.  
  969. - a game seems to run too slowly when the emulator is resident:
  970. + try setting sampling interval to higher values (2, 3) or
  971.   switching on 'hold mode'; disable full read mode; set all repeat
  972.   delays to 0; use switch buttons only to access rarely used keys;
  973.  
  974. - game reaction to joystick movements seems too slow:
  975. + try setting sampling interval to lower values (1 or 2) or switch off
  976.   'hold mode'; turning off force release mode and disabling full read mode
  977.   could also help;
  978.  
  979. - game action is not fluid:
  980. + try switching on 'hold mode' and/or disabling full read mode;
  981.  
  982. - sometimes, a direction key is stuffed without moving the joystick:
  983. + try decreasing joystick sensibility (Ctrl-F1/F2 or parameter S);
  984.  
  985. - sometimes, a direction key is stuffed without moving the mouse:
  986. + try increasing mouse tolerance (Shift-F11/F12 or parameter Myt);
  987.  
  988. - you need to stuff different keys for diagonals:
  989. + in the "Key settings" menu, select "Keys joystick x.." and then
  990.   "Diagonals.."; activate 8 way mode and select keys to be stuffed;
  991.  
  992. - your joypad does not have enough buttons for the keys to be emulated;
  993. + try using switch buttons;
  994.  
  995. - you are using an analogue joystick and you must push the stick too far from
  996.   the center for JOYEMU/JOYEM to stuff direction key:
  997. + increase joystick sensibility (Shift-F1/F2 or parameter S);
  998.  
  999. - the application in foreground uses the hot keys of JOYEMU as standard keys
  1000.   for entering data:
  1001. + use JOYEM instead of JOYEMU, or turn off hot key support with parameter 'Y-';
  1002.  
  1003. - you want to use the emulator with programs that have weak joystick support:
  1004. + disable joystick support in these programs; you will probably use a
  1005.   command line switch or there will be an option for doing this; if you
  1006.   don't, you could get unexpected results or even lock-ups;
  1007.  
  1008. - you want to use the emulator with programs that have weak mouse support:
  1009. + disable mouse support in these programs; you will probably use a
  1010.   command line switch or there will be an option for doing this; if you
  1011.   don't, you could get unexpected results or even lock-ups.
  1012.  
  1013.  
  1014. 11  A NOTE FOR WINDOWS 95 USERS
  1015. _______________________________
  1016.  
  1017. To use JOYEM/JOYEMU for Windows 95 NATIVE programs, you MUST load the emulator
  1018. before you load Windows 95, i.e. put it in your AUTOEXEC.BAT; a good position
  1019. for JOYEM/JOYEMU is as the FIRST command in AUTOEXEC file. Then, you can use
  1020. JOYCP to update parameters of resident emulator; an icon is supplied if you
  1021. want to make a shortcut for it, but you can also open a Dos box and run JOYCP
  1022. from there to update the TSR program.
  1023.  
  1024. NOTE: the default key set file should have keyboard emulation via mouse
  1025. DISABLED, or you won't be able to use the mouse in Windows as usual.
  1026. Only enable mouse emulation when needed.
  1027.  
  1028. It has been reported that sometimes, after using JOYEM/JOYEMU in a Dos prompt
  1029. (that is: opening a Dos prompt; installing the emulator; running an app;
  1030. closing the Dos prompt) system returns in an odd status: a shift key (Alt,
  1031. Ctrl, Shift) seems to be always pressed.
  1032. To restore normal operation, press together CTRL and ALT on the left side of
  1033. the keyboard and press and release the shift-type key (ctrl, alt, left and
  1034. right shift) that seems pressed.
  1035.  
  1036. This is caused by the fact that JOYEM/JOYEMU has stuffed make codes for these
  1037. keys but no corresponding break code, so the BIOS presumes that these keys
  1038. are still pressed.
  1039.  
  1040. You can use long file names under JoyCP, but JoyEm(u) does not have the
  1041. code to support long file names on the command line (parameters 'J' and 'K');
  1042. you need to use the short name for them, in this case.
  1043.  
  1044. It has been reported that sometimes, with motherboards equipped with Intel TX
  1045. chipset, if JoyEm(u) is active when you shut down Windows 95, the system
  1046. locks up between the screen that tells you that the system is being
  1047. shut down and the screen that tells you that it is safe to power off the
  1048. system. This is not a big problem in itself; just turn off emulation before
  1049. shutting down and everything will work as expected. Actually, emulation
  1050. should always stay disabled, except when really needed, because in this way
  1051. you will get the best performance from your system all the time.
  1052.  
  1053.  
  1054. 12  COMPATIBILITY
  1055. _________________
  1056.  
  1057. How much compatible is JOYEMU with games and other programs?
  1058.  
  1059. The answer is: VERY compatible.
  1060.  
  1061. If JOYEMU works with your hardware, you will find that almost EVERY program
  1062. works with it; you might need a little 'fine tuning' of the options requested
  1063. by JOYCP, though, so make sure to read carefully the sections 'HOW TO USE
  1064. JOYCP' and 'WHAT TO DO IF...'.
  1065.  
  1066. Actually, I've only found a couple of programs that refuse to work with
  1067. JoyEmu/JoyEm, and both use a weird method of reading keyboard.
  1068.  
  1069. JOYEMU was especially tested with DOZENS of arcade and console
  1070. emulators, since these programs are often developed without joystick support.
  1071. Moreover, I found that most of these programs worked BETTER if I disabled
  1072. their native joystick support and used JOYEMU to play.
  1073. The mouse emulation is also very good, much better than native support
  1074. in many arcade emulators; compatibility here is directly connected to the
  1075. quality (and speed) of the mouse driver.
  1076.  
  1077. Of course, even if I tried JOYEMU/JOYEM with a LOT of software, there may be
  1078. programs that refuse to operate while it is installed; if you find such a
  1079. program, just let me know.
  1080.  
  1081. JOYEM/JOYEMU is written in C and inline Assembly; though I paid special care
  1082. to optimize time critical parts, I can't be sure that it will work well on
  1083. smaller systems; presumably, you will need at least a Pentium 75 to achieve
  1084. a reasonable speed -- try it and let me know the results.
  1085.  
  1086.  
  1087. 13  HISTORY
  1088. ___________
  1089.  
  1090. Changes from v1.01 (written by Pin Fei Sun):
  1091.  
  1092. KEYSET:
  1093.   * rewritten from scratch
  1094.   * now supports Alt, Ctrl and Shift on their own
  1095.   * display scan codes of keys pressed
  1096.   * added key configuration for second joystick
  1097.   * added sampling interval setting
  1098.   * added 'force release mode' setting
  1099.   * added 'hold mode' setting
  1100.   * added autofire setting
  1101.   * added displaying of scan and ASCII codes of keys pressed
  1102.   * added query mode, for parameter E of JOYEM/JOYEMU
  1103.  
  1104. JOYSET:
  1105.   * rewritten to work with analogue joysticks
  1106.   * added calibration for second joystick
  1107.   * added read mode setting
  1108.   * added 4 button/2 button mode
  1109.   * added sensibility setting
  1110.  
  1111. JOYEMU:
  1112.   * rewritten to better stability and add new features
  1113.   * changed keyboard handler for faster response
  1114.   * provided in two versions, with or without hot keys, for greater
  1115.     compatibility and faster keyboard response
  1116.   * emulates now both joysticks, if present
  1117.   * corrected function to reload key configuration while the emulator
  1118.     is resident (now WORKS)
  1119.   * added function to reload joystick configuration while the emulator
  1120.     is resident
  1121.   * corrected the auto-fire-every-30-minutes bug
  1122.   * added support for shift keys
  1123.   * added autofire and repeat delay for each fire button
  1124.   * added hold mode setting for directional keys
  1125.   * removed unnecessary break codes sent during emulation
  1126.   * added research of configuration files in the directory of the emulator,
  1127.     if not found in current directory
  1128.   * added keys to increase/decrease joystick(s) sensibility while JOYEMU is
  1129.     resident
  1130.   * added keys to increase/decrease sampling interval while JOYEMU is
  1131.     resident
  1132.   * added a new mode of reading joystick, user selectable
  1133.   * added a key to switch 'force release mode' on/off
  1134.   * added a key to switch 'hold mode' on/off
  1135.   * added keys to switch autofire on/off
  1136.   * added a key and corresponding code to unload the emulator from memory
  1137.   * added sound, to signal user the result of operations
  1138.   * added command line options to have resident emulator:
  1139.     - uninstall itself from memory
  1140.     - switch emulation on/off
  1141.     - reload key settings (even from a specified file)
  1142.     - change joystick sensibility
  1143.     - change sampling interval
  1144.     - set 'force release mode' on/off
  1145.     - set 'hold mode' on/off
  1146.     - set autofire on/off and repeat delay
  1147.     - set key associated to a direction/fire button
  1148.   * changed CFG files format and names
  1149.  
  1150. Changes from v2.0:
  1151.  
  1152. JOYEM/JOYEMU:
  1153.   * rewritten key stuffer for compatibility under pure Dos (1st layer)
  1154.   * perfectioned directional key stuffer (2nd layer)
  1155.   * added command line parameter '?' to display help text
  1156.   * deleted description of hot keys, which was printed when going TSR
  1157.   * added D parameter for JoyCP and batch processing
  1158.   * added ability to install emulator with specified CL parameters
  1159.   * corrected code for two joysticks
  1160.   * added support for shifted keys
  1161.   * changed parameter E according to new magic numbers
  1162.   * changed CFG files format and names
  1163.  
  1164. JOYSET/KEYSET:
  1165.   * removed from the package; they are superseded by JOYCP
  1166.  
  1167. JOYCP:
  1168.   * first release of the control panel for JOYEM/JOYEMU
  1169.     (LOT of work!)
  1170.  
  1171. Changes from v3.0:
  1172.  
  1173. JOYEM/JOYEMU:
  1174.   * support for selective key stuffing (don't stuff keys for certain
  1175.     directions/buttons, as configured by JoyCP)
  1176.   * added "8 way mode" (stuff different keys for diagonals)
  1177.   * added command line parameter 'X', to switch "8 way mode" on or off for
  1178.     each joystick
  1179.   * modified E parameter to accept setting of diagonal keys
  1180.   * added second help page (only for JoyEmu)
  1181.   * modified ? parameter syntax to accept help page number (only for JoyEmu)
  1182.  
  1183. JOYCP:
  1184.   * changed definitions for right ctrl and alt gr (were incorrect)
  1185.   * introduceded the possibility of setting to "none" the key stuffed by a
  1186.     certain direction/button (e.g. for games which don't require fire buttons)
  1187.   * added auto update mode: in this mode, when you change an option
  1188.     the resident emulator is updated immediately
  1189.   * added "swap key bindings" to key settings menu, to exchange emulated keys
  1190.     between the two joysticks
  1191.   * added "swap fire buttons" to exchange key bindings between the first two
  1192.     fire buttons of current joystick
  1193.   * added "8 way mode": in this mode, you can specify keys to be stuffed for
  1194.     diagonals as well as for straight directions.
  1195.  
  1196. Changes from v3.1:
  1197.  
  1198. JOYEM/JOYEMU:
  1199.   * added support for joysticks with 6 fire buttons
  1200.  
  1201. JOYCP:
  1202.   * added support for joysticks with 6 fire buttons
  1203.  
  1204. Changes from v3.2:
  1205.  
  1206. JOYEM/JOYEMU:
  1207.   * "unrolled" functions and definitions in JoyEm and JoyEmu: should be
  1208.     faster (even though they take up a little more memory now..)
  1209.  
  1210. JOYCP:
  1211.   * fixed a stupid bug that locked the computer in a strict loop
  1212.     with interrupts disabled if just one joystick was connected to the PC
  1213.  
  1214. Changes from v3.3:
  1215.  
  1216. JOYEM/JOYEMU:
  1217.   * faster!
  1218.   * added support for mouse keyboard emulation
  1219.   * added support for switch fire buttons (change keys stuffed by
  1220.     every other button/direction)
  1221.   * added support for 8-button joysticks
  1222.   * added FIFO key queue
  1223.   * added command line parameters N (set number of switch buttons) and
  1224.     W (set switch button number)
  1225.   * changed hot key shift-F4: it now switches on/off autofire for mouse
  1226.     (Ctrl-F7 has become the hot key for switch force break mode on/off)
  1227.   * added hot keys Shift/Ctrl-F11 and Shift/Ctrl-F12 (tolerance for
  1228.     mouse axis)
  1229.   * fixed a bug: autofire on button 5 would not work if force break mode was
  1230.     off and button 6 did not use autofire
  1231.   * fixed shift mode (now the break for the shift keys is sent on button
  1232.     release)
  1233.   * added command line parameter 'Y' to turn on/off hot key support
  1234.     (JoyEmu only); removed additional keyboard handler (JoyEm only)
  1235.   * changed values for b in E and R command line parameters
  1236.   * extended values for j in E, to set also switched keys
  1237.   * added joystick check on start/re-activation
  1238.   * added a page to on-line help (both JoyEm and JoyEmu)
  1239.  
  1240. JOYCP:
  1241.   * added support for Windows 95 long file names
  1242.   * added support for mouse keyboard emulation
  1243.   * added support for 8-button joysticks
  1244.   * changed definitions for 'num /' and 'num enter' (were incorrect)
  1245.   * exchanged buttons 5 and 6 in calibration
  1246.   * added hot key support switch
  1247.   * added detection and report of type and version of emulator in memory
  1248.   * changed window handler (glitches when windows near end of screen)
  1249.   * added switch buttons and configuration of additional keys
  1250.   * changed load and save setting dialog
  1251.   * changed set directory dialog
  1252.  
  1253.   +-----------------------------------------------------------------------+
  1254.   | The '.KS' file format has changed; use the enclosed utility CONVKS to |
  1255.   | upgrade existing key set files to version 4.x.                        |
  1256.   +-----------------------------------------------------------------------+
  1257.  
  1258. Changes from v4.0:
  1259.  
  1260. JOYEM/JOYEMU:
  1261.   * ifdef-ed the code used to wait on the joystick port until ready
  1262.     (it caused problems on a few configurations)
  1263.   * now emulation is de-activated (if active) before loading
  1264.     configuration files and re-activated immediately afterwards,
  1265.     both when using command line parameters 'J'/'K' and hot key Shift-F8
  1266.   * added to the package the program JCMPTST which can be used to
  1267.     determine if your system is compatible with JoyEmu
  1268.  
  1269. JOYCP:
  1270.   * changed joystick detection to avoid bios bugs
  1271.   * ifdef-ed the code used to wait on the joystick port until ready
  1272.     (it caused problems on a few configurations)
  1273.  
  1274.  
  1275. 14  TECHNICAL SPECIFICATIONS
  1276. ____________________________
  1277.  
  1278. For those really curious, who want to know HOW the whole thing works, here
  1279. are some hints.
  1280.  
  1281. JOYEMU installs itself and establishes a communication ISR on the
  1282. first available interrupt from 0x60 (96) to 0x68 (104); this interrupt is
  1283. used by JoyCP, to communicate with the TSR, and by JOYEMU itself, when it
  1284. is used to update the options of a copy in memory. When JOYEMU is executed
  1285. with parameter D, it exits setting Dos error level to 0 (not installed)
  1286. or the vector number for communication; that's how JoyCP finds the presence
  1287. in memory of the emulator (and that's why it needs its executable).
  1288.  
  1289. If the version with hot keys support is installed, the keyboard interrupt
  1290. is chained and adequate action is taken when the user presses one of the
  1291. hot keys.
  1292.  
  1293. JOYEMU chains the system timer to be called at pre-defined intervals,
  1294. specified by the sampling delay parameter.
  1295.  
  1296. Every time the program is woken, the joysticks and/or the mouse are read.
  1297.  
  1298. For the mouse, two special counters for X and Y axis are kept and periodically
  1299. reset, to avoid internal overflow; every time that one of these counters
  1300. exceeds a pre-defined amount, given by the X and Y tolerance, a direction
  1301. is requested to the key generation subsystem.
  1302.  
  1303. For the joystick, threshold lines are calculated from the calibration
  1304. information and are used to determine if the joystick is off-centered and
  1305. which direction should be generated; these lines depend on the values of
  1306. sensibility. Joysticks are read according to the reading mode (full or timed).
  1307.  
  1308. In case of 6-8 button joypads, the directions connected to the second lines
  1309. are converted to fire buttons using calibration information.
  1310.  
  1311. A second special subsystem checks for autofire for each button, deciding
  1312. if it is time to break (release) the key or to make (press) it; force break
  1313. mode is taken into account here.
  1314.  
  1315. A third subsystem checks if switch button status has changed; if so, all
  1316. currently pressed keys are released and internal pointers to key structures
  1317. are updated to point to the correct key tables. Of course, we must
  1318. consider which switches are pressed (one, two or both) and if each switch
  1319. is a shift or a toggle; also, we don't want to release keys when a toggle
  1320. switch is released.
  1321.  
  1322. When we have all the information about the status of the devices, the
  1323. key generation subsystem begins to stuff keys to the keyboard buffer.
  1324. All 4-8 way transformations are handled at this level.
  1325. Then, hold mode and force break mode are considered for stuffing direction
  1326. keys, taking into account the current and the previous status.
  1327. If shift mode is active, we check the shift mask and stuff corresponding
  1328. shift keys before the make code and after the break code.
  1329. For each key, we have a redirection table, because the user can set two
  1330. or more buttons/directions to stuff the same key and we don't want to
  1331. stuff two makes/breaks, or a make and a break, for the same key.
  1332. We keep track of all keys pressed, to release them when the TSR is turned
  1333. off or uninstalled. If the keyboard buffer is full, scan codes to be stuffed
  1334. are stored in a special FIFO circular queue; as keys are read from
  1335. the keyboard, if the queue is not empty the scan codes in it are stuffed
  1336. to the keyboard buffer.
  1337.  
  1338. That's all; the real challenge is doing all these operations in the least
  1339. possible time: this is achieved by dinamically changing the code executed
  1340. (instead of using tests or switches) and by using pre-calculated lookup
  1341. tables, to avoid doing maths at run time.
  1342.  
  1343. By default, i.e. when sampling delay is 0, all these things are repeated
  1344. about 18 times per second.
  1345.  
  1346. JOYEMU is long about 5.000 lines of code; JOYCP is long about 6.000 lines
  1347. of code, to which you must add at least other 5.000+ lines not directly
  1348. included, but related to functions linked from my personal C library;
  1349. this adds up to a grand total of more than 16.000 lines of code.
  1350. Keep this in mind if you use the program and would like to donate something :)
  1351.  
  1352.  
  1353. 15  CREDITS
  1354. ___________
  1355.  
  1356. JOYEMU, JOYEM, JOYCP and CONVKS are all written by Simone Zanella, SZP.
  1357. All the programs in the package are written in C with inline Assembly where
  1358. needed.
  1359.  
  1360.  +-------------------------------------------------------------------------+
  1361.  |                                                                         |
  1362.  |  If you like and use this program, send me what you want (your sister,  |
  1363.  |  if 18+ years old and good looking would be much appreciated :).        |
  1364.  |  Money, hardware, software, postcards are welcome (in this order).      |
  1365.  |  If you have special controllers or interfaces that you would like to   |
  1366.  |  be supported by JoyEmu, just send them in and I'll see what I can do   |
  1367.  |  (the address is written below).                                        |
  1368.  |                                                                         |
  1369.  +-------------------------------------------------------------------------+
  1370.  
  1371. To contact me by snail mail (bug reports, suggestions, donations :) write to:
  1372.  
  1373.                        Simone Zanella Productions
  1374.                                C.P. 51
  1375.                            30035 Mirano (VE)
  1376.                                 Italy
  1377.  
  1378.                     e-mail: simone@zanella-hifi.com
  1379.                             zanella@prometeo.it
  1380.                             szanella@dsi.unive.it
  1381.  
  1382.   Simone Zanella Home Page: http://members.tripod.com/~szanella
  1383.                             http://www.dsi.unive.it/~szanella/index.htm
  1384.  
  1385.  
  1386. -----BEGIN PGP PUBLIC KEY BLOCK-----
  1387. Version: 2.6.2i
  1388.  
  1389. mQCNAzARNUQAAAEEAMTn+IgTuJ5Ei99lzFa6D6GCDYPUimdSQ2I2keFCVG2sCVfB
  1390. uejwgdPp+u/mlwJDE2wZpAUfgHe8E3N/vmfO6bl0RxOc1Hkl0mc/np5/F4wZoeOB
  1391. GcaEpwJLkKlFoE93p8Bh/UwUNo9UaKjfwx0mqP9G+XgiVowo7NEsAHa/+Bl9AAUR
  1392. tCpTaW1vbmUgWmFuZWxsYSA8c3phbmVsbGFAbW9vLmRzaS51bml2ZS5pdD6JAJUD
  1393. BRAwETVz0SwAdr/4GX0BAXjLA/9IZD5mT/BHdRfDvH6AnFwaxqAuluhCcycchW0A
  1394. /SOUJPsmFnFjGUoCFrur603rEUJpR/JsZpVOXaQHcNSuitB2msDu8YZyrVPgcV86
  1395. vGptHkX31GrfIK8RR4hHRtt0suUBWZBDJRfLNbq7KMKxfNF3h4wRjC1NBzzU0orM
  1396. mj9d2A==
  1397. =HOga
  1398. -----END PGP PUBLIC KEY BLOCK-----
  1399.  
  1400.  
  1401. I wish to thank the following people who have contributed to the development
  1402. of this set of utilities:
  1403.  
  1404. Pin Fei Sun (pfsun@undergrad.math.uwaterloo.ca)
  1405.   for writing the original emulator and utilities and distributing the
  1406.   source code without restrictions; no part of the original code is still
  1407.   present in this version -- even the key stuffer was slightly modified --
  1408.   but it served as a general basis to build the package; without it, I would
  1409.   have spent MANY more hours in developing and debugging; moreover, I liked
  1410.   the simple design (the emulator + 2 utilities to set keys and calibrate
  1411.   joystick, that were eventually merged in JoyCP), which I think is far
  1412.   superior than having just one executable with a LOT of command line options
  1413.   pretty obscure (anyway, they are there if you want to use them)
  1414.  
  1415. Scott Hall
  1416.   most interrupt handlers, from his package TSRFIL10.ZIP, available from
  1417.   Simtel
  1418.  
  1419. Tom Grubbe
  1420.   TSR detection, uninstall routines and keyboard handler (well, slightly
  1421.   modified) -- part of the code was taken from his package PCPILOT.ZIP,
  1422.   available from Simtel; many routines were eventually taken from a book
  1423.   by Al Stevens
  1424.  
  1425. Markus F.X.J. Oberhumer
  1426.   routines to read keyboard (used for setting keys to be emulated), which
  1427.   are based on his package LIBKB100.ZIP, available from Simtel
  1428.  
  1429. Thomas Brandenborg
  1430.   beep routine (slightly modified), from his package TSRDEMO2.ZIP, available
  1431.   from Simtel
  1432.  
  1433. _____________________________________________________________________________
  1434.  
  1435.              Support software authors! It is in your interest!
  1436.