1
0
mirror of synced 2024-12-17 22:55:52 +01:00
bananatools/saoio/saoio.h
Kevin Trocolli 8ff356b84c add games
2023-09-18 04:05:22 -04:00

67 lines
1.9 KiB
C

#pragma once
#include <windows.h>
#include <stdint.h>
#include "saoio/config.h"
enum {
SAO_IO_OPBTN_TEST = 0x01,
SAO_IO_OPBTN_SERVICE = 0x02,
SAO_IO_OPBTN_UP = 0x04,
SAO_IO_OPBTN_DOWN = 0x08,
SAO_IO_OPBTN_ENTER = 0x10,
};
enum {
SAO_IO_P1_RIM_L = 0x0001,
SAO_IO_P1_CENTER_L = 0x0002,
SAO_IO_P1_CENTER_R = 0x0004,
SAO_IO_P1_RIM_R = 0x0008,
SAO_IO_P2_RIM_L = 0x0100,
SAO_IO_P2_CENTER_L = 0x0200,
SAO_IO_P2_CENTER_R = 0x1000,
SAO_IO_P2_RIM_R = 0x2000,
};
/* Get the version of the Pokken 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 sao_io_get_api_version(void);
/* Initialize the IO DLL. This is the second function that will be called on
your DLL, after sao_io_get_api_version.
All subsequent calls to this API may originate from arbitrary threads.
Minimum API version: 0x0100 */
HRESULT sao_io_init(void);
/* Get the state of the cabinet's operator buttons as of the last poll. See
SAO_IO_OPBTN enum above: this contains bit mask definitions for button
states returned in *opbtn. All buttons are active-high.
Minimum API version: 0x0100 */
void sao_io_get_opbtns(uint8_t *opbtn);
/* Get the state of the cabinet's gameplay buttons as of the last poll. See
SAO_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 sao_io_get_drum_analog(uint8_t *gamebtn);
void sao_io_read_coin_counter(uint16_t *coins, uint16_t *services);