forked from Dniel97/segatools
chuasn: fixed coin insert for custom chuniio
This commit is contained in:
parent
72db08ac93
commit
1cbc33d97d
@ -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)) {
|
||||
|
@ -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++) {
|
||||
|
4
dist/chusan/segatools.ini
vendored
4
dist/chusan/segatools.ini
vendored
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user