commit
7379c0649a
8 changed files with 136 additions and 71 deletions
|
@ -1,7 +1,7 @@
|
|||
input_driver = "udev"
|
||||
input_device = "retrogame_joypad"
|
||||
input_vendor_id = "18507"
|
||||
input_product_id = "4353"
|
||||
input_device = "Rinputer"
|
||||
input_vendor_id = "1234"
|
||||
input_product_id = "5648"
|
||||
input_b_btn = "0"
|
||||
input_y_btn = "3"
|
||||
input_select_btn = "8"
|
||||
|
@ -22,8 +22,8 @@ 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_axis = "+2"
|
||||
input_r_x_minus_axis = "-2"
|
||||
input_r_y_plus_axis = "+3"
|
||||
input_r_y_minus_axis = "-3"
|
||||
input_r_x_plus_axis = "+3"
|
||||
input_r_x_minus_axis = "-3"
|
||||
input_r_y_plus_axis = "+4"
|
||||
input_r_y_minus_axis = "-4"
|
||||
input_gun_trigger_mbtn = "1"
|
|
@ -88,6 +88,7 @@ makeinstall_target() {
|
|||
aarch64)
|
||||
cp -vP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/retroarch-*/.install_pkg/usr/bin/retroarch ${INSTALL}/usr/bin/retroarch32
|
||||
cp -rvP ${ROOT}/build.${DISTRO}-${DEVICE}.arm/retroarch-*/.install_pkg/usr/share/retroarch/filters/* ${INSTALL}/usr/share/retroarch/filters
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
21
packages/games/tools/rinputer2/package.mk
Normal file
21
packages/games/tools/rinputer2/package.mk
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Copyright (C) 2022-present Brooksytech (https://github.com/brooksytech)
|
||||
|
||||
PKG_NAME="rinputer2"
|
||||
PKG_VERSION="b1fc0fb69047011d99b54029be500280d33a8027"
|
||||
PKG_ARCH="aarch64"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/R-ARM/rinputer2"
|
||||
PKG_URL="$PKG_SITE.git"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_TOOLCHAIN="make"
|
||||
GET_HANDLER_SUPPORT="git"
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp rinputer2 ${INSTALL}/usr/bin
|
||||
chmod 0755 ${INSTALL}/usr/bin/rinputer2
|
||||
}
|
||||
|
||||
post_install() {
|
||||
enable_service Rinputer2.service
|
||||
}
|
40
packages/games/tools/rinputer2/patches/000-fix-buttons.patch
Normal file
40
packages/games/tools/rinputer2/patches/000-fix-buttons.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
diff --git a/main.c b/main.c
|
||||
index 8efafc6..6ec8d84 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -316,10 +316,10 @@ int main(void)
|
||||
|
||||
ioctl(outfd, UI_SET_EVBIT, EV_KEY);
|
||||
|
||||
- //ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_UP); // dpad up
|
||||
- //ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_DOWN); // dpad down
|
||||
- //ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_LEFT); // dpad left
|
||||
- //ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_RIGHT); // dpad right
|
||||
+ ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_UP); // dpad up
|
||||
+ ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_DOWN); // dpad down
|
||||
+ ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_LEFT); // dpad left
|
||||
+ ioctl(outfd, UI_SET_KEYBIT, BTN_DPAD_RIGHT); // dpad right
|
||||
|
||||
ioctl(outfd, UI_SET_KEYBIT, BTN_NORTH); // x
|
||||
ioctl(outfd, UI_SET_KEYBIT, BTN_SOUTH); // b
|
||||
@@ -332,6 +332,9 @@ int main(void)
|
||||
ioctl(outfd, UI_SET_KEYBIT, BTN_TR2); // L2
|
||||
ioctl(outfd, UI_SET_KEYBIT, BTN_TL2); // R2
|
||||
|
||||
+ ioctl(outfd, UI_SET_KEYBIT, BTN_THUMBL); // L3
|
||||
+ ioctl(outfd, UI_SET_KEYBIT, BTN_THUMBR); // R3
|
||||
+
|
||||
ioctl(outfd, UI_SET_KEYBIT, BTN_SELECT);
|
||||
ioctl(outfd, UI_SET_KEYBIT, BTN_START);
|
||||
|
||||
@@ -350,8 +353,8 @@ int main(void)
|
||||
setup_abs(outfd, ABS_RZ);
|
||||
|
||||
// dpad
|
||||
- setup_abs(outfd, ABS_HAT0X);
|
||||
- setup_abs(outfd, ABS_HAT0Y);
|
||||
+ //setup_abs(outfd, ABS_HAT0X);
|
||||
+ //setup_abs(outfd, ABS_HAT0Y);
|
||||
|
||||
// maybe we should pretend to be xbox gamepad?
|
||||
memset(&usetup, 0, sizeof(usetup));
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Ragnarok Input Daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/rinputer2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,33 +1,60 @@
|
|||
<?xml version="1.0"?>
|
||||
<inputList>
|
||||
<inputConfig type="keyboard" deviceName="Keyboard" deviceGUID="-1">
|
||||
<input name="hotkeyenable" type="key" id="1073741952" value="1" />
|
||||
</inputConfig>
|
||||
<inputConfig type="joystick" deviceName="retrogame_joypad" deviceGUID="190000004b4800000111000000010000">
|
||||
<input name="a" type="button" id="1" value="1" />
|
||||
<input name="b" type="button" id="0" value="1" />
|
||||
<input name="up" type="button" id="13" value="1" />
|
||||
<input name="down" type="button" id="14" value="1" />
|
||||
<input name="left" type="button" id="15" value="1" />
|
||||
<input name="right" type="button" id="16" value="1" />
|
||||
<input name="hotkeyenable" type="button" id="10" value="1" />
|
||||
<input name="leftanalogleft" type="axis" id="0" value="-1" />
|
||||
<input name="leftanalogright" type="axis" id="0" value="1" />
|
||||
<input name="leftanalogup" type="axis" id="1" value="-1" />
|
||||
<input name="leftanalogdown" type="axis" id="1" value="1" />
|
||||
<input name="leftshoulder" type="button" id="4" value="1" />
|
||||
<input name="leftthumb" type="button" id="11" value="1" />
|
||||
<input name="lefttrigger" type="button" id="6" value="1" />
|
||||
<input name="rightanalogleft" type="axis" id="2" value="-1" />
|
||||
<input name="rightanalogright" type="axis" id="2" value="1" />
|
||||
<input name="rightanalogup" type="axis" id="3" value="-1" />
|
||||
<input name="rightanalogdown" type="axis" id="3" value="1" />
|
||||
<input name="rightshoulder" type="button" id="5" value="1" />
|
||||
<input name="rightthumb" type="button" id="12" value="1" />
|
||||
<input name="righttrigger" type="button" id="7" value="1" />
|
||||
<input name="select" type="button" id="8" value="1" />
|
||||
<input name="start" type="button" id="9" value="1" />
|
||||
<input name="x" type="button" id="2" value="1" />
|
||||
<input name="y" type="button" id="3" value="1" />
|
||||
</inputConfig>
|
||||
<inputConfig type="keyboard" deviceName="Keyboard" deviceGUID="-1">
|
||||
<input name="hotkeyenable" type="key" id="1073741952" value="1" />
|
||||
</inputConfig>
|
||||
<inputConfig type="joystick" deviceName="retrogame_joypad" deviceGUID="190000004b4800000111000000010000">
|
||||
<input name="a" type="button" id="1" value="1" />
|
||||
<input name="b" type="button" id="0" value="1" />
|
||||
<input name="up" type="button" id="13" value="1" />
|
||||
<input name="down" type="button" id="14" value="1" />
|
||||
<input name="left" type="button" id="15" value="1" />
|
||||
<input name="right" type="button" id="16" value="1" />
|
||||
<input name="hotkeyenable" type="button" id="10" value="1" />
|
||||
<input name="leftanalogleft" type="axis" id="0" value="-1" />
|
||||
<input name="leftanalogright" type="axis" id="0" value="1" />
|
||||
<input name="leftanalogup" type="axis" id="1" value="-1" />
|
||||
<input name="leftanalogdown" type="axis" id="1" value="1" />
|
||||
<input name="leftshoulder" type="button" id="4" value="1" />
|
||||
<input name="leftthumb" type="button" id="11" value="1" />
|
||||
<input name="lefttrigger" type="button" id="6" value="1" />
|
||||
<input name="rightanalogleft" type="axis" id="2" value="-1" />
|
||||
<input name="rightanalogright" type="axis" id="2" value="1" />
|
||||
<input name="rightanalogup" type="axis" id="3" value="-1" />
|
||||
<input name="rightanalogdown" type="axis" id="3" value="1" />
|
||||
<input name="rightshoulder" type="button" id="5" value="1" />
|
||||
<input name="rightthumb" type="button" id="12" value="1" />
|
||||
<input name="righttrigger" type="button" id="7" value="1" />
|
||||
<input name="select" type="button" id="8" value="1" />
|
||||
<input name="start" type="button" id="9" value="1" />
|
||||
<input name="x" type="button" id="2" value="1" />
|
||||
<input name="y" type="button" id="3" value="1" />
|
||||
</inputConfig>
|
||||
<inputConfig type="joystick" deviceName="Rinputer" deviceGUID="03000000341200007856000000000000">
|
||||
<input name="a" type="button" id="1" value="1" />
|
||||
<input name="b" type="button" id="0" value="1" />
|
||||
<input name="down" type="button" id="14" value="1" />
|
||||
<input name="hotkeyenable" type="button" id="8" value="1" />
|
||||
<input name="left" type="button" id="15" value="1" />
|
||||
<input name="leftanalogdown" type="axis" id="1" value="-1" />
|
||||
<input name="leftanalogleft" type="axis" id="0" value="-1" />
|
||||
<input name="leftanalogright" type="axis" id="0" value="1" />
|
||||
<input name="leftanalogup" type="axis" id="1" value="1" />
|
||||
<input name="leftshoulder" type="button" id="4" value="1" />
|
||||
<input name="leftthumb" type="button" id="11" value="1" />
|
||||
<input name="lefttrigger" type="button" id="6" value="1" />
|
||||
<input name="right" type="button" id="16" value="1" />
|
||||
<input name="rightanalogdown" type="axis" id="4" value="-1" />
|
||||
<input name="rightanalogleft" type="axis" id="3" value="-1" />
|
||||
<input name="rightanalogright" type="axis" id="3" value="1" />
|
||||
<input name="rightanalogup" type="axis" id="4" value="1" />
|
||||
<input name="rightshoulder" type="button" id="5" value="1" />
|
||||
<input name="rightthumb" type="button" id="12" value="1" />
|
||||
<input name="righttrigger" type="button" id="7" value="1" />
|
||||
<input name="select" type="button" id="8" value="1" />
|
||||
<input name="start" type="button" id="9" value="1" />
|
||||
<input name="up" type="button" id="13" value="1" />
|
||||
<input name="x" type="button" id="2" value="1" />
|
||||
<input name="y" type="button" id="3" value="1" />
|
||||
</inputConfig>
|
||||
</inputList>
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<inputList>
|
||||
<inputConfig type="keyboard" deviceName="Keyboard" deviceGUID="-1">
|
||||
<input name="hotkeyenable" type="key" id="1073741952" value="1" />
|
||||
</inputConfig>
|
||||
<inputConfig type="joystick" deviceName="retrogame_joypad" deviceGUID="190000004b4800000111000000010000">
|
||||
<input name="a" type="button" id="1" value="1" />
|
||||
<input name="b" type="button" id="0" value="1" />
|
||||
<input name="up" type="button" id="13" value="1" />
|
||||
<input name="down" type="button" id="14" value="1" />
|
||||
<input name="left" type="button" id="15" value="1" />
|
||||
<input name="right" type="button" id="16" value="1" />
|
||||
<input name="hotkeyenable" type="button" id="10" value="1" />
|
||||
<input name="leftanalogleft" type="axis" id="0" value="-1" />
|
||||
<input name="leftanalogright" type="axis" id="0" value="1" />
|
||||
<input name="leftanalogup" type="axis" id="1" value="-1" />
|
||||
<input name="leftanalogdown" type="axis" id="1" value="1" />
|
||||
<input name="leftshoulder" type="button" id="4" value="1" />
|
||||
<input name="leftthumb" type="button" id="11" value="1" />
|
||||
<input name="lefttrigger" type="button" id="6" value="1" />
|
||||
<input name="rightanalogleft" type="axis" id="2" value="-1" />
|
||||
<input name="rightanalogright" type="axis" id="2" value="1" />
|
||||
<input name="rightanalogup" type="axis" id="3" value="-1" />
|
||||
<input name="rightanalogdown" type="axis" id="3" value="1" />
|
||||
<input name="rightshoulder" type="button" id="5" value="1" />
|
||||
<input name="rightthumb" type="button" id="12" value="1" />
|
||||
<input name="righttrigger" type="button" id="7" value="1" />
|
||||
<input name="select" type="button" id="8" value="1" />
|
||||
<input name="start" type="button" id="9" value="1" />
|
||||
<input name="x" type="button" id="2" value="1" />
|
||||
<input name="y" type="button" id="3" value="1" />
|
||||
</inputConfig>
|
||||
</inputList>
|
|
@ -36,7 +36,7 @@ PKG_DEPENDS_TARGET="${PKG_EMUS} ${PKG_RETROARCH} ${LIBRETRO_CORES}"
|
|||
### Emulators or cores for specific devices
|
||||
case "${DEVICE}" in
|
||||
RG552)
|
||||
PKG_DEPENDS_TARGET+=" duckstationsa"
|
||||
PKG_DEPENDS_TARGET+=" duckstationsa rinputer2"
|
||||
;;
|
||||
RG503|RG353P|handheld)
|
||||
PKG_DEPENDS_TARGET+=" duckstationsa dolphinsa"
|
||||
|
|
Loading…
Reference in a new issue