From d423058cbded51e956b5176f4104376f3e300166 Mon Sep 17 00:00:00 2001 From: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Date: Sun, 10 Aug 2025 16:04:01 +0000 Subject: [PATCH 1/3] APM3: Fix amdaemon breakage when Unity Doorstop is present (#76) Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/76 Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> --- dist/apm3/launch.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/apm3/launch.bat b/dist/apm3/launch.bat index 6bb1fd9..7b153e4 100644 --- a/dist/apm3/launch.bat +++ b/dist/apm3/launch.bat @@ -17,8 +17,10 @@ if exist %tmp%\SequenceSetting.json ( :BEGIN pushd %~dp0 +set DOORSTOP_DISABLE=TRUE qprocess amdaemon.exe > NUL IF %ERRORLEVEL% NEQ 0 start /min "AM Daemon" inject -d -k apm3hook.dll amdaemon.exe -c daemon_config\common.json daemon_config\server.json config_hook.json +set DOORSTOP_DISABLE= REM Add "-screen-fullscreen 0 -popupWindow" if you want to run in windowed mode inject -d -k apm3hook.dll APMV3System -logFile output_log.txt From 83a9a4942979e119e9789da091a1a8dbbd66f0b2 Mon Sep 17 00:00:00 2001 From: puniru Date: Fri, 22 Aug 2025 15:03:19 +0900 Subject: [PATCH 2/3] idac: allow changing up and down for custom boards --- games/idacio/config.c | 2 ++ games/idacio/config.h | 2 ++ games/idacio/di.c | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/games/idacio/config.c b/games/idacio/config.c index f862840..a325fa8 100644 --- a/games/idacio/config.c +++ b/games/idacio/config.c @@ -60,6 +60,8 @@ void idac_di_config_load(struct idac_di_config *cfg, const wchar_t *filename) cfg->view_chg = GetPrivateProfileIntW(L"dinput", L"viewChg", 0, filename); cfg->left = GetPrivateProfileIntW(L"dinput", L"left", 0, filename); cfg->right = GetPrivateProfileIntW(L"dinput", L"right", 0, filename); + cfg->up = GetPrivateProfileIntW(L"dinput", L"up", 0, filename); + cfg->down = GetPrivateProfileIntW(L"dinput", L"down", 0, filename); cfg->shift_dn = GetPrivateProfileIntW(L"dinput", L"shiftDn", 0, filename); cfg->shift_up = GetPrivateProfileIntW(L"dinput", L"shiftUp", 0, filename); diff --git a/games/idacio/config.h b/games/idacio/config.h index 88a1d6a..df70404 100644 --- a/games/idacio/config.h +++ b/games/idacio/config.h @@ -18,6 +18,8 @@ struct idac_di_config { uint8_t view_chg; uint8_t left; uint8_t right; + uint8_t up; + uint8_t down; uint8_t shift_dn; uint8_t shift_up; uint8_t gear[6]; diff --git a/games/idacio/di.c b/games/idacio/di.c index 8a52e9c..e676062 100644 --- a/games/idacio/di.c +++ b/games/idacio/di.c @@ -71,6 +71,8 @@ static uint8_t idac_di_view_chg; static uint8_t idac_di_start; static uint8_t idac_di_left; static uint8_t idac_di_right; +static uint8_t idac_di_up; +static uint8_t idac_di_down; static uint8_t idac_di_gear[6]; static bool idac_di_use_pedals; static bool idac_di_reverse_brake_axis; @@ -247,6 +249,16 @@ static HRESULT idac_di_config_apply(const struct idac_di_config *cfg) return E_INVALIDARG; } + if (cfg->up > 32) { + dprintf("Wheel: Invalid up button: %i\n", cfg->up); + return E_INVALIDARG; + } + + if (cfg->down > 32) { + dprintf("Wheel: Invalid down button: %i\n", cfg->down); + return E_INVALIDARG; + } + if (cfg->shift_dn > 32) { dprintf("Wheel: Invalid shift down button: %i\n", cfg->shift_dn); @@ -282,6 +294,8 @@ static HRESULT idac_di_config_apply(const struct idac_di_config *cfg) dprintf("Wheel: View Change button : %i\n", cfg->view_chg); dprintf("Wheel: Left button . . . . : %i\n", cfg->left); dprintf("Wheel: Right button . . . : %i\n", cfg->right); + dprintf("Wheel: Up button . . . . . : %i\n", cfg->up); + dprintf("Wheel: Down button . . . : %i\n", cfg->down); dprintf("Wheel: Shift Down button . : %i\n", cfg->shift_dn); dprintf("Wheel: Shift Up button . . : %i\n", cfg->shift_up); dprintf("Wheel: Reverse Brake Axis : %i\n", cfg->reverse_brake_axis); @@ -317,6 +331,8 @@ static HRESULT idac_di_config_apply(const struct idac_di_config *cfg) idac_di_view_chg = cfg->view_chg; idac_di_left = cfg->left; idac_di_right = cfg->right; + idac_di_up = cfg->up; + idac_di_down = cfg->down; idac_di_shift_dn = cfg->shift_dn; idac_di_shift_up = cfg->shift_up; idac_di_reverse_brake_axis = cfg->reverse_brake_axis; @@ -480,6 +496,14 @@ static void idac_di_get_buttons(uint8_t *gamebtn_out) gamebtn |= IDAC_IO_GAMEBTN_RIGHT; } + if (idac_di_up && state.st.rgbButtons[idac_di_up - 1]) { + gamebtn |= IDAC_IO_GAMEBTN_UP; + } + + if (idac_di_down && state.st.rgbButtons[idac_di_down - 1]) { + gamebtn |= IDAC_IO_GAMEBTN_DOWN; + } + *gamebtn_out = gamebtn; } From eb96660fdf6c4a49013628ad99e460ad76b04df3 Mon Sep 17 00:00:00 2001 From: puniru Date: Wed, 27 Aug 2025 13:30:00 +0900 Subject: [PATCH 3/3] idac: update config for up and down dpad buttons --- dist/idac/segatools.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dist/idac/segatools.ini b/dist/idac/segatools.ini index f7d0218..f596979 100644 --- a/dist/idac/segatools.ini +++ b/dist/idac/segatools.ini @@ -235,6 +235,9 @@ viewChg=2 ; This is not possible on most devices, so we set the left and right button again. left=7 right=8 +; Additional mapping for up and down buttons in DPad. +up=4 +down=3 ; Button mappings for the simulated six-speed shifter. shiftDn=6 shiftUp=5