mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2024-11-13 18:00:49 +01:00
bi2a: Clarify data field usage on init command
The single byte is a specific parameter required to initialize the IO correctly. Otherwise, it either will only work partially or not worked at all. The full impact and meaning of that byte is not entirely known, yet.
This commit is contained in:
parent
0c88518a1f
commit
ef377f40d8
@ -66,6 +66,7 @@ struct ac_io_message {
|
||||
uint8_t raw[0xFF];
|
||||
uint8_t count;
|
||||
uint8_t status;
|
||||
uint8_t param;
|
||||
struct ac_io_version version;
|
||||
|
||||
struct ac_io_icca_misc icca_misc;
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
static const uint8_t _BIO2DR_BI2A_IIDX_INIT_DATA = 0x3B;
|
||||
|
||||
static bool bio2drv_bi2a_iidx_init_io(uint8_t node_id)
|
||||
{
|
||||
struct ac_io_message msg;
|
||||
@ -16,7 +18,7 @@ static bool bio2drv_bi2a_iidx_init_io(uint8_t node_id)
|
||||
msg.addr = node_id + 1;
|
||||
msg.cmd.code = ac_io_u16(BIO2_BI2A_CMD_INIT);
|
||||
msg.cmd.nbytes = 1;
|
||||
msg.cmd.count = 0x3B;
|
||||
msg.cmd.param = _BIO2DR_BI2A_IIDX_INIT_DATA;
|
||||
|
||||
if (!aciodrv_send_and_recv(
|
||||
&msg, offsetof(struct ac_io_message, cmd.raw) + 1)) {
|
||||
|
@ -9,6 +9,8 @@
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
static const uint8_t _BIO2DR_BI2A_SDVX_INIT_DATA = 0x3B;
|
||||
|
||||
// this is probably InitIO
|
||||
static bool bio2drv_bi2a_sdvx_init_io(uint8_t node_id)
|
||||
{
|
||||
@ -17,7 +19,7 @@ static bool bio2drv_bi2a_sdvx_init_io(uint8_t node_id)
|
||||
msg.addr = node_id + 1;
|
||||
msg.cmd.code = ac_io_u16(BIO2_BI2A_CMD_INIT);
|
||||
msg.cmd.nbytes = 1;
|
||||
msg.cmd.count = 0x3B;
|
||||
msg.cmd.param = _BIO2DR_BI2A_SDVX_INIT_DATA;
|
||||
|
||||
if (!aciodrv_send_and_recv(
|
||||
&msg, offsetof(struct ac_io_message, cmd.raw) + 1)) {
|
||||
|
@ -85,8 +85,8 @@ void bio2_emu_bi2a_dispatch_request(
|
||||
cmd_code = ac_io_u16(req->cmd.code);
|
||||
|
||||
switch (cmd_code) {
|
||||
case AC_IO_CMD_CLEAR:
|
||||
log_misc("AC_IO_CMD_CLEAR(%d)", req->addr);
|
||||
case BIO2_BI2A_CMD_INIT:
|
||||
log_misc("BIO2_BI2A_CMD_INIT(%d)", req->addr);
|
||||
bio2_emu_bi2a_send_status(&bio2port->acio, req, 0x00);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user