1
0
mirror of https://gitea.tendokyu.moe/Dniel97/segatools.git synced 2024-11-15 09:37:35 +01:00
segatools-dniel97/carolio/carolio.h

60 lines
1.8 KiB
C
Raw Normal View History

2022-12-11 04:01:52 +01:00
#pragma once
#include <windows.h>
#include <stdbool.h>
#include <stdint.h>
2023-11-28 05:23:00 +01:00
typedef void (*carol_io_touch_callback_t)(const bool is_pressed, const uint16_t mouse_x, const uint16_t mouse_y);
2023-05-31 10:54:38 +02:00
2022-12-11 04:01:52 +01:00
/* Get the version of the Project carol 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 carol_io_get_api_version(void);
/* Initialize JVS-based input. This function will be called before any other
carol_io_jvs_*() function calls. Errors returned from this function will
manifest as a disconnected JVS bus.
All subsequent calls may originate from arbitrary threads and some may
overlap with each other. Ensuring synchronization inside your IO DLL is
your responsibility.
Minimum API version: 0x0100 */
HRESULT carol_io_jvs_init(void);
/* Poll JVS input.
opbtn returns the cabinet test/service state, where bit 0 is Test and Bit 1
is Service.
gamebtn bits, from least significant to most significant, are:
Circle Cross Square Triangle Start UNUSED UNUSED UNUSED
Minimum API version: 0x0100 */
void carol_io_jvs_poll(uint8_t *opbtn, uint8_t *gamebtn);
/* Read the current state of the coin counter. This value should be incremented
for every coin detected by the coin acceptor mechanism. This count does not
need to persist beyond the lifetime of the process.
Minimum API Version: 0x0100 */
void carol_io_jvs_read_coin_counter(uint16_t *out);
HRESULT carol_io_touch_init();
2023-04-11 06:20:51 +02:00
HRESULT carol_io_ledbd_init();
2023-05-31 10:54:38 +02:00
HRESULT carol_io_controlbd_init();
void carol_io_touch_start(carol_io_touch_callback_t callback);
void carol_io_touch_stop();