small optimizations

This commit is contained in:
Dniel97 2024-01-16 17:54:06 +01:00
parent a8bd98706f
commit 0affc96e3e
Signed by untrusted user: Dniel97
GPG Key ID: 6180B3C768FB2E08
14 changed files with 12 additions and 30 deletions

View File

@ -71,7 +71,7 @@ void aime_config_load(struct aime_config *cfg, const wchar_t *filename)
aime_dll_config_load(&cfg->dll, 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);
}

View File

@ -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->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_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xadf7, filename);

View File

@ -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->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_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xadf7, filename);

View File

@ -13,7 +13,7 @@ appdata=
enable=1
aimePath=DEVICE\aime.txt
; Enable high baud rate.
;highbaud=1
;highBaud=1
[aimeio]
; 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
; setting enabled is strongly recommended.
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]
; The /24 LAN subnet that the emulated keychip will tell the game to expect.

View File

@ -23,7 +23,6 @@ default=127.0.0.1
; SEGA games are somewhat picky about their LAN environment, so leaving this
; setting enabled is recommended.
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`).

View File

@ -31,7 +31,7 @@ Default: `1`
Enable Aime card reader assembly emulation. Disable to use a real SEGA Aime
reader (COM port number varies by game).
### `highbaud`
### `highBaud`
Default: `1`

View File

@ -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->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_sum = GetPrivateProfileIntW(L"led15093", L"fwSum", 0xAA53, filename);

View File

@ -11,7 +11,7 @@ struct fgo_dll {
void (*get_opbtns)(uint8_t *opbtn);
void (*get_gamebtns)(uint8_t *gamebtn);
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);
};

View File

@ -142,7 +142,6 @@ void fgo_io_get_analogs(int16_t *stick_x, int16_t *stick_y)
HRESULT fgo_io_led_init(void)
{
// return 0;
return S_OK;
}

View File

@ -12,9 +12,6 @@ const struct dll_bind_sym idac_dll_syms[] = {
{
.sym = "idac_io_init",
.off = offsetof(struct idac_dll, init),
}, {
.sym = "idac_io_poll",
.off = offsetof(struct idac_dll, poll),
}, {
.sym = "idac_io_get_opbtns",
.off = offsetof(struct idac_dll, get_opbtns),

View File

@ -7,7 +7,6 @@
struct idac_dll {
uint16_t api_version;
HRESULT (*init)(void);
HRESULT (*poll)(void);
void (*get_opbtns)(uint8_t *opbtn);
void (*get_gamebtns)(uint8_t *gamebtn);
void (*get_shifter)(uint8_t *gear);

View File

@ -57,7 +57,6 @@ static HRESULT idac_io4_poll(void *ctx, struct io4_state *state)
struct idac_io_analog_state analog_state;
HRESULT hr;
assert(idac_dll.poll != NULL);
assert(idac_dll.get_opbtns != NULL);
assert(idac_dll.get_gamebtns != 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(&analog_state, 0, sizeof(analog_state));
hr = idac_dll.poll();
if (FAILED(hr)) {
return hr;
}
opbtn = 0;
gamebtn = 0;
gear = 0;

View File

@ -2,7 +2,6 @@ LIBRARY idacio
EXPORTS
idac_io_init
idac_io_poll
idac_io_get_opbtns
idac_io_get_gamebtns
idac_io_get_shifter

View File

@ -56,13 +56,6 @@ uint16_t idac_io_get_api_version(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
IDAC_IO_OPBTN enum above: this contains bit mask definitions for button
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
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
game will then interpret as the current position of the gear lever.