taitools/ll3io/ll3io.h
2024-02-17 16:46:23 -05:00

57 lines
1.6 KiB
C

#pragma once
#include <windows.h>
#include <stdint.h>
enum {
ll3_BTN_TEST = 0x01,
ll3_BTN_SERVICE = 0x02,
ll3_BTN_COIN = 0x03,
ll3_BTN_LEFT = 0x04,
ll3_BTN_RIGHT = 0x05,
};
enum {
ll3_STICK_L_UP = 0x01,
ll3_STICK_L_RIGHT = 0x02,
ll3_STICK_L_DOWN = 0x03,
ll3_STICK_L_LEFT = 0x04,
ll3_STICK_R_UP = 0x05,
ll3_STICK_R_RIGHT = 0x06,
ll3_STICK_R_DOWN = 0x07,
ll3_STICK_R_LEFT = 0x08,
};
/* Get the version of the Theatrhythm IO API that this DLL supports. This
function should return a positive 16-bit integer, where the high byte is
the major version and the low byte is the minor version (as defined by the
Semantic Versioning standard).
The latest API version as of this writing is 0x0100. */
uint16_t ll3_io_get_api_version(void);
/* Initialize the IO DLL. This is the second function that will be called on
your DLL, after ll3_io_get_api_version.
All subsequent calls to this API may originate from arbitrary threads.
Minimum API version: 0x0100 */
HRESULT ll3_io_init(void);
/* Get the state of the cabinet's gameplay buttons as of the last poll. See
ll3_IO_GAMEBTN enum above for bit mask definitions. Inputs are split into
a left hand side set of inputs and a right hand side set of inputs: the bit
mappings are the same in both cases.
All buttons are active-high, even though some buttons' electrical signals
on a real cabinet are active-low.
Minimum API version: 0x0100 */
void ll3_io_get_btns(uint8_t *btn, uint8_t *stick);
void ll3_io_read_coin_counter(uint16_t *coins, uint16_t *services);