4way to 8way Auto-switching Joystick Mod

From BYOAC New Wiki
Jump to navigation Jump to search

Rotating Restrictor Plates

The majority of joysticks are either 8 way or 4 way restricted. This restriction is accomplished by either a restrictor plate or an actuator which serves to ensure that the proper combinations of switches are depressed based on joystick movement. For example Pac-Man utilizes a square restrictor oriented as a diamond to prevent combinations of switches from being depressed whereas Samurai Showdown uses a square restrictor oriented to allow diagonals to hit with ease. This wiki entry will deal with joysticks that have user rotatable restrictor plates for selective 4 way or 8 way play and how the user can modify those joysticks for automated switching between 4 way and 8 way use.

Joysticks used for this Modification

Although several different joysticks are available with adjustable restrictor plates thus far the only two models have been documented as successfully modded to switch automatically from 4 way to 8 way mode are the Groovy Game Gear Omni II and the Ultimarc Mag-Stik. Both joysticks are equipped with a switch or post used for rotating the restrictor plate and this serves as the point of connection for the automation. While other joysticks may provide methods for selectively and automatically restricting diagonals through software such as the U360 or other digital joysticks many users prefer the tactile feedback of a physically restricted joystick it is from this that the auto rotate hack was born.

Rotating Mechanism Mechanics

An OMNI II joystick connected to a Pololu Servo

In order to rotate the switch or post between 4 way and 8 way automatically servos with user fabricated actuating arms have been used. There has been discussion of implementing a worm gear to drive the circular restrictor plate on the Omni II; however, to date this mod has not yet been realized. Typically a small hobby servo is mounted on the underside of the control panel and hooked via an aluminum bar to one or two joysticks. The most popular servo for this application has been the Pololu HD Standard Power Servo thanks to its high torque, smooth operation, and low cost. Properly positing the servo in line with the switch or post to translate the rotational force of the servo into the linear force needed to change the restrictor plate position is entirely dependent on the control panel layout and will change from build to build. The joystick usually needs to be modified in some way to securely attach to the actuating arm to ensure smooth operation by either adding different or additional hardware or removing some limiting factor from the restrictor plate or switching mechanism.

Rotating Mechanism Electronics

To power and communicate with the servo a servo controller is required. Servo controllers can accommodate varying numbers of servos and your application will determine the type of controller needed. The majority of builds rely on one or two servos and the most popular servo controller is the Pololu Micro Maestro 6 Channel Servo Controller. This controller comes packed with a robust software package that allows commands to be send via USB to individual servos. As a note, servos have different energy consumption requirements and while some can be powered via USB not all can or should be so additional power supplies may be required depending on your build.

Programmatic Interaction

Once the servo is connected to the servo controller and to the joystick via an actuating arm and the controller is connected to the computer simple commands and scripts can be sent to the servo. Initially the user will have to determine the right and left values of the servo that result in proper 4 way and 8 way actuation. Once registered either a script or simple batch files can be created that call the servo to the required position. Depending on application the user can physically call the servo to change positions by linking a key press to a script or can automate the switch through a custom script. For example the MALA frontend can utilize a plugin called JoyChoose written by DaOld Man which reads the MAME controller.ini to determine whether a game is played with a 4 way or 8 way joystick and then in turn sends the corresponding command to the servo controller. This allows the user to select a game and not worry about joystick configuration as the application will determine the restrictor plate setting required. Through the use of additional programs such as Auto Hot Key more advanced scripts can be created that allow mid-game switching between 4 way and 8 way joystick settings. An example when this utility would be convenient is TRON. TRON is an 8 way game that benefited through a specialty restrictor plate that limited but didn't prevent diagonal movement. When played with a normal 8 way joystick the light bike levels are extremely difficult to compete due to "stair stepping" a zig zag pattern created by the diagonal inputs, however; TRON does make benefit of the 8 way in two other levels. Linking the AHK Image Search capability to the servo system allows the user to automatically switch to 4 way when entering the light bike level and then automatically switch back to 8 way upon completion.

Examples of code used with this application

USCCMD:

  • USCCMD is a dos tool that comes with the Maestro USB Controller software suite. It allows simple positional commands to be sent to the servo(s) via a batch file. The following code tells the servo to switch to a previously identified position which orients the restrictor plate for 4 way use then to wait two seconds and shut off. The return to 0 command is very important because if the servo becomes stuck in position is will shut off rather than burning out the motor attempting to move to the 4000 position. Additional note, sleep is not native to certain windows editions and can be installed or TIMEOUT, PAUSE, or a ping to nowhere string can be substituted.
  "4way"
  @echo off
  usccmd --servo 0,4000
  sleep 2
  usccmd --servo 0,0 

  • Here is another example with multiple servos. Note that each servo is called by a serial number rather than a port number as in the previous example. This ensures that the proper servo receives the proper command from the controller. Again each servo is turned off after a few seconds to safe guard the build in case of mechanical failure.
 "4way"
 @echo off
 usccmd --DEVICE 0002876 --SERVO 0,4000
 usccmd --DEVICE 0001430 --SERVO 1,6000
 sleep 2
 usccmd --DEVICE 0002876 --SERVO 0,0
 usccmd --DEVICE 0001430 --SERVO 1,0

Specific Implementations

Below are some examples of specific implementations for an automatically switching joystick

Le Chuck's Darkade http://forum.arcadecontrols.com/index.php?topic=116602.0

Darth Paul's Automated Cabinet http://forum.arcadecontrols.com/index.php?topic=116929.0

See Also

TRON 4way to 8way in-game switching http://forum.arcadecontrols.com/index.php?topic=117395.0

Darth Paul's tutorial http://forum.arcadecontrols.com/index.php?topic=113249.0

See Also