diff --git a/chuniio/chuniio.c b/chuniio/chuniio.c index 86938be..5df741f 100644 --- a/chuniio/chuniio.c +++ b/chuniio/chuniio.c @@ -38,7 +38,7 @@ void chuni_io_jvs_read_coin_counter(uint16_t *out) return; } - if (GetAsyncKeyState(chuni_io_cfg.vk_coin)) { + if (GetAsyncKeyState(chuni_io_cfg.vk_coin) & 0x8000) { if (!chuni_io_coin) { chuni_io_coin = true; chuni_io_coins++; @@ -62,15 +62,6 @@ void chuni_io_jvs_poll(uint8_t *opbtn, uint8_t *beams) *opbtn |= CHUNI_IO_OPBTN_SERVICE; } - if (GetAsyncKeyState(chuni_io_cfg.vk_coin) & 0x8000) { - if (!chuni_io_coin) { - chuni_io_coin = true; - *opbtn |= CHUNI_IO_OPBTN_COIN; - } - } else { - chuni_io_coin = false; - } - if (chuni_io_cfg.vk_ir_emu) { // Use emulated AIR if (GetAsyncKeyState(chuni_io_cfg.vk_ir_emu)) { diff --git a/chusanhook/io4.c b/chusanhook/io4.c index 2495369..c7f8265 100644 --- a/chusanhook/io4.c +++ b/chusanhook/io4.c @@ -73,6 +73,7 @@ static HRESULT chusan_io4_poll(void* ctx, struct io4_state* state) beams = 0; chuni_dll.jvs_poll(&opbtn, &beams); + chuni_dll.jvs_read_coin_counter(&coins); if (chuni_dll.api_version >= 0x0101) { // Use correct mapping @@ -90,9 +91,7 @@ static HRESULT chusan_io4_poll(void* ctx, struct io4_state* state) state->buttons[0] |= IO4_BUTTON_SERVICE; } - if (opbtn & CHUNI_IO_OPBTN_COIN) { - coins++; - } + // Update the coin counter with the value from jvs_read_coin_counter state->chutes[0] = coins << 8; for (i = 0; i < 6; i++) { diff --git a/dist/chusan/segatools.ini b/dist/chusan/segatools.ini index 1631b35..df9419f 100644 --- a/dist/chusan/segatools.ini +++ b/dist/chusan/segatools.ini @@ -18,7 +18,7 @@ aimePath=DEVICE\aime.txt [aimeio] ; x64 aimeio dll path. ; Uncomment this if you have custom aime implementation. -;path64= +;path= [dns] ; Insert the hostname or IP address of the server you wish to use here. @@ -35,7 +35,7 @@ enable=1 ; The /24 LAN subnet that the emulated keychip will tell the game to expect. ; If you disable netenv then you must set this to your LAN's IP subnet, and ; that subnet must start with 192.168. -subnet=192.168.100.0 +subnet=192.168.139.0 [gpio] ; ALLS DIP switches.