@@@ @@@@@@ @@@ @@@@@@ @@@ @@@ @@ @@ @@@ @@ @@ @@ @@ @@ @@@ @@ @@ @@ @@ @@@@@@ @@@ @@ @ @@ @@ @@ @@@ @@ @@ @@ @@ @@@ @@ @ @ @@ @@ @@@@@@ @@@ @@@ @@@@@@ @@ @ @ @@@@ @@@ @@@ @@@@@@ @@@ Version 4.1 (C) 1996-97 Simone Zanella Productions INDEX _____ 1 DISCLAIMER AND LEGAL STUFF 2 FILES IN THE PACKAGE 3 BEFORE START 4 WHAT IS JOYEMU 5 CURRENT FEATURES (v4.1) 6 UPGRADING FROM VERSIONS BEFORE 4.0 7 HOW TO USE JOYCP 8 HOW TO USE JOYEMU/JOYEM 9 TROUBLE SHOOTING 10 WHAT TO DO IF... 11 A NOTE FOR WINDOWS 95 USERS 12 COMPATIBILITY 13 HISTORY 14 TECHNICAL SPECIFICATIONS 15 CREDITS 1 DISCLAIMER AND LEGAL STUFF _____________________________ This product comes with no warranty. It is freeware, but use it at your own risk; the author takes no responsibilities of any sort related to the use of this product. Everyone that receives a FULL copy of this package (see section "FILES IN THE PACKAGE") can freely install, duplicate and distribute the package, as long as: - FULL, unmodified package is duplicated; - no additional fee is requested, apart from the cost of the media necessary for the copy; - the package is not distributed with other software or hardware. Any WEB/FTP site can freely distribute this package as long as FULL, unmodified package is downloadable in a single, compressed file (any archiver will do). The user acquire the right of using the package, but he can not alter, disassemble or sell the software and the documentation that comes with it. Simone Zanella retains intellectual property and copyright over the whole package. Written permission is required from Simone Zanella if you want to: - sell this package; - distribute this package together with other software; - include this package in a compilation of software; - bundle this package with any hardware device (especially joysticks, joypads, mouse and hardware interfaces). The concept of 'written permission' applies also to digitally signed text, i.e. a plain text that I'll send through e-mail, signed with my private PGP key. Simone Zanella reserves the right to charge money for releasing said permission. Inclusion of this package in shareware/freeware collections follows this special policy: a written permission will be granted as soon as a full and detailed list of the programs that will be distributed with this package is received by Simone Zanella; the author of the collection is bound to send a copy of the collection for which permission was granted to Simone Zanella at the address written at the end of this document (CREDITS section) or to another address stated in the permission as soon as the collection becomes commercially available. Simone Zanella reserves the right to deny or revoke said permission at his will. Any other form of distribution must be previously agreed upon with Simone Zanella and requires a special, written license, which can be subject to payment. REMEMBER: You may distribute this package only in its integrity (see section "FILES IN THE PACKAGE"). Under no circumstances you can charge money for this product, unless a reasonable amount to cover copying and handling (mass distribution is NOT covered by this point). This package cannot be distributed with other software/hardware unless a written permission for the distribution has been previously obtained from Simone Zanella. 2 FILES IN THE PACKAGE _______________________ JCMPTST.EXE Test compatibility of JoyEmu with your system JOYCP.EXE Control panel for JOYEM/JOYEMU JOYEMU.EXE TSR for emulation (with hot keys) JOYEM.EXE TSR for emulation (without hot keys) CONVKS.EXE KS file upgrader (3.1+ -> 4.x) JOYCP.ICO Icon for JOYCP (Windows 95/Windows 3.1) JOYEMU.TXT This file WHATSNEW.TXT Features added in the current release MOUSE.JS File to be used if you don't have any joystick JOYEMU.FAQ Frequently asked questions about JoyEmu and JoyCP FILE_ID.DIZ Short package description The original archive is AV certified and all the programs are virus free. 3 BEFORE START _______________ JoyEmu uses a special feature which is common to most modern bioses to fake key presses. Unfortunately, 'most' is not 'all'; before reading this (long) document that explains in details how to use JoyEmu, you can quickly determine if your system is compatible with it. The program JCMPTST.EXE is provided for this purpose; all that it does is printing 'joyemu' (or 'JOYEMU', depending on the state of caps lock) by stuffing keys to the keyboard buffer with the same method used by JoyEmu when emulating keyboard. If, after running it, you don't see this string appearing on the Dos prompt, your system is not compatible with JoyEmu. You may consider trying fiddling with the bios settings (especially the shadowing of the paragraph F000-FFFF) or updating/replacing your current bios, if your motherboard has flash bios support. Be aware, though, that I can't help you on this matter: you are on your own. 4 WHAT IS JOYEMU _________________ JOYEMU and JOYEM are keyboard emulators for joystick and mouse: they are two TSR programs that let you use your input devices with software that accepts only keyboard input, or with those programs that have weak support for other kind of input. JOYEMU and JOYEM are essentially the same program, but JOYEM lacks hot key support. Hot keys let you change on the fly many parameters of the emulation, but are not strictly necessary -- both JOYEMU and JOYEM accept command line parameters to update the status of the resident emulator; moreover, JOYCP can be used to change all the settings of TSR emulator. JOYEMU and JOYEM can be easily uninstalled and reinstalled as needed (read section "A NOTE FOR WINDOWS 95 USERS" to learn how to use the emulators with Windows 95 native programs). To configure the emulators for you system, JOYCP must be used. JOYCP replaces the original utilities JOYSET and KEYSET, which are no longer necessary. JOYCP is by far more flexible than the older utilities; it can be used to: - calibrate your joystick(s) and define common emulation parameters such as the number of fire buttons, joystick sensibility and interface read mode; - set mouse tolerance for both axis; - define emulated keys (i.e. keys associated with joystick directions and fire buttons), autofire and repeat delay for each fire button and various other settings that depend on the application to run in foreground (hold mode, force break mode, shift mode, 8 way mode, sampling delay, switch keys); - swap emulated keys between the two joysticks; - create separate configuration files and load them as needed; - update resident emulator with new settings; - and much more.. Special care has been taken to ensure great compatibility and robustness; both emulators could be cut down in size and made faster if I removed all the checks and workarounds that I left to make them work on as many hardware configurations as possible. Neverthless, it is possible that these programs don't work on your system -- I'm sorry if they don't, but I really don't know what else I could change to make them more compatible. If you have troubles, read the TROUBLE SHOOTING section and the JOYEMU.FAQ and, if you don't solve the problem, try messing around with BIOS settings for the keyboard (but ONLY if you know what you are doing!!). JOYEMU was inspired from an original utility with the same name written by Pin Fei Sun (version 1.01); this program, however, is completely different and was rewritten from scratch; no part of the actual code resembles the source written by Pin Fei. This is not to say the original code wasn't noteworthy: it really helped me in developing this package and was the spring that made me start this project -- this is the reason why I kept the original name for the emulator (despite the fact that now it is no more limited to joystick input). I wish to thank once more Pin Fei for sharing his efforts with the Internet community -- without him, you wouldn't be reading this notes. JOYCP was written from scratch by me, to create a modern interface both easy to use and pleasant to see. JOYEMU takes up about 27K of memory while resident; JOYEM about 26K. 5 CURRENT FEATURES (v4.1) __________________________ * Up to TWO digital and/or analogue joysticks are supported (2 buttons) * Support for joysticks with FOUR buttons * Support for a single joystick with SIX or EIGHT buttons * Up to TWO SWITCH BUTTONS, which change the keys stuffed by all other buttons and directions; with an 8-button joypad, you can now stuff 56 different keys (40 different keys with a 4-button joypad, 24 keys not counting diagonals)! * Support for MOUSE INPUT: 4 direction movements, 3 fire buttons, autofire individually set for each button; the mouse can be used alone or together with one or two joysticks * Capability of emulating all NORMAL AND EXTENDED keystrokes (arrow keys, Ctrl, Alt, Shift ..) * Emulation of SHIFTED KEYS, i.e. keys combined with Ctrl, Alt, Shift (both left and right) * TWO joystick reading modes (full or timed), to match your hardware * AUTOFIRE AND REPEAT DELAY individually set for each fire button * HOLD MODE setting, for games that require to hold directional keys instead of pressing and releasing them * SHIFT MODE setting, to enter single keystrokes or allow shifted keys * SELECTIVE KEY STUFFING: you can set to "none" the key stuffed by a certain direction/button (e.g. for games which don't require fire buttons) * 8 WAY MODE to have different keys stuffed when joystick is moved in diagonal (instead of stuffing keys for the two directions) * Two SEPARATE CONFIGURATION files: one keeps joystick calibration, number of buttons, sensibility and read mode (usually set once and for all); the other keeps key settings, sampling interval, force release mode, hold mode, shift mode, diagonal mode, switch keys, mouse tolerance for both axis and autofire settings, which are subject to change depending on the application to run * Configuration files (JOYSET.JS and KEYSET.KS) are searched first in current directory and, if not found, in the DIRECTORY OF THE EMULATOR * While JOYEMU IS RUNNING, through hot keys you can: - increase/decrease joystick sensibility - increase/decrease joystick sampling interval - increase/decrease tolerance for each mouse axis - switch 'force release mode' on/off - switch autofire on/off for each joystick and for mouse - switch hold mode on/off - turn the emulation on and off - reload key settings from file in current directory - uninstall the emulator, if no other TSR was loaded on its top * Support of COMMAND LINE PARAMETERS to: - display an on-line help (both hot keys and command line parameters) - detect resident emulator (for batch processing) - uninstall TSR - set emulation on/off - reload key settings (from a file in current directory or from a specified file) - reload joystick settings (from a file in current directory or from a specified file) - set key associated with a direction/fire button (normal or switched) - set hold mode for directional keys - set joystick sensibility to a specified value - set 'force release mode' on or off - set 'shift mode' on or off - set '8 way mode' on or off for each joystick - set autofire on/off and repeat delay for each button of every joystick - set sampling interval to a specified value - turn hot key support on or off - set number of switch keys - set button corresponding to a switch - set tolerance for each mouse axis - turn on/off mouse keyboard emulation * Command line parameters can be used to INSTALL EMULATOR WITH SPECIFIED SETTINGS or UPDATE RESIDENT EMULATOR (same syntax) * JOYEM, a version of JOYEMU without hot keys, is also provided, to better compatibility, speed up keyboard response and spare a little memory * Errors and confirmations signaled through different sounds from INTERNAL SPEAKER * JOYEMU/JOYEM can be easily UNINSTALLED, freeing up its memory * Greatly improved COMPATIBILITY AND ROBUSTNESS * Works under DOS (real mode) and WINDOWS 95; Windows 3.1 is untested * JOYCP, a control panel for both emulators, let you change ALL the parameters for resident emulator, create and manage configuration files using Windows 95 long names, uninstall the emulator, swap key settings, all through an intuitive interface with repositionable windows that allows the use of both mouse and keyboard ".JS" configuration files are compatible with those created with version 3.1; ".KS" files are NOT compatible and must be converted from previous versions (or use JOYCP to recreate them for each configured application). JOYSET.JS and KEYSET.KS must exist in current directory or in the same directory of the emulator when it is installed; KEYSET.KS must be located in the current directory or in JOYEMU's directory when you press Shift-F8 to change emulated keys. Both configuration files are created by JOYCP (read on for further information). 6 UPGRADING FROM VERSIONS BEFORE 4.0 _____________________________________ '.JS' configuration files for version 3.0+ are compatible with version 4.x; '.KS' files for version 3.1+ (before 4.0) must be converted with CONVKS for use under version 4.0+. CONVKS is useful only to users of JoyEmu 3.1+. CONVKS takes a single parameter: the name of a '.KS' file in version 3.1+ format; it upgrades in place the file to version 4.x, i.e. the old file is overwritten with the new configuration. CONVKS checks that the file is actually in 3.1+ format before upgrading; files already in 4.x format or files in format previous to 3.1 are left unchanged and a warning message is issued. The difference between 3.1+ and 4.x format lies in the new switch buttons and mouse support, that require additional key bindings. Converted configuration files have no switch keys and all related keys set to 'none' by default. 7 HOW TO USE JOYCP ___________________ Type JOYCP to setup emulation parameters. JOYCP is structured in various menus; at any time, just one menu is active and its window can be positioned anywhere on the screen by clicking on the frame, moving the mouse and releasing the button; JOYCP remembers the position for each window between different sessions; for this reason, it modifies its executable (be aware of this if you use antivirus packages that check file integrity by calculating CRCs on executables). You can move the windows also by using arrow keys combined with Ctrl. These are the keys recognized: - enter, space, right: select option; - up/down: change option; - esc, left: previous menu; - home, end, pag up, pag down: navigate the menu. You can select an option also by clicking on it with the mouse or by pressing highlighted letter; unselectable options are automatically grayed out, reflecting your selections and TSR status. Right mouse button does the same as the Esc key. When an option is highlighted, a one-line help text is printed on the bottom of the screen that explains what the option means/does. JOYCP's main menu has 6 submenus: - Joy settings: for calibrating joystick(s), setting read mode, sensibility and number of fire buttons; - Mouse settings: to turn on/off mouse keyboard emulation and to set tolerance for each mouse axis; - Key settings: for setting keyboard mode, emulated keys, autofire settings, sampling delay, shift mode, 8 way mode, switch buttons; - TSR settings: to force detection of resident emulators and connected joysticks; to switch on/off: emulation, autofire and hot key support; to uninstall TSR and get information about resident program; - Configuration: for switching on/off auto-detection of JoyEm/JoyEmu on startup, change path to emulators and initial path for configuration files, switch auto update mode on/off; - Exit: to return to Dos (same as pressing Esc). On startup, JOYCP will search JOYEM and JOYEMU in the Dos path and in its directory (or in the directory specified in the Configuration section), and warn you if it cannot find them. JOYEM and JOYEMU must be reachable to let JOYCP determine the presence in memory of the emulator. The "Configuration.." submenu is used to specify default paths and TSR detection on startup. If you want to keep JOYEM/JOYEMU in a separate directory, switch "Use Dos path" to "Off" and change "Executables path..". Upon start, if an emulator is resident, JOYCP will load its configuration and set menus accordingly; if it isn't, JOYCP will search default configuration files (JOYSET.JS and KEYSET.KS) following this order: 1) JOYCP directory; 2) current directory, or directory specified as "Config files path.." (when "Use current dir" is "Off"). If no file is found or loading fails (files corrupted or not accessible), JOYCP set parameters to default values. Every time you have to enter a path or a pathname, a standard window pops up; besides the usual keys and mouse functions, the following keys are active: - shift-tab: self complete name in the edit section (Unix like); - alphanumeric keys: moves the highlight bar to the first file satisfying the typed letters. If you have to choose a path (not a file), when you press "OK" the string after "Path:" will be accepted. To avoid detecting resident emulators on startup, in the same menu you can turn off "Check JoyEm" or "Check JoyEmu". The "Auto update" option is very useful if you keep the emulator resident and change on the fly parameters as needed; when auto update is on, as soon as you change the value of each parameter the resident emulator is updated accordingly. Because of program design, ALL parameters of the same group are actually updated, that is: all joystick settings, all key settings (including mouse features) or all TSR settings, depending on the position of modified parameter in the menu tree. With the last option ("Config files path..") you can enter the initial path for configuration files: this is the path in which ".JS" and ".KS" files are saved/loaded, if not changed explicitly. The "Joy settings.." submenu must be used to calibrate joystick(s). Before running the calibration, you must choose if you want to adopt the timed or full reading mode for joysticks. Timed reading is the default -- you should switch to full reading ONLY if you have a very fast machine AND you experience directional lock-ups. If you change reading mode, you must recalibrate the joysticks; you will not be able to save/update TSR until all joysticks detected are calibrated with the SAME reading mode. Auto-update takes place ONLY when joystick(s) are calibrated and reading mode is set to the same value under which joystick(s) were calibrated. For each joystick you can set: - status: enabled/disabled; when disabled, joystick will not be read during emulation (disable both joysticks, for example, if you need only keyboard emulation via mouse); - fire buttons: 2, 4, 6 or 8 for first joystick, 2 or 4 for second joystick; select 2 even if the joystick has just one fire button; if you select 6/8- button mode, the options for the second joystick will be disabled; - sensibility: from 2 to 7; 2 is VERY hard and 7 is VERY sensible: typical values are 5 for a digital joystick and 3 or 4 for an analogue one. The calibration is very simple: for each joystick, center the stick and press fire button 1 or 2; then, move the stick to upper left and press fire; at last, move the stick to lower right and confirm with fire. For 6/8 button joysticks, there is an additional procedure: you will be asked to press fire button 5 together with 3 or 4 and then fire button 6 with 3 or 4; this is necessary since fire buttons 5 and 6 are connected to direction lines for the second joystick, which do not return digital (0-1) values. The same procedure will be repeated for fire buttons 7 and 8, if necessary. If TSR emulation is active, you won't be able to calibrate joysticks until emulation is turned off: see "TSR settings.." submenu. As a rule of thumb, select timed reading mode, 2 buttons and enter 5 for sensibility. Use: - "Load settings..", to load joystick calibration from a saved file; - "Save settings..", to save current joystick configuration to disk; - "Import from TSR", to update menu values from TSR settings; - "Update TSR", to update TSR settings from current menu values. The "Mouse settings.." submenu is used to setup mouse parameters. All the parameters in this menu are saved together with the key parameters (see "Key settings" menu). "Mouse emulation" sets on or off keyboard emulation with mouse input when emulator is started; you can manually turn on or off only this part of the emulation by running JOYEMU with the command line parameter 'M'. To start JOYEMU, you MUST specify a JS configuration file, even if no joystick is connected; if you don't have any joystick, use the file MOUSE.JS enclosed in the package. WARNING! JOYEMU does not do any check for the presence of the mouse driver; it presumes it exists, since you have specified so. You could get unexpected results if no mouse driver is loaded and you activate mouse emulation. Moreover, compatibility here is directly connected to the quality (and speed) of the mouse driver; if the driver is very complicated and takes too much time, emulation will be slow or you could even experience lock-ups (NOT under Windows 95, anyway). JOYEMU does not change the mouse handler; using an interrupt driven approach revealed that it worked worse than a polling one. This means that JOYEMU is perfectly safe under Windows 95; be aware, though, that when mouse emulation is active you won't be able to use the mouse as usual in Windows: so, it is a good idea to activate and de-activate keyboard emulation via mouse only through batch files. "X tolerance" and "Y tolerance" set the value of this feature for X and Y axis. You can enter any value between 1 and 20; the lesser the value, the quicker will be the mouse response (higher sensibility). Usually, the Y tolerance should be half of the X tolerance, to compensate for the display shape. The "Key settings.." submenu is used to setup keys for emulation. "Sampling delay" let you enter sampling interval for joystick and mouse readings; a value of 0 means continuous probing; higher values (2, 3) helps in a few games which are VERY time critical; you should probably leave this value to 0 if you have a fast machine or if you don't experience slow downs during emulation. Higher values COULD help if you have a slow machine (but you'll get the impression of playing via satellite!). Sampling interval can also be changed while JOYEMU is running by using Shift-F3 (increase) or Ctrl-F3 (decrease), or updated by running JOYEMU with parameter S (read on). There are three switches that control how keys are stuffed during emulation: - "Hold mode": if you activate hold mode, when you push the stick or the mouse in a direction the associated key will be pressed and when you re-center the device it will be released; if hold mode is off, as long as you keep the device off centered the corresponding key will be stuffed to the keyboard buffer. This setting depends on how the user is supposed to enter data in the application in foreground; if you experience slow downs, activating hold mode could solve the problem; the default should be hold mode ON - use Shift-F7 in JOYEMU to switch hold mode on/off; - "Force break": this switch determines if JOYEMU should force release before each keypress; forcing release is more compatible, but since a higher number of scan codes is stuffed to the keyboard buffer it COULD slow down the emulation on slower machines; this setting depends heavily on your particular hardware; the default should be force release mode ON - use Shift-F4 in JOYEMU to switch force release mode on/off; - "Shift mode": when shift mode is on, if configured keys are actually combinations of a key with shift keys (alt, ctrl, shift) these other keys are also stuffed to keyboard buffer; if shift mode is off, only single keys are stuffed - you should turn off shift mode if key combinations are not needed. The "switch keys" are special buttons (available only for a single joystick AND when only the first joystick is enabled) that, when pressed, change the keys stuffed by every other button and direction; there can be zero, one or two switch buttons. Each switch button can be a toggle switch or a shift switch. 'Shift switch' means that the effect of the button disappears as soon as you release the button itself (think at the keys Ctrl and Alt on the keyboard). 'Toggle switch' means that when you press the button once you activate its function and you must press it again to remove its effect (think at the keys Caps Lock and Num Lock on the keyboard). You can have one shift and one toggle switch, two toggle switches or two shift switches; it is up to you to determine what is better for the particular program in foreground. The "Fire switch 1" and "Fire switch 2" options let you select which button should act as a switch key. When you have one switch key, you have TWO complete sets of keys, each with 4 directions, 4 diagonals (if 8 way mode is activated) and up to 7 fire buttons; with two switch keys, you have FOUR complete sets of keys: one used when no switch key is pressed, two used when one switch key is pressed (but not the other) and one used when both switch keys are pressed. The grand total of distinct keys that can be stuffed is reported by these tables: +------------+-------------------+ | ONE | # of buttons | | SWITCH | | | | 2 4 6 8 | +------------+----+----+----+----+ | 4 way mode | 10 | 14 | 18 | 22 | +------------+----+----+----+----+ | 8 way mode | 18 | 22 | 26 | 30 | +------------+----+----+----+----+ +------------+-------------------+ | TWO | # of buttons | | SWITCHES | | | | 2 4 6 8 | +------------+----+----+----+----+ | 4 way mode | 16 | 24 | 32 | 40 | +------------+----+----+----+----+ | 8 way mode | 32 | 40 | 48 | 56 | +------------+----+----+----+----+ With the switch keys you can, for example, play Quake without using the keyboard, or play Robotron with a single fire button (very nice - try it!). NOTE: when any switch key is pressed, keyboard emulation via mouse is suspended. For each joystick there is a separate submenu that let you select keys to be emulated and autofire settings; there are 4 directions (+ 4 diagonals) and 4, 6 or 8 fire buttons to be configured (read on to understand why), and the same keys must be configured for each additional switch state (if any). For the mouse, you can enter the keys for the 4 directions, one key for each button (left, right and middle) and corresponding autofire. You can set directions and buttons even for joysticks that won't be connected: it doesn't matter, since keys configured for non-existent devices are simply ignored during emulation. IMPORTANT! If you don't want to stuff any key at all for a certain button/ direction, select the option with the SPACE BAR, that is: - move selection bar to highlight desired direction or button; - press the space bar. If you select the option with return, right arrow or left mouse button, you will set the key to be stuffed as usual, by pressing any key on the keyboard (the key can be the space bar as well). All keys are supported: shift keys (Shift, Ctrl, Alt), as well as other special keys (as CapsLock and NumLock) and key combinations with shift keys (ctrl, alt, shift). If your joystick has 6 or 8 fire buttons, remember to set this parameter in the joy settings menu, before entering the key settings; thus, the menu will change to include the two or four additional fire buttons (both for assigned key and autofire rate). You might ask why up to 8 buttons are requested for each joystick; the reason is that there are PC controllers available that have more than 2 fire buttons; buttons 3 and 4 use the lines in the interface for buttons on the other joystick, buttons 5..8 use direction lines for the second joystick. If you are going to connect two joysticks via a Y-adapter, you will probably use traditional models with two buttons. NOTE: the key assignments for fire buttons 5..8 are stored in place of key assignments for the buttons 1..4 of the second joystick; this is done both to spare memory and because one 6/8-button joystick uses all the lines available in the joystick interface, so you cannot connect any other device. I don't know if 8-button joysticks are actually being produced (I mean joysticks with 8 DISTINCT fire buttons, not controllers with duplicated turbo or autofire buttons), but you can easily build such a beast and that's the reason why I put in this feature. This is a simple diagram that shows how to build this kind of joystick from two standard 2-button joypads; Fx means fire button x, U/L/R/D stand for up, left, right, down. U F6 | | L --+-- R F1 F2 F5 --+-- F7 F3 F4 | | D F8 | | | | +----------+----------+ +----------+----------+ | | | | +------------+------------+ | to PC game port | Join the lines so that, in a single PC game connector, you have the control signals from both joypads (you'll need to get a more detailed diagram for that, this is just to give you the idea). One thing that you must keep in mind is that fire buttons 5 and 7 (as well as 6 and 8) are mutually exclusive; the reason is very simple: they share the same direction line and just as you can't go up and down at the same time, you can't press buttons 6 and 8 simultaneously. So what's the deal in having 8 fire buttons when I can use only 6 distinct buttons at a time, you might ask? Well, there are many cases in which this is useful; for example, to activate functions rarely used but needed (a start or select button in a console emulator), or when the mutually exclusive nature is implied by the situation (e.g. a character that can use two weapons, but only one at a time). The "Diagonals.." submenu let you (de)activate 8 way mode and set keys to be stuffed for diagonals. When 8 way mode is on, you can stuff different keys for, say, up, left and up + left; if 8 way mode is off, a diagonal is translated as two keypresses, corresponding to the two directions. You must activate 8 way mode in the first key submenu to enter diagonal key setting in the switched keys submenu. In the "Autofire rate.." submenu, for each button enter 0 for repeat delay if you don't want autofire (default), or a value between 1 and 18. Lower values (except 0) mean faster repetition, since these numbers refer to the repeat delay, that is the number of joystick pollings after which a keypress is generated if a fire button is held down. If 'force break' is active, settings should be >= 2, since 1 = 2 (one delay state is necessary for releasing the button); in this mode, at most 9 keys per second are stuffed in the buffer. The autofire values are valid also for all switched fire buttons. Use Shift-F5 and Shift-F6 to turn on/off autofire for ALL buttons of joystick 1 or 2, respectively. Important: SET ALL REPEAT DELAYS TO 0 TO SPEED UP EMULATION. The option "Swap buttons 1 and 2" let you exchange keys bound to fire 1 and 2; this is usually quicker than re-selecting keys and can be useful if the buttons on the joystick are in different positions (if one of the buttons is a switch, the keys cannot be swapped). The option "Swap key bindings" exchange all keys, autofire rates, diagonal and 8 way mode settings between joystick 1 and 2; this is useful if you have two different joysticks and want to try which is best without desconnecting cables. If you have just one joystick, this option can be used to have two full configurations on line, which can be swapped as needed. As a rule of thumb, enter 0 for sampling interval, activate hold mode and force break mode and de-activate shift mode and 8 way mode. Note that if you change sampling interval you will probably want to change also autofire settings, since now the key generation subsystem is invoked less frequently. Use: - "Load settings..", to load key configuration from a saved file; - "Save settings..", to save current key configuration to disk; - "Import from TSR", to update menu values from TSR settings; - "Update TSR", to update TSR settings from current menu values. The "TSR settings.." submenu is used to change general TSR switches and to manually detect emulator in memory (if "Check JoyEm" and "Check JoyEmu" options are turned off in "Configuration.." menu), or to detect currently connected joysticks if you have disconnected/reconnected devices. Use: - "Force detection", to check for the presence of JOYEM/JOYEMU in memory and to detect connected joysticks; - "About TSR" to show information about detected TSR (type and version); - "Hot key support" to switch on/off hot key support (only when JoyEmu is resident); - "Autofire x/mouse", to switch on/off autofire for all buttons of joystick x or mouse; - "Emulation", to (de)activate keyboard emulation; - "Import from TSR", to update menu values from TSR settings; - "Update TSR", to update TSR settings from current menu values; - "Uninstall TSR", to remove from memory resident emulator. JOYCP has also a special 'query mode' which is activated when you run the program with '?' as the only parameter: JOYCP ? While in this mode, JOYCP displays a 6 digit hexadecimal number for each key pressed; this number can be used with the E parameter of JOYEMU/JOYEM (read on for further details) to set the key emulated by a certain direction or a fire button; press Esc to return to Dos. 8 HOW TO USE JOYEMU/JOYEM __________________________ Type JOYEMU to install the emulator in memory - hot keys available once installed are: Shift-F1 increase sensibility for joystick 1 Shift-F2 increase sensibility for joystick 2 Ctrl -F1 decrease sensibility for joystick 1 Ctrl -F2 decrease sensibility for joystick 2 Shift-F3 increase sampling interval Ctrl -F3 decrease sampling interval Shift-F4 switch autofire on/off for mouse Shift-F5 switch autofire on/off for joystick 1 Shift-F6 switch autofire on/off for joystick 2 Shift-F7 switch 'hold mode' for directional keys on or off Ctrl -F7 switch 'force release mode' on/off Shift-F8 reload keystrokes to emulate from the file KEYSET.KS (which must reside in the current directory or in JOYEMU's directory) Shift-F9 turn on/off the emulation Shift-F10 unload JOYEMU from memory; this is possible ONLY IF no other TSR was loaded on the top of it Shift-F11 increase mouse tolerance for X axis Ctrl -F11 decrease mouse tolerance for X axis Shift-F12 increase mouse tolerance for Y axis Ctrl -F12 decrease mouse tolerance for Y axis It is a good idea to use these keys ONLY on Dos command line and not while an application is running. Moreover, keys Shift-F10 and Shift-F8 are disabled during Dos internal operations so if they don't work the first time keep pressing them until you hear the confirmation beep. To turn off hot key support, use parameter 'Y-' (see below); hot key support is on by default at startup. JOYEMU sounds the internal speaker to inform the user if requested operation was completed successfully or not: you will easily distinguish an error beep (lower) from a confirmation beep (brighter). If command line parameters are used to change settings, only errors are acoustically signaled. It is possibile to change parameters of resident JOYEMU by running JOYEMU with the following command line options: JOYEMU [ ?[1|2|3] | D | U | [K[filename]] [J[filename]] [+] [-] [Sjx] [Ix] [F[-]] [H[-]] [T[-]] [Xj[-]] [Rjbx] [Aj[-]] [Ejbk] [Y[-]] [Nn] [Wnb[+]] [M[-] [Myt] ] ? display corresponding page from on-line help D exit setting errorlevel to 0 if emulator is NOT installed U unload resident JOYEMU K have resident JOYEMU load key settings from KEYSET.KS; if a pathname is present after K, settings are loaded from specified file J have resident JOYEMU load joy settings from JOYSET.JS; if a pathname is present after J, settings are loaded from specified file +/- enable keyboard emulation/disable keyboard emulation, but keeps JOYEMU in memory (use U to remove it) Sjx set joystick sensibility for joystick j (1 or 2) to x, which must be between 2 and 7 Ix set sampling interval to x; x can be between 0 and 9 F switch on 'force release mode'; if 'F-', switch it off H switch on 'hold mode'; if 'H-', switch it off T switch on 'shift mode'; if 'T-', switch it off Y switch on 'hot key support'; if 'Y-', switch it off (JoyEmu only) Xj[-] switch on (or off, if '-') 8 way mode for joystick j (1-2) Aj switch autofire on for device j (1-2 joystick, 3 mouse); if 'Aj-', switch it off M turn on keyboard emulation via mouse; if 'M-', turn it off Myt set mouse tolerance for axis y (X/Y) to t (1-20) Nn set the total number of switch keys to n (1-2) Wnb set button b (see below) as switch n (1-2); button is a shift switch Wnb+ set button b (see below) as switch n (1-2); button is a toggle switch Rjbx set repeat delay for device j (1-2 joy, 3 mouse) and button b (see below) to x, which can be 0 (no autofire) or 1 (fast) - 18 (slow) Ejbk set key emulated by device j and button b to key k, which is a 6 digit hexadecimal number (AKA "magic number") that can be found by using 'JOYCP ?'. Warning! Magic numbers have changed from version 2.0! The following tables show values for b and j: Values for j: 1/2 joystick 1/2 3 mouse 4/5 keys when switch 1/2 is pressed 6 keys when both switch 1 and 2 are pressed Values for b: 8 fire buttons directions (button # - 1) 1 2 3 4 5 6 7 8 C 9 E 9 v v v v v v v v \³/ ³ 0 1 2 3 4 5 6 7 8 -J- A 8 -Mouse- A /³\ ³ Mouse: L 0 R 1 M 2 D B F B Warning! Syntax for parameters 'R' and 'E' has changed from version 3.3. If JOYEMU is not in memory and parameters are specified (except '?', 'D' and 'U'), then JOYEMU goes resident and change settings according to parameters specified. e.g. JOYEMU - Y- Install JOYEMU with emulation disabled and without hot key support, or turn off emulation and hot key support for resident emulator JOYEMU KMYKEYS.KS Install JOYEMU with specified key settings, or set emulated keys for resident emulator JOYEMU H F T- Install JOYEMU with specified switches, or change settings for resident emulator Pay attention to the syntax of each parameter; the internal command line interpreter should be safe, but it does not perform many checks (since the code had to be very tight to save memory). Remember that by reloading key configuration (Shift-F8 in JOYEMU, command line parameter K in both JOYEM and JOYEMU) you will also set sampling interval, force release mode, hold mode, shift mode, 8 way mode, mouse tolerances and emulation status, diagonal and autofire settings to the respective values stored in the configuration file. For this reason, remember to put J and K parameters at the beginning. JOYEM works exactly as JOYEMU, but it lacks hot key support. However, it has a few advantages: - the keyboard response is faster, since the handler does not search for hot keys at each keypress (the speed is the same if you disable hot key support with parameter 'Y-' in JoyEmu); - it uses less memory; - it can be used to avoid troubles with programs in which the hot keys have a special meaning or are used to enter data (problem overcome in JoyEmu by using 'Y-'). Command line parameters works exactly as in JOYEMU (except parameter 'Y', which makes no sense here). You must use JOYEM to update a resident JOYEM and JOYEMU to update a resident JOYEMU; you can NOT set resident JOYEM with JOYEMU and vice-versa. 9 TROUBLE SHOOTING ___________________ JoyEmu seems to have problems with PCs equipped with Mr. Bios. I was told, also, that on some machines you need to shadow the F000-FFFF paragraph of the bios for the emulator to work. Read the paragraph "BEFORE START" for more information. NEVER disconnect a joystick while the emulator is in memory and is active; this would lead to a continuous stream of keys stuffed into keyboard buffer, that would prevent the use of the PC; in this case, always disable emulation (by Shift-F9 or parameter -) or unload emulator (by Shift-F10 or parameter U) before operating. Moreover, disconnecting hardware while your PC is powered on is not very healthy for both the attached device and your computer. If you want to change on the fly the joysticks connected, there are several ways of doing it; this is the suggested method -- replace JOYEMU with JOYEM if you prefer using the version without the hot keys: AFTER THE EMULATOR IS INSTALLED IN MEMORY: 1) use: JOYEMU - to momentarily turn off emulation; 2) disconnect and reconnect joystick(s) as needed; 3a) calibrate joystick(s) through JOYCP; 3b) if you prefer, you can calibrate them once and for all and save configuration to MYJOY2.JS, for example; 4) now update resident emulator with the new configuration and turn on emulation; example is given for user selected configuration: JOYEMU JMYJOY2.JS + Always put '+' as the last parameter! If you disconnect/reconnect your joysticks very frequently, you can automate this sequence by writing a batch file. Of course, the same operation can be accomplished entirely through JOYCP: 1) select "TSR settings.."; switch off "Emulation" and select "Update TSR"; 2) disconnect and reconnect joystick(s) as needed; 3a) select "Joy settings.." and calibrate joysticks as needed; 3b) if you prefer, you can calibrate them once and for all and save configuration to MYJOY2.JS, for example; 4) select "Update TSR" in the "Joy settings" submenu; select "TSR settings.."; switch on "Emulation" and select "Update TSR". You don't need to "Update TSR" if "Auto update" is on. If you are simply desconnecting one of the joysticks, you can do it by turning emulation off, removing the device and then turning emulation on; in fact, the number of joysticks connected is checked every time that TSR emulation is turned on. Remember that repeat delay for autofire is directly connected to sampling interval; if you increase sampling interval, you might want to decrease repeat delay and vice-versa. That's because repeat delay should be interpreted as 'NUMBER OF JOYSTICK POLLINGS after which a fire key should be stuffed in the keyboard buffer while joystick fire button is kept pressed'. Many programs (especially games) chain the keyboard handler to get faster response and to filter unwanted keys; while these programs are running, JOYEMU's hot keys may not be accessible. Moreover, it is safer to use the hot keys on Dos command line. You can't uninstall JOYEMU/JOYEM if one or more TSR programs have been installed after it; unload the other TSRs in reverse order of installation, then uninstall the emulator. 10 WHAT TO DO IF... ____________________ - you don't have any joystick; + use the supplied MOUSE.JS file; you need to specify a '.JS' file to install the emulator; - joystick readings seem uncorrect: + try activating full read mode; - autofire does not work correctly or you get directional lock-ups: + turn on force release mode; to speed up key stuffing (up to 18 keypresses per second), turn off force release mode; - a game seems to run too slowly when the emulator is resident: + try setting sampling interval to higher values (2, 3) or switching on 'hold mode'; disable full read mode; set all repeat delays to 0; use switch buttons only to access rarely used keys; - game reaction to joystick movements seems too slow: + try setting sampling interval to lower values (1 or 2) or switch off 'hold mode'; turning off force release mode and disabling full read mode could also help; - game action is not fluid: + try switching on 'hold mode' and/or disabling full read mode; - sometimes, a direction key is stuffed without moving the joystick: + try decreasing joystick sensibility (Ctrl-F1/F2 or parameter S); - sometimes, a direction key is stuffed without moving the mouse: + try increasing mouse tolerance (Shift-F11/F12 or parameter Myt); - you need to stuff different keys for diagonals: + in the "Key settings" menu, select "Keys joystick x.." and then "Diagonals.."; activate 8 way mode and select keys to be stuffed; - your joypad does not have enough buttons for the keys to be emulated; + try using switch buttons; - you are using an analogue joystick and you must push the stick too far from the center for JOYEMU/JOYEM to stuff direction key: + increase joystick sensibility (Shift-F1/F2 or parameter S); - the application in foreground uses the hot keys of JOYEMU as standard keys for entering data: + use JOYEM instead of JOYEMU, or turn off hot key support with parameter 'Y-'; - you want to use the emulator with programs that have weak joystick support: + disable joystick support in these programs; you will probably use a command line switch or there will be an option for doing this; if you don't, you could get unexpected results or even lock-ups; - you want to use the emulator with programs that have weak mouse support: + disable mouse support in these programs; you will probably use a command line switch or there will be an option for doing this; if you don't, you could get unexpected results or even lock-ups. 11 A NOTE FOR WINDOWS 95 USERS _______________________________ To use JOYEM/JOYEMU for Windows 95 NATIVE programs, you MUST load the emulator before you load Windows 95, i.e. put it in your AUTOEXEC.BAT; a good position for JOYEM/JOYEMU is as the FIRST command in AUTOEXEC file. Then, you can use JOYCP to update parameters of resident emulator; an icon is supplied if you want to make a shortcut for it, but you can also open a Dos box and run JOYCP from there to update the TSR program. NOTE: the default key set file should have keyboard emulation via mouse DISABLED, or you won't be able to use the mouse in Windows as usual. Only enable mouse emulation when needed. It has been reported that sometimes, after using JOYEM/JOYEMU in a Dos prompt (that is: opening a Dos prompt; installing the emulator; running an app; closing the Dos prompt) system returns in an odd status: a shift key (Alt, Ctrl, Shift) seems to be always pressed. To restore normal operation, press together CTRL and ALT on the left side of the keyboard and press and release the shift-type key (ctrl, alt, left and right shift) that seems pressed. This is caused by the fact that JOYEM/JOYEMU has stuffed make codes for these keys but no corresponding break code, so the BIOS presumes that these keys are still pressed. You can use long file names under JoyCP, but JoyEm(u) does not have the code to support long file names on the command line (parameters 'J' and 'K'); you need to use the short name for them, in this case. It has been reported that sometimes, with motherboards equipped with Intel TX chipset, if JoyEm(u) is active when you shut down Windows 95, the system locks up between the screen that tells you that the system is being shut down and the screen that tells you that it is safe to power off the system. This is not a big problem in itself; just turn off emulation before shutting down and everything will work as expected. Actually, emulation should always stay disabled, except when really needed, because in this way you will get the best performance from your system all the time. 12 COMPATIBILITY _________________ How much compatible is JOYEMU with games and other programs? The answer is: VERY compatible. If JOYEMU works with your hardware, you will find that almost EVERY program works with it; you might need a little 'fine tuning' of the options requested by JOYCP, though, so make sure to read carefully the sections 'HOW TO USE JOYCP' and 'WHAT TO DO IF...'. Actually, I've only found a couple of programs that refuse to work with JoyEmu/JoyEm, and both use a weird method of reading keyboard. JOYEMU was especially tested with DOZENS of arcade and console emulators, since these programs are often developed without joystick support. Moreover, I found that most of these programs worked BETTER if I disabled their native joystick support and used JOYEMU to play. The mouse emulation is also very good, much better than native support in many arcade emulators; compatibility here is directly connected to the quality (and speed) of the mouse driver. Of course, even if I tried JOYEMU/JOYEM with a LOT of software, there may be programs that refuse to operate while it is installed; if you find such a program, just let me know. JOYEM/JOYEMU is written in C and inline Assembly; though I paid special care to optimize time critical parts, I can't be sure that it will work well on smaller systems; presumably, you will need at least a Pentium 75 to achieve a reasonable speed -- try it and let me know the results. 13 HISTORY ___________ Changes from v1.01 (written by Pin Fei Sun): KEYSET: * rewritten from scratch * now supports Alt, Ctrl and Shift on their own * display scan codes of keys pressed * added key configuration for second joystick * added sampling interval setting * added 'force release mode' setting * added 'hold mode' setting * added autofire setting * added displaying of scan and ASCII codes of keys pressed * added query mode, for parameter E of JOYEM/JOYEMU JOYSET: * rewritten to work with analogue joysticks * added calibration for second joystick * added read mode setting * added 4 button/2 button mode * added sensibility setting JOYEMU: * rewritten to better stability and add new features * changed keyboard handler for faster response * provided in two versions, with or without hot keys, for greater compatibility and faster keyboard response * emulates now both joysticks, if present * corrected function to reload key configuration while the emulator is resident (now WORKS) * added function to reload joystick configuration while the emulator is resident * corrected the auto-fire-every-30-minutes bug * added support for shift keys * added autofire and repeat delay for each fire button * added hold mode setting for directional keys * removed unnecessary break codes sent during emulation * added research of configuration files in the directory of the emulator, if not found in current directory * added keys to increase/decrease joystick(s) sensibility while JOYEMU is resident * added keys to increase/decrease sampling interval while JOYEMU is resident * added a new mode of reading joystick, user selectable * added a key to switch 'force release mode' on/off * added a key to switch 'hold mode' on/off * added keys to switch autofire on/off * added a key and corresponding code to unload the emulator from memory * added sound, to signal user the result of operations * added command line options to have resident emulator: - uninstall itself from memory - switch emulation on/off - reload key settings (even from a specified file) - change joystick sensibility - change sampling interval - set 'force release mode' on/off - set 'hold mode' on/off - set autofire on/off and repeat delay - set key associated to a direction/fire button * changed CFG files format and names Changes from v2.0: JOYEM/JOYEMU: * rewritten key stuffer for compatibility under pure Dos (1st layer) * perfectioned directional key stuffer (2nd layer) * added command line parameter '?' to display help text * deleted description of hot keys, which was printed when going TSR * added D parameter for JoyCP and batch processing * added ability to install emulator with specified CL parameters * corrected code for two joysticks * added support for shifted keys * changed parameter E according to new magic numbers * changed CFG files format and names JOYSET/KEYSET: * removed from the package; they are superseded by JOYCP JOYCP: * first release of the control panel for JOYEM/JOYEMU (LOT of work!) Changes from v3.0: JOYEM/JOYEMU: * support for selective key stuffing (don't stuff keys for certain directions/buttons, as configured by JoyCP) * added "8 way mode" (stuff different keys for diagonals) * added command line parameter 'X', to switch "8 way mode" on or off for each joystick * modified E parameter to accept setting of diagonal keys * added second help page (only for JoyEmu) * modified ? parameter syntax to accept help page number (only for JoyEmu) JOYCP: * changed definitions for right ctrl and alt gr (were incorrect) * introduceded the possibility of setting to "none" the key stuffed by a certain direction/button (e.g. for games which don't require fire buttons) * added auto update mode: in this mode, when you change an option the resident emulator is updated immediately * added "swap key bindings" to key settings menu, to exchange emulated keys between the two joysticks * added "swap fire buttons" to exchange key bindings between the first two fire buttons of current joystick * added "8 way mode": in this mode, you can specify keys to be stuffed for diagonals as well as for straight directions. Changes from v3.1: JOYEM/JOYEMU: * added support for joysticks with 6 fire buttons JOYCP: * added support for joysticks with 6 fire buttons Changes from v3.2: JOYEM/JOYEMU: * "unrolled" functions and definitions in JoyEm and JoyEmu: should be faster (even though they take up a little more memory now..) JOYCP: * fixed a stupid bug that locked the computer in a strict loop with interrupts disabled if just one joystick was connected to the PC Changes from v3.3: JOYEM/JOYEMU: * faster! * added support for mouse keyboard emulation * added support for switch fire buttons (change keys stuffed by every other button/direction) * added support for 8-button joysticks * added FIFO key queue * added command line parameters N (set number of switch buttons) and W (set switch button number) * changed hot key shift-F4: it now switches on/off autofire for mouse (Ctrl-F7 has become the hot key for switch force break mode on/off) * added hot keys Shift/Ctrl-F11 and Shift/Ctrl-F12 (tolerance for mouse axis) * fixed a bug: autofire on button 5 would not work if force break mode was off and button 6 did not use autofire * fixed shift mode (now the break for the shift keys is sent on button release) * added command line parameter 'Y' to turn on/off hot key support (JoyEmu only); removed additional keyboard handler (JoyEm only) * changed values for b in E and R command line parameters * extended values for j in E, to set also switched keys * added joystick check on start/re-activation * added a page to on-line help (both JoyEm and JoyEmu) JOYCP: * added support for Windows 95 long file names * added support for mouse keyboard emulation * added support for 8-button joysticks * changed definitions for 'num /' and 'num enter' (were incorrect) * exchanged buttons 5 and 6 in calibration * added hot key support switch * added detection and report of type and version of emulator in memory * changed window handler (glitches when windows near end of screen) * added switch buttons and configuration of additional keys * changed load and save setting dialog * changed set directory dialog +-----------------------------------------------------------------------+ | The '.KS' file format has changed; use the enclosed utility CONVKS to | | upgrade existing key set files to version 4.x. | +-----------------------------------------------------------------------+ Changes from v4.0: JOYEM/JOYEMU: * ifdef-ed the code used to wait on the joystick port until ready (it caused problems on a few configurations) * now emulation is de-activated (if active) before loading configuration files and re-activated immediately afterwards, both when using command line parameters 'J'/'K' and hot key Shift-F8 * added to the package the program JCMPTST which can be used to determine if your system is compatible with JoyEmu JOYCP: * changed joystick detection to avoid bios bugs * ifdef-ed the code used to wait on the joystick port until ready (it caused problems on a few configurations) 14 TECHNICAL SPECIFICATIONS ____________________________ For those really curious, who want to know HOW the whole thing works, here are some hints. JOYEMU installs itself and establishes a communication ISR on the first available interrupt from 0x60 (96) to 0x68 (104); this interrupt is used by JoyCP, to communicate with the TSR, and by JOYEMU itself, when it is used to update the options of a copy in memory. When JOYEMU is executed with parameter D, it exits setting Dos error level to 0 (not installed) or the vector number for communication; that's how JoyCP finds the presence in memory of the emulator (and that's why it needs its executable). If the version with hot keys support is installed, the keyboard interrupt is chained and adequate action is taken when the user presses one of the hot keys. JOYEMU chains the system timer to be called at pre-defined intervals, specified by the sampling delay parameter. Every time the program is woken, the joysticks and/or the mouse are read. For the mouse, two special counters for X and Y axis are kept and periodically reset, to avoid internal overflow; every time that one of these counters exceeds a pre-defined amount, given by the X and Y tolerance, a direction is requested to the key generation subsystem. For the joystick, threshold lines are calculated from the calibration information and are used to determine if the joystick is off-centered and which direction should be generated; these lines depend on the values of sensibility. Joysticks are read according to the reading mode (full or timed). In case of 6-8 button joypads, the directions connected to the second lines are converted to fire buttons using calibration information. A second special subsystem checks for autofire for each button, deciding if it is time to break (release) the key or to make (press) it; force break mode is taken into account here. A third subsystem checks if switch button status has changed; if so, all currently pressed keys are released and internal pointers to key structures are updated to point to the correct key tables. Of course, we must consider which switches are pressed (one, two or both) and if each switch is a shift or a toggle; also, we don't want to release keys when a toggle switch is released. When we have all the information about the status of the devices, the key generation subsystem begins to stuff keys to the keyboard buffer. All 4-8 way transformations are handled at this level. Then, hold mode and force break mode are considered for stuffing direction keys, taking into account the current and the previous status. If shift mode is active, we check the shift mask and stuff corresponding shift keys before the make code and after the break code. For each key, we have a redirection table, because the user can set two or more buttons/directions to stuff the same key and we don't want to stuff two makes/breaks, or a make and a break, for the same key. We keep track of all keys pressed, to release them when the TSR is turned off or uninstalled. If the keyboard buffer is full, scan codes to be stuffed are stored in a special FIFO circular queue; as keys are read from the keyboard, if the queue is not empty the scan codes in it are stuffed to the keyboard buffer. That's all; the real challenge is doing all these operations in the least possible time: this is achieved by dinamically changing the code executed (instead of using tests or switches) and by using pre-calculated lookup tables, to avoid doing maths at run time. By default, i.e. when sampling delay is 0, all these things are repeated about 18 times per second. JOYEMU is long about 5.000 lines of code; JOYCP is long about 6.000 lines of code, to which you must add at least other 5.000+ lines not directly included, but related to functions linked from my personal C library; this adds up to a grand total of more than 16.000 lines of code. Keep this in mind if you use the program and would like to donate something :) 15 CREDITS ___________ JOYEMU, JOYEM, JOYCP and CONVKS are all written by Simone Zanella, SZP. All the programs in the package are written in C with inline Assembly where needed. +-------------------------------------------------------------------------+ | | | If you like and use this program, send me what you want (your sister, | | if 18+ years old and good looking would be much appreciated :). | | Money, hardware, software, postcards are welcome (in this order). | | If you have special controllers or interfaces that you would like to | | be supported by JoyEmu, just send them in and I'll see what I can do | | (the address is written below). | | | +-------------------------------------------------------------------------+ To contact me by snail mail (bug reports, suggestions, donations :) write to: Simone Zanella Productions C.P. 51 30035 Mirano (VE) Italy e-mail: simone@zanella-hifi.com zanella@prometeo.it szanella@dsi.unive.it Simone Zanella Home Page: http://members.tripod.com/~szanella http://www.dsi.unive.it/~szanella/index.htm -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2i mQCNAzARNUQAAAEEAMTn+IgTuJ5Ei99lzFa6D6GCDYPUimdSQ2I2keFCVG2sCVfB uejwgdPp+u/mlwJDE2wZpAUfgHe8E3N/vmfO6bl0RxOc1Hkl0mc/np5/F4wZoeOB GcaEpwJLkKlFoE93p8Bh/UwUNo9UaKjfwx0mqP9G+XgiVowo7NEsAHa/+Bl9AAUR tCpTaW1vbmUgWmFuZWxsYSA8c3phbmVsbGFAbW9vLmRzaS51bml2ZS5pdD6JAJUD BRAwETVz0SwAdr/4GX0BAXjLA/9IZD5mT/BHdRfDvH6AnFwaxqAuluhCcycchW0A /SOUJPsmFnFjGUoCFrur603rEUJpR/JsZpVOXaQHcNSuitB2msDu8YZyrVPgcV86 vGptHkX31GrfIK8RR4hHRtt0suUBWZBDJRfLNbq7KMKxfNF3h4wRjC1NBzzU0orM mj9d2A== =HOga -----END PGP PUBLIC KEY BLOCK----- I wish to thank the following people who have contributed to the development of this set of utilities: Pin Fei Sun (pfsun@undergrad.math.uwaterloo.ca) for writing the original emulator and utilities and distributing the source code without restrictions; no part of the original code is still present in this version -- even the key stuffer was slightly modified -- but it served as a general basis to build the package; without it, I would have spent MANY more hours in developing and debugging; moreover, I liked the simple design (the emulator + 2 utilities to set keys and calibrate joystick, that were eventually merged in JoyCP), which I think is far superior than having just one executable with a LOT of command line options pretty obscure (anyway, they are there if you want to use them) Scott Hall most interrupt handlers, from his package TSRFIL10.ZIP, available from Simtel Tom Grubbe TSR detection, uninstall routines and keyboard handler (well, slightly modified) -- part of the code was taken from his package PCPILOT.ZIP, available from Simtel; many routines were eventually taken from a book by Al Stevens Markus F.X.J. Oberhumer routines to read keyboard (used for setting keys to be emulated), which are based on his package LIBKB100.ZIP, available from Simtel Thomas Brandenborg beep routine (slightly modified), from his package TSRDEMO2.ZIP, available from Simtel _____________________________________________________________________________ Support software authors! It is in your interest!