# Retro-Bit x 8Bitdo RB8-64   - http://retro-bit.com/n64bluetooth.html - http://retro-bit.com/media/wysiwyg/rb864manual.pdf
# Firmware v2.00              - http://download.8bitdo.com/Firmware/n64/Firmware_N64_V2.00.zip

input_driver = "udev"
input_device = "8Bitdo N64 GamePad"
input_device_display_name = "RB8-64"

# 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:3830 -> Decimal vid:pid = 11720:14384
input_vendor_id = "11720"
input_product_id = "14384"

input_b_btn = "1"
input_start_btn = "11"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "0"
input_l_btn = "6"
input_r_btn = "7"
input_l2_btn = "10"
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_r_x_plus_btn = "9"
input_r_x_minus_btn = "4"
input_r_y_plus_btn = "3"
input_r_y_minus_btn = "8"

input_b_btn_label = "B"
input_start_btn_label = "Start"
input_up_btn_label = "Dpad Up"
input_down_btn_label = "Dpad Down"
input_left_btn_label = "Dpad Left"
input_right_btn_label = "Dpad Right"
input_a_btn_label = "A"
input_l_btn_label = "L"
input_r_btn_label = "R"
input_l2_btn_label = "Z"
input_l_x_plus_axis_label = "Joystick Right"
input_l_x_minus_axis_label = "Joystick Left"
input_l_y_plus_axis_label = "Joystick Down"
input_l_y_minus_axis_label = "Joystick Up"
input_r_x_plus_btn_label = "C Right"
input_r_x_minus_btn_label = "C Left"
input_r_y_plus_btn_label = "C Down"
input_r_y_minus_btn_label = "C Up"

# -------------------------------------------------------------------------------------------------------------------------------------------------
# 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 N64 GamePad", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
# -------------------------------------------------------------------------------------------------------------------------------------------------
