mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-27 14:30:49 +01:00
non-working coin insert emulation
This commit is contained in:
parent
1964fa766f
commit
25a532347b
1
dist/mercury/segatools.ini
vendored
1
dist/mercury/segatools.ini
vendored
@ -39,6 +39,7 @@ enable=1
|
||||
; Input API selection for JVS input emulator.
|
||||
test=0x2D
|
||||
service=0x2E
|
||||
coin=0x24
|
||||
volup=0x26
|
||||
voldown=0x28
|
||||
|
||||
|
@ -63,6 +63,10 @@ static HRESULT mercury_io4_poll(void *ctx, struct io4_state *state)
|
||||
state->buttons[0] |= IO4_BUTTON_SERVICE;
|
||||
}
|
||||
|
||||
if (gamebtn & MERCURY_IO_OPBTN_COIN) {
|
||||
state->chutes[0] |= 1 << 1; // FIXME: insert coins
|
||||
}
|
||||
|
||||
if (gamebtn & MERCURY_IO_GAMEBTN_VOL_UP) {
|
||||
state->buttons[0] |= 1 << 1;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ void mercury_io_config_load(
|
||||
|
||||
cfg->vk_test = GetPrivateProfileIntW(L"io4", L"test", 0x2D, filename);
|
||||
cfg->vk_service = GetPrivateProfileIntW(L"io4", L"service", 0x2E, filename);
|
||||
cfg->vk_coin = GetPrivateProfileIntW(L"io4", L"coin", 0x24, filename);
|
||||
cfg->vk_vol_up = GetPrivateProfileIntW(L"io4", L"volup", 0x26, filename);
|
||||
cfg->vk_vol_down = GetPrivateProfileIntW(L"io4", L"voldown", 0x28, filename);
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
struct mercury_io_config {
|
||||
uint8_t vk_test;
|
||||
uint8_t vk_service;
|
||||
uint8_t vk_coin;
|
||||
uint8_t vk_vol_up;
|
||||
uint8_t vk_vol_down;
|
||||
uint8_t vk_cell[240];
|
||||
|
@ -40,6 +40,10 @@ HRESULT mercury_io_poll(void)
|
||||
mercury_opbtn |= MERCURY_IO_OPBTN_SERVICE;
|
||||
}
|
||||
|
||||
if (GetAsyncKeyState(mercury_io_cfg.vk_coin)) {
|
||||
mercury_opbtn |= MERCURY_IO_OPBTN_COIN;
|
||||
}
|
||||
|
||||
if (GetAsyncKeyState(mercury_io_cfg.vk_vol_up)) {
|
||||
mercury_gamebtn |= MERCURY_IO_GAMEBTN_VOL_UP;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
enum {
|
||||
MERCURY_IO_OPBTN_TEST = 0x01,
|
||||
MERCURY_IO_OPBTN_SERVICE = 0x02,
|
||||
MERCURY_IO_OPBTN_COIN = 0x04,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user