19#ifndef __DC_SOUND_AICA_COMM_H
20#define __DC_SOUND_AICA_COMM_H
24typedef unsigned long uint32;
41typedef struct aica_queue {
51typedef struct aica_cmd {
61#define AICA_CMD_MAX_SIZE 256
68typedef struct aica_channel {
92#define AICA_CMDSTR_CHANNEL(T, CMDR, CHANR) \
93 uint8 T[sizeof(aica_cmd_t) + sizeof(aica_channel_t)]; \
94 aica_cmd_t * CMDR = (aica_cmd_t *)T; \
95 aica_channel_t * CHANR = (aica_channel_t *)(CMDR->cmd_data);
98#define AICA_CMDSTR_CHANNEL_SIZE ((sizeof(aica_cmd_t) + sizeof(aica_channel_t))/4)
104#define AICA_CMD_NONE 0x00000000
105#define AICA_CMD_PING 0x00000001
106#define AICA_CMD_CHAN 0x00000002
107#define AICA_CMD_SYNC_CLOCK 0x00000003
114#define AICA_RESP_NONE 0x00000000
115#define AICA_RESP_PONG 0x00000001
116#define AICA_RESP_DBGPRINT 0x00000002
123#define AICA_CH_CMD_MASK 0x0000000f
125#define AICA_CH_CMD_NONE 0x00000000
126#define AICA_CH_CMD_START 0x00000001
127#define AICA_CH_CMD_STOP 0x00000002
128#define AICA_CH_CMD_UPDATE 0x00000003
135#define AICA_CH_START_MASK 0x00300000
137#define AICA_CH_START_DELAY 0x00100000
138#define AICA_CH_START_SYNC 0x00200000
145#define AICA_CH_UPDATE_MASK 0x000ff000
147#define AICA_CH_UPDATE_SET_FREQ 0x00001000
148#define AICA_CH_UPDATE_SET_VOL 0x00002000
149#define AICA_CH_UPDATE_SET_PAN 0x00004000
156#define AICA_SM_16BIT 0
157#define AICA_SM_8BIT 1
158#define AICA_SM_ADPCM 2
159#define AICA_SM_ADPCM_LS 3
unsigned long uint8
Definition aica_comm.h:23
unsigned long uint32
32-bit unsigned integer
Definition types.h:33
AICA command payload data for AICA_CMD_CHAN.
Definition aica_comm.h:68
uint32 vol
Volume 0-255.
Definition aica_comm.h:77
uint32 base
Sample base in RAM.
Definition aica_comm.h:70
uint32 length
Sample length.
Definition aica_comm.h:72
uint32 pan
Pan 0-255.
Definition aica_comm.h:78
uint32 type
(8/16bit/ADPCM)
Definition aica_comm.h:71
uint32 cmd
Command ID.
Definition aica_comm.h:69
uint32 freq
Frequency.
Definition aica_comm.h:76
uint32 loopstart
Sample loop start.
Definition aica_comm.h:74
uint32 loop
Sample looping.
Definition aica_comm.h:73
uint32 loopend
Sample loop end.
Definition aica_comm.h:75
uint32 pos
Sample playback pos.
Definition aica_comm.h:79
Command queue struct for commanding the AICA from the SH-4.
Definition aica_comm.h:51
uint32 cmd
Command ID.
Definition aica_comm.h:53
uint32 size
Command data size in dwords.
Definition aica_comm.h:52
uint32 timestamp
When to execute the command (0 == now)
Definition aica_comm.h:54
uint32 cmd_id
CmdID, for cmd/resp pairs, or chn id.
Definition aica_comm.h:55
SH4-to-AICA command queue.
Definition aica_comm.h:41
uint32 head
Insertion point offset (in bytes)
Definition aica_comm.h:42
uint32 process_ok
1 if it's ok to process the data
Definition aica_comm.h:46
uint32 valid
1 if the queue structs are valid
Definition aica_comm.h:45
uint32 tail
Removal point offset (in bytes)
Definition aica_comm.h:43
uint32 data
Pointer to queue data buffer.
Definition aica_comm.h:47
uint32 size
Queue size (in bytes)
Definition aica_comm.h:44