# 3H Dual Arcade USB Adapter
#
# This is an adapter board that converts arcade cabinet inputs to behave like
# two USB gamepads.
#
# Special Notes:
#
# 1. While the device works normally in Windows, it may be necessary to use 
#    a usbhid.quirks setting on RPi. If the adapter isn't recognized as
#    two gamepads, append the following to your cmdline.txt:
#
#        usbhid.quirks=0x16c0:0x75e1:0x040
#
# 2. In order to support 12 inputs per player, some pins that would normally
#    be empty or differently used are repurposed as button inputs. Be sure
#    to read the section at the end of this file that describes these
#    non-standard inputs.
# 
# 3. Service (pin 14, solder side) isn't connected to anything.

input_device_display_name = "3H JAMMA to Dual USB Adapter"

#
# The doubled-up version is used on RPi, possibly related to usbhid.quirks
#
input_device = "3H Dual Arcade 3H Dual Arcade"
#input_device = "3H Dual Arcade"

#
# Hex vid:pid = 16c0:75e1 -> Decimal vid:pid = 5824:30177
#
input_vendor_id = "5824"
input_product_id = "30177"

#
# udev on RPi, xinput on Windows
#
input_driver = "udev"
#input_driver = "xinput"

#
# Standard JAMMA Inputs
#
input_up_axis_label = "Joystick Up"
input_down_axis_label = "Joystick Down"
input_left_axis_label = "Joystick Left"
input_right_axis_label = "Joystick Right"
input_up_axis = "-1"
input_down_axis = "+1"
input_left_axis = "-0"
input_right_axis = "+0"

input_a_btn_label = "A/JAMMA22"
input_b_btn_label = "B/JAMMA23"
input_x_btn_label = "C/JAMMA24"
input_y_btn_label = "D/JAMMA25"
input_a_btn = "0"
input_b_btn = "1"
input_x_btn = "2"
input_y_btn = "3"

#
# JAMMA26 was chosen for Select because that's what the Neo Geo MVS uses
#
input_select_btn_label = "Select/JAMMA26"
input_start_btn_label = "Start/JAMMA17"
input_select_btn = "4"
input_start_btn = "7"

input_l_btn_label = "Coin/JAMMA16"
input_r_btn_label = "Test/Tilt/JAMMA15"
input_l_btn = "8"
input_r_btn = "9"

#
# The following buttons on non-standard pins and will need special wiring
# for your cabinet to work properly with them.
#
# Notably, pins 27 and 28 are supposed to be grounds.
# 
# Pin 9 is supposed to be for the coin lockout, which is technically an
# *output*.
#
# Pin 11 shouldn't have anything on it for JAMMA but an MVS cabinet would 
# have mono audio the parts side and test on the solder side. Use this 
# board with caution!
#
input_l2_btn_label = "E/JAMMA27"
input_r2_btn_label = "F/JAMMA28"
input_l3_btn_label = "G/JAMMA11"
input_r3_btn_label = "H/JAMMA9"
input_l2_btn = "5"
input_r2_btn = "6"
input_l3_btn = "10"
input_r3_btn = "11"