SNESKey is a hardware/software combination that allows the use of video game console control pads or PC game controllers (such as the MS Sidewinder or Gravis Game Pad Pro) as input devices for computer programs, especially games. The software allows the buttons on the controller to be programmed as any key, or sequence of keys on the keyboard. The software also has the ability to define buttons to be "shifts" that work in much the same way the Ctrl, Alt, and Shift buttons on your keyboard work, except that you get to decide what there shifted and unshifted values will be. The current software allows for up to four buttons to be defined as shifts, this gives a maximum of forty-eight different functions on a SNES controller. Very seldom will all the shifts be used, but with all the variables in computer gaming, flexibility is a good idea.
Two quick notes: there are two diagnostic utilities included to help you (1) see if the newest SNESKey keyboard simulation works on your machine (KeyTest), and (2) see if control pad(s) connected to the parallel port are working (SNESKey /x). When KeyTest is run and the command prompt reappears there should be the text "SNESKey" waiting on the prompt, this is all KeyTest does. If you don't see this text, then SNESKey may still work with your machine. See the Trouble Shooting section for more help.
Also remember that this is just a spare-time project for me. If there are no updates for a while, or you send me email and I take some time to answer it, it's because I'm busy. Be patiant and you will be rewarded.
Simply copy or unzip the various files into a directory called "SNESKey" off of your root directory. For example:
cd\ md c:\sneskey copy a:\*.* c:\sneskey or, if you are unzipping the files: cd\ md c:\sneskey pkunzip -d sneskey.zip c:\sneskey\
After the files have been placed in their appropriate place, you must add SNESKey to your path by editing your autoexec.bat file and adding ";c:\sneskey" to the end of the line that starts "path" or "set path=". Now you need to reboot, so the changes can take effect. After your computer starts you may wish to examine the example initiate (ini) files provided for several games. If you have one of these games and wish to try the pad out right away, you can simply copy the file into the directory the game is in, rename the file to "sneskey.ini" (without the quotes) and edit the line in the ini file that says "ProgPath = c:\directory\filename.exe" to reflect the correct path and name of the program to run. Now you just have to change to the directory of the game you want to run, type "go" and you should see the SNESKey banner pop up and your game begin to load.
Unless you buy a prebuilt converter you will have to build one, or convert a controller before you can play any games.
Note that all the numbers in the schematics refer to standard pin numbers for the type of connector indicated (e.g. DB25 for parallel port).
The "X" above should be replaced with a 10, 12, 13, 15, or 11 for the first, second, third, fourth and fifth SNES pads, respectively. Connect all the other pins exactly like the first pad, then connect the data line of the first, second, third, fourth and fifth SNES pads to the appropriate pins on the DB25. Configuring these controllers is discussed in the section about the ini files.
You can also "mix and match" NES and SNES control pads by connecting the data lines to whichever pad you wish (for example connect the first and second data lines to SNES pads, and connect the third and fourth to NES pads. You would then refer to the SNES pads in the ini file as [SNES 1] and [SNES 2] and the NES pads as [NES 3] and [NES 4].
The "X" above should be replaced with a 10, 12, 13, 15, or 11 for the first, second, third, fourth and fifth NES pads, respectively. Connect all the other pins exactly like the first pad, then connect the data line of the first, second, third, fourth and fifth NES pads to the appropriate pins on the DB25. Configuring these controllers is discussed in the section about the ini files.
See notes on SNES pads for information about mixing NES and SNES pads.
The left/right side of the plug is determined by looking directly at the side of the connector that plugs into the NES console.
The "X" above should be replaced with a 10 for the first Four Score and 13 for the second. The "Y" above should be replaced with 12 for the first Four Score and 15 for the second Four Score. Configuring the Four Score adapters is discussed in the section about the ini files.
For some reason, on my machine the turbo mode (auto fire) on the Four Score doesn't work. I think it is because it isn't getting enough power.
Other pads can work in parallel with one or two Four Scores. Just compare the circuits to make sure they only share power and ground.
This circuit works for both 6 button and 3 button Genesis pads. Use [Genesis3] as the title of the config section for a 3 button Genesis pad and use [Genesis6] as the title of the config section for a 6 button Genesis pad.
The connection to pin 1 (power) on the controller should not be necessary for normal joysticks. Build the circuit without it first, and see if it works. Use  as the title of the config section for an Atari 2600 controller.
A 2600 joystick will also work when plugged into the Genesis circuit.
For a single spinner, you can use the same circuit as the Atari 2600 or Genesis adapter, that way you can just swap the controllers out, depending on which you want to use. The connection to pin 1 (power) on the controller should not be necessary. Build the circuit without it first, and see if it works.
Use [2600 Spinner] as the title of the config section for an Atari 2600 spinner. Use [2600 Spinner N] where N > 1 for spinners other than the first one. You may need to increase the TickFreq setting in the spinner ini file to as high, or higher than 200 to get good results.
To simplify the diagram above, I'll just describe how to connect a second or third spinner. Pins 5, 4, and 9 for spinner two go to pins 12, 13, and 1, respectively. Pins 5, 4, and 9 for spinner three go to pins 14, 16, and 17, respectively.
It would be best if any diodes are Germanium, because they use less power, and since the power is being pulled from the data lines of the parallel port, we don't want to use too much. The diodes don't need to be "special" in any way. Normal diodes should work perfectly. If you use a regular controller this arrangement will be ok, and provide a compact adapter for you console controller, but if you want to get fancy (IR controllers, big joysticks, programmable pads, multiple controllers on one port, etc.) you may wish (or need) to pull power from the joystick or keyboard port, or better yet, get a power pack that plugs into the AC main and outputs +5V dc. This will allow you to use any controller you could dream of (not to mention reduce the complexity of the converter from simple to almost non-existent).
Another note about diodes: when building the circuit, it may not be necessary to use diodes. Try to connect only one of the parallel port pins (choose one that has a diode on it in the schematic) to the power input (the pins the diodes go to) on the controller with no diode. If this works, then good, otherwise more pins (with corresponding diodes) or external power will be needed.
The best way I have found to achieve a good result is to buy an extension cable for your controller. They are usually about $10 for a pack of one or two. Carefully remove the part of the connector that plugs in to the console Get a male DB-25 connector and solder the wires, diodes, and the DB-25 together. Try to make the total assembly as small as possible because you want to be able to fit it inside the DB-25 shell. What you end up with will be a very cool adapter cable. Of course, you could do this to the end of a controller, but that seems a bit permanent to me.
Another method is to remove the console connector and splice in the DB25 connector, then reattach the console connector. You'll end up with a controller with two plugs; one for the console, and one for your PC.
You can install more than one type of controller on a port as long as the input lines to the PC (pins 10-13, 15, and sometimes 1, 14, 16, and 17) are different for every controller. They should be able to share any output (from the PC) lines. If you have a question as to whether specific controllers can be used together, email me. Notice that the Genesis and Atari 2600 controllers use several data lines, so using them with other controllers will be more difficult or even impossible.
Some notes: you need to connect the ground from any power adapter to the ground created from pins 18 to 25 on the port, so everything will have a common reference. Also, connecting the ground line to all the pins from 18 to 25 is not strictly necessary. You may wish to just connect to one or a few, and let it go at that.
The use of the ini files is really straight forward, copy a bare bones one (in \sneskey\examples\) or one you already have set up into the directory of your game. Rename it to "sneskey.ini". Change the lines that have to do with the key configurations and program path, and type "go" at the command line. The way the key config lines work is simple: the key sequences are separated by commas, and the values of the different shift states are separated by semicolons. Not a really good explanation, so look at this:
This line would make the "B" button on the controller generate the keystrokes "a" "b" and "c" when none of the shift buttons are held down and it is pressed, "1" "2" and "3" when shift one is down and it is pressed, and "F1" "F2" and "F3" when shift two is down and it is pressed. Of course, most of the time you will just want one keystroke per button, per shift state (e.g. B = lctrl; lshift).
You may also preface any key name with the word "pulse." This will make SNESKey send the key up signal immediately after the key down. This is useful when the shortest possible key-down time is necessary (e.g. very small amount of movement).
The "NumShifts =" line tells how many shift states to expect, and the "Shifts =" line tells which buttons are shifts, and in what order. Every button must have a value for each shift state, even if it is just "none" (to find out all the abbreviations for the keys look in appendix A of this document). For example, if I wanted there to be two shifts, the first being Select, and the other being Start, this would be in the ini file, in the [SNES] section:
Any shift on the "Shifts =" line can be prefaced with the word "toggle." This will make the shift be on when hit once, and stay on until hit again.
To make a key sequence repeat (like an "auto-fire" or "turbo" switch) preface the line with "repeat." So to make the x button on a SNES pad repeat the x key, you would use a line like this:
To override the default repeat rate set in the main SNESKey.ini file, put the desired rate in parenthases after the repeat directive, like so:
The first SNES controller is configured in the section [SNES 1] the second, third, fourth, and fifth are configured in the sections [SNES 2], [SNES 3], [SNES 4], and [SNES 5] respectively. Likewise, the first NES controller is configured in the section [NES 1] the second, third, fourth, and fifth are configured in a similar way to the SNES pads. The six and three button Genesis pads are configured in the [Genesis6] and [Genesis3] sections, respectively. The pads connected to the first Four Score are configured in sections [Four Score 1] through [Four Score 4]. The pads connected to a second Four Score are configured in sections [Four Score 5] through [Four Score 8]. The Atari 2600 joysticks are configured in the section  and Atari 2600 driving controllers (a.k.a. spinners) are configured in section [2600 spinner 1] through [2600 spinner 3]. A Sidewinder would be configured in the [sidewinder] section, and a Game Pad Pro would be configured in a section entitled [game pad pro]. Sample ini files for all the supported controllers are included in the examples directory.
If the number in the section name is one (e.g. [SNES 1]), then the number can be left off. The space between the name and number is also optional. So [SNES], [SNES1], and [SNES 1] are equivilent.
The ini files can also reside in a directory named "sneskey" directly off of the current directory. For example, if you run a game from c:\path\ and "sneskey.ini" is not in that directory, then SNESKey will look in c:\path\sneskey\ for the file before giving up.
The ini files used to start SNESKey with the /x option only need the section headers (ex. [SNES]) for the controllers to be tested.
If you have problems, you should change the lines in the [Config] section of the main ini file in c:\SNESKey until it works correctly (see the Trouble Shooting section). Each line is accompanied by a description in the ini file itself, so I won't go into detail here, if you really care, you should be able to figure it out.
A note: an alternate ini file can be specified on the command line like so: "SNESKey myconfig.ini". This provides for having different configurations for different people or different controllers.
Here is a list of solutions to problems that I encountered when writing the program, I just thought of, or someone else had a problem with. Many rely on the test screen accessed with the "/x" switch. It allows you to do a bare bones check to see if the controller is alive and responding.
Also remember that the port and controller type are the only things that effect how the controller is read. All the other settings are either for how the TSR acts, or how the key presses are simulated. Thus, there is no reason to change non-controller related settings until the test screen shows everything is working correctly.
If that doesn't work change the "MainInt =" line to "MainInt = 0x08", "MainInt = 0x1C" or "MainInt = 0x28" and the "TickFreq =" line to "TickFreq = none" (that might sound strange, but its ok, believe me). Now, run the game (using "go" to start it) and see if it works. If so, and the game seems to be responding quickly enough, use these settings, but I would appreciate an email about what game, what version of SNESKey you are using, and a copy of your ini files, so I can try to fix your problem appropriately.
There is another possibility, SNESKey uses an interrupt as a "wakeup." Whenever this interrupt is executed, it makes sure that the interrupt SNESKey uses for most of it's work (usually 0x70) is doing fine. I have never had this cause a problem on interrupt 0x08, but I guess it could. If it does, try using 0x09, this is the keyboard interrupt, it is only called when you press a key, so if SNESKey seems to have stopped responding, hit a key and see if it wakes up. You can also disable the wakeup function by setting the line in the ini file that says "WakeUpInt = " to "none" (no quotes). There is also a variable in the ini file called "TweakType." This variable tells SNESKey what kind of wakeup to do. Values range form 0 to 2, each being a different type of wakeup. A value of 1 does a "safer" subset of 2, and 0 does neither.
Here are some things I want to add when I have time/am motivated to.
If you want one of these to become a reality look at the following:
My source of SNES extension cables has dried up, and I have grown tired of building and supporting the adapters, so I have stopped offering this service. If you wish to buy one, I would recommend Console Adapters. See their web page for more information.
|Left Control||lctrl||It is best to use the "left" version of a key if you can, they are executed slightly faster.|
|1 (key pad)||num1||Again, these are a little faster than their gray counterparts.|
|2 (key pad)||num2|
|3 (key pad)||num3|
|4 (key pad)||num4|
|5 (key pad)||num5|
|6 (key pad)||num6|
|7 (key pad)||num7|
|8 (key pad)||num8|
|9 (key pad)||num9|
|0 (key pad)||num0|
|. (key pad)||num.|
|/ (key pad)||num/|
|* (key pad)||num*|
|- (key pad)||num-|
|+ (key pad)||num+|
|Enter (key pad)||numenter|
|No Definition||none||Use this for undefined buttons.|