mu3: coin input added

This commit is contained in:
2023-07-14 00:54:30 +02:00
parent ec072667b3
commit 90a6f1be7c
7 changed files with 69 additions and 5 deletions

View File

@ -11,6 +11,7 @@
#include "util/dprintf.h"
static HRESULT mu3_io4_poll(void *ctx, struct io4_state *state);
static uint16_t coins;
static const struct io4_ops mu3_io4_ops = {
.poll = mu3_io4_poll,
@ -69,6 +70,11 @@ static HRESULT mu3_io4_poll(void *ctx, struct io4_state *state)
state->buttons[0] |= IO4_BUTTON_SERVICE;
}
if (opbtn & MU3_IO_OPBTN_COIN) {
coins++;
}
state->chutes[0] = coins << 8;
if (left & MU3_IO_GAMEBTN_1) {
state->buttons[0] |= 1 << 0;
}