Skip to content

Instantly share code, notes, and snippets.

@elsonrodriguez
Last active January 16, 2016 08:59
Show Gist options
  • Save elsonrodriguez/de9ad8dad7e1f672e2bd to your computer and use it in GitHub Desktop.
Save elsonrodriguez/de9ad8dad7e1f672e2bd to your computer and use it in GitHub Desktop.
RetroRig-ES/Retroarch/AttractMode Notes
#KERNEL=="js?", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", NAME="input/js100"
#SUBSYSTEM=="input", KERNEL=="js[0-9]*", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", ENV{ID_INPUT_JOYSTICK}=="?*", MODE="0000", ENV{ID_INPUT_JOYSTICK}="", RUN+="/bin/rm %E{DEVNAME}"
SUBSYSTEM=="input", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", ENV{ID_INPUT_JOYSTICK}=="?*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
SUBSYSTEM=="input", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
Section "InputDevice"
Identifier "WiiMote0"
Driver "evdev"
Option "Device" "/dev/input/wiimote0"
Option "SendCoreEvents" "True"
EndSection
Section "InputDevice"
Identifier "WiiMote1"
Driver "evdev"
Option "Device" "/dev/input/wiimote1"
Option "SendCoreEvents" "True"
EndSection
Section "ServerLayout"
Identifier "X.org Configured"
InputDevice "WiiMote0"
InputDevice "WiiMote1"
EndSection
#Section "ServerLayout"
# InputDevice "WiiMote0"
# InputDevice "WiiMote1"
#EndSection
#KERNEL=="js?", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", NAME="input/js100"
#SUBSYSTEM=="input", KERNEL=="js[0-9]*", ATTRS{name}=="HJZ Mayflash Wiimote PC Adapter", ENV{ID_INPUT_JOYSTICK}=="?*", MODE="0000", ENV{ID_INPUT_JOYSTICK}="", RUN+="/bin/rm %E{DEVNAME}"
SUBSYSTEM=="input", ATTRS{name}=="Nintendo Wiimote", ENV{ID_INPUT_JOYSTICK}=="?*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
SUBSYSTEM=="input", ATTRS{name}=="Nintendo Wiimote", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""
SUBSYSTEM=="input", ATTRS{name}=="Nintendo Wiimote", KERNEL=="event*", PROGRAM="/usr/bin/wiimotes", SYMLINK+="input/wiimote%c"
<?xml version="1.0" encoding="UTF-8"?>
<joystick configversion="9" appversion="2.5">
<!--The SDL name for a joystick is included for informational purposes only.-->
<sdlname>PLAYSTATION(R)3 Controller (00:1E:3D:4F:DA:7B)</sdlname>
<names/>
<sets>
<set index="1">
<button index="2">
<slots>
<slot>
<code>3100</code>
<mode>hold</mode>
</slot>
<slot>
<code>0x1000030</code>
<mode>keyboard</mode>
</slot>
<slot>
<code>100</code>
<mode>pause</mode>
</slot>
</slots>
</button>
<button index="3">
<slots>
<slot>
<code>3000</code>
<mode>hold</mode>
</slot>
<slot>
<code>0x1000031</code>
<mode>keyboard</mode>
</slot>
<slot>
<code>100</code>
<mode>pause</mode>
</slot>
</slots>
</button>
<button index="17">
<slots>
<slot>
<code>3000</code>
<mode>hold</mode>
</slot>
<slot>
<code>0x1000000</code>
<mode>keyboard</mode>
</slot>
<slot>
<code>100</code>
<mode>pause</mode>
</slot>
<slot>
<code>0x1000021</code>
<mode>keyboard</mode>
</slot>
<slot>
<code>0x51</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
</set>
</sets>
</joystick>
#ir_ptr
include buttons
Plugin.ir_ptr.X = ABS_X
Plugin.ir_ptr.Y = ABS_Y
Plugin.led.Led1 = 1
Plugin.led.Led2 = 0
Plugin.led.Led3 = 0
Plugin.led.Led4 = 0
Plugin.led.Battery = 1
obby@nucade:~$ cat /etc/cwiid/wminput/buttons
#buttons
Wiimote.A = KEY_KP1
Wiimote.B = KEY_F13
Wiimote.Up = KEY_UP
Wiimote.Down = KEY_DOWN
Wiimote.Left = KEY_LEFT
Wiimote.Right = KEY_RIGHT
Wiimote.Minus = KEY_BACK
Wiimote.Plus = KEY_FORWARD
Wiimote.Home = KEY_HOME
Wiimote.1 = KEY_KP2
Wiimote.2 = KEY_KP3
Nunchuk.C = BTN_LEFT
Nunchuk.Z = BTN_RIGHT
Classic.Up = KEY_UP
Classic.Down = KEY_DOWN
Classic.Left = KEY_LEFT
Classic.Right = KEY_RIGHT
Classic.Minus = KEY_BACK
Classic.Plus = KEY_FORWARD
Classic.Home = KEY_HOME
Classic.A = BTN_LEFT
Classic.B = BTN_RIGHT
#Classic.X =
#Classic.Y =
#Classic.ZL =
#Classic.ZR =
#Classic.L =
#Classic.R =
#buttons
Wiimote.A = KEY_KP4
Wiimote.B = KEY_F14
Wiimote.Up = KEY_UP
Wiimote.Down = KEY_DOWN
Wiimote.Left = KEY_LEFT
Wiimote.Right = KEY_RIGHT
Wiimote.Minus = KEY_BACK
Wiimote.Plus = KEY_FORWARD
Wiimote.Home = KEY_HOME
Wiimote.1 = KEY_KP5
Wiimote.2 = KEY_KP6
Nunchuk.C = BTN_LEFT
Nunchuk.Z = BTN_RIGHT
Classic.Up = KEY_UP
Classic.Down = KEY_DOWN
Classic.Left = KEY_LEFT
Classic.Right = KEY_RIGHT
Classic.Minus = KEY_BACK
Classic.Plus = KEY_FORWARD
Classic.Home = KEY_HOME
Classic.A = BTN_LEFT
Classic.B = BTN_RIGHT
#Classic.X =
#Classic.Y =
#Classic.ZL =
#Classic.ZR =
#Classic.L =
#Classic.R =
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="default">
<input>
<port type="P1_JOYSTICKLEFT_UP">
<newseq type="standard">
JOYCODE_1_BUTTON5 OR JOYCODE_1_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKLEFT_DOWN">
<newseq type="standard">
JOYCODE_1_YAXIS_DOWN_SWITCH OR JOYCODE_1_BUTTON7
</newseq>
</port>
<port type="P1_JOYSTICKLEFT_LEFT">
<newseq type="standard">
JOYCODE_1_BUTTON8 OR JOYCODE_1_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKLEFT_RIGHT">
<newseq type="standard">
JOYCODE_1_BUTTON6 OR JOYCODE_1_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_UP">
<newseq type="standard">
JOYCODE_1_BUTTON13 OR JOYCODE_1_RXAXIS_NEG_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_DOWN">
<newseq type="standard">
JOYCODE_1_BUTTON15 OR JOYCODE_1_RXAXIS_POS_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_LEFT">
<newseq type="standard">
JOYCODE_1_BUTTON16 OR JOYCODE_1_ZAXIS_NEG_SWITCH
</newseq>
</port>
<port type="P1_JOYSTICKRIGHT_RIGHT">
<newseq type="standard">
JOYCODE_1_ZAXIS_POS_SWITCH OR JOYCODE_1_BUTTON14
</newseq>
</port>
<port type="P1_LIGHTGUN_X">
<newseq type="standard">
GUNCODE_1_XAXIS
</newseq>
</port>
<port type="P1_LIGHTGUN_Y">
<newseq type="standard">
GUNCODE_1_YAXIS
</newseq>
</port>
<port type="P1_AD_STICK_X">
<newseq type="standard">
GUNCODE_1_XAXIS
</newseq>
</port>
<port type="P1_AD_STICK_Y">
<newseq type="standard">
GUNCODE_1_YAXIS
</newseq>
</port>
<port type="P1_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_1_BUTTON5
</newseq>
</port>
<port type="P1_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_1_BUTTON7
</newseq>
</port>
<port type="P1_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_1_BUTTON8
</newseq>
</port>
<port type="P1_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_1_BUTTON6
</newseq>
</port>
<port type="P1_BUTTON1">
<newseq type="standard">
JOYCODE_1_BUTTON16 OR KEYCODE_F13
</newseq>
</port>
<port type="P1_BUTTON2">
<newseq type="standard">
JOYCODE_1_BUTTON15 OR KEYCODE_1PAD
</newseq>
</port>
<port type="P1_BUTTON3">
<newseq type="standard">
JOYCODE_1_BUTTON14
</newseq>
</port>
<port type="P1_BUTTON4">
<newseq type="standard">
JOYCODE_1_BUTTON13
</newseq>
</port>
<port type="P1_BUTTON5">
<newseq type="standard">
JOYCODE_1_BUTTON11
</newseq>
</port>
<port type="P1_BUTTON6">
<newseq type="standard">
JOYCODE_1_BUTTON12
</newseq>
</port>
<port type="P1_BUTTON7">
<newseq type="standard">
JOYCODE_1_BUTTON9 JOYCODE_1_ADDAXIS5_POS_SWITCH
</newseq>
</port>
<port type="P1_BUTTON8">
<newseq type="standard">
JOYCODE_1_BUTTON10 JOYCODE_1_ADDAXIS6_POS_SWITCH
</newseq>
</port>
<port type="P1_BUTTON9">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_BUTTON10">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_BUTTON11">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_BUTTON12">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_BUTTON13">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_BUTTON14">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_BUTTON15">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_BUTTON16">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P1_START">
<newseq type="standard">
JOYCODE_1_BUTTON4 OR KEYCODE_3PAD
</newseq>
</port>
<port type="P1_SELECT">
<newseq type="standard">
JOYCODE_1_BUTTON1
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_UP">
<newseq type="standard">
JOYCODE_2_BUTTON5 OR JOYCODE_2_YAXIS_UP_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_DOWN">
<newseq type="standard">
JOYCODE_2_YAXIS_DOWN_SWITCH OR JOYCODE_2_BUTTON7
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_LEFT">
<newseq type="standard">
JOYCODE_2_BUTTON8 OR JOYCODE_2_XAXIS_LEFT_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKLEFT_RIGHT">
<newseq type="standard">
JOYCODE_2_BUTTON6 OR JOYCODE_2_XAXIS_RIGHT_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_UP">
<newseq type="standard">
JOYCODE_2_BUTTON13 OR JOYCODE_2_RXAXIS_NEG_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_DOWN">
<newseq type="standard">
JOYCODE_2_BUTTON15 OR JOYCODE_2_RXAXIS_POS_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_LEFT">
<newseq type="standard">
JOYCODE_2_BUTTON16 OR JOYCODE_2_ZAXIS_NEG_SWITCH
</newseq>
</port>
<port type="P2_JOYSTICKRIGHT_RIGHT">
<newseq type="standard">
JOYCODE_2_ZAXIS_POS_SWITCH OR JOYCODE_2_BUTTON14
</newseq>
</port>
<port type="P2_LIGHTGUN_X">
<newseq type="standard">
GUNCODE_2_XAXIS
</newseq>
</port>
<port type="P2_LIGHTGUN_Y">
<newseq type="standard">
GUNCODE_2_YAXIS
</newseq>
</port>
<port type="P2_AD_STICK_X">
<newseq type="standard">
GUNCODE_2_XAXIS
</newseq>
</port>
<port type="P2_AD_STICK_Y">
<newseq type="standard">
GUNCODE_2_YAXIS
</newseq>
</port>
<port type="P2_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_2_BUTTON5
</newseq>
</port>
<port type="P2_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_2_BUTTON7
</newseq>
</port>
<port type="P2_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_2_BUTTON8
</newseq>
</port>
<port type="P2_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_2_BUTTON6
</newseq>
</port>
<port type="P2_BUTTON1">
<newseq type="standard">
JOYCODE_2_BUTTON16 OR KEYCODE_F14
</newseq>
</port>
<port type="P2_BUTTON2">
<newseq type="standard">
JOYCODE_2_BUTTON15 OR KEYCODE_4PAD
</newseq>
</port>
<port type="P2_BUTTON3">
<newseq type="standard">
JOYCODE_2_BUTTON14
</newseq>
</port>
<port type="P2_BUTTON4">
<newseq type="standard">
JOYCODE_2_BUTTON13
</newseq>
</port>
<port type="P2_BUTTON5">
<newseq type="standard">
JOYCODE_2_BUTTON11
</newseq>
</port>
<port type="P2_BUTTON6">
<newseq type="standard">
JOYCODE_2_BUTTON12
</newseq>
</port>
<port type="P2_BUTTON7">
<newseq type="standard">
JOYCODE_2_BUTTON9
</newseq>
</port>
<port type="P2_BUTTON8">
<newseq type="standard">
JOYCODE_2_BUTTON10
</newseq>
</port>
<port type="P2_BUTTON9">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_BUTTON10">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_BUTTON11">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_BUTTON12">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_BUTTON13">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_BUTTON14">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_BUTTON15">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_BUTTON16">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P2_START">
<newseq type="standard">
JOYCODE_2_BUTTON4 OR KEYCODE_3PAD
</newseq>
</port>
<port type="P2_SELECT">
<newseq type="standard">
JOYCODE_2_BUTTON1
</newseq>
</port>
<port type="P3_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_3_BUTTON5
</newseq>
</port>
<port type="P3_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_3_BUTTON7
</newseq>
</port>
<port type="P3_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_3_BUTTON8
</newseq>
</port>
<port type="P3_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_3_BUTTON6
</newseq>
</port>
<port type="P3_BUTTON1">
<newseq type="standard">
JOYCODE_3_BUTTON16
</newseq>
</port>
<port type="P3_BUTTON2">
<newseq type="standard">
JOYCODE_3_BUTTON15
</newseq>
</port>
<port type="P3_BUTTON3">
<newseq type="standard">
JOYCODE_3_BUTTON14
</newseq>
</port>
<port type="P3_BUTTON4">
<newseq type="standard">
JOYCODE_3_BUTTON13
</newseq>
</port>
<port type="P3_BUTTON5">
<newseq type="standard">
JOYCODE_3_BUTTON11
</newseq>
</port>
<port type="P3_BUTTON6">
<newseq type="standard">
JOYCODE_3_BUTTON12
</newseq>
</port>
<port type="P3_BUTTON7">
<newseq type="standard">
JOYCODE_3_BUTTON9
</newseq>
</port>
<port type="P3_BUTTON8">
<newseq type="standard">
JOYCODE_3_BUTTON10
</newseq>
</port>
<port type="P3_BUTTON9">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_BUTTON10">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_BUTTON11">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_BUTTON12">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_BUTTON13">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_BUTTON14">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_BUTTON15">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_BUTTON16">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P3_START">
<newseq type="standard">
JOYCODE_3_BUTTON4
</newseq>
</port>
<port type="P3_SELECT">
<newseq type="standard">
JOYCODE_3_BUTTON1
</newseq>
</port>
<port type="P4_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_4_BUTTON5
</newseq>
</port>
<port type="P4_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_4_BUTTON7
</newseq>
</port>
<port type="P4_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_4_BUTTON8
</newseq>
</port>
<port type="P4_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_4_BUTTON6
</newseq>
</port>
<port type="P4_BUTTON1">
<newseq type="standard">
JOYCODE_4_BUTTON16
</newseq>
</port>
<port type="P4_BUTTON2">
<newseq type="standard">
JOYCODE_4_BUTTON15
</newseq>
</port>
<port type="P4_BUTTON3">
<newseq type="standard">
JOYCODE_4_BUTTON14
</newseq>
</port>
<port type="P4_BUTTON4">
<newseq type="standard">
JOYCODE_4_BUTTON13
</newseq>
</port>
<port type="P4_BUTTON5">
<newseq type="standard">
JOYCODE_4_BUTTON11
</newseq>
</port>
<port type="P4_BUTTON6">
<newseq type="standard">
JOYCODE_4_BUTTON12
</newseq>
</port>
<port type="P4_BUTTON7">
<newseq type="standard">
JOYCODE_4_BUTTON9
</newseq>
</port>
<port type="P4_BUTTON8">
<newseq type="standard">
JOYCODE_4_BUTTON10
</newseq>
</port>
<port type="P4_BUTTON9">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_BUTTON10">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_BUTTON11">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_BUTTON12">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_BUTTON13">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_BUTTON14">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_BUTTON15">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_BUTTON16">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P4_START">
<newseq type="standard">
JOYCODE_4_BUTTON4
</newseq>
</port>
<port type="P4_SELECT">
<newseq type="standard">
JOYCODE_4_BUTTON1
</newseq>
</port>
<port type="P5_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_5_BUTTON5
</newseq>
</port>
<port type="P5_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_5_BUTTON7
</newseq>
</port>
<port type="P5_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_5_BUTTON8
</newseq>
</port>
<port type="P5_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_5_BUTTON6
</newseq>
</port>
<port type="P5_BUTTON1">
<newseq type="standard">
JOYCODE_5_BUTTON16
</newseq>
</port>
<port type="P5_BUTTON2">
<newseq type="standard">
JOYCODE_5_BUTTON15
</newseq>
</port>
<port type="P5_BUTTON3">
<newseq type="standard">
JOYCODE_5_BUTTON14
</newseq>
</port>
<port type="P5_BUTTON4">
<newseq type="standard">
JOYCODE_5_BUTTON13
</newseq>
</port>
<port type="P5_BUTTON5">
<newseq type="standard">
JOYCODE_5_BUTTON11
</newseq>
</port>
<port type="P5_BUTTON6">
<newseq type="standard">
JOYCODE_5_BUTTON12
</newseq>
</port>
<port type="P5_BUTTON7">
<newseq type="standard">
JOYCODE_5_BUTTON9
</newseq>
</port>
<port type="P5_BUTTON8">
<newseq type="standard">
JOYCODE_5_BUTTON10
</newseq>
</port>
<port type="P5_BUTTON9">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_BUTTON10">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_BUTTON11">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_BUTTON12">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_BUTTON13">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_BUTTON14">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_BUTTON15">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_BUTTON16">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P5_START">
<newseq type="standard">
JOYCODE_5_BUTTON4
</newseq>
</port>
<port type="P5_SELECT">
<newseq type="standard">
JOYCODE_5_BUTTON1
</newseq>
</port>
<port type="P6_JOYSTICK_UP">
<newseq type="standard">
JOYCODE_6_BUTTON5
</newseq>
</port>
<port type="P6_JOYSTICK_DOWN">
<newseq type="standard">
JOYCODE_6_BUTTON7
</newseq>
</port>
<port type="P6_JOYSTICK_LEFT">
<newseq type="standard">
JOYCODE_6_BUTTON8
</newseq>
</port>
<port type="P6_JOYSTICK_RIGHT">
<newseq type="standard">
JOYCODE_6_BUTTON6
</newseq>
</port>
<port type="P6_BUTTON1">
<newseq type="standard">
JOYCODE_6_BUTTON16
</newseq>
</port>
<port type="P6_BUTTON2">
<newseq type="standard">
JOYCODE_6_BUTTON15
</newseq>
</port>
<port type="P6_BUTTON3">
<newseq type="standard">
JOYCODE_6_BUTTON14
</newseq>
</port>
<port type="P6_BUTTON4">
<newseq type="standard">
JOYCODE_6_BUTTON13
</newseq>
</port>
<port type="P6_BUTTON5">
<newseq type="standard">
JOYCODE_6_BUTTON11
</newseq>
</port>
<port type="P6_BUTTON6">
<newseq type="standard">
JOYCODE_6_BUTTON12
</newseq>
</port>
<port type="P6_BUTTON7">
<newseq type="standard">
JOYCODE_6_BUTTON9
</newseq>
</port>
<port type="P6_BUTTON8">
<newseq type="standard">
JOYCODE_6_BUTTON10
</newseq>
</port>
<port type="P6_BUTTON9">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_BUTTON10">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_BUTTON11">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_BUTTON12">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_BUTTON13">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_BUTTON14">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_BUTTON15">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_BUTTON16">
<newseq type="standard">
NONE
</newseq>
</port>
<port type="P6_START">
<newseq type="standard">
JOYCODE_6_BUTTON4
</newseq>
</port>
<port type="P6_SELECT">
<newseq type="standard">
JOYCODE_6_BUTTON1
</newseq>
</port>
<port type="START1">
<newseq type="standard">
JOYCODE_1_BUTTON4 OR KEYCODE_3PAD
</newseq>
</port>
<port type="START2">
<newseq type="standard">
JOYCODE_2_BUTTON4 OR KEYCODE_6PAD
</newseq>
</port>
<port type="START3">
<newseq type="standard">
JOYCODE_3_BUTTON4
</newseq>
</port>
<port type="START4">
<newseq type="standard">
JOYCODE_4_BUTTON4
</newseq>
</port>
<port type="START5">
<newseq type="standard">
JOYCODE_5_BUTTON4
</newseq>
</port>
<port type="START6">
<newseq type="standard">
JOYCODE_6_BUTTON4
</newseq>
</port>
<port type="COIN1">
<newseq type="standard">
JOYCODE_1_BUTTON1 OR KEYCODE_2PAD
</newseq>
</port>
<port type="COIN2">
<newseq type="standard">
JOYCODE_2_BUTTON1 OR KEYCODE_5PAD
</newseq>
</port>
<port type="COIN3">
<newseq type="standard">
JOYCODE_3_BUTTON1
</newseq>
</port>
<port type="COIN4">
<newseq type="standard">
JOYCODE_4_BUTTON1
</newseq>
</port>
<port type="COIN5">
<newseq type="standard">
JOYCODE_5_BUTTON1
</newseq>
</port>
<port type="COIN6">
<newseq type="standard">
JOYCODE_6_BUTTON1
</newseq>
</port>
<port type="UI_CANCEL">
<newseq type="standard">
KEYCODE_ESC OR JOYCODE_1_BUTTON17
</newseq>
</port>
</input>
</system>
</mameconfig>
#ir_ptr
include buttons
Plugin.ir_ptr.X = ABS_X
Plugin.ir_ptr.Y = ABS_Y
Plugin.led.Led1 = 1
Plugin.led.Led2 = 0
Plugin.led.Led3 = 0
Plugin.led.Led4 = 0
Plugin.led.Battery = 1
#ir_ptr
include buttons2
Plugin.ir_ptr.X = ABS_X
Plugin.ir_ptr.Y = ABS_Y
Plugin.led.Led1 = 1
Plugin.led.Led2 = 1
Plugin.led.Led3 = 0
Plugin.led.Led4 = 0
Plugin.led.Battery = 1
#
# CORE CONFIGURATION OPTIONS
#
readconfig 1
writeconfig 0
#
# CORE SEARCH PATH OPTIONS
#
rompath ~/RetroRig-ES/ROMs/MAME;~/RetroRig-ES/BIOS/MAME
hashpath /usr/share/games/mess/hash
samplepath ~/RetroRig-ES/Games/Arwork/samples;/usr/local/share/games/mame/samples;/usr/share/games/mame/samples
artpath ~/RetroRig-ES/Games/Artwork/MAME;/usr/local/share/games/mame/artwork;/usr/share/games/mame/artwork
ctrlrpath /etc/mess/ctrlr
inipath ~/.retrorig-es/.mame;/etc/mame
fontpath .
cheatpath ~/RetroRig-ES/Games/Cheats/MAME/cheat;/usr/local/share/games/mame/cheat;/usr/share/games/mame/cheat
crosshairpath ~/RetroRig-ES/Games/Other/MAME/crosshair;/usr/local/share/games/mame/crosshair;/usr/share/games/mame/crosshair
#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory ~/.retrorig-es/.mame/cfg
nvram_directory ~/.retrorig-es/.mame/nvram
memcard_directory ~/.retrorig-es/.mame/memcard
input_directory ~/.retrorig-es/.mame/inp
state_directory ~/.retrorig-es/.mame/sta
snapshot_directory ~/.retrorig-es/.mame/snap
diff_directory ~/.retrorig-es/.mame/diff
comment_directory ~/.retrorig-es/.mame/comments
#
# CORE STATE/PLAYBACK OPTIONS
#
state
autosave 0
playback
record
mngwrite
aviwrite
wavwrite
snapname %g/%i
snapsize auto
snapview internal
statename %g
burnin 0
#
# CORE PERFORMANCE OPTIONS
#
autoframeskip 0
frameskip 0
seconds_to_run 0
throttle 1
sleep 1
speed 1.0
refreshspeed 0
#
# CORE ROTATION OPTIONS
#
rotate 1
ror 0
rol 0
autoror 0
autorol 0
flipx 0
flipy 0
#
# CORE ARTWORK OPTIONS
#
artwork_crop 0
use_backdrops 1
use_overlays 1
use_bezels 1
use_cpanels 1
use_marquees 1
#
# CORE SCREEN OPTIONS
#
brightness 1.0
contrast 1.0
gamma 1.0
pause_brightness 0.65
effect none
#
# CORE VECTOR OPTIONS
#
antialias 1
beam 1.0
flicker 0
#
# CORE SOUND OPTIONS
#
sound 1
samplerate 48000
samples 1
volume 0
#
# CORE INPUT OPTIONS
#
coin_lockout 1
ctrlr
mouse 0
joystick 1
lightgun 1
multikeyboard 0
multimouse 0
steadykey 0
ui_active 0
offscreen_reload 1
joystick_map auto
joystick_deadzone 0
joystick_saturation 0.85
natural 0
joystick_contradictory 0
coin_impulse 0
#
# CORE INPUT AUTOMATIC ENABLE OPTIONS
#
paddle_device keyboard
adstick_device keyboard
pedal_device keyboard
dial_device keyboard
trackball_device mouse
lightgun_device lightgun
positional_device keyboard
mouse_device mouse
lightgun_index1 WiiMote0
lightgun_index2 WiiMote1
#
# CORE DEBUGGING OPTIONS
#
log 0
verbose 0
update_in_pause 0
debug 0
debugscript
debug_internal 0
#
# CORE MISC OPTIONS
#
drc 1
drc_use_c 0
bios
cheat 0
skip_gameinfo 1
skip_disclaimer 1
skip_warnings 1
uifont default
ramsize
confirm_quit 1
ui_mouse 0
autoboot_command
autoboot_delay 2
autoboot_script
http 0
http_port 8080
http_path /usr/share/games/mess/web/
#
# DEBUGGING OPTIONS
#
oslog 0
watchdog 0
#
# PERFORMANCE OPTIONS
#
multithreading 0
numprocessors auto
sdlvideofps 0
bench 0
#
# VIDEO OPTIONS
#
video opengl
numscreens 1
window 0
maximize 1
keepaspect 1
unevenstretch 1
centerh 1
centerv 1
waitvsync 1
syncrefresh 0
scalemode none
#
# OpenGL-SPECIFIC OPTIONS
#
filter 1
prescale 1
gl_forcepow2texture 0
gl_notexturerect 0
gl_vbo 1
gl_pbo 1
gl_glsl 0
gl_glsl_filter 1
glsl_shader_mame0 none
glsl_shader_mame1 none
glsl_shader_mame2 none
glsl_shader_mame3 none
glsl_shader_mame4 none
glsl_shader_mame5 none
glsl_shader_mame6 none
glsl_shader_mame7 none
glsl_shader_mame8 none
glsl_shader_mame9 none
glsl_shader_screen0 none
glsl_shader_screen1 none
glsl_shader_screen2 none
glsl_shader_screen3 none
glsl_shader_screen4 none
glsl_shader_screen5 none
glsl_shader_screen6 none
glsl_shader_screen7 none
glsl_shader_screen8 none
glsl_shader_screen9 none
gl_glsl_vid_attr 1
#
# PER-WINDOW VIDEO OPTIONS
#
screen auto
aspect auto
resolution auto
view auto
screen0 auto
aspect0 auto
resolution0 auto
view0 auto
screen1 auto
aspect1 auto
resolution1 auto
view1 auto
screen2 auto
aspect2 auto
resolution2 auto
view2 auto
screen3 auto
aspect3 auto
resolution3 auto
view3 auto
#
# FULL SCREEN OPTIONS
#
switchres 0
useallheads 0
#
# SOUND OPTIONS
#
audio_latency 2
#
# SDL KEYBOARD MAPPING
#
keymap 0
keymap_file keymap.dat
uimodekey SCRLOCK
#
# SDL JOYSTICK MAPPING
#
joy_idx1 auto
joy_idx2 auto
joy_idx3 auto
joy_idx4 auto
joy_idx5 auto
joy_idx6 auto
joy_idx7 auto
joy_idx8 auto
sixaxis 0
#
# SDL LOWLEVEL DRIVER OPTIONS
#
videodriver auto
audiodriver auto
gl_lib auto
#! /bin/sh
### BEGIN INIT INFO
# Provides: wiimote
# Required-Start: bluetooth
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: WiiMote startup script
# Description: Starts two instances of wminput for two different wiimotes
### END INIT INFO
# Author: Sprite_tm
#Bluetooth addresses of the wiimotes. Find this out by using the lswm program.
#You can put these two lines in /etc/default/wminput too if you want.
WM_BDADDR1="D8:6B:F7:60:D5:B9"
WM_BDADDR2="D8:6B:F7:51:3B:F1"
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="WiiMote userspace driver"
NAME=wminput
DAEMON=/usr/bin/wminput
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
$DAEMON -d -c ir_ptr $WM_BDADDR1 >/dev/null 2>/dev/null &
#Try not to race between the two controllers
sleep .1
$DAEMON -d -c ir_ptr2 $WM_BDADDR2 >/dev/null 2>/dev/null &
}
#
# Function that stops the daemon/service
#
do_stop()
{
#Evil but works....
killall wminput
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
do_start
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 3
;;
esac
#!/bin/bash
ls -1 /dev/input/wiimote* 2> /dev/null | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment