From 154511f4cb0defb4be3f5141459fa7c2d073c79d Mon Sep 17 00:00:00 2001 From: brooksytech <1673861+brooksytech@users.noreply.github.com> Date: Wed, 20 Mar 2024 02:01:49 +0000 Subject: [PATCH] Update Drastic and MelonDS HK for Ace & set MelonDS as default --- .../drastic-sa/config/RK3588/drastic.cfg | 10 +++--- .../standalone/drastic-sa/package.mk | 8 +++++ .../drastic-sa/scripts/start_drastic.sh | 1 + .../melonds-sa/config/RK3588/melonDS.ini | 22 ++++++------- .../standalone/melonds-sa/config/melonDS.gptk | 31 +++++++++++++++++++ .../standalone/melonds-sa/package.mk | 13 +++++++- .../melonds-sa/scripts/start_melonds.sh | 12 +++++++ .../config/gamecontrollerdb.txt | 2 +- packages/jelos/sources/post-update | 4 +++ packages/virtual/emulators/package.mk | 4 +-- 10 files changed, 87 insertions(+), 20 deletions(-) create mode 100644 packages/emulators/standalone/melonds-sa/config/melonDS.gptk diff --git a/packages/emulators/standalone/drastic-sa/config/RK3588/drastic.cfg b/packages/emulators/standalone/drastic-sa/config/RK3588/drastic.cfg index 33f9682db4..f1f0fae6ea 100644 --- a/packages/emulators/standalone/drastic-sa/config/RK3588/drastic.cfg +++ b/packages/emulators/standalone/drastic-sa/config/RK3588/drastic.cfg @@ -41,8 +41,8 @@ controls_a[CONTROL_INDEX_A] = 32 controls_a[CONTROL_INDEX_B] = 480 controls_a[CONTROL_INDEX_X] = 122 controls_a[CONTROL_INDEX_Y] = 120 -controls_a[CONTROL_INDEX_L] = 481 -controls_a[CONTROL_INDEX_R] = 99 +controls_a[CONTROL_INDEX_L] = 113 +controls_a[CONTROL_INDEX_R] = 111 controls_a[CONTROL_INDEX_START] = 13 controls_a[CONTROL_INDEX_SELECT] = 485 controls_a[CONTROL_INDEX_HINGE] = 104 @@ -54,10 +54,10 @@ controls_a[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 65535 controls_a[CONTROL_INDEX_MENU] = 27 controls_a[CONTROL_INDEX_SAVE_STATE] = 115 controls_a[CONTROL_INDEX_LOAD_STATE] = 108 -controls_a[CONTROL_INDEX_FAST_FORWARD] = 111 +controls_a[CONTROL_INDEX_FAST_FORWARD] = 116 controls_a[CONTROL_INDEX_SWAP_SCREENS] = 109 controls_a[CONTROL_INDEX_SWAP_ORIENTATION_A] = 1026 -controls_a[CONTROL_INDEX_SWAP_ORIENTATION_B] = 116 +controls_a[CONTROL_INDEX_SWAP_ORIENTATION_B] = 65535 controls_a[CONTROL_INDEX_LOAD_GAME] = 65535 controls_a[CONTROL_INDEX_QUIT] = 65535 controls_a[CONTROL_INDEX_FAKE_MICROPHONE] = 65535 @@ -89,7 +89,7 @@ controls_b[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 1156 controls_b[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 1219 controls_b[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 1155 controls_b[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 1035 -controls_b[CONTROL_INDEX_MENU] = 1033 +controls_b[CONTROL_INDEX_MENU] = 120 controls_b[CONTROL_INDEX_SAVE_STATE] = 65535 controls_b[CONTROL_INDEX_LOAD_STATE] = 65535 controls_b[CONTROL_INDEX_FAST_FORWARD] = 65535 diff --git a/packages/emulators/standalone/drastic-sa/package.mk b/packages/emulators/standalone/drastic-sa/package.mk index 83065051d9..f834ed03b2 100644 --- a/packages/emulators/standalone/drastic-sa/package.mk +++ b/packages/emulators/standalone/drastic-sa/package.mk @@ -33,11 +33,19 @@ post_install() { case ${DEVICE} in S922X) LIBEGL="export SDL_VIDEO_GL_DRIVER=\/usr\/lib\/egl\/libGL.so.1 SDL_VIDEO_EGL_DRIVER=\/usr\/lib\/egl\/libEGL.so.1" + HOTKEY="" + ;; + RK3588) + LIBEGL="" + HOTKEY="export HOTKEY="guide"" ;; *) LIBEGL="" + HOTKEY="" ;; esac sed -e "s/@LIBEGL@/${LIBEGL}/g" \ -i ${INSTALL}/usr/bin/start_drastic.sh + sed -e "s/@HOTKEY@/${HOTKEY}/g" \ + -i ${INSTALL}/usr/bin/start_drastic.sh } diff --git a/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh b/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh index 23806ae576..d34b23847c 100644 --- a/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh +++ b/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh @@ -50,6 +50,7 @@ rm -rf /storage/.config/drastic/backup ln -sf /storage/roms/nds /storage/.config/drastic/backup cd /storage/.config/drastic/ +@HOTKEY@ @LIBEGL@ $GPTOKEYB "drastic" -c "drastic.gptk" & ./drastic "$1" diff --git a/packages/emulators/standalone/melonds-sa/config/RK3588/melonDS.ini b/packages/emulators/standalone/melonds-sa/config/RK3588/melonDS.ini index 18e80df81b..8ebf639a17 100644 --- a/packages/emulators/standalone/melonds-sa/config/RK3588/melonDS.ini +++ b/packages/emulators/standalone/melonds-sa/config/RK3588/melonDS.ini @@ -18,15 +18,15 @@ Joy_Right=16842767 Joy_Left=17891342 Joy_Up=65548 Joy_Down=1114125 -Joy_R=86114303 -Joy_L=35782655 +Joy_R=85065727 +Joy_L=34734079 Joy_X=3 Joy_Y=4 HKKey_Lid=-1 -HKKey_Mic=-1 +HKKey_Mic=77 HKKey_Pause=-1 HKKey_Reset=-1 -HKKey_FastForward=-1 +HKKey_FastForward=70 HKKey_FastForwardToggle=-1 HKKey_FullscreenToggle=-1 HKKey_SwapScreens=-1 @@ -37,25 +37,25 @@ HKKey_FrameStep=-1 HKKey_PowerButton=-1 HKKey_VolumeUp=-1 HKKey_VolumeDown=-1 -HKKey_SaveState=-1 -HKKey_LoadState=-1 +HKKey_SaveState=83 +HKKey_LoadState=76 HKJoy_Lid=-1 -HKJoy_Mic=10 +HKJoy_Mic=-1 HKJoy_Pause=-1 HKJoy_Reset=-1 HKJoy_FastForward=-1 HKJoy_FastForwardToggle=-1 HKJoy_FullscreenToggle=-1 -HKJoy_SwapScreens=9 -HKJoy_SwapScreenEmphasis=2 +HKJoy_SwapScreens=2 +HKJoy_SwapScreenEmphasis=-1 HKJoy_SolarSensorDecrease=-1 HKJoy_SolarSensorIncrease=-1 HKJoy_FrameStep=-1 HKJoy_PowerButton=-1 HKJoy_VolumeUp=-1 HKJoy_VolumeDown=-1 -HKJoy_SaveState=6 -HKJoy_LoadState=5 +HKJoy_SaveState=-1 +HKJoy_LoadState=-1 JoystickID=0 WindowWidth=1920 WindowHeight=1080 diff --git a/packages/emulators/standalone/melonds-sa/config/melonDS.gptk b/packages/emulators/standalone/melonds-sa/config/melonDS.gptk new file mode 100644 index 0000000000..a9253ebf6a --- /dev/null +++ b/packages/emulators/standalone/melonds-sa/config/melonDS.gptk @@ -0,0 +1,31 @@ +back = \\ +start = \\ +a = \\ +b = \\ +x = \\ +y = \\ +l1 = \\ +l1_hk = l +l2 = \\ +l2_hk = m +l3 = \\ +r1 = \\ +r1_hk = s +r2 = \\ +r2_hk = f +r3 = mouse_left +up = \\ +down = \\ +left = \\ +right = \\ +left_analog_up = \\ +left_analog_down = \\ +left_analog_left = \\ +left_analog_right = \\ +right_analog_up = mouse_movement_up +right_analog_down = mouse_movement_down +right_analog_left = mouse_movement_left +right_analog_right = mouse_movement_right +deadzone_triggers = 3000 +mouse_scale = 6128 +mouse_delay = 16 diff --git a/packages/emulators/standalone/melonds-sa/package.mk b/packages/emulators/standalone/melonds-sa/package.mk index a859a5a123..90866591a7 100644 --- a/packages/emulators/standalone/melonds-sa/package.mk +++ b/packages/emulators/standalone/melonds-sa/package.mk @@ -5,7 +5,7 @@ PKG_NAME="melonds-sa" PKG_LICENSE="GPLv3" PKG_SITE="https://github.com/melonDS-emu/melonDS" PKG_URL="${PKG_SITE}.git" -PKG_DEPENDS_TARGET="SDL2 qt5 libslirp libepoxy libarchive ecm libpcap" +PKG_DEPENDS_TARGET="SDL2 qt5 libslirp libepoxy libarchive ecm libpcap control-gen" PKG_LONGDESC="DS emulator, sorta. The goal is to do things right and fast" PKG_TOOLCHAIN="cmake" @@ -48,6 +48,7 @@ makeinstall_target() { mkdir -p ${INSTALL}/usr/config/melonDS cp -rf ${PKG_DIR}/config/${DEVICE}/* ${INSTALL}/usr/config/melonDS + cp -rf ${PKG_DIR}/config/melonDS.gptk ${INSTALL}/usr/config/melonDS cp -rf ${PKG_DIR}/scripts/* ${INSTALL}/usr/bin chmod +x ${INSTALL}/usr/bin/start_melonds.sh @@ -64,4 +65,14 @@ post_install() { esac sed -e "s/@PANFROST@/${PANFROST}/g" \ -i ${INSTALL}/usr/bin/start_melonds.sh + case ${DEVICE} in + RK3588) + HOTKEY="export HOTKEY="guide"" + ;; + *) + HOTKEY="" + ;; + esac + sed -e "s/@HOTKEY@/${HOTKEY}/g" \ + -i ${INSTALL}/usr/bin/start_melonds.sh } diff --git a/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh b/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh index 5ac88bbaf8..2a9f417998 100644 --- a/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh +++ b/packages/emulators/standalone/melonds-sa/scripts/start_melonds.sh @@ -7,6 +7,11 @@ set_kill set "-9 melonDS" +#load gptokeyb support files +control-gen_init.sh +source /storage/.config/gptokeyb/control.ini +get_controls + if [ ! -d "/storage/.config/melonDS" ]; then mkdir -p "/storage/.config/melonDS" cp -r "/usr/config/melonDS" "/storage/.config/" @@ -16,6 +21,11 @@ if [ ! -d "/storage/roms/savestates/nds" ]; then mkdir -p "/storage/roms/savestates/nds" fi +#Make sure melonDS gptk config exists +if [ ! -f "/storage/.config/melonDS/melonDS.gptk" ]; then + cp -r "/usr/config/melonDS/melonDS.gptk" "/storage/.config/melonDS/melonDS.gptk" +fi + #Emulation Station Features GAME=$(echo "${1}"| sed "s#^/.*/##") GRENDERER=$(get_setting graphics_backend nds "${GAME}") @@ -81,11 +91,13 @@ fi #Set QT Platform to Wayland export QT_QPA_PLATFORM=wayland @PANFROST@ + @HOTKEY@ #Run MelonDS emulator if [ "$SUI" = "1" ] then /usr/bin/melonDS else + $GPTOKEYB "melonDS" -c "/storage/.config/melonDS/melonDS.gptk" & /usr/bin/melonDS -f "${1}" fi diff --git a/packages/emulators/tools/gamecontrollerdb/config/gamecontrollerdb.txt b/packages/emulators/tools/gamecontrollerdb/config/gamecontrollerdb.txt index 0da7ef0454..f4707042b5 100644 --- a/packages/emulators/tools/gamecontrollerdb/config/gamecontrollerdb.txt +++ b/packages/emulators/tools/gamecontrollerdb/config/gamecontrollerdb.txt @@ -10,5 +10,5 @@ 190014b3010000009178000000050000,r33s_joypad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b12,dpdown:b11,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7, 1900e5914b4800007711000077010000,RGB20S Gamepad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b12,start:b13,dpleft:b10,dpdown:b9,dpright:b11,dpup:b8,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b14,rightstick:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3, 1900e7444b4800000111000034020000,rg552_joypad,platform:Linux,x:b2,a:b1,b:b0,y:b3,back:b8,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3, -03001a3447616d65466f726365204100,GameForce ACE Gamepad,a:b1,b:b0,dpdown:b13,dpleft:b14,+lefty:-a1,-leftx:-a0,+leftx:+a0,-lefty:+a1,leftshoulder:b5,leftstick:b10,lefttrigger:-a2,dpright:b15,+righty:+a4,-rightx:-a3,+rightx:+a3,-righty:-a4,rightshoulder:b6,rightstick:b11,righttrigger:-a5,back:b7,start:b8,dpup:b12,x:b3,y:b4,platform:Linux, +03001a3447616d65466f726365204100,GameForce ACE Gamepad,a:b1,b:b0,dpdown:b13,dpleft:b14,+lefty:-a1,-leftx:-a0,+leftx:+a0,-lefty:+a1,leftshoulder:b5,leftstick:b10,lefttrigger:-a2,dpright:b15,+righty:+a4,-rightx:-a3,+rightx:+a3,-righty:-a4,rightshoulder:b6,rightstick:b11,righttrigger:-a5,back:b7,guide:b9,start:b8,dpup:b12,x:b3,y:b4,platform:Linux, 1900c3ea010000000100000001010000,odroidgo3_joypad,a:b1,b:b0,dpdown:b13,dpleft:b14,+lefty:+a1,-leftx:-a0,+leftx:+a0,-lefty:-a1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,dpright:b15,+righty:+a3,-rightx:-a2,+rightx:+a2,-righty:-a3,rightshoulder:b5,rightstick:b11,righttrigger:b7,back:b8,start:b9,dpup:b12,x:b2,y:b3,platform:Linux, diff --git a/packages/jelos/sources/post-update b/packages/jelos/sources/post-update index afa116d5d9..6ae77dcc58 100644 --- a/packages/jelos/sources/post-update +++ b/packages/jelos/sources/post-update @@ -91,6 +91,10 @@ if [ "${model}" = "Powkiddy RGB10" ]; then rm -f /storage/joypads/odroidgo2_v11_joypad.cfg fi +### 20240319 - Fix MelonDS and Drastic Configs +rsync -ah --update /usr/config/melonDS/* /storage/.config/melondDS 2>/dev/null +rsync -ah --update /usr/config/drastic/* /storage/.config/drastic 2>/dev/null + ### 20240207 - Update Vita launchers and data. rsync -ah --update /usr/config/vita3k/* /storage/.config/vita3k 2>/dev/null rm -f "/storage/.config/vita3k/launcher/Start Vita3K.sh" diff --git a/packages/virtual/emulators/package.mk b/packages/virtual/emulators/package.mk index 7d9a520e97..cbcd71edc2 100644 --- a/packages/virtual/emulators/package.mk +++ b/packages/virtual/emulators/package.mk @@ -687,8 +687,8 @@ makeinstall_target() { ;; RK3588*) add_emu_core nds drastic drastic-sa false - add_emu_core nds retroarch melonds true - add_emu_core nds melonds melonds-sa false + add_emu_core nds retroarch melonds false + add_emu_core nds melonds melonds-sa true add_emu_core nds retroarch desmume false ;; RK3*)