Welcome to ´ArcadeJoySwitch´ Tool.

. The ArcadeJoySwitch is a windows tool that takes care of settings the servo positions of your joysticks into the correct position for each game that you start from your frontend. The ArcadeJoySwitch tool has a plugin that is copied into the AttractMode Frontend plugins folder.
. The tool gathers all required joystick information from a MAME executable and converts it into a database. The ArcadeJoySwitch plugin is executed before a games is started and sends the game name to the executable Main.exe. This executable matches the game name with the database to determine if the games used 4 or 8 way joystick directions. The joystick mode is send via a USB cable to a connected arduino and converted to a led signal and a servo setting. The whole operation can be seen in the video below.

To be more precise the data that is send is 2H, 2V, 4W or 8W, but I only need 4W & 8W myself.

good luck.

e-mail: floor.keukens@scarlet.be

Select file to Download

ArcadeJoySwitch for WINDOWS 7

'ArcadeJoySwitch for WINDOWS 7'

ArcadeJoySwitch for WINDOWS 10

'ArcadeJoySwitch for WINDOWS 10'

. On the left you see an animation of the servo controlled 4way/8way switching controller. It switches to a 4way mode by creating a wooden plate with a diamond shaped hole in it, centered around the end of the joystick pin. This blocks the diagonal moves in such a way that only 1 microswitch is used instead of two. Also you feel that the joystick nicely centers around the position you would expect.
. To move to a 8way mode, one could rotate the to plate to shape the hole from diamond to square, but this is not as good as moving to a circular shape. However since I cannot transform a diamond shape into a circular shape by rotation, a moved to translation. Moving the hole away from the joystick acts as a circular move, since the joystick can move freely.
. The upwards move of the wooden plate is connected to a simple servo arm. The arm is adjusted such that a full servo move of 180 degrees locks the plate nicely into both 4way and 8way positions.

4way mode: DIAMOND shape

8way mode: NO shape

Pin settings:
pin_in_4way = 6; // Connect to Arcade button to switch to 4way
pin_in_8way = 7; // Connect to Arcade button to switch to 8way
pin_in_fn = 8; // Connect to Arcade button as shift button
pin_out_led_green = 2; // Connect to leds for diagnostics
pin_out_led_yellow = 3;
pin_out_led_orange= 4;
pin_out_led_red = 5;
pin_servo_1 = 9; // Connect to player 1 joystick servo
pin_servo_2 = 10;// Connect to player 2 joystick servo
pin_servo_3 = 11;// Connect to player 3 joystick servo
pin_servo_4 = 12;// Connect to player 4 joystick servo


When using an Arduino Uno or Micro pro (as shown on the left) you need to install an USB driver in order to allow serial communication. The Arduino NANO may needs a different driver.
When you are able to upload an arduino sketch to the board, you are fine. You can test if USB is working using the 4 yellow buttons in the ArcadeJoystick GUI.
If you build and test the board on seperate laptop like i did, i did not have the USB drivers installed on my arcade. The easiest way is to download Arduino_v1.6.6.exe and install the USB drivers with it. If you want only the driver, then you have to copy only the ´driver´ folder in the arduino software and update the device in DeviceManager yourself.

WARNING. When programming the arduino with the provided code, the correct arduino needs to be selected. However there is a slight difference in Arduino UNO and Arduino Nana or Micro behaviour. The difference is that the ARDUINO UNO performs a reset when a serial connection is made. This means that when testing your will see all four leds to be turned on for 1 seconds, but the servo will not move. This is due to the reset that takes about 1 second to finish and then the send code is missed.
Luckily there is a very simple solution for this:
Apply a 10uF capacitor from RESET pin (+) to the GND pin (-), to prevent the automatic RESET. With this capacitor all arduinos behave the same. However, you must remove the capacitor again in order to reprogram it.

This video shows how the Servo is connected and how it responses to the Diagnostic Buttons if the port is set OK.

tags: - Arcade Joystick Switching - 4way 8way joystick switching - 4 way 8 way joystick switching - 4/8 way joystick switching - joystick with Servo - joystick Servo control - Arcade control - Switching joystick modes - Switching joystick mode - generic joystick switching - automatic joystick switching - joystick switching plugin - Attract Mode plugin - AttactMode plugin - 2way, 4way, 8way - 2way, 4way & 8way - 2 way, 4 way, 8 way - 2 way, 4 way & 8 way - 2/4/8way - 2/4/8 way - Arcade plugins - Joystick directions - do it yourself arcade - DIY arcade - do it yourself joystick - DIY joystick

This video shows how you prepare your software. You have to do this only once.