mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2025-03-04 08:54:28 +01:00
Merge branch 'feature/code-cleanup' into develop
This commit is contained in:
commit
a57542c2d2
30
Package.mk
30
Package.mk
@ -5,7 +5,7 @@ $(BUILD_DIR_ZIP)/chuni.zip:
|
||||
$(V)cp $(BUILD_DIR_32)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_32)/chunihook/chunihook.dll \
|
||||
$(DIST_DIR)/chuni/segatools.ini \
|
||||
$(DIST_DIR)/chuni/start.bat \
|
||||
$(DIST_DIR)/chuni/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/chuni
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -20,7 +20,7 @@ $(BUILD_DIR_ZIP)/cxb.zip:
|
||||
$(V)cp $(BUILD_DIR_32)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_32)/cxbhook/cxbhook.dll \
|
||||
$(DIST_DIR)/cxb/segatools.ini \
|
||||
$(DIST_DIR)/cxb/start.bat \
|
||||
$(DIST_DIR)/cxb/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/cxb
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -35,7 +35,7 @@ $(BUILD_DIR_ZIP)/diva.zip:
|
||||
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_64)/divahook/divahook.dll \
|
||||
$(DIST_DIR)/diva/segatools.ini \
|
||||
$(DIST_DIR)/diva/start.bat \
|
||||
$(DIST_DIR)/diva/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/diva
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -50,7 +50,7 @@ $(BUILD_DIR_ZIP)/carol.zip:
|
||||
$(V)cp $(BUILD_DIR_32)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_32)/carolhook/carolhook.dll \
|
||||
$(DIST_DIR)/carol/segatools.ini \
|
||||
$(DIST_DIR)/carol/start.bat \
|
||||
$(DIST_DIR)/carol/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/carol
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -65,7 +65,7 @@ $(BUILD_DIR_ZIP)/idz.zip:
|
||||
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_64)/idzhook/idzhook.dll \
|
||||
$(DIST_DIR)/idz/segatools.ini \
|
||||
$(DIST_DIR)/idz/start.bat \
|
||||
$(DIST_DIR)/idz/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/idz
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -80,7 +80,7 @@ $(BUILD_DIR_ZIP)/fgo.zip:
|
||||
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_64)/fgohook/fgohook.dll \
|
||||
$(DIST_DIR)/fgo/segatools.ini \
|
||||
$(DIST_DIR)/fgo/start.bat \
|
||||
$(DIST_DIR)/fgo/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/fgo
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -96,7 +96,7 @@ $(BUILD_DIR_ZIP)/idac.zip:
|
||||
$(BUILD_DIR_64)/idachook/idachook.dll \
|
||||
$(DIST_DIR)/idac/segatools.ini \
|
||||
$(DIST_DIR)/idac/config_hook.json \
|
||||
$(DIST_DIR)/idac/start.bat \
|
||||
$(DIST_DIR)/idac/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/idac
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -112,7 +112,7 @@ $(BUILD_DIR_ZIP)/swdc.zip:
|
||||
$(BUILD_DIR_64)/swdchook/swdchook.dll \
|
||||
$(DIST_DIR)/swdc/segatools.ini \
|
||||
$(DIST_DIR)/swdc/config_hook.json \
|
||||
$(DIST_DIR)/swdc/start.bat \
|
||||
$(DIST_DIR)/swdc/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/swdc
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -127,7 +127,7 @@ $(BUILD_DIR_ZIP)/mercury.zip:
|
||||
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_64)/mercuryhook/mercuryhook.dll \
|
||||
$(DIST_DIR)/mercury/segatools.ini \
|
||||
$(DIST_DIR)/mercury/start.bat \
|
||||
$(DIST_DIR)/mercury/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/mercury
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -141,7 +141,7 @@ $(BUILD_DIR_ZIP)/chusan.zip:
|
||||
$(V)mkdir -p $(BUILD_DIR_ZIP)/chusan/DEVICE
|
||||
$(V)cp $(DIST_DIR)/chusan/segatools.ini \
|
||||
$(DIST_DIR)/chusan/config_hook.json \
|
||||
$(DIST_DIR)/chusan/start.bat \
|
||||
$(DIST_DIR)/chusan/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/chusan
|
||||
$(V)cp $(BUILD_DIR_32)/chusanhook/chusanhook.dll \
|
||||
$(BUILD_DIR_ZIP)/chusan/chusanhook_x86.dll
|
||||
@ -164,7 +164,7 @@ $(BUILD_DIR_ZIP)/mu3.zip:
|
||||
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_64)/mu3hook/mu3hook.dll \
|
||||
$(DIST_DIR)/mu3/segatools.ini \
|
||||
$(DIST_DIR)/mu3/start.bat \
|
||||
$(DIST_DIR)/mu3/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/mu3
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -179,7 +179,7 @@ $(BUILD_DIR_ZIP)/mai2.zip:
|
||||
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
||||
$(BUILD_DIR_64)/mai2hook/mai2hook.dll \
|
||||
$(DIST_DIR)/mai2/segatools.ini \
|
||||
$(DIST_DIR)/mai2/start.bat \
|
||||
$(DIST_DIR)/mai2/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/mai2
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -195,7 +195,7 @@ $(BUILD_DIR_ZIP)/cm.zip:
|
||||
$(BUILD_DIR_64)/cmhook/cmhook.dll \
|
||||
$(DIST_DIR)/cm/config_hook.json \
|
||||
$(DIST_DIR)/cm/segatools.ini \
|
||||
$(DIST_DIR)/cm/start.bat \
|
||||
$(DIST_DIR)/cm/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/cm
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -211,7 +211,7 @@ $(BUILD_DIR_ZIP)/tokyo.zip:
|
||||
$(BUILD_DIR_64)/tokyohook/tokyohook.dll \
|
||||
$(DIST_DIR)/tokyo/config_hook.json \
|
||||
$(DIST_DIR)/tokyo/segatools.ini \
|
||||
$(DIST_DIR)/tokyo/start.bat \
|
||||
$(DIST_DIR)/tokyo/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/tokyo
|
||||
$(V)cp pki/billing.pub \
|
||||
pki/ca.crt \
|
||||
@ -224,7 +224,7 @@ $(BUILD_DIR_ZIP)/kemono.zip:
|
||||
$(V)mkdir -p $(BUILD_DIR_ZIP)/kemono
|
||||
$(V)mkdir -p $(BUILD_DIR_ZIP)/kemono/DEVICE
|
||||
$(V)cp $(DIST_DIR)/kemono/segatools.ini \
|
||||
$(DIST_DIR)/kemono/start.bat \
|
||||
$(DIST_DIR)/kemono/launch.bat \
|
||||
$(BUILD_DIR_ZIP)/kemono
|
||||
$(V)cp $(BUILD_DIR_32)/kemonohook/kemonohook.dll \
|
||||
$(BUILD_DIR_ZIP)/kemono/kemonohook_x86.dll
|
||||
|
@ -26,19 +26,24 @@
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "amex/amex.h"
|
||||
#include "board/sg-reader.h"
|
||||
#include "board/vfd.h"
|
||||
|
||||
#include "chuniio/chuniio.h"
|
||||
#include "chusanhook/config.h"
|
||||
#include "chusanhook/io4.h"
|
||||
#include "chusanhook/slider.h"
|
||||
|
||||
#include "gfxhook/d3d9.h"
|
||||
#include "gfxhook/gfx.h"
|
||||
|
||||
#include "hook/process.h"
|
||||
|
||||
#include "hooklib/serial.h"
|
||||
#include "hooklib/spike.h"
|
||||
|
||||
#include "platform/platform.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
#include "util/env.h"
|
||||
|
||||
@ -96,8 +101,11 @@ static DWORD CALLBACK chusan_pre_startup(void) {
|
||||
memcpy(chusan_hook_cfg.platform.system.dipsw_config, new_dipsw_config,
|
||||
sizeof(new_dipsw_config));
|
||||
|
||||
hr = platform_hook_init(&chusan_hook_cfg.platform, "SDHD", "ACA2",
|
||||
chusan_hook_mod);
|
||||
hr = platform_hook_init(
|
||||
&chusan_hook_cfg.platform,
|
||||
"SDHD",
|
||||
"ACA2",
|
||||
chusan_hook_mod);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
goto fail;
|
||||
|
4
dist/carol/start.bat → dist/carol/launch.bat
vendored
4
dist/carol/start.bat → dist/carol/launch.bat
vendored
@ -2,10 +2,10 @@
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
taskkill /f /im aimeReaderHost.exe > nul 2>&1
|
||||
|
||||
start /min inject -d -k carolhook.dll aimeReaderHost.exe -p 10
|
||||
|
||||
inject -d -k carolhook.dll carol_nu.exe
|
||||
|
||||
taskkill /f /im aimeReaderHost.exe > nul 2>&1
|
||||
|
||||
echo.
|
2
dist/chuni/start.bat → dist/chuni/launch.bat
vendored
2
dist/chuni/start.bat → dist/chuni/launch.bat
vendored
@ -3,7 +3,9 @@
|
||||
pushd %~dp0
|
||||
|
||||
start /min inject -d -k chunihook.dll aimeReaderHost.exe -p 12
|
||||
|
||||
inject -d -k chunihook.dll chuniApp.exe
|
||||
|
||||
taskkill /f /im aimeReaderHost.exe > nul 2>&1
|
||||
|
||||
echo.
|
0
dist/cm/start.bat → dist/cm/launch.bat
vendored
0
dist/cm/start.bat → dist/cm/launch.bat
vendored
2
dist/idz/start.bat → dist/idz/launch.bat
vendored
2
dist/idz/start.bat → dist/idz/launch.bat
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
start /min "AM Daemon" 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
|
||||
start "AM Daemon" /min 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
|
||||
|
||||
rem Set dipsw1=0 and uncomment the ServerBox for in store battle?
|
||||
rem inject -k idzhook.dll ServerBoxD8_Nu_x64.exe
|
@ -1,10 +1,8 @@
|
||||
@echo off
|
||||
pushd %~dp0
|
||||
|
||||
taskkill /f /im amdaemon.exe > nul 2>&1
|
||||
|
||||
REM USA
|
||||
start "AM Daemon" /min inject -d -k mercuryhook.dll amdaemon.exe -f -c config.json config_lan_install_client.json config_lan_install_server.json config_video_clone.json config_video_dual.json config_video_clone_flip.json config_video_dual_flip.json config_region_exp.json config_region_chn.json config_region_usa.json
|
||||
REM start "AM Daemon" /min inject -d -k mercuryhook.dll amdaemon.exe -f -c config.json config_lan_install_client.json config_lan_install_server.json config_video_clone.json config_video_dual.json config_video_clone_flip.json config_video_dual_flip.json config_region_exp.json config_region_chn.json config_region_usa.json
|
||||
|
||||
REM JP
|
||||
start "AM Daemon" /min inject -d -k mercuryhook.dll amdaemon.exe -f -c config.json config_lan_install_client.json config_lan_install_server.json config_video_clone.json config_video_dual.json config_video_clone_flip.json config_video_dual_flip.json config_region_exp.json config_region_chn.json config_region_jpn.json
|
2
dist/mercury/segatools.ini
vendored
2
dist/mercury/segatools.ini
vendored
@ -5,7 +5,7 @@
|
||||
[vfs]
|
||||
; Insert the path to the game AMFS directory here (contains ICF1 and ICF2)
|
||||
amfs=
|
||||
; Insert the path to the game Option directory here (contains Axxx directories)
|
||||
; Insert the path to the game Option directory here (unused in Mercury)
|
||||
option=
|
||||
; Create an empty directory somewhere and insert the path here.
|
||||
; This directory may be shared between multiple SEGA games.
|
||||
|
@ -44,7 +44,7 @@ option=../../option
|
||||
1. In the `[dns]` section, set `default=` to your computer's hostname or LAN IP. Do not put
|
||||
`127.0.0.1` here, the game specifically checks for and rejects loopback addresses. This setting
|
||||
controls the address of the network services server
|
||||
1. Right click `start.bat` in `app/bin` and run it as Administrator. I think you need to run it as
|
||||
1. Right click `launch.bat` in `app/bin` and run it as Administrator. I think you need to run it as
|
||||
admin at least once, but once you have done that you can run the game as a regular user
|
||||
1. A sequence of several start-up screens will be displayed. You should also see a bunch of debug
|
||||
output in a command line window; if you're seeing hex dumps here then that's a good sign. There
|
||||
|
@ -11,7 +11,7 @@ The default file path for config file is `./segatools.ini`.
|
||||
|
||||
You can modify environment variable `SEGATOOLS_CONFIG_PATH` to another path.
|
||||
|
||||
For example, You can have another `start.bat` with following code in it,
|
||||
For example, You can have another `launch.bat` with following code in it,
|
||||
Then you can copy `segatools.ini` to `another_config.ini` but with different dns host in it
|
||||
```bat
|
||||
set SEGATOOLS_CONFIG_PATH=.\another_config.ini
|
||||
|
@ -65,7 +65,7 @@ felicaGen=0
|
||||
and fill it with 20 digits, for example `01234567891234567890`. Make sure to
|
||||
save the file.
|
||||
|
||||
1. Right click `start.bat` in `package` and run it as Administrator. After the
|
||||
1. Right click `launch.bat` in `package` and run it as Administrator. After the
|
||||
first run you may be able to run the game as a normal user.
|
||||
1. Once you're at the title screen, press 2 or 3 a few times to add some
|
||||
credits, then _hold_ the Enter key for a few seconds to scan a card and start
|
||||
|
@ -82,13 +82,21 @@ static DWORD CALLBACK idac_pre_startup(void)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
bool *dipsw = &idac_hook_cfg.platform.system.dipsw[0];
|
||||
bool is_swdc_cvt = dipsw[1];
|
||||
|
||||
if (!dipsw[2]) {
|
||||
// the next two bit are the seat number most significant bit first
|
||||
dprintf("System: Seat Number: %d\n", ((dipsw[4] << 1) | dipsw[3]) + 1);
|
||||
}
|
||||
|
||||
hr = idac_dll_init(&idac_hook_cfg.dll, idac_hook_mod);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
hr = sg_reader_hook_init(&idac_hook_cfg.aime, 3, 3, idac_hook_mod);
|
||||
hr = sg_reader_hook_init(&idac_hook_cfg.aime, 3, is_swdc_cvt ? 3 : 2, idac_hook_mod);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
goto fail;
|
||||
|
@ -70,6 +70,26 @@ static DWORD CALLBACK tokyo_pre_startup(void)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
bool *dipsw = &tokyo_hook_cfg.platform.system.dipsw[0];
|
||||
unsigned int cabinet_id = 0;
|
||||
|
||||
if (dipsw[0] == 1 && dipsw[1] == 0 && dipsw[2] == 0) {
|
||||
cabinet_id = 1; // Server 1
|
||||
} else if (dipsw[0] == 0 && dipsw[1] == 1 && dipsw[2] == 0) {
|
||||
cabinet_id = 2; // Client 2
|
||||
} else if (dipsw[0] == 0 && dipsw[1] == 0 && dipsw[2] == 1) {
|
||||
cabinet_id = 3; // Client 3
|
||||
} else if (dipsw[0] == 0 && dipsw[1] == 1 && dipsw[2] == 1) {
|
||||
cabinet_id = 4; // Client 4
|
||||
} else {
|
||||
dprintf("Error: Invalid dip switch configuration!\n");
|
||||
}
|
||||
|
||||
// Print the correct Cabinet ID if valid
|
||||
if (cabinet_id > 0) {
|
||||
dprintf("System: Cabinet ID %d\n", cabinet_id);
|
||||
}
|
||||
|
||||
hr = tokyo_dll_init(&tokyo_hook_cfg.dll, tokyo_hook_mod);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user