Rotary Manual

The MK64 will support two "Ikari Warrior" style 12 position (single pole 12 throw) rotary joysticks like Happcontrols 50-5618-00. (NOT the optical 50-5619-00). The original SNK LS-30 (yellow often hex handled) joysticks are also supported. They are functionally the same. In this document I'm am refering only to the connection of the rotating shaft switch. The joystick also has the regular up/down/left right switches. Those line are wired just like any joystick and are not covered here. You can connect one or two joysticks. Each joystick requires six input lines. You can use any inputs and they do not need to be in order or contiguous. The MK64 does not have a dedicated mating connector for the joystick wire harness connector. You will need to cut off the connector or splice the wires with the MK64 input wires. Wire nuts, solder or crimp style inline splices, as well as just twisting and black taping will connect the joystick to the MK64.

Connect a MK ground line to joystick wire A the (Purple) This is the common ground and is the only switch contact that is not in a ring pattern.

Connect a MK input line to joystick wires 1 & 7 (Brown, Grey)

Connect a MK input line to joystick wires 2 & 8 (Red, White)

Connect a MK input line to joystick wires 3 & 9 (Orange, Black)

Connect a MK input line to joystick wires 4 & 10 (Yellow, White-Brown)

Connect a MK input line to joystick wires 5 & 11(Green, White-Red)

Connect a MK input line to joystick wires 6 & 12(Blue, White-Orange)

These colors are from the Happ Controls joystick and the numbers are embossed on the rotary switch. The SNK LS-30 may have different colors. The only important thing is that the switch wires you connect together are at opposite sides of the ring. This will ensure a six step repeating pattern as you rotate the joystick.

Once wired, use INTEST.EXE to verify your wiring. Turning clockwise should repeat the same six input lines being pressed over and over (do at least one full turn of 12 clicks). If the pattern is incorrect, check your wiring. Record this pattern. It will be used in your key map file.

In your key map file, assign the inputs to rotary key codes, R11 to R16, (see code sample) in the same order that Intest provided. If this is the second rotary joystick, use codes R21 to R26. (see sample at end of document)

Finally, program the keymap into the MK64. Open a text editor. Rotate the knob clockwise and verify just one "x" or "m" character appears for every click. Turning the joystick counterclockwise will produce one "z" or "n" for every click.

The key codes sent by default are Z, X, N, and M. The default press time is 75mS. In MAME under analog controls set "dial key/joy speed" to 2 and "dial sensitivity" to 225%. You may need to tweak MAME to get reliable one to one rotations. Use can use the WRITERAM program to change these defaults. Add them to your AUTOEXEC.BAT file if you need them set on power up.

The user definable variables and default values are listed in the table below.

Variable

Default Value in decimal

RAM location in decimal

ROTARY 1 CCW KEY CODE

26 "Z"

204

ROTARY 2 CCW KEY CODE

49 "N"

205

ROTARY 1 CW KEY CODE

34 "X"

206

ROTARY 2 CW KEY CODE

58 "M"

207

PRESS HOLD TIME (2.5mS per)

30 "75mS"

214

The decimal value for key codes can be found here

The files, "forget.b0", "forget.b1", and "forget.bat", are a key map example for a 4 player setup with 1 rotary joystick and shift keys that are defined automatically on power up. From the ‘forget.b0" file….

INPUT 51 R11        ROTARY ONE LINE 1 & 7

INPUT 52 R12        ROTARY ONE LINE 2 & 8

INPUT 53 R13        ROTARY ONE LINE 3 & 9

INPUT 54 R14        ROTARY ONE LINE 4 & 10

INPUT 55 R15        ROTARY ONE LINE 5 & 11

INPUT 56 R16        ROTARY ONE LINE 6 & 12

In this example inputs 51 to 56 connect to a rotary joystick. As stated before, it is not necessary for the input channels to be order, but the R11 to R16 assignments must match the order that the joystick rotates.