Bemanitools v5.26 release
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
#ifndef AC_IO_AC_IO_H
|
||||
#define AC_IO_AC_IO_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "acio/icca.h"
|
||||
#include "acio/kfca.h"
|
||||
|
||||
#define AC_IO_SOF 0xAA
|
||||
#define AC_IO_ESCAPE 0xFF
|
||||
#define AC_IO_RESPONSE_FLAG 0x80
|
||||
#define AC_IO_BROADCAST 0x70
|
||||
|
||||
#define ac_io_u16(x) _byteswap_ushort(x)
|
||||
#define ac_io_u32(x) _byteswap_ulong(x)
|
||||
|
||||
enum ac_io_cmd {
|
||||
AC_IO_CMD_ASSIGN_ADDRS = 0x0001,
|
||||
AC_IO_CMD_GET_VERSION = 0x0002,
|
||||
AC_IO_CMD_START_UP = 0x0003,
|
||||
AC_IO_CMD_KEEPALIVE = 0x0080,
|
||||
/* Yet unknown command encountered first on jubeat (1) */
|
||||
AC_IO_CMD_UNKN_00FF = 0x00FF,
|
||||
AC_IO_CMD_CLEAR = 0x0100,
|
||||
};
|
||||
|
||||
enum ac_io_node_type {
|
||||
AC_IO_NODE_TYPE_H44B = 0x04010000,
|
||||
AC_IO_NODE_TYPE_ICCA = 0x03000000,
|
||||
/* same as ICCA */
|
||||
AC_IO_NODE_TYPE_ICCB = 0x03000000,
|
||||
AC_IO_NODE_TYPE_LED_STRIP = 0x04020000,
|
||||
AC_IO_NODE_TYPE_LED_SPIKE = 0x05010000,
|
||||
AC_IO_NODE_TYPE_KFCA = 0x09060000,
|
||||
AC_IO_NODE_TYPE_BI2A = 0x0d060000,
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct ac_io_version {
|
||||
/* Names taken from some debug text in libacio.dll */
|
||||
uint32_t type;
|
||||
uint8_t flag;
|
||||
uint8_t major;
|
||||
uint8_t minor;
|
||||
uint8_t revision;
|
||||
char product_code[4];
|
||||
char date[16];
|
||||
char time[16];
|
||||
};
|
||||
|
||||
struct ac_io_message {
|
||||
uint8_t addr; /* High bit: clear = req, set = resp */
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint16_t code;
|
||||
uint8_t seq_no;
|
||||
uint8_t nbytes;
|
||||
|
||||
union {
|
||||
uint8_t raw[0xFF];
|
||||
uint8_t count;
|
||||
uint8_t status;
|
||||
struct ac_io_version version;
|
||||
|
||||
struct ac_io_icca_misc icca_misc;
|
||||
struct ac_io_icca_state icca_state;
|
||||
|
||||
struct ac_io_kfca_poll_in kfca_poll_in;
|
||||
struct ac_io_kfca_poll_out kfca_poll_out;
|
||||
};
|
||||
} cmd;
|
||||
|
||||
struct {
|
||||
uint8_t nbytes;
|
||||
uint8_t raw[0xFF]; /* 0xFFucked if I know */
|
||||
} bcast;
|
||||
};
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef ACIO_H44B_H
|
||||
#define ACIO_H44B_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum ac_io_h44b_cmd {
|
||||
AC_IO_H44B_CMD_SET_OUTPUTS = 0x0122,
|
||||
};
|
||||
|
||||
struct ac_io_h44b_output {
|
||||
uint8_t front_rgb[3];
|
||||
uint8_t top_rgb[3];
|
||||
uint8_t left_rgb[3];
|
||||
uint8_t right_rgb[3];
|
||||
uint8_t title_rgb[3];
|
||||
uint8_t woofer_rgb[3];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
#ifndef AC_IO_ICCA_H
|
||||
#define AC_IO_ICCA_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum ac_io_icca_cmd {
|
||||
/* Yet unknown command encountered first on jubeat (1) */
|
||||
AC_IO_ICCA_CMD_UNKN_0120 = 0x0120,
|
||||
AC_IO_ICCA_CMD_QUEUE_LOOP_START = 0x0130,
|
||||
AC_IO_ICCA_CMD_ENGAGE = 0x0131,
|
||||
AC_IO_ICCA_CMD_POLL = 0x0134,
|
||||
AC_IO_ICCA_CMD_SET_SLOT_STATE = 0x0135,
|
||||
AC_IO_ICCA_CMD_BEGIN_KEYPAD = 0x013A,
|
||||
AC_IO_ICCA_CMD_POLL_FELICA = 0x0161,
|
||||
};
|
||||
|
||||
enum ac_io_icca_slot_state {
|
||||
AC_IO_ICCA_SLOT_STATE_OPEN = 0x11,
|
||||
AC_IO_ICCA_SLOT_STATE_EJECT = 0x12,
|
||||
AC_IO_ICCA_SLOT_STATE_CLOSE = 0,
|
||||
};
|
||||
|
||||
enum ac_io_icca_sensor_state {
|
||||
/* Card eject event fired once after slot state is set to eject the card */
|
||||
AC_IO_ICCA_SENSOR_STATE_CARD_EJECTED = 0x50,
|
||||
AC_IO_ICCA_SENSOR_MASK_FRONT_ON = (1 << 4),
|
||||
AC_IO_ICCA_SENSOR_MASK_BACK_ON = (1 << 5)
|
||||
};
|
||||
|
||||
enum ac_io_icca_keypad_mask {
|
||||
AC_IO_ICCA_KEYPAD_MASK_EMPTY = (1 << 0),
|
||||
AC_IO_ICCA_KEYPAD_MASK_3 = (1 << 1),
|
||||
AC_IO_ICCA_KEYPAD_MASK_6 = (1 << 2),
|
||||
AC_IO_ICCA_KEYPAD_MASK_9 = (1 << 3),
|
||||
|
||||
AC_IO_ICCA_KEYPAD_MASK_0 = (1 << 8),
|
||||
AC_IO_ICCA_KEYPAD_MASK_1 = (1 << 9),
|
||||
AC_IO_ICCA_KEYPAD_MASK_4 = (1 << 10),
|
||||
AC_IO_ICCA_KEYPAD_MASK_7 = (1 << 11),
|
||||
|
||||
AC_IO_ICCA_KEYPAD_MASK_00 = (1 << 12),
|
||||
AC_IO_ICCA_KEYPAD_MASK_2 = (1 << 13),
|
||||
AC_IO_ICCA_KEYPAD_MASK_5 = (1 << 14),
|
||||
AC_IO_ICCA_KEYPAD_MASK_8 = (1 << 15),
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct ac_io_icca_misc {
|
||||
uint8_t unknown;
|
||||
uint8_t subcmd;
|
||||
};
|
||||
|
||||
struct ac_io_icca_state {
|
||||
/* Similar to the struct returned by libacio, but not quite the same */
|
||||
|
||||
uint8_t status_code;
|
||||
uint8_t sensor_state;
|
||||
uint8_t uid[8];
|
||||
uint8_t card_type;
|
||||
uint8_t keypad_started;
|
||||
uint8_t key_events[2];
|
||||
uint16_t key_state;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,48 @@
|
||||
#ifndef AC_IO_ICCB_H
|
||||
#define AC_IO_ICCB_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum ac_io_iccb_cmd {
|
||||
/* found on jubeat prop, sent after acio init req, maybe fw update? */
|
||||
AC_IO_ICCB_CMD_UNK_0100 = 0x0100,
|
||||
/* found on jubeat prop, sent right after queue loop start */
|
||||
AC_IO_ICCB_CMD_UNK_0116 = 0x0116,
|
||||
/* found on jubeat prop, sent after 0100 req */
|
||||
AC_IO_ICCB_CMD_UNK_0120 = 0x0120,
|
||||
AC_IO_ICCB_CMD_QUEUE_LOOP_START = 0x0130,
|
||||
AC_IO_ICCB_CMD_POLL = 0x0134,
|
||||
AC_IO_ICCB_CMD_UNK_135 = 0x0135,
|
||||
AC_IO_ICCB_CMD_SLEEP = 0x013A,
|
||||
AC_IO_ICCB_CMD_READ_CARD = 0x0161
|
||||
};
|
||||
|
||||
enum ac_io_iccb_sensor_state {
|
||||
AC_IO_ICCB_SENSOR_CARD = 0x02,
|
||||
AC_IO_ICCB_SENSOR_NO_CARD = 0x04
|
||||
};
|
||||
|
||||
enum ac_io_iccb_card_type {
|
||||
AC_IO_ICCB_CARD_TYPE_ISO15696 = 0x0,
|
||||
AC_IO_ICCB_CARD_TYPE_FELICA = 0x1,
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct ac_io_iccb_misc {
|
||||
uint8_t unknown;
|
||||
uint8_t subcmd;
|
||||
};
|
||||
|
||||
struct ac_io_iccb_state {
|
||||
uint8_t sensor_state;
|
||||
uint8_t card_type;
|
||||
uint8_t uid[8];
|
||||
uint8_t unk2;
|
||||
uint8_t unk3;
|
||||
uint8_t unk4[4];
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef AC_IO_KFCA_H
|
||||
#define AC_IO_KFCA_H
|
||||
|
||||
#define AC_IO_CMD_KFCA_POLL 0x0113
|
||||
#define AC_IO_CMD_KFCA_UNK_0120 0x0120
|
||||
#define AC_IO_CMD_KFCA_UNK_0128 0x0128
|
||||
|
||||
#define AC_IO_KFCA_IN_GPIO_SYS_COIN 0x04
|
||||
/* ... AC_IO_KFCA_IN_GPIO_SYS_COIN2 0x08 (maybe?) */
|
||||
#define AC_IO_KFCA_IN_GPIO_SYS_TEST 0x10
|
||||
#define AC_IO_KFCA_IN_GPIO_SYS_SERVICE 0x20
|
||||
|
||||
#define AC_IO_KFCA_IN_GPIO_0_C 0x0001
|
||||
#define AC_IO_KFCA_IN_GPIO_0_B 0x0002
|
||||
#define AC_IO_KFCA_IN_GPIO_0_A 0x0004
|
||||
#define AC_IO_KFCA_IN_GPIO_0_START 0x0008
|
||||
#define AC_IO_KFCA_IN_GPIO_0_HEADPHONE 0x0020
|
||||
|
||||
#define AC_IO_KFCA_IN_GPIO_1_FX_R 0x0008
|
||||
#define AC_IO_KFCA_IN_GPIO_1_FX_L 0x0010
|
||||
#define AC_IO_KFCA_IN_GPIO_1_D 0x0020
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
struct ac_io_kfca_poll_in {
|
||||
/* ADC data is 10 bits. Low 6 bits of ADCs 1 through 3 are zero, low 6 bits
|
||||
of ADC 0 is the system GPIOs (test, service, coin). */
|
||||
|
||||
union {
|
||||
uint16_t gpio_sys;
|
||||
|
||||
struct {
|
||||
uint16_t adc[4];
|
||||
uint16_t gpio[4];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
struct ac_io_kfca_poll_out {
|
||||
uint32_t gpio;
|
||||
uint8_t pwm[18];
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user