Files
TeamTofuShop_taitools/idmac/fastio.h
T

21 lines
894 B
C

#pragma once
#include <windows.h>
#include <stdint.h>
struct fastio_node {
struct fastio_node *next;
// Unlike JVS, FastIO comms are done on the game side through
// DMA register reads and writes, meaning we need to have
// indivitual functions here instead of just "transact"
void (*digital_in)(uint16_t *out); // Digital button inputs
void (*analog_in)(uint16_t *out); // Analog stick inputs (WIP)
void (*coins_in)(uint8_t slot, uint16_t *out); // Number of unprocessed coins
void (*digital_out)(uint16_t channel, uint16_t val); // Digital outputs
void (*analog_out)(uint16_t channel, uint16_t val); // Analog outputs (WIP)
void (*coins_out)(uint8_t slot, uint16_t removed); // Remove coins from the count
};
typedef HRESULT (*fastio_provider_t)(struct fastio_node **root);
HRESULT fastio_hook_init(fastio_provider_t main, fastio_provider_t sub);