forked from Dniel97/segatools
small optimizations
This commit is contained in:
parent
a8bd98706f
commit
0affc96e3e
@ -71,7 +71,7 @@ void aime_config_load(struct aime_config *cfg, const wchar_t *filename)
|
|||||||
|
|
||||||
aime_dll_config_load(&cfg->dll, filename);
|
aime_dll_config_load(&cfg->dll, filename);
|
||||||
cfg->enable = GetPrivateProfileIntW(L"aime", L"enable", 1, filename);
|
cfg->enable = GetPrivateProfileIntW(L"aime", L"enable", 1, filename);
|
||||||
cfg->high_baudrate = GetPrivateProfileIntW(L"aime", L"highbaud", 1, filename);
|
cfg->high_baudrate = GetPrivateProfileIntW(L"aime", L"highBaud", 1, filename);
|
||||||
cfg->gen = GetPrivateProfileIntW(L"aime", L"gen", 0, filename);
|
cfg->gen = GetPrivateProfileIntW(L"aime", L"gen", 0, filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ void led15093_config_load(struct led15093_config *cfg, const wchar_t *filename)
|
|||||||
|
|
||||||
cfg->enable = GetPrivateProfileIntW(L"led15093", L"enable", 1, filename);
|
cfg->enable = GetPrivateProfileIntW(L"led15093", L"enable", 1, filename);
|
||||||
cfg->port_no = 0;
|
cfg->port_no = 0;
|
||||||
cfg->high_baudrate = GetPrivateProfileIntW(L"led15093", L"highBaudrate", 0, filename);
|
cfg->high_baudrate = GetPrivateProfileIntW(L"led15093", L"highBaud", 0, filename);
|
||||||
cfg->fw_ver = GetPrivateProfileIntW(L"led15093", L"fwVer", 0x90, filename);
|
cfg->fw_ver = GetPrivateProfileIntW(L"led15093", L"fwVer", 0x90, filename);
|
||||||
cfg->fw_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xadf7, filename);
|
cfg->fw_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xadf7, filename);
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ void led15093_config_load(struct led15093_config *cfg, const wchar_t *filename)
|
|||||||
|
|
||||||
cfg->enable = GetPrivateProfileIntW(L"led15093", L"enable", 1, filename);
|
cfg->enable = GetPrivateProfileIntW(L"led15093", L"enable", 1, filename);
|
||||||
cfg->port_no = 0;
|
cfg->port_no = 0;
|
||||||
cfg->high_baudrate = GetPrivateProfileIntW(L"led15093", L"highBaudrate", 0, filename);
|
cfg->high_baudrate = GetPrivateProfileIntW(L"led15093", L"highBaud", 0, filename);
|
||||||
cfg->fw_ver = GetPrivateProfileIntW(L"led15093", L"fwVer", 0x90, filename);
|
cfg->fw_ver = GetPrivateProfileIntW(L"led15093", L"fwVer", 0x90, filename);
|
||||||
cfg->fw_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xadf7, filename);
|
cfg->fw_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xadf7, filename);
|
||||||
|
|
||||||
|
6
dist/chusan/segatools.ini
vendored
6
dist/chusan/segatools.ini
vendored
@ -13,7 +13,7 @@ appdata=
|
|||||||
enable=1
|
enable=1
|
||||||
aimePath=DEVICE\aime.txt
|
aimePath=DEVICE\aime.txt
|
||||||
; Enable high baud rate.
|
; Enable high baud rate.
|
||||||
;highbaud=1
|
;highBaud=1
|
||||||
|
|
||||||
[aimeio]
|
[aimeio]
|
||||||
; Uncomment this if you have custom (x64) aime implementation.
|
; Uncomment this if you have custom (x64) aime implementation.
|
||||||
@ -30,6 +30,10 @@ default=127.0.0.1
|
|||||||
; Chunithm is extremely picky about its LAN environment, so leaving this
|
; Chunithm is extremely picky about its LAN environment, so leaving this
|
||||||
; setting enabled is strongly recommended.
|
; setting enabled is strongly recommended.
|
||||||
enable=1
|
enable=1
|
||||||
|
; The final octet of the local host's IP address on the virtualized subnet (so,
|
||||||
|
; if the keychip subnet is `192.168.32.0` and this value is set to `11`, then the
|
||||||
|
; local host's virtualized LAN IP is `192.168.32.11`).
|
||||||
|
addrSuffix=11
|
||||||
|
|
||||||
[keychip]
|
[keychip]
|
||||||
; The /24 LAN subnet that the emulated keychip will tell the game to expect.
|
; The /24 LAN subnet that the emulated keychip will tell the game to expect.
|
||||||
|
1
dist/fgo/segatools.ini
vendored
1
dist/fgo/segatools.ini
vendored
@ -23,7 +23,6 @@ default=127.0.0.1
|
|||||||
; SEGA games are somewhat picky about their LAN environment, so leaving this
|
; SEGA games are somewhat picky about their LAN environment, so leaving this
|
||||||
; setting enabled is recommended.
|
; setting enabled is recommended.
|
||||||
enable=1
|
enable=1
|
||||||
|
|
||||||
; The final octet of the local host's IP address on the virtualized subnet (so,
|
; The final octet of the local host's IP address on the virtualized subnet (so,
|
||||||
; if the keychip subnet is `192.168.32.0` and this value is set to `11`, then the
|
; if the keychip subnet is `192.168.32.0` and this value is set to `11`, then the
|
||||||
; local host's virtualized LAN IP is `192.168.32.11`).
|
; local host's virtualized LAN IP is `192.168.32.11`).
|
||||||
|
@ -31,7 +31,7 @@ Default: `1`
|
|||||||
Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime
|
Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime
|
||||||
reader (COM port number varies by game).
|
reader (COM port number varies by game).
|
||||||
|
|
||||||
### `highbaud`
|
### `highBaud`
|
||||||
|
|
||||||
Default: `1`
|
Default: `1`
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ void led15093_config_load(struct led15093_config *cfg, const wchar_t *filename)
|
|||||||
|
|
||||||
cfg->enable = GetPrivateProfileIntW(L"led15093", L"enable", 1, filename);
|
cfg->enable = GetPrivateProfileIntW(L"led15093", L"enable", 1, filename);
|
||||||
cfg->port_no = GetPrivateProfileIntW(L"led15093", L"portNo", 0, filename);
|
cfg->port_no = GetPrivateProfileIntW(L"led15093", L"portNo", 0, filename);
|
||||||
cfg->high_baudrate = GetPrivateProfileIntW(L"led15093", L"highBaudrate", 0, filename);
|
cfg->high_baudrate = GetPrivateProfileIntW(L"led15093", L"highBaud", 0, filename);
|
||||||
cfg->fw_ver = GetPrivateProfileIntW(L"led15093", L"fwVer", 0xA0, filename);
|
cfg->fw_ver = GetPrivateProfileIntW(L"led15093", L"fwVer", 0xA0, filename);
|
||||||
cfg->fw_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xAA53, filename);
|
cfg->fw_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xAA53, filename);
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ struct fgo_dll {
|
|||||||
void (*get_opbtns)(uint8_t *opbtn);
|
void (*get_opbtns)(uint8_t *opbtn);
|
||||||
void (*get_gamebtns)(uint8_t *gamebtn);
|
void (*get_gamebtns)(uint8_t *gamebtn);
|
||||||
void (*get_analogs)(int16_t *stick_x, int16_t *stick_y);
|
void (*get_analogs)(int16_t *stick_x, int16_t *stick_y);
|
||||||
HRESULT (*led_init)();
|
HRESULT (*led_init)(void);
|
||||||
void (*led_set_leds)(uint8_t board, uint8_t *rgb);
|
void (*led_set_leds)(uint8_t board, uint8_t *rgb);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -142,7 +142,6 @@ void fgo_io_get_analogs(int16_t *stick_x, int16_t *stick_y)
|
|||||||
|
|
||||||
HRESULT fgo_io_led_init(void)
|
HRESULT fgo_io_led_init(void)
|
||||||
{
|
{
|
||||||
// return 0;
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,9 +12,6 @@ const struct dll_bind_sym idac_dll_syms[] = {
|
|||||||
{
|
{
|
||||||
.sym = "idac_io_init",
|
.sym = "idac_io_init",
|
||||||
.off = offsetof(struct idac_dll, init),
|
.off = offsetof(struct idac_dll, init),
|
||||||
}, {
|
|
||||||
.sym = "idac_io_poll",
|
|
||||||
.off = offsetof(struct idac_dll, poll),
|
|
||||||
}, {
|
}, {
|
||||||
.sym = "idac_io_get_opbtns",
|
.sym = "idac_io_get_opbtns",
|
||||||
.off = offsetof(struct idac_dll, get_opbtns),
|
.off = offsetof(struct idac_dll, get_opbtns),
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
struct idac_dll {
|
struct idac_dll {
|
||||||
uint16_t api_version;
|
uint16_t api_version;
|
||||||
HRESULT (*init)(void);
|
HRESULT (*init)(void);
|
||||||
HRESULT (*poll)(void);
|
|
||||||
void (*get_opbtns)(uint8_t *opbtn);
|
void (*get_opbtns)(uint8_t *opbtn);
|
||||||
void (*get_gamebtns)(uint8_t *gamebtn);
|
void (*get_gamebtns)(uint8_t *gamebtn);
|
||||||
void (*get_shifter)(uint8_t *gear);
|
void (*get_shifter)(uint8_t *gear);
|
||||||
|
@ -57,7 +57,6 @@ static HRESULT idac_io4_poll(void *ctx, struct io4_state *state)
|
|||||||
struct idac_io_analog_state analog_state;
|
struct idac_io_analog_state analog_state;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
assert(idac_dll.poll != NULL);
|
|
||||||
assert(idac_dll.get_opbtns != NULL);
|
assert(idac_dll.get_opbtns != NULL);
|
||||||
assert(idac_dll.get_gamebtns != NULL);
|
assert(idac_dll.get_gamebtns != NULL);
|
||||||
assert(idac_dll.get_analogs != NULL);
|
assert(idac_dll.get_analogs != NULL);
|
||||||
@ -65,13 +64,6 @@ static HRESULT idac_io4_poll(void *ctx, struct io4_state *state)
|
|||||||
|
|
||||||
memset(state, 0, sizeof(*state));
|
memset(state, 0, sizeof(*state));
|
||||||
memset(&analog_state, 0, sizeof(analog_state));
|
memset(&analog_state, 0, sizeof(analog_state));
|
||||||
|
|
||||||
hr = idac_dll.poll();
|
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
|
||||||
return hr;
|
|
||||||
}
|
|
||||||
|
|
||||||
opbtn = 0;
|
opbtn = 0;
|
||||||
gamebtn = 0;
|
gamebtn = 0;
|
||||||
gear = 0;
|
gear = 0;
|
||||||
|
@ -2,7 +2,6 @@ LIBRARY idacio
|
|||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
idac_io_init
|
idac_io_init
|
||||||
idac_io_poll
|
|
||||||
idac_io_get_opbtns
|
idac_io_get_opbtns
|
||||||
idac_io_get_gamebtns
|
idac_io_get_gamebtns
|
||||||
idac_io_get_shifter
|
idac_io_get_shifter
|
||||||
|
@ -56,13 +56,6 @@ uint16_t idac_io_get_api_version(void);
|
|||||||
|
|
||||||
HRESULT idac_io_init(void);
|
HRESULT idac_io_init(void);
|
||||||
|
|
||||||
/* Send any queued outputs (of which there are currently none, though this may
|
|
||||||
change in subsequent API versions) and retrieve any new inputs.
|
|
||||||
|
|
||||||
Minimum API version: 0x0100 */
|
|
||||||
|
|
||||||
HRESULT idac_io_poll(void);
|
|
||||||
|
|
||||||
/* Get the state of the cabinet's operator buttons as of the last poll. See
|
/* Get the state of the cabinet's operator buttons as of the last poll. See
|
||||||
IDAC_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.
|
states returned in *opbtn. All buttons are active-high.
|
||||||
@ -93,7 +86,7 @@ void idac_io_get_analogs(struct idac_io_analog_state *out);
|
|||||||
/* Poll the current position of the six-speed shifter and return it via the
|
/* Poll the current position of the six-speed shifter and return it via the
|
||||||
gear out parameter. Valid values are 0 for neutral and 1-6 for gears 1-6.
|
gear out parameter. Valid values are 0 for neutral and 1-6 for gears 1-6.
|
||||||
|
|
||||||
idzhook internally translates this gear position value into the correct
|
idachook internally translates this gear position value into the correct
|
||||||
combination of Gear Left, Gear Right, Gear Up, Gear Down buttons that the
|
combination of Gear Left, Gear Right, Gear Up, Gear Down buttons that the
|
||||||
game will then interpret as the current position of the gear lever.
|
game will then interpret as the current position of the gear lever.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user