From f6e961d4f4a0b55d72fe173745ee44d1af24eee6 Mon Sep 17 00:00:00 2001 From: Dniel97 Date: Tue, 29 Aug 2023 00:49:58 +0200 Subject: [PATCH] Removed `-f` from start.bat and fixed idz --- board/io4.c | 18 +++++++++--------- dist/chusan/start.bat | 2 +- dist/cm/start.bat | 2 +- dist/idac/start.bat | 2 +- dist/idz/start.bat | 4 ++-- dist/swdc/start.bat | 6 +++--- idacio/idacio.h | 6 +++--- idzhook/dllmain.c | 8 ++++++-- idzhook/idzhook.def | 5 ----- 9 files changed, 26 insertions(+), 27 deletions(-) diff --git a/board/io4.c b/board/io4.c index e7fe9e3..cc0165c 100644 --- a/board/io4.c +++ b/board/io4.c @@ -28,7 +28,7 @@ enum { IO4_CMD_CLEAR_BOARD_STATUS = 0x03, IO4_CMD_SET_GENERAL_OUTPUT = 0x04, IO4_CMD_SET_PWM_OUTPUT = 0x05, - IO4_CMD_UNIMPLEMENTED = 0x41, + IO4_CMD_SET_UNIQUE_OUTPUT = 0x41, IO4_CMD_UPDATE_FIRMWARE = 0x85, }; @@ -40,7 +40,7 @@ struct io4_report_in { uint16_t buttons[2]; uint8_t system_status; uint8_t usb_status; - uint8_t unknown[29]; + uint8_t unique_input[29]; }; static_assert(sizeof(struct io4_report_in) == 0x40, "IO4 IN report size"); @@ -232,15 +232,15 @@ static HRESULT io4_handle_write(struct irp *irp) return S_OK; + case IO4_CMD_SET_UNIQUE_OUTPUT: + dprintf("USB I/O: Unique Out\n"); + + return S_OK; + case IO4_CMD_UPDATE_FIRMWARE: dprintf("USB I/O: Update firmware..?\n"); - return E_FAIL; - - case IO4_CMD_UNIMPLEMENTED: - //dprintf("USB I/O: Unimplemented cmd 41\n"); - - return S_OK; + return E_FAIL; default: dprintf("USB I/O: Unknown command %02x\n", out.cmd); @@ -316,7 +316,7 @@ static HRESULT io4_async_poll(void *ctx, struct irp *irp) /* Delay long enough for the instigating thread in amdaemon to be satisfied that all queued-up reports have been drained. */ - Sleep(1); + // Sleep(1); /* Call into ops to poll the underlying inputs */ diff --git a/dist/chusan/start.bat b/dist/chusan/start.bat index 4125873..78de368 100644 --- a/dist/chusan/start.bat +++ b/dist/chusan/start.bat @@ -2,7 +2,7 @@ pushd %~dp0 -start /min inject_x64 -d -k chusanhook_x64.dll amdaemon.exe -f -c config_common.json config_server.json config_client.json config_cvt.json config_sp.json config_hook.json +start /min inject_x64 -d -k chusanhook_x64.dll amdaemon.exe -c config_common.json config_server.json config_client.json config_cvt.json config_sp.json config_hook.json inject_x86 -d -k chusanhook_x86.dll chusanApp.exe taskkill /f /im amdaemon.exe > nul 2>&1 diff --git a/dist/cm/start.bat b/dist/cm/start.bat index 3c6b6f5..b17a6a1 100644 --- a/dist/cm/start.bat +++ b/dist/cm/start.bat @@ -2,7 +2,7 @@ pushd %~dp0 -start /min inject -d -k cmhook.dll amdaemon.exe -f -c config_common.json config_server.json config_client.json config_hook.json +start /min inject -d -k cmhook.dll amdaemon.exe -c config_common.json config_server.json config_client.json config_hook.json inject -d -k cmhook.dll CardMaker.exe -screen-fullscreen 0 -popupwindow -screen-width 1080 -screen-height 1920 taskkill /f /im amdaemon.exe > nul 2>&1 diff --git a/dist/idac/start.bat b/dist/idac/start.bat index 4b2d8e9..d87a3ca 100644 --- a/dist/idac/start.bat +++ b/dist/idac/start.bat @@ -16,7 +16,7 @@ if not exist "%APP_DIR%" ( echo Mounted the Y:\ drive to the %TEMP%\SDGT folder -start /min inject -d -k idachook.dll amdaemon.exe -f -c config_aime_high_ex.json config_aime_high_jp.json config_aime_normal_ex.json config_aime_normal_jp.json config_common.json config_ex.json config_jp.json config_laninstall_client_ex.json config_laninstall_client_jp.json config_laninstall_server_ex.json config_laninstall_server_jp.json config_seat_1_ex.json config_seat_1_jp.json config_seat_2_ex.json config_seat_2_jp.json config_seat_3_ex.json config_seat_3_jp.json config_seat_4_ex.json config_seat_4_jp.json config_seat_single_ex.json config_seat_single_jp.json +start /min inject -d -k idachook.dll amdaemon.exe -c config_aime_high_ex.json config_aime_high_jp.json config_aime_normal_ex.json config_aime_normal_jp.json config_common.json config_ex.json config_jp.json config_laninstall_client_ex.json config_laninstall_client_jp.json config_laninstall_server_ex.json config_laninstall_server_jp.json config_seat_1_ex.json config_seat_1_jp.json config_seat_2_ex.json config_seat_2_jp.json config_seat_3_ex.json config_seat_3_jp.json config_seat_4_ex.json config_seat_4_jp.json config_seat_single_ex.json config_seat_single_jp.json inject -d -k idachook.dll ..\WindowsNoEditor\GameProject.exe -culture=en launch=Cabinet ABSLOG="..\..\..\..\..\Userdata\GameProject.log" -Master -UserDir="..\..\..\Userdata" -NotInstalled -UNATTENDED taskkill /f /im amdaemon.exe > nul 2>&1 diff --git a/dist/idz/start.bat b/dist/idz/start.bat index b8d6b18..66ce606 100644 --- a/dist/idz/start.bat +++ b/dist/idz/start.bat @@ -2,8 +2,8 @@ pushd %~dp0 -.\inject.exe -k .\idzhook.dll .\InitialD0_DX11_Nu.exe -.\inject.exe -d -k .\idzhook.dll .\amdaemon.exe -c configDHCP_Final_Common.json configDHCP_Final_JP.json configDHCP_Final_JP_ST1.json configDHCP_Final_JP_ST2.json configDHCP_Final_EX.json configDHCP_Final_EX_ST1.json configDHCP_Final_EX_ST2.json +inject -k idzhook.dll InitialD0_DX11_Nu.exe +inject -d -k idzhook.dll amdaemon.exe -c configDHCP_Final_Common.json configDHCP_Final_JP.json configDHCP_Final_JP_ST1.json configDHCP_Final_JP_ST2.json configDHCP_Final_EX.json configDHCP_Final_EX_ST1.json configDHCP_Final_EX_ST2.json echo. echo Game processes have terminated diff --git a/dist/swdc/start.bat b/dist/swdc/start.bat index 7121754..b06b6e0 100644 --- a/dist/swdc/start.bat +++ b/dist/swdc/start.bat @@ -16,9 +16,9 @@ if not exist "%APP_DIR%" ( echo Mounted the Y:\ drive to the %TEMP%\SWDC folder -REM start /min inject -d -k swdchook.dll amdaemon.exe -f -c config.json config_LanClient.json config_MiniCabinet.json -start /min inject -d -k swdchook.dll amdaemon.exe -f -c config.json config_LanServer.json config_MiniCabinet.json config_hook.json -inject -d -k swdchook.dll ..\Todoroki\Binaries\Win64\Todoroki-Win64-Shipping.exe -launch=MiniCabinet -ABSLOG="..\..\..\..\..\Userdata\GameProject.log" -UserDir="..\..\..\Userdata" -NotInstalled -UNATTENDED +REM start /min inject -d -k swdchook.dll amdaemon.exe -c config.json config_LanClient.json config_MiniCabinet.json config_hook.json +start /min inject -d -k swdchook.dll amdaemon.exe -c config.json config_LanServer.json config_MiniCabinet.json config_hook.json +inject -d -k swdchook.dll ..\Todoroki\Binaries\Win64\Todoroki-Win64-Shipping.exe -launch=MiniCabinet -ABSLOG="..\..\..\..\..\Userdata\Todoroki.log" -UserDir="..\..\..\Userdata" -NotInstalled -UNATTENDED taskkill /f /im amdaemon.exe > nul 2>&1 REM unmount the APP_DIR diff --git a/idacio/idacio.h b/idacio/idacio.h index 035c5c4..c0e743e 100644 --- a/idacio/idacio.h +++ b/idacio/idacio.h @@ -64,7 +64,7 @@ HRESULT idac_io_init(void); HRESULT idac_io_poll(void); /* Get the state of the cabinet's operator buttons as of the last poll. See - MU3_IO_OPBTN enum above: this contains bit mask definitions for button + IDAC_IO_OPBTN enum above: this contains bit mask definitions for button states returned in *opbtn. All buttons are active-high. Minimum API version: 0x0100 */ @@ -72,7 +72,7 @@ HRESULT idac_io_poll(void); void idac_io_get_opbtns(uint8_t *opbtn); /* Get the state of the cabinet's gameplay buttons as of the last poll. See - MU3_IO_GAMEBTN enum above for bit mask definitions. Inputs are split into + IDAC_IO_GAMEBTN enum above for bit mask definitions. Inputs are split into a left hand side set of inputs and a right hand side set of inputs: the bit mappings are the same in both cases. @@ -83,7 +83,7 @@ void idac_io_get_opbtns(uint8_t *opbtn); void idac_io_get_gamebtns(uint8_t *gamebtn); -/* Poll the current state of the cabinet's JVS analog inputs. See structure +/* Poll the current state of the cabinet's IO4 analog inputs. See structure definition above for details. Minimum API version: 0x0100 */ diff --git a/idzhook/dllmain.c b/idzhook/dllmain.c index fe78b6f..b358470 100644 --- a/idzhook/dllmain.c +++ b/idzhook/dllmain.c @@ -44,7 +44,8 @@ static DWORD CALLBACK idz_pre_startup(void) /* Config load */ idz_hook_config_load(&idz_hook_cfg, L".\\segatools.ini"); - + + /* module_path = module_file_name(NULL); if (module_path != NULL) { @@ -52,7 +53,7 @@ static DWORD CALLBACK idz_pre_startup(void) _wcslwr(file_name); - if (wcsstr(file_name, L"serverbox") != NULL) { + if (wcsstr(file_name, L"ServerBox") != NULL) { dprintf("Executable filename contains 'ServerBox', disabling full-screen mode\n"); idz_hook_cfg.gfx.windowed = true; @@ -63,13 +64,16 @@ static DWORD CALLBACK idz_pre_startup(void) module_path = NULL; } + */ /* Hook Win32 APIs */ serial_hook_init(); + /* gfx_hook_init(&idz_hook_cfg.gfx); gfx_d3d11_hook_init(&idz_hook_cfg.gfx, idz_hook_mod); gfx_dxgi_hook_init(&idz_hook_cfg.gfx, idz_hook_mod); + */ zinput_hook_init(&idz_hook_cfg.zinput); dvd_hook_init(&idz_hook_cfg.dvd, idz_hook_mod); diff --git a/idzhook/idzhook.def b/idzhook/idzhook.def index d8db3b0..486400c 100644 --- a/idzhook/idzhook.def +++ b/idzhook/idzhook.def @@ -1,11 +1,6 @@ LIBRARY idzhook EXPORTS - CreateDXGIFactory - CreateDXGIFactory1 - CreateDXGIFactory2 - D3D11CreateDevice - D3D11CreateDeviceAndSwapChain aime_io_get_api_version aime_io_init aime_io_led_set_color