1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2024-11-24 14:50:10 +01:00

bio2: Add BIO2_BI2A_CMD_INIT command

Turns out this is different from the generic CLEAR command used
on other ACIO devices. Has further implications when initializing
BIO2 boards for specific games, e.g. IIDX.
This commit is contained in:
icex2 2020-12-16 23:10:13 +01:00
parent 0bc87db8da
commit 0c88518a1f
3 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,9 @@
#include <stdint.h>
enum bio2_bi2a_cmd {
// Same as AC_IO_CMD_CLEAR but called differently
// with a parameter required to initialize the IO correctly
BIO2_BI2A_CMD_INIT = 0x0100,
BIO2_BI2A_CMD_WATCHDOG = 0x0120,
BIO2_BI2A_CMD_POLL = 0x0152, // For IIDX
};

View File

@ -14,7 +14,7 @@ static bool bio2drv_bi2a_iidx_init_io(uint8_t node_id)
struct ac_io_message msg;
msg.addr = node_id + 1;
msg.cmd.code = ac_io_u16(AC_IO_CMD_CLEAR);
msg.cmd.code = ac_io_u16(BIO2_BI2A_CMD_INIT);
msg.cmd.nbytes = 1;
msg.cmd.count = 0x3B;

View File

@ -15,7 +15,7 @@ static bool bio2drv_bi2a_sdvx_init_io(uint8_t node_id)
struct ac_io_message msg;
msg.addr = node_id + 1;
msg.cmd.code = ac_io_u16(AC_IO_CMD_CLEAR);
msg.cmd.code = ac_io_u16(BIO2_BI2A_CMD_INIT);
msg.cmd.nbytes = 1;
msg.cmd.count = 0x3B;