|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
JVS coin slot meter access and commands More...
Functions | |
| uint16_t | mie_get_coin_meter (uint8_t slot) |
| Read cached coin slot meter. | |
| bool | mie_read_coin_input (mie_jvs_coin_slot_t *out, int max_slots) |
| Copy cached coin slot state from the last poll. | |
| bool | mie_coin_decrease (uint8_t slot, uint16_t amount, bool block) |
| Send JVS COINDEC (0x30) for a coin slot. | |
| bool | mie_coin_add (uint8_t slot, uint16_t amount, bool block) |
| Send JVS COINADD (0x35) for a coin slot. | |
JVS coin slot meter access and commands
| bool mie_coin_add | ( | uint8_t | slot, |
| uint16_t | amount, | ||
| bool | block ) |
Send JVS COINADD (0x35) for a coin slot.
Adds credits to the specified coin slot meter on the JVS board.
| slot | Coin slot index (0 = first slot). |
| amount | Credits to add. |
| block | true to wait for completion; false to queue only. |
| true | Command completed or queued successfully. |
| false | Invalid arguments, JVS not initialized, busy, or I/O failed. |
Referenced by mie_service_cb().
| bool mie_coin_decrease | ( | uint8_t | slot, |
| uint16_t | amount, | ||
| bool | block ) |
Send JVS COINDEC (0x30) for a coin slot.
Subtracts credits from the specified coin slot meter on the JVS board.
| slot | Coin slot index (0 = first slot). |
| amount | Credits to subtract. |
| block | true to wait for completion; false to queue only. |
| true | Command completed or queued successfully. |
| false | Invalid arguments, JVS not initialized, busy, or I/O failed. |
| uint16_t mie_get_coin_meter | ( | uint8_t | slot | ) |
Read cached coin slot meter.
Returns the parsed cumulative count for the given coin slot from the latest driver poll. Does not perform a synchronous bus transaction.
| slot | Coin slot index (0 = first slot). |
Referenced by ui_build().
| bool mie_read_coin_input | ( | mie_jvs_coin_slot_t * | out, |
| int | max_slots ) |
Copy cached coin slot state from the last poll.
Copies the parsed per-slot data already obtained by the periodic input poll. Does not send a standalone JVS COININP (0x21) command.
| out | Per-slot parsed data (up to MIE_JVS_COIN_SLOTS). |
| max_slots | Number of coin slots to copy (1 or 2). |
| true | Arguments valid and JVS initialized. |
| false | Invalid arguments or JVS not initialized. |