KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
aica_comm.h File Reference

Shared API for the SH4/AICA interface. More...

Go to the source code of this file.

Data Structures

struct  aica_queue_t
 SH4-to-AICA command queue. More...
 
struct  aica_cmd_t
 Command queue struct for commanding the AICA from the SH-4. More...
 
struct  aica_channel_t
 AICA command payload data for AICA_CMD_CHAN. More...
 

Macros

#define AICA_CMD_MAX_SIZE   256
 Maximum command size – 256 dwords.
 
#define AICA_CMDSTR_CHANNEL(T, CMDR, CHANR)
 Macro for declaring an aica channel command.
 
#define AICA_CMDSTR_CHANNEL_SIZE   ((sizeof(aica_cmd_t) + sizeof(aica_channel_t))/4)
 Size of an AICA channel command in words.
 
#define AICA_CMD_NONE   0x00000000
 No command (dummy packet)

 
#define AICA_CMD_PING   0x00000001
 Check for signs of life

 
#define AICA_CMD_CHAN   0x00000002
 Perform a wavetable action

 
#define AICA_CMD_SYNC_CLOCK   0x00000003
 Reset the millisecond clock

 
#define AICA_RESP_NONE   0x00000000
 No response.
 
#define AICA_RESP_PONG   0x00000001
 Response to CMD_PING.
 
#define AICA_RESP_DBGPRINT   0x00000002
 Payload is a C string.
 
#define AICA_CH_CMD_MASK   0x0000000f
 Mask for commands.
 
#define AICA_CH_CMD_NONE   0x00000000
 No command.
 
#define AICA_CH_CMD_START   0x00000001
 Start command.
 
#define AICA_CH_CMD_STOP   0x00000002
 Stop command.
 
#define AICA_CH_CMD_UPDATE   0x00000003
 Update command.
 
#define AICA_CH_START_MASK   0x00300000
 Mask for start values.
 
#define AICA_CH_START_DELAY   0x00100000
 Set params, but delay key-on.
 
#define AICA_CH_START_SYNC   0x00200000
 Set key-on for all selected channels.
 
#define AICA_CH_UPDATE_MASK   0x000ff000
 Mask for update values.
 
#define AICA_CH_UPDATE_SET_FREQ   0x00001000
 frequency
 
#define AICA_CH_UPDATE_SET_VOL   0x00002000
 volume
 
#define AICA_CH_UPDATE_SET_PAN   0x00004000
 panning
 
#define AICA_SM_16BIT   0 /* Linear PCM 16-bit */
 
#define AICA_SM_8BIT   1 /* Linear PCM 8-bit */
 
#define AICA_SM_ADPCM   2 /* Yamaha ADPCM 4-bit */
 
#define AICA_SM_ADPCM_LS   3 /* Long stream ADPCM 4-bit */
 

Typedefs

typedef unsigned long uint8
 

Detailed Description

Shared API for the SH4/AICA interface.

Structure and constant definitions for the SH-4/AICA interface. This file is included from both the ARM and SH-4 sides of the fence.

Author
Megan Potter
Ruslan Rostovtsev

Typedef Documentation

◆ uint8

typedef unsigned long uint8