PowerMouse v1.1 (Copyright © 1990) By: Mike Cargal & Paul King PowerMouse is the software driver for a project detailed in the January, 1991 issue of AC's Tech. PowerMouse allows you to hook up Mattel's Power Glove or one of the infrared remote controllers for the Nintendo Entertainment System to the joystick port on your Amiga. PowerMouse is freely-redistributable as 'shareware' (Thanks for your support!). Please see the AC's Tech article for instructions on how to put together the required adapter cable. The PowerMouse software is designed to run transparently in the background, allowing these devices to emulate mouse or keyboard input. The infrared remote controllers are great for doing multimedia presentations, or for playing games that usually get input from the keyboard, and the Power Glove is interesting to experiment with. PowerMouse may be started through the CLI or workbench. If started through the CLI, you will still probably want to have the PowerMouse.info file available since many of PowerMouse's features are configurable only through .info files. This allows PowerMouse to remain relatively small, yet easy to configure for the novice user who works primarily through the workbench. PowerMouse will read the configuration information from the .info file even if started from the CLI. To start from the CLI, type: run PowerMouse where is the name of the .info file to use. Do not put the ".info" on the end of the filename. PowerMouse.info is the default and will be used if is not specified. PowerMouse is designed to operate in two modes. Mouse mode receives signals from the glove/remote and converts them to mouse movement events for Intuition. The A and B buttons on the glove or controller function as the left and right mouse buttons respectively. Keyboard mode allows you to use the glove/remote to send keyboard sequences to the Amiga and allows 6 to 16 different user-configurable keyboard sequences to be transmitted. Interactive Settings When started, PowerMouse will bring up a control window to allow you to adjust many of PowerMouse's settings. NOTE: This control window will not come up initially if you have specified POPUP=NO in your .info file. This window has gadgets to allow you to control: polling rate, speed (for mouse emulation only), whether or not acceleration is enabled (also only applicable to mouse emulation), PowerMouse enable/disable, switching between keyboard and mouse emulation, hiding the PowerMouse control window, and killing the PowerMouse program. The "Rate" gadget will allow you to adjust the rate at which the input device (the glove or remote) is polled. The higher the number, the more frequently the device is checked. This will affect the speed slightly, but is designed more to allow you control of the system resources utilized by PowerMouse as a background task. If set too low, you may notice that the mouse mode responds sluggishly, and if set too high you may notice that your system slows down. With the wide range of Amiga's around today (referring specifically to the speed of the various machines) it seemed best to allow you control of the polling rate. A default value for this rate may be established using the RATE keyword in the .info file. The "Speed" gadget will allow you to adjust the speed at which PowerMouse will move the mouse pointer. The effective speed is also affected by the Rate setting and can be affected by whether or not you have acceleration enabled. Naturally this setting only applies to mouse emulation. A default value for this speed may be established using the SPEED keyword in the .info file. The "Accelerate" gadget allows you to specify whether or not you wish PowerMouse to accelerate the mouse speed as you continue to move a particular direction. The longer you move in that direction, the faster the mouse will move. We have found that setting the speed fairly low (1 or 2) and turning on acceleration, gives the mouse emulation a fairly natural and very usable feel. This setting also only applies to mouse emulation. You can set the default for this setting by specifying ACCELERATE=YES or ACCELERATE=NO in the .info file. The "Enabled" gadget allows you to temporarily disable PowerMouse so that it does no emulation. This is particularly handy when using the PowerGlove, since it allows you to "turn off" the glove temporarily to do something with that hand without that motion being interpreted by PowerMouse. You can set the default for this setting by specifying ENABLED=YES or ENABLED=NO in the .info file. The "Mouse" gadget allows you to indicate that you want Power- Mouse to emulate mouse input. This option is mutually exclusive of "Keyboard". You can have this be the default emulation mode by specifying MODE=MOUSE in the .info file. The "Keyboard" gadget allows you to indicate that you want PowerMouse to emulate keyboard input. This option is mutually exclusive of "Mouse". You can have this be the default emulation mode by specifying MODE=KEYBOARD in the .info file. The "Hide" gadget allows you to close the control window while leaving PowerMouse running in the background. By default, this window can be brought back up by pressing the "SELECT" button on your input device, but this may be overridden by specifying actions for the "SELECT" and/or "START" buttons in the .info file. The "Kill" gadget removes PowerMouse from your system. Configuration (.info) Files PowerMouse makes extensive use of the .info file facility provided through workbench for setting up different configurations. You may set up project icons which will start up PowerMouse with any set of options you desire by having a separate icon for each set of options, and simply double-clicking on the approriate icon. This allows you to have as many configurations as you wish, each having a unique icon name and set of options, yet all using the same PowerMouse program. To set these values click once on the PowerMouse icon (or whatever you have it named), and then select the "Info" menu item if using 1.2 or 1.3, or the "Information.." menu item if using 2.0 or higher. Consult the documentation supplied by Commodore for informa- tion on changing the values in your .info file. Set the default tool to c:PowerMouse (or whichever directory you choose to put it in). Set the tool types to the following keywords, depending on desired use. Keywords that accept a value should be specified as =. See the sample .info files for examples - We have included files for using BIX and for playing Tetrix-like games. The following are the values PowerMouse will recognize and their effects upon PowerMouse: RATE - (1-20) Allows you to set a default rate between 1 and 20 (see the discussion of the "Rate" gadget above). SPEED - (1-10) Allows you to set a default speed between 1 and 10 (see the discussion of the "Speed" gadget above). ACCELERATE - (YES/NO) Allows you to set the default value of mouse acceleration (see the discussion of the "Accelerate" gadget above). ENABLED - (YES/NO) Allows you to set the initial enabled/ disabled state of PowerMouse (see the discussion of the "Enabled" gadget above). POPUP - (YES/NO) If POPUP=YES then PowerMouse will open the control window immediately upon start-up. If POPUP=NO then PowerMouse will not open a control window until you request it. MODE - (MOUSE/KEYBOARD) If MODE=MOUSE PowerMouse will start-up emulating a mouse. If MODE=KEYBOARD PowerMouse will start-up emulating a keyboard. QUAL - (A/B/A|B) If QUAL=A then the "A" button will be treated as a qualifier for the other buttons when used in keyboard mode. If QUAL=B then the "B" button will be treated as a qualifier for the other buttons. If QUAL=A|B then the "A" and "B" as well as "AB" (A and B pressed simultaneously) buttons will be treated as qualifiers. QUAL= (or if QUAL is absent from the .info file) will cause "A" and "B" to be used by themselves to send text in the keyboard mode. SELECT - (ADJUST/MODE/ENABLE) - Using the SELECT keyword allows you to define the action assigned to the "SELECT" button on your input device. By default "SELECT" will open/close the control window (SELECT=ADJUST), and "START" will enable/ disable PowerMouse (START=ENABLE). The ADJUST action opens/closes the control window. The "MODE" action toggles between mouse and keyboard emulation, and the "ENABLE" action enables/disables PowerMouse. You may assign any of these actions to the "SELECT" button. START - (ADJUST/MODE/ENABLE) - Allows you to specify the action associated with the "START" button. See the discussion for the SELECT keyword above. A - (text string) Text string to be sent if "A" button is pressed (only if "A" is NOT a qualifier). B - (text string) Text string to be sent if "B" button is pressed (only if "B" is NOT a qualifier). UP - (text string) Text string to be sent if "UP" signal is received. DOWN - (text string) Text string to be sent if "DOWN" signal is received. LEFT - (text string) Text string to be sent if "LEFT" signal is received. RIGHT - (text string) Text string to be sent if "RIGHT" signal is received. AB - (text string) Text string to be sent if "B" button is pressed while "A" is pressed (if "A" is a qualifier, and "B" is not). AUP - (text string) Text string to be sent if "UP" signal is received while "A" button is pressed (If "A" is a quali- fier). ADOWN - (text string) Text string to be sent if "DOWN" signal is received while the "A" button is pressed (If "A" is a qualifier). ALEFT - (text string) Text string to be sent if "LEFT" signal is received while the "A" button is pressed (If "A" is a qualifier). ARIGHT - (text string) Text string to be sent if "RIGHT" signal is received while the "A" button is pressed (If "A" is a qualifier). BA - (text string) Text string to be sent if "A" button is pressed while "B" is pressed (if "B" is a qualifier and "A" is not). BUP - (text string) Text string to be sent if "UP" signal is received while "B" button is pressed (If "B" is a quali- fier). BDOWN - (text string) Text string to be sent if "DOWN" signal is received while the "B" button is pressed (If "B" is a qualifier). BLEFT - (text string) Text string to be sent if "LEFT" signal is received while the "B" button is pressed (If "B" is a qualifier). BRIGHT - (text string) Text string to be sent if "RIGHT" signal is received while the "B" button is pressed (If "B" is a qualifier). ABUP - (text string) Text string to be sent if "UP" signal is received while "A" and "B" buttons are pressed (If "A" and "B" are qualifiers). ABDOWN - (text string) Text string to be sent if "DOWN" signal is received while the "A" and "B" buttons are pressed (If "A" and "B" are qualifiers). ABLEFT - (text string) Text string to be sent if "LEFT" signal is received while the "A" and "B" buttons are pressed (If "A" and "B" are qualifiers). ABRIGHT - (text string) Text string to be sent if "RIGHT" signal is received while the "A" and "B" buttons are pressed (If "A" and "B" are qualifiers). (Note: for 1.3 and below the values for the keywords are case sen- sitive, so to keep things simple keywords have been defined as all upper-case. The values assigned to these keywords are not case- sensitive. Case sensitivity is not a concern in 2.0 and above) Please see the AC article for a more thorough treatment of using PowerMouse with the Mattel Power Glove and discussion of the original Modula-2 source code. PowerMouse History 1.0 - Originally printed in the January, 1991 issue of AC's Tech. This is a Mouse mode only version, and primarily for use with the Power Glove. 1.1 - Originally distrubuted on January, 1991 AC's Tech companion disk. This version is released as 'Shareware.' Additions: keyboard mode and support for project icons (.info files) to be used as configura- tion files. These additions were made primarily to enhance PowerMouse for use with infrared remote controllers.