forked from Hay1tsme/segatools
Compare commits
2 Commits
ca4a8bd84d
...
51b11469d0
Author | SHA1 | Date | |
---|---|---|---|
51b11469d0 | |||
f0dc51d01e |
@ -80,6 +80,7 @@ $(BUILD_DIR_ZIP)/idac.zip:
|
|||||||
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
$(V)cp $(BUILD_DIR_64)/subprojects/capnhook/inject/inject.exe \
|
||||||
$(BUILD_DIR_64)/idachook/idachook.dll \
|
$(BUILD_DIR_64)/idachook/idachook.dll \
|
||||||
$(DIST_DIR)/idac/segatools.ini \
|
$(DIST_DIR)/idac/segatools.ini \
|
||||||
|
$(DIST_DIR)/idac/config_hook.json \
|
||||||
$(DIST_DIR)/idac/start.bat \
|
$(DIST_DIR)/idac/start.bat \
|
||||||
$(BUILD_DIR_ZIP)/idac
|
$(BUILD_DIR_ZIP)/idac
|
||||||
$(V)cp pki/billing.pub \
|
$(V)cp pki/billing.pub \
|
||||||
|
@ -17,6 +17,7 @@ struct aime_io_config {
|
|||||||
wchar_t aime_path[MAX_PATH];
|
wchar_t aime_path[MAX_PATH];
|
||||||
wchar_t felica_path[MAX_PATH];
|
wchar_t felica_path[MAX_PATH];
|
||||||
bool felica_gen;
|
bool felica_gen;
|
||||||
|
bool aime_gen;
|
||||||
uint8_t vk_scan;
|
uint8_t vk_scan;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -40,6 +41,11 @@ static HRESULT aime_io_generate_felica(
|
|||||||
uint8_t *bytes,
|
uint8_t *bytes,
|
||||||
size_t nbytes);
|
size_t nbytes);
|
||||||
|
|
||||||
|
static HRESULT aime_io_generate_aime(
|
||||||
|
const wchar_t *path,
|
||||||
|
uint8_t *bytes,
|
||||||
|
size_t nbytes);
|
||||||
|
|
||||||
static void aime_io_config_read(
|
static void aime_io_config_read(
|
||||||
struct aime_io_config *cfg,
|
struct aime_io_config *cfg,
|
||||||
const wchar_t *filename)
|
const wchar_t *filename)
|
||||||
@ -67,6 +73,12 @@ static void aime_io_config_read(
|
|||||||
cfg->felica_gen = GetPrivateProfileIntW(
|
cfg->felica_gen = GetPrivateProfileIntW(
|
||||||
L"aime",
|
L"aime",
|
||||||
L"felicaGen",
|
L"felicaGen",
|
||||||
|
0,
|
||||||
|
filename);
|
||||||
|
|
||||||
|
cfg->aime_gen = GetPrivateProfileIntW(
|
||||||
|
L"aime",
|
||||||
|
L"aimeGen",
|
||||||
1,
|
1,
|
||||||
filename);
|
filename);
|
||||||
|
|
||||||
@ -163,6 +175,47 @@ static HRESULT aime_io_generate_felica(
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static HRESULT aime_io_generate_aime(
|
||||||
|
const wchar_t *path,
|
||||||
|
uint8_t *bytes,
|
||||||
|
size_t nbytes)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
|
assert(path != NULL);
|
||||||
|
assert(bytes != NULL);
|
||||||
|
assert(nbytes > 0);
|
||||||
|
|
||||||
|
srand(time(NULL));
|
||||||
|
|
||||||
|
/* AiMe IDs should not start with 3, due to a missing check for BananaPass IDs */
|
||||||
|
do {
|
||||||
|
for (i = 0; i < nbytes; i++) {
|
||||||
|
bytes[i] = rand() % 10 << 4 | rand() % 10;
|
||||||
|
}
|
||||||
|
} while (bytes[0] >> 4 == 3);
|
||||||
|
|
||||||
|
f = _wfopen(path, L"w");
|
||||||
|
|
||||||
|
if (f == NULL) {
|
||||||
|
dprintf("AimeIO DLL: %S: fopen failed: %i\n", path, (int) errno);
|
||||||
|
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < nbytes; i++) {
|
||||||
|
fprintf(f, "%02x", bytes[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "\n");
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
dprintf("AimeIO DLL: Generated random AiMe ID\n");
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
uint16_t aime_io_get_api_version(void)
|
uint16_t aime_io_get_api_version(void)
|
||||||
{
|
{
|
||||||
return 0x0100;
|
return 0x0100;
|
||||||
@ -210,6 +263,22 @@ HRESULT aime_io_nfc_poll(uint8_t unit_no)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Try generating AiMe IC (if enabled) */
|
||||||
|
|
||||||
|
if (aime_io_cfg.aime_gen) {
|
||||||
|
hr = aime_io_generate_aime(
|
||||||
|
aime_io_cfg.aime_path,
|
||||||
|
aime_io_aime_id,
|
||||||
|
sizeof(aime_io_aime_id));
|
||||||
|
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
aime_io_aime_id_present = true;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
/* Try FeliCa IC */
|
/* Try FeliCa IC */
|
||||||
|
|
||||||
hr = aime_io_read_id_file(
|
hr = aime_io_read_id_file(
|
||||||
|
1
dist/chusan/segatools.ini
vendored
1
dist/chusan/segatools.ini
vendored
@ -11,6 +11,7 @@ appdata=
|
|||||||
[aime]
|
[aime]
|
||||||
; Enable aime reader emulation.
|
; Enable aime reader emulation.
|
||||||
enable=1
|
enable=1
|
||||||
|
aimePath=DEVICE\aime.txt
|
||||||
; Enable high baud rate.
|
; Enable high baud rate.
|
||||||
;highbaud=1
|
;highbaud=1
|
||||||
|
|
||||||
|
1
dist/cm/segatools.ini
vendored
1
dist/cm/segatools.ini
vendored
@ -12,7 +12,6 @@ appdata=
|
|||||||
; Enable aime reader emulation.
|
; Enable aime reader emulation.
|
||||||
enable=1
|
enable=1
|
||||||
aimePath=DEVICE\aime.txt
|
aimePath=DEVICE\aime.txt
|
||||||
felicaGen=0
|
|
||||||
|
|
||||||
[dns]
|
[dns]
|
||||||
; Insert the hostname or IP address of the server you wish to use here.
|
; Insert the hostname or IP address of the server you wish to use here.
|
||||||
|
18
dist/idac/config_hook.json
vendored
Normal file
18
dist/idac/config_hook.json
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"aime" :
|
||||||
|
{
|
||||||
|
"firmware_path" :
|
||||||
|
[
|
||||||
|
".\\aime_firm\\TN32MSEC003S_V12.hex",
|
||||||
|
".\\aime_firm\\update_15396_6728_94.bin"
|
||||||
|
],
|
||||||
|
"high_baudrate" : true
|
||||||
|
},
|
||||||
|
"network" :
|
||||||
|
{
|
||||||
|
"property" :
|
||||||
|
{
|
||||||
|
"dhcp" : true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
dist/idac/segatools.ini
vendored
1
dist/idac/segatools.ini
vendored
@ -12,7 +12,6 @@ appdata=
|
|||||||
; Controls emulation of the Aime card reader assembly.
|
; Controls emulation of the Aime card reader assembly.
|
||||||
enable=1
|
enable=1
|
||||||
aimePath=DEVICE\aime.txt
|
aimePath=DEVICE\aime.txt
|
||||||
felicaGen=0
|
|
||||||
|
|
||||||
[dns]
|
[dns]
|
||||||
; Insert the hostname or IP address of the server you wish to use here.
|
; Insert the hostname or IP address of the server you wish to use here.
|
||||||
|
26
dist/idac/start.bat
vendored
26
dist/idac/start.bat
vendored
@ -16,7 +16,31 @@ if not exist "%APP_DIR%" (
|
|||||||
|
|
||||||
echo Mounted the Y:\ drive to the %TEMP%\SDGT folder
|
echo Mounted the Y:\ drive to the %TEMP%\SDGT folder
|
||||||
|
|
||||||
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
|
set AMDAEMON_CFG=config_common.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_aime_high_ex.json ^
|
||||||
|
config_aime_high_jp.json ^
|
||||||
|
config_aime_normal_ex.json ^
|
||||||
|
config_aime_normal_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 ^
|
||||||
|
config_hook.json
|
||||||
|
|
||||||
|
start /min inject -d -k idachook.dll amdaemon.exe -c %AMDAEMON_CFG%
|
||||||
inject -d -k idachook.dll ..\WindowsNoEditor\GameProject.exe -culture=en launch=Cabinet ABSLOG="..\..\..\..\..\Userdata\GameProject.log" -Master -UserDir="..\..\..\Userdata" -NotInstalled -UNATTENDED
|
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
|
taskkill /f /im amdaemon.exe > nul 2>&1
|
||||||
|
|
||||||
|
1
dist/mai2/segatools.ini
vendored
1
dist/mai2/segatools.ini
vendored
@ -11,6 +11,7 @@ appdata=
|
|||||||
[aime]
|
[aime]
|
||||||
; Enable aime reader emulation.
|
; Enable aime reader emulation.
|
||||||
enable=1
|
enable=1
|
||||||
|
aimePath=DEVICE\aime.txt
|
||||||
|
|
||||||
[dns]
|
[dns]
|
||||||
; Insert the hostname or IP address of the server you wish to use here.
|
; Insert the hostname or IP address of the server you wish to use here.
|
||||||
|
1
dist/mu3/segatools.ini
vendored
1
dist/mu3/segatools.ini
vendored
@ -12,7 +12,6 @@ appdata=
|
|||||||
; Controls emulation of the Aime card reader assembly.
|
; Controls emulation of the Aime card reader assembly.
|
||||||
enable=1
|
enable=1
|
||||||
aimePath=DEVICE\aime.txt
|
aimePath=DEVICE\aime.txt
|
||||||
felicaGen=0
|
|
||||||
|
|
||||||
[dns]
|
[dns]
|
||||||
; Insert the hostname or IP address of the server you wish to use here.
|
; Insert the hostname or IP address of the server you wish to use here.
|
||||||
|
1
dist/swdc/segatools.ini
vendored
1
dist/swdc/segatools.ini
vendored
@ -12,7 +12,6 @@ appdata=
|
|||||||
; Controls emulation of the Aime card reader assembly.
|
; Controls emulation of the Aime card reader assembly.
|
||||||
enable=1
|
enable=1
|
||||||
aimePath=DEVICE\aime.txt
|
aimePath=DEVICE\aime.txt
|
||||||
felicaGen=0
|
|
||||||
|
|
||||||
[dns]
|
[dns]
|
||||||
; Insert the hostname or IP address of the server you wish to use here.
|
; Insert the hostname or IP address of the server you wish to use here.
|
||||||
|
@ -45,6 +45,13 @@ Default: `DEVICE\aime.txt`
|
|||||||
Path to a text file containing a classic Aime IC card ID. **This does not
|
Path to a text file containing a classic Aime IC card ID. **This does not
|
||||||
currently work**.
|
currently work**.
|
||||||
|
|
||||||
|
### `aimeGen`
|
||||||
|
|
||||||
|
Default: `1`
|
||||||
|
|
||||||
|
Whether to generate a random AiMe ID if the file at `aimePath` does not
|
||||||
|
exist.
|
||||||
|
|
||||||
### `felicaPath`
|
### `felicaPath`
|
||||||
|
|
||||||
Default: `DEVICE\felica.txt`
|
Default: `DEVICE\felica.txt`
|
||||||
@ -53,7 +60,7 @@ Path to a text file containing a FeliCa e-cash card IDm serial number.
|
|||||||
|
|
||||||
### `felicaGen`
|
### `felicaGen`
|
||||||
|
|
||||||
Default: `1`
|
Default: `0`
|
||||||
|
|
||||||
Whether to generate a random FeliCa ID if the file at `felicaPath` does not
|
Whether to generate a random FeliCa ID if the file at `felicaPath` does not
|
||||||
exist.
|
exist.
|
||||||
|
Loading…
Reference in New Issue
Block a user