# 8Bitdo N30 Arcade           - http://www.8bitdo.com/     - http://www.8bitdo.com/n30-arcade-stick/
# Firmware v4.01              - http://support.8bitdo.com/ - http://download.8bitdo.com/Firmware/Joystick/8Bitdo_N30_Arcade_Firmware_V4.01.zip

input_driver = "udev"
input_device = "8Bitdo NES30 Arcade"
input_device_display_name = "8BitDo N30 Arcade"

# Hex vid:pid is found using "dmesg -w" or "tail -f /var/log/syslog" and converted to Decimal using http://www.binaryhexconverter.com/hex-to-decimal-converter
# Hex vid:pid = 2DC8:1080 -> Decimal vid:pid = 11720:4224
input_vendor_id = "11720"
input_product_id = "4224"

input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "10"
input_start_btn = "11"
input_a_btn = "1"
input_x_btn = "4"
input_l_btn = "6"
input_r_btn = "7"
input_l2_btn = "8"
input_r2_btn = "9"

input_b_btn_label = "A"
input_y_btn_label = "X"
input_select_btn_label = "Select"
input_start_btn_label = "Start"
input_a_btn_label = "B"
input_x_btn_label = "Y"
input_l_btn_label = "LB/L1"
input_r_btn_label = "RB/R1"
input_l2_btn_label = "LT/L2"
input_r2_btn_label = "RT/R2"

# DPAD
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"

input_up_btn_label = "DPAD Up"
input_down_btn_label = "DPAD Down"
input_left_btn_label = "DPAD Left"
input_right_btn_label = "DPAD Right"

# X/Y
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"

input_l_x_plus_axis_label = "X/Y Up"
input_l_x_minus_axis_label = "X/Y Down"
input_l_y_plus_axis_label = "X/Y Left"
input_l_y_minus_axis_label = "X/Y Right"

# -------------------------------------------------------------------------------------------------------------------------------------------------
# If RetroArch do NOT detect the controller when connected via Bluetooth and won't even recognize manual binding,
# fix it by adding this udev rule (the line below WITHOUT the # symbol at the beginning!) to "/etc/udev/rules.d/10-local.rules" and reboot.
# SUBSYSTEM=="input", ATTRS{name}=="8Bitdo NES30 Arcade", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
# -------------------------------------------------------------------------------------------------------------------------------------------------
