PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
libsd-common.h File Reference
#include <tamtypes.h>
+ Include dependency graph for libsd-common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  sceSdBatch
 
struct  sceSdEffectAttr
 

Macros

#define SD_VOICE(_core, _v)   ((_core) | ((_v) << 1))
 
#define SD_ADSR_AR_LINEARi   0
 
#define SD_ADSR_AR_EXPi   1
 
#define SD_ADSR_SR_LINEARi   0
 
#define SD_ADSR_SR_LINEARd   2
 
#define SD_ADSR_SR_EXPi   4
 
#define SD_ADSR_SR_EXPd   6
 
#define SD_ADSR_RR_LINEARd   0
 
#define SD_ADSR_RR_EXPd   1
 
#define SD_SET_ADSR1(_arm, _ar, _dr, _sl)   ((((_arm)&1) << 15) | (((_ar)&0x7f) << 8) | (((_dr)&0xf) << 4) | ((_sl)&0xf))
 
#define SD_SET_ADSR2(_srm, _sr, _rrm, _rr)   ((((_srm)&7) << 13) | (((_sr)&0x7f) << 6) | (((_rrm)&1) << 5) | ((_rr)&0x1f))
 
#define SD_VPARAM_VOLL   (0x00 << 8)
 
#define SD_VPARAM_VOLR   (0x01 << 8)
 
#define SD_VPARAM_PITCH   (0x02 << 8)
 
#define SD_VPARAM_ADSR1   (0x03 << 8)
 
#define SD_VPARAM_ADSR2   (0x04 << 8)
 
#define SD_VPARAM_ENVX   (0x05 << 8)
 
#define SD_VPARAM_VOLXL   (0x06 << 8)
 
#define SD_VPARAM_VOLXR   (0x07 << 8)
 
#define SD_PARAM_MMIX   (0x08 << 8)
 
#define SD_PARAM_MVOLL   ((0x09 << 8) | 0x80)
 
#define SD_PARAM_MVOLR   ((0x0A << 8) | 0x80)
 
#define SD_PARAM_EVOLL   ((0x0B << 8) | 0x80)
 
#define SD_PARAM_EVOLR   ((0x0C << 8) | 0x80)
 
#define SD_PARAM_AVOLL   ((0x0D << 8) | 0x80)
 
#define SD_PARAM_AVOLR   ((0x0E << 8) | 0x80)
 
#define SD_PARAM_BVOLL   ((0x0F << 8) | 0x80)
 
#define SD_PARAM_BVOLR   ((0x10 << 8) | 0x80)
 
#define SD_PARAM_MVOLXL   ((0x11 << 8) | 0x80)
 
#define SD_PARAM_MVOLXR   ((0x12 << 8) | 0x80)
 
#define SD_TRANS_WRITE   0
 
#define SD_TRANS_READ   1
 
#define SD_TRANS_STOP   2
 
#define SD_TRANS_WRITE_FROM   3 /* only for block */
 
#define SD_TRANS_LOOP   0x10 /* only for block*/
 
#define SD_TRANS_MODE_DMA   0
 
#define SD_TRANS_MODE_IO   8
 
#define SD_EFFECT_MODE_OFF   0x0
 
#define SD_EFFECT_MODE_ROOM   0x1
 
#define SD_EFFECT_MODE_STUDIO_1   0x2
 
#define SD_EFFECT_MODE_STUDIO_2   0x3
 
#define SD_EFFECT_MODE_STUDIO_3   0x4
 
#define SD_EFFECT_MODE_HALL   0x5
 
#define SD_EFFECT_MODE_SPACE   0x6
 
#define SD_EFFECT_MODE_ECHO   0x7
 
#define SD_EFFECT_MODE_DELAY   0x8
 
#define SD_EFFECT_MODE_PIPE   0x9
 
#define SD_EFFECT_MODE_CLEAR   0x100
 
#define SD_CORE_EFFECT_ENABLE   0x2
 
#define SD_CORE_IRQ_ENABLE   0x4
 
#define SD_CORE_MUTE_ENABLE   0x6
 
#define SD_CORE_NOISE_CLK   0x8
 
#define SD_CORE_SPDIF_MODE   0xA
 
#define SD_SWITCH_PMON   (0x13 << 8)
 
#define SD_SWITCH_NON   (0x14 << 8)
 
#define SD_SWITCH_KON   (0x15 << 8)
 
#define SD_SWITCH_KEYDOWN   SD_SWITCH_KON
 
#define SD_SWITCH_KOFF   (0x16 << 8)
 
#define SD_SWITCH_KEYUP   SD_SWITCH_KOFF
 
#define SD_SWITCH_ENDX   (0x17 << 8)
 
#define SD_SWITCH_VMIXL   (0x18 << 8)
 
#define SD_SWITCH_VMIXEL   (0x19 << 8)
 
#define SD_SWITCH_VMIXR   (0x1A << 8)
 
#define SD_SWITCH_VMIXER   (0x1B << 8)
 
#define SD_ADDR_ESA   (0x1C << 8)
 
#define SD_ADDR_EEA   (0x1D << 8)
 
#define SD_ADDR_TSA   (0x1E << 8)
 
#define SD_ADDR_IRQA   (0x1F << 8)
 
#define SD_VADDR_SSA   (0x20 << 8)
 
#define SD_VADDR_LSAX   (0x21 << 8)
 
#define SD_VADDR_NAX   (0x22 << 8)
 
#define SD_SPU2_ON   (1 << 15)
 
#define SD_MUTE   (1 << 14)
 
#define SD_NOISE_CLOCK(c)   ((c & 0x1F) << 8)
 
#define SD_ENABLE_EFFECTS   (1 << 7)
 
#define SD_ENABLE_IRQ   (1 << 6)
 
#define SD_DMA_IO   (1 << 4)
 
#define SD_DMA_WRITE   (2 << 4)
 
#define SD_DMA_READ   (3 << 4)
 
#define SD_DMA_IN_PROCESS   (3 << 4)
 
#define SD_CORE_DMA   (3 << 4)
 
#define SD_ENABLE_EX_INPUT   (1 << 0)
 
#define SD_IO_IN_PROCESS   (1 << 10)
 
#define SD_BATCH_SETPARAM   0x1
 
#define SD_BATCH_SETSWITCH   0x2
 
#define SD_BATCH_SETADDR   0x3
 
#define SD_BATCH_SETCORE   0x4
 
#define SD_BATCH_WRITEIOP   0x5
 
#define SD_BATCH_WRITEEE   0x6
 
#define SD_BATCH_EERETURN   0x7
 
#define SD_BATCH_GETPARAM   0x10
 
#define SD_BATCH_GETSWITCH   0x12
 
#define SD_BATCH_GETADDR   0x13
 
#define SD_BATCH_GETCORE   0x14
 
#define ADPCM_LOOP_START   4 /* Set on first block of looped data */
 
#define ADPCM_LOOP   2 /* Set on all blocks (?that are inside the loop?) */
 
#define ADPCM_LOOP_END   1 /* Set on last block to loop */
 
#define BATCH_SETPARAM   SD_BATCH_SETPARAM
 
#define BATCH_SETSWITCH   SD_BATCH_SETSWITCH
 
#define BATCH_SETADDR   SD_BATCH_SETADDR
 
#define BATCH_SETCORE   SD_BATCH_SETCORE
 
#define BATCH_WRITEIOP   SD_BATCH_WRITEIOP
 
#define BATCH_WRITEEE   SD_BATCH_WRITEEE
 
#define BATCH_EERETURN   SD_BATCH_EERETURN
 
#define BATCH_GETPARAM   SD_BATCH_GETPARAM
 
#define BATCH_GETSWITCH   SD_BATCH_GETSWITCH
 
#define BATCH_GETADDR   SD_BATCH_GETADDR
 
#define BATCH_GETCORE   SD_BATCH_GETCORE
 
#define SD_BLOCK_TRANS_WRITE   SD_TRANS_WRITE
 
#define SD_BLOCK_TRANS_READ   SD_TRANS_READ
 
#define SD_BLOCK_TRANS_STOP   SD_TRANS_STOP
 
#define SD_BLOCK_TRANS_WRITE_FROM   SD_TRANS_WRITE_FROM
 
#define SD_BLOCK_TRANS_LOOP   SD_TRANS_LOOP
 
#define SD_VOICE_TRANS_WRITE   SD_TRANS_WRITE
 
#define SD_VOICE_TRANS_READ   SD_TRANS_READ
 
#define SD_VOICE_TRANS_STOP   SD_TRANS_STOP
 
#define SD_VOICE_TRANS_MODE_DMA   SD_TRANS_MODE_DMA
 
#define SD_VOICE_TRANS_MODE_IO   SD_TRANS_MODE_IO
 
#define SdBatch   sceSdBatch
 
#define SdEffectAttr   sceSdEffectAttr
 
#define SdSpu2IntrHandler   sceSdSpu2IntrHandler
 
#define SdTransIntrHandler   sceSdTransIntrHandler
 
#define IntrCallback   SdIntrCallback
 
#define SdQuit   sceSdQuit
 
#define SdInit   sceSdInit
 
#define SdSetIRQCallback   sceSdSetIRQCallback
 
#define SdSetTransCallback   sceSdSetTransCallback
 
#define SdSetParam   sceSdSetParam
 
#define SdGetParam   sceSdGetParam
 
#define SdSetCoreAttr   sceSdSetCoreAttr
 
#define SdGetCoreAttr   sceSdGetCoreAttr
 
#define SdClearEffectWorkArea   sceSdClearEffectWorkArea
 
#define SdSetAddr   sceSdSetAddr
 
#define SdGetAddr   sceSdGetAddr
 
#define SdSetSwitch   sceSdSetSwitch
 
#define SdGetSwitch   sceSdGetSwitch
 
#define SdNote2Pitch   sceSdNote2Pitch
 
#define SdPitch2Note   sceSdPitch2Note
 
#define SdSetEffectAttr   sceSdSetEffectAttr
 
#define SdGetEffectAttr   sceSdGetEffectAttr
 
#define SdProcBatch   sceSdProcBatch
 
#define SdProcBatchEx   sceSdProcBatchEx
 
#define SdVoiceTrans   sceSdVoiceTrans
 
#define SdBlockTrans   sceSdBlockTrans
 
#define SdVoiceTransStatus   sceSdVoiceTransStatus
 
#define SdBlockTransStatus   sceSdBlockTransStatus
 
#define SdSetTransIntrHandler   sceSdSetTransIntrHandler
 
#define SdSetSpu2IntrHandler   sceSdSetSpu2IntrHandler
 
#define SdGetTransIntrHandlerArgument   sceSdGetTransIntrHandlerArgument
 
#define SdGetSpu2IntrHandlerArgument   sceSdGetSpu2IntrHandlerArgument
 
#define SdStopTrans   sceSdStopTrans
 
#define SdCleanEffectWorkArea   sceSdCleanEffectWorkArea
 
#define SdSetEffectMode   sceSdSetEffectMode
 
#define SdSetEffectModeParams   sceSdSetEffectModeParams
 

Typedefs

typedef int(* sceSdSpu2IntrHandler) (int, void *)
 
typedef int(* sceSdTransIntrHandler) (int, void *)
 
typedef int(* SdIntrCallback) (void *data)
 

Functions

int sceSdQuit ()
 
int sceSdInit (int flag)
 
SdIntrCallback sceSdSetIRQCallback (SdIntrCallback cb)
 
SdIntrCallback sceSdSetTransCallback (s32 core, SdIntrCallback cb)
 
void sceSdSetParam (u16 entry, u16 value)
 
u16 sceSdGetParam (u16 entry)
 
void sceSdSetCoreAttr (u16 entry, u16 value)
 
u16 sceSdGetCoreAttr (u16 entry)
 
int sceSdClearEffectWorkArea (int core, int channel, int effect_mode)
 
void sceSdSetAddr (u16 entry, u32 value)
 
u32 sceSdGetAddr (u16 entry)
 
void sceSdSetSwitch (u16 entry, u32 value)
 
u32 sceSdGetSwitch (u16 entry)
 
u16 sceSdNote2Pitch (u16 center_note, u16 center_fine, u16 note, s16 fine)
 
u16 sceSdPitch2Note (u16 center_note, u16 center_fine, u16 pitch)
 
int sceSdSetEffectAttr (int core, sceSdEffectAttr *attr)
 
void sceSdGetEffectAttr (int core, sceSdEffectAttr *attr)
 
int sceSdProcBatch (sceSdBatch *batch, u32 *rets, u32 num)
 
int sceSdProcBatchEx (sceSdBatch *batch, u32 *rets, u32 num, u32 voice)
 
int sceSdVoiceTrans (s16 chan, u16 mode, u8 *iopaddr, u32 *spuaddr, u32 size)
 
int sceSdBlockTrans (s16 chan, u16 mode, u8 *iopaddr, u32 size,...)
 
u32 sceSdVoiceTransStatus (s16 channel, s16 flag)
 
u32 sceSdBlockTransStatus (s16 channel, s16 flag)
 
sceSdTransIntrHandler sceSdSetTransIntrHandler (int channel, sceSdTransIntrHandler func, void *arg)
 
sceSdSpu2IntrHandler sceSdSetSpu2IntrHandler (sceSdSpu2IntrHandler func, void *arg)
 
void * sceSdGetTransIntrHandlerArgument (int arg)
 
void * sceSdGetSpu2IntrHandlerArgument ()
 
int sceSdStopTrans (int channel)
 
int sceSdCleanEffectWorkArea (int core, int channel, int effect_mode)
 
int sceSdSetEffectMode (int core, sceSdEffectAttr *param)
 
int sceSdSetEffectModeParams (int core, sceSdEffectAttr *attr)
 

Detailed Description

Common definitions for libsd on the EE and IOP

Definition in file libsd-common.h.


Data Structure Documentation

◆ sceSdBatch

struct sceSdBatch

Definition at line 130 of file libsd-common.h.

Data Fields
u16 func
u16 entry
u32 value

◆ sceSdEffectAttr

struct sceSdEffectAttr

Definition at line 137 of file libsd-common.h.

Data Fields
int core
int mode
short depth_L
short depth_R
int delay
int feedback

Macro Definition Documentation

◆ SD_VOICE

#define SD_VOICE (   _core,
  _v 
)    ((_core) | ((_v) << 1))

Definition at line 11 of file libsd-common.h.

◆ SD_ADSR_AR_LINEARi

#define SD_ADSR_AR_LINEARi   0

Definition at line 14 of file libsd-common.h.

◆ SD_ADSR_AR_EXPi

#define SD_ADSR_AR_EXPi   1

Definition at line 15 of file libsd-common.h.

◆ SD_ADSR_SR_LINEARi

#define SD_ADSR_SR_LINEARi   0

Definition at line 16 of file libsd-common.h.

◆ SD_ADSR_SR_LINEARd

#define SD_ADSR_SR_LINEARd   2

Definition at line 17 of file libsd-common.h.

◆ SD_ADSR_SR_EXPi

#define SD_ADSR_SR_EXPi   4

Definition at line 18 of file libsd-common.h.

◆ SD_ADSR_SR_EXPd

#define SD_ADSR_SR_EXPd   6

Definition at line 19 of file libsd-common.h.

◆ SD_ADSR_RR_LINEARd

#define SD_ADSR_RR_LINEARd   0

Definition at line 20 of file libsd-common.h.

◆ SD_ADSR_RR_EXPd

#define SD_ADSR_RR_EXPd   1

Definition at line 21 of file libsd-common.h.

◆ SD_SET_ADSR1

#define SD_SET_ADSR1 (   _arm,
  _ar,
  _dr,
  _sl 
)    ((((_arm)&1) << 15) | (((_ar)&0x7f) << 8) | (((_dr)&0xf) << 4) | ((_sl)&0xf))

Definition at line 22 of file libsd-common.h.

◆ SD_SET_ADSR2

#define SD_SET_ADSR2 (   _srm,
  _sr,
  _rrm,
  _rr 
)    ((((_srm)&7) << 13) | (((_sr)&0x7f) << 6) | (((_rrm)&1) << 5) | ((_rr)&0x1f))

Definition at line 23 of file libsd-common.h.

◆ SD_VPARAM_VOLL

#define SD_VPARAM_VOLL   (0x00 << 8)

Definition at line 26 of file libsd-common.h.

◆ SD_VPARAM_VOLR

#define SD_VPARAM_VOLR   (0x01 << 8)

Definition at line 27 of file libsd-common.h.

◆ SD_VPARAM_PITCH

#define SD_VPARAM_PITCH   (0x02 << 8)

Definition at line 28 of file libsd-common.h.

◆ SD_VPARAM_ADSR1

#define SD_VPARAM_ADSR1   (0x03 << 8)

Definition at line 29 of file libsd-common.h.

◆ SD_VPARAM_ADSR2

#define SD_VPARAM_ADSR2   (0x04 << 8)

Definition at line 30 of file libsd-common.h.

◆ SD_VPARAM_ENVX

#define SD_VPARAM_ENVX   (0x05 << 8)

Definition at line 31 of file libsd-common.h.

◆ SD_VPARAM_VOLXL

#define SD_VPARAM_VOLXL   (0x06 << 8)

Definition at line 32 of file libsd-common.h.

◆ SD_VPARAM_VOLXR

#define SD_VPARAM_VOLXR   (0x07 << 8)

Definition at line 33 of file libsd-common.h.

◆ SD_PARAM_MMIX

#define SD_PARAM_MMIX   (0x08 << 8)

Definition at line 34 of file libsd-common.h.

◆ SD_PARAM_MVOLL

#define SD_PARAM_MVOLL   ((0x09 << 8) | 0x80)

Definition at line 35 of file libsd-common.h.

◆ SD_PARAM_MVOLR

#define SD_PARAM_MVOLR   ((0x0A << 8) | 0x80)

Definition at line 36 of file libsd-common.h.

◆ SD_PARAM_EVOLL

#define SD_PARAM_EVOLL   ((0x0B << 8) | 0x80)

Definition at line 37 of file libsd-common.h.

◆ SD_PARAM_EVOLR

#define SD_PARAM_EVOLR   ((0x0C << 8) | 0x80)

Definition at line 38 of file libsd-common.h.

◆ SD_PARAM_AVOLL

#define SD_PARAM_AVOLL   ((0x0D << 8) | 0x80)

Definition at line 39 of file libsd-common.h.

◆ SD_PARAM_AVOLR

#define SD_PARAM_AVOLR   ((0x0E << 8) | 0x80)

Definition at line 40 of file libsd-common.h.

◆ SD_PARAM_BVOLL

#define SD_PARAM_BVOLL   ((0x0F << 8) | 0x80)

Definition at line 41 of file libsd-common.h.

◆ SD_PARAM_BVOLR

#define SD_PARAM_BVOLR   ((0x10 << 8) | 0x80)

Definition at line 42 of file libsd-common.h.

◆ SD_PARAM_MVOLXL

#define SD_PARAM_MVOLXL   ((0x11 << 8) | 0x80)

Definition at line 43 of file libsd-common.h.

◆ SD_PARAM_MVOLXR

#define SD_PARAM_MVOLXR   ((0x12 << 8) | 0x80)

Definition at line 44 of file libsd-common.h.

◆ SD_TRANS_WRITE

#define SD_TRANS_WRITE   0

Definition at line 47 of file libsd-common.h.

◆ SD_TRANS_READ

#define SD_TRANS_READ   1

Definition at line 48 of file libsd-common.h.

◆ SD_TRANS_STOP

#define SD_TRANS_STOP   2

Definition at line 49 of file libsd-common.h.

◆ SD_TRANS_WRITE_FROM

#define SD_TRANS_WRITE_FROM   3 /* only for block */

Definition at line 50 of file libsd-common.h.

◆ SD_TRANS_LOOP

#define SD_TRANS_LOOP   0x10 /* only for block*/

Definition at line 51 of file libsd-common.h.

◆ SD_TRANS_MODE_DMA

#define SD_TRANS_MODE_DMA   0

Definition at line 52 of file libsd-common.h.

◆ SD_TRANS_MODE_IO

#define SD_TRANS_MODE_IO   8

Definition at line 53 of file libsd-common.h.

◆ SD_EFFECT_MODE_OFF

#define SD_EFFECT_MODE_OFF   0x0

Definition at line 56 of file libsd-common.h.

◆ SD_EFFECT_MODE_ROOM

#define SD_EFFECT_MODE_ROOM   0x1

Definition at line 57 of file libsd-common.h.

◆ SD_EFFECT_MODE_STUDIO_1

#define SD_EFFECT_MODE_STUDIO_1   0x2

Definition at line 58 of file libsd-common.h.

◆ SD_EFFECT_MODE_STUDIO_2

#define SD_EFFECT_MODE_STUDIO_2   0x3

Definition at line 59 of file libsd-common.h.

◆ SD_EFFECT_MODE_STUDIO_3

#define SD_EFFECT_MODE_STUDIO_3   0x4

Definition at line 60 of file libsd-common.h.

◆ SD_EFFECT_MODE_HALL

#define SD_EFFECT_MODE_HALL   0x5

Definition at line 61 of file libsd-common.h.

◆ SD_EFFECT_MODE_SPACE

#define SD_EFFECT_MODE_SPACE   0x6

Definition at line 62 of file libsd-common.h.

◆ SD_EFFECT_MODE_ECHO

#define SD_EFFECT_MODE_ECHO   0x7

Definition at line 63 of file libsd-common.h.

◆ SD_EFFECT_MODE_DELAY

#define SD_EFFECT_MODE_DELAY   0x8

Definition at line 64 of file libsd-common.h.

◆ SD_EFFECT_MODE_PIPE

#define SD_EFFECT_MODE_PIPE   0x9

Definition at line 65 of file libsd-common.h.

◆ SD_EFFECT_MODE_CLEAR

#define SD_EFFECT_MODE_CLEAR   0x100

Definition at line 66 of file libsd-common.h.

◆ SD_CORE_EFFECT_ENABLE

#define SD_CORE_EFFECT_ENABLE   0x2

Definition at line 69 of file libsd-common.h.

◆ SD_CORE_IRQ_ENABLE

#define SD_CORE_IRQ_ENABLE   0x4

Definition at line 70 of file libsd-common.h.

◆ SD_CORE_MUTE_ENABLE

#define SD_CORE_MUTE_ENABLE   0x6

Definition at line 71 of file libsd-common.h.

◆ SD_CORE_NOISE_CLK

#define SD_CORE_NOISE_CLK   0x8

Definition at line 72 of file libsd-common.h.

◆ SD_CORE_SPDIF_MODE

#define SD_CORE_SPDIF_MODE   0xA

Definition at line 73 of file libsd-common.h.

◆ SD_SWITCH_PMON

#define SD_SWITCH_PMON   (0x13 << 8)

Definition at line 76 of file libsd-common.h.

◆ SD_SWITCH_NON

#define SD_SWITCH_NON   (0x14 << 8)

Definition at line 77 of file libsd-common.h.

◆ SD_SWITCH_KON

#define SD_SWITCH_KON   (0x15 << 8)

Definition at line 78 of file libsd-common.h.

◆ SD_SWITCH_KEYDOWN

#define SD_SWITCH_KEYDOWN   SD_SWITCH_KON

Definition at line 79 of file libsd-common.h.

◆ SD_SWITCH_KOFF

#define SD_SWITCH_KOFF   (0x16 << 8)

Definition at line 80 of file libsd-common.h.

◆ SD_SWITCH_KEYUP

#define SD_SWITCH_KEYUP   SD_SWITCH_KOFF

Definition at line 81 of file libsd-common.h.

◆ SD_SWITCH_ENDX

#define SD_SWITCH_ENDX   (0x17 << 8)

Definition at line 82 of file libsd-common.h.

◆ SD_SWITCH_VMIXL

#define SD_SWITCH_VMIXL   (0x18 << 8)

Definition at line 83 of file libsd-common.h.

◆ SD_SWITCH_VMIXEL

#define SD_SWITCH_VMIXEL   (0x19 << 8)

Definition at line 84 of file libsd-common.h.

◆ SD_SWITCH_VMIXR

#define SD_SWITCH_VMIXR   (0x1A << 8)

Definition at line 85 of file libsd-common.h.

◆ SD_SWITCH_VMIXER

#define SD_SWITCH_VMIXER   (0x1B << 8)

Definition at line 86 of file libsd-common.h.

◆ SD_ADDR_ESA

#define SD_ADDR_ESA   (0x1C << 8)

Definition at line 89 of file libsd-common.h.

◆ SD_ADDR_EEA

#define SD_ADDR_EEA   (0x1D << 8)

Definition at line 90 of file libsd-common.h.

◆ SD_ADDR_TSA

#define SD_ADDR_TSA   (0x1E << 8)

Definition at line 91 of file libsd-common.h.

◆ SD_ADDR_IRQA

#define SD_ADDR_IRQA   (0x1F << 8)

Definition at line 92 of file libsd-common.h.

◆ SD_VADDR_SSA

#define SD_VADDR_SSA   (0x20 << 8)

Definition at line 93 of file libsd-common.h.

◆ SD_VADDR_LSAX

#define SD_VADDR_LSAX   (0x21 << 8)

Definition at line 94 of file libsd-common.h.

◆ SD_VADDR_NAX

#define SD_VADDR_NAX   (0x22 << 8)

Definition at line 95 of file libsd-common.h.

◆ SD_SPU2_ON

#define SD_SPU2_ON   (1 << 15)

Definition at line 98 of file libsd-common.h.

◆ SD_MUTE

#define SD_MUTE   (1 << 14)

Definition at line 99 of file libsd-common.h.

◆ SD_NOISE_CLOCK

#define SD_NOISE_CLOCK (   c)    ((c & 0x1F) << 8)

Definition at line 100 of file libsd-common.h.

◆ SD_ENABLE_EFFECTS

#define SD_ENABLE_EFFECTS   (1 << 7)

Definition at line 101 of file libsd-common.h.

◆ SD_ENABLE_IRQ

#define SD_ENABLE_IRQ   (1 << 6)

Definition at line 102 of file libsd-common.h.

◆ SD_DMA_IO

#define SD_DMA_IO   (1 << 4)

Definition at line 103 of file libsd-common.h.

◆ SD_DMA_WRITE

#define SD_DMA_WRITE   (2 << 4)

Definition at line 104 of file libsd-common.h.

◆ SD_DMA_READ

#define SD_DMA_READ   (3 << 4)

Definition at line 105 of file libsd-common.h.

◆ SD_DMA_IN_PROCESS

#define SD_DMA_IN_PROCESS   (3 << 4)

Definition at line 106 of file libsd-common.h.

◆ SD_CORE_DMA

#define SD_CORE_DMA   (3 << 4)

Definition at line 107 of file libsd-common.h.

◆ SD_ENABLE_EX_INPUT

#define SD_ENABLE_EX_INPUT   (1 << 0)

Definition at line 108 of file libsd-common.h.

◆ SD_IO_IN_PROCESS

#define SD_IO_IN_PROCESS   (1 << 10)

Definition at line 111 of file libsd-common.h.

◆ SD_BATCH_SETPARAM

#define SD_BATCH_SETPARAM   0x1

Definition at line 114 of file libsd-common.h.

◆ SD_BATCH_SETSWITCH

#define SD_BATCH_SETSWITCH   0x2

Definition at line 115 of file libsd-common.h.

◆ SD_BATCH_SETADDR

#define SD_BATCH_SETADDR   0x3

Definition at line 116 of file libsd-common.h.

◆ SD_BATCH_SETCORE

#define SD_BATCH_SETCORE   0x4

Definition at line 117 of file libsd-common.h.

◆ SD_BATCH_WRITEIOP

#define SD_BATCH_WRITEIOP   0x5

Definition at line 118 of file libsd-common.h.

◆ SD_BATCH_WRITEEE

#define SD_BATCH_WRITEEE   0x6

Definition at line 119 of file libsd-common.h.

◆ SD_BATCH_EERETURN

#define SD_BATCH_EERETURN   0x7

Definition at line 120 of file libsd-common.h.

◆ SD_BATCH_GETPARAM

#define SD_BATCH_GETPARAM   0x10

Definition at line 121 of file libsd-common.h.

◆ SD_BATCH_GETSWITCH

#define SD_BATCH_GETSWITCH   0x12

Definition at line 122 of file libsd-common.h.

◆ SD_BATCH_GETADDR

#define SD_BATCH_GETADDR   0x13

Definition at line 123 of file libsd-common.h.

◆ SD_BATCH_GETCORE

#define SD_BATCH_GETCORE   0x14

Definition at line 124 of file libsd-common.h.

◆ ADPCM_LOOP_START

#define ADPCM_LOOP_START   4 /* Set on first block of looped data */

Definition at line 126 of file libsd-common.h.

◆ ADPCM_LOOP

#define ADPCM_LOOP   2 /* Set on all blocks (?that are inside the loop?) */

Definition at line 127 of file libsd-common.h.

◆ ADPCM_LOOP_END

#define ADPCM_LOOP_END   1 /* Set on last block to loop */

Definition at line 128 of file libsd-common.h.

◆ BATCH_SETPARAM

#define BATCH_SETPARAM   SD_BATCH_SETPARAM

Definition at line 202 of file libsd-common.h.

◆ BATCH_SETSWITCH

#define BATCH_SETSWITCH   SD_BATCH_SETSWITCH

Definition at line 203 of file libsd-common.h.

◆ BATCH_SETADDR

#define BATCH_SETADDR   SD_BATCH_SETADDR

Definition at line 204 of file libsd-common.h.

◆ BATCH_SETCORE

#define BATCH_SETCORE   SD_BATCH_SETCORE

Definition at line 205 of file libsd-common.h.

◆ BATCH_WRITEIOP

#define BATCH_WRITEIOP   SD_BATCH_WRITEIOP

Definition at line 206 of file libsd-common.h.

◆ BATCH_WRITEEE

#define BATCH_WRITEEE   SD_BATCH_WRITEEE

Definition at line 207 of file libsd-common.h.

◆ BATCH_EERETURN

#define BATCH_EERETURN   SD_BATCH_EERETURN

Definition at line 208 of file libsd-common.h.

◆ BATCH_GETPARAM

#define BATCH_GETPARAM   SD_BATCH_GETPARAM

Definition at line 209 of file libsd-common.h.

◆ BATCH_GETSWITCH

#define BATCH_GETSWITCH   SD_BATCH_GETSWITCH

Definition at line 210 of file libsd-common.h.

◆ BATCH_GETADDR

#define BATCH_GETADDR   SD_BATCH_GETADDR

Definition at line 211 of file libsd-common.h.

◆ BATCH_GETCORE

#define BATCH_GETCORE   SD_BATCH_GETCORE

Definition at line 212 of file libsd-common.h.

◆ SD_BLOCK_TRANS_WRITE

#define SD_BLOCK_TRANS_WRITE   SD_TRANS_WRITE

Definition at line 214 of file libsd-common.h.

◆ SD_BLOCK_TRANS_READ

#define SD_BLOCK_TRANS_READ   SD_TRANS_READ

Definition at line 215 of file libsd-common.h.

◆ SD_BLOCK_TRANS_STOP

#define SD_BLOCK_TRANS_STOP   SD_TRANS_STOP

Definition at line 216 of file libsd-common.h.

◆ SD_BLOCK_TRANS_WRITE_FROM

#define SD_BLOCK_TRANS_WRITE_FROM   SD_TRANS_WRITE_FROM

Definition at line 217 of file libsd-common.h.

◆ SD_BLOCK_TRANS_LOOP

#define SD_BLOCK_TRANS_LOOP   SD_TRANS_LOOP

Definition at line 218 of file libsd-common.h.

◆ SD_VOICE_TRANS_WRITE

#define SD_VOICE_TRANS_WRITE   SD_TRANS_WRITE

Definition at line 220 of file libsd-common.h.

◆ SD_VOICE_TRANS_READ

#define SD_VOICE_TRANS_READ   SD_TRANS_READ

Definition at line 221 of file libsd-common.h.

◆ SD_VOICE_TRANS_STOP

#define SD_VOICE_TRANS_STOP   SD_TRANS_STOP

Definition at line 222 of file libsd-common.h.

◆ SD_VOICE_TRANS_MODE_DMA

#define SD_VOICE_TRANS_MODE_DMA   SD_TRANS_MODE_DMA

Definition at line 223 of file libsd-common.h.

◆ SD_VOICE_TRANS_MODE_IO

#define SD_VOICE_TRANS_MODE_IO   SD_TRANS_MODE_IO

Definition at line 224 of file libsd-common.h.

◆ SdBatch

#define SdBatch   sceSdBatch

Definition at line 226 of file libsd-common.h.

◆ SdEffectAttr

#define SdEffectAttr   sceSdEffectAttr

Definition at line 227 of file libsd-common.h.

◆ SdSpu2IntrHandler

#define SdSpu2IntrHandler   sceSdSpu2IntrHandler

Definition at line 228 of file libsd-common.h.

◆ SdTransIntrHandler

#define SdTransIntrHandler   sceSdTransIntrHandler

Definition at line 229 of file libsd-common.h.

◆ IntrCallback

#define IntrCallback   SdIntrCallback

Definition at line 230 of file libsd-common.h.

◆ SdQuit

#define SdQuit   sceSdQuit

Definition at line 232 of file libsd-common.h.

◆ SdInit

#define SdInit   sceSdInit

Definition at line 233 of file libsd-common.h.

◆ SdSetIRQCallback

#define SdSetIRQCallback   sceSdSetIRQCallback

Definition at line 234 of file libsd-common.h.

◆ SdSetTransCallback

#define SdSetTransCallback   sceSdSetTransCallback

Definition at line 235 of file libsd-common.h.

◆ SdSetParam

#define SdSetParam   sceSdSetParam

Definition at line 236 of file libsd-common.h.

◆ SdGetParam

#define SdGetParam   sceSdGetParam

Definition at line 237 of file libsd-common.h.

◆ SdSetCoreAttr

#define SdSetCoreAttr   sceSdSetCoreAttr

Definition at line 238 of file libsd-common.h.

◆ SdGetCoreAttr

#define SdGetCoreAttr   sceSdGetCoreAttr

Definition at line 239 of file libsd-common.h.

◆ SdClearEffectWorkArea

#define SdClearEffectWorkArea   sceSdClearEffectWorkArea

Definition at line 240 of file libsd-common.h.

◆ SdSetAddr

#define SdSetAddr   sceSdSetAddr

Definition at line 241 of file libsd-common.h.

◆ SdGetAddr

#define SdGetAddr   sceSdGetAddr

Definition at line 242 of file libsd-common.h.

◆ SdSetSwitch

#define SdSetSwitch   sceSdSetSwitch

Definition at line 243 of file libsd-common.h.

◆ SdGetSwitch

#define SdGetSwitch   sceSdGetSwitch

Definition at line 244 of file libsd-common.h.

◆ SdNote2Pitch

#define SdNote2Pitch   sceSdNote2Pitch

Definition at line 245 of file libsd-common.h.

◆ SdPitch2Note

#define SdPitch2Note   sceSdPitch2Note

Definition at line 246 of file libsd-common.h.

◆ SdSetEffectAttr

#define SdSetEffectAttr   sceSdSetEffectAttr

Definition at line 247 of file libsd-common.h.

◆ SdGetEffectAttr

#define SdGetEffectAttr   sceSdGetEffectAttr

Definition at line 248 of file libsd-common.h.

◆ SdProcBatch

#define SdProcBatch   sceSdProcBatch

Definition at line 249 of file libsd-common.h.

◆ SdProcBatchEx

#define SdProcBatchEx   sceSdProcBatchEx

Definition at line 250 of file libsd-common.h.

◆ SdVoiceTrans

#define SdVoiceTrans   sceSdVoiceTrans

Definition at line 251 of file libsd-common.h.

◆ SdBlockTrans

#define SdBlockTrans   sceSdBlockTrans

Definition at line 252 of file libsd-common.h.

◆ SdVoiceTransStatus

#define SdVoiceTransStatus   sceSdVoiceTransStatus

Definition at line 253 of file libsd-common.h.

◆ SdBlockTransStatus

#define SdBlockTransStatus   sceSdBlockTransStatus

Definition at line 254 of file libsd-common.h.

◆ SdSetTransIntrHandler

#define SdSetTransIntrHandler   sceSdSetTransIntrHandler

Definition at line 255 of file libsd-common.h.

◆ SdSetSpu2IntrHandler

#define SdSetSpu2IntrHandler   sceSdSetSpu2IntrHandler

Definition at line 256 of file libsd-common.h.

◆ SdGetTransIntrHandlerArgument

#define SdGetTransIntrHandlerArgument   sceSdGetTransIntrHandlerArgument

Definition at line 257 of file libsd-common.h.

◆ SdGetSpu2IntrHandlerArgument

#define SdGetSpu2IntrHandlerArgument   sceSdGetSpu2IntrHandlerArgument

Definition at line 258 of file libsd-common.h.

◆ SdStopTrans

#define SdStopTrans   sceSdStopTrans

Definition at line 259 of file libsd-common.h.

◆ SdCleanEffectWorkArea

#define SdCleanEffectWorkArea   sceSdCleanEffectWorkArea

Definition at line 260 of file libsd-common.h.

◆ SdSetEffectMode

#define SdSetEffectMode   sceSdSetEffectMode

Definition at line 261 of file libsd-common.h.

◆ SdSetEffectModeParams

#define SdSetEffectModeParams   sceSdSetEffectModeParams

Definition at line 262 of file libsd-common.h.

Typedef Documentation

◆ sceSdSpu2IntrHandler

typedef int(* sceSdSpu2IntrHandler) (int, void *)

Definition at line 147 of file libsd-common.h.

◆ sceSdTransIntrHandler

typedef int(* sceSdTransIntrHandler) (int, void *)

Definition at line 148 of file libsd-common.h.

◆ SdIntrCallback

typedef int(* SdIntrCallback) (void *data)

Definition at line 149 of file libsd-common.h.

Function Documentation

◆ sceSdQuit()

int sceSdQuit ( )

Definition at line 841 of file freesd.c.

◆ sceSdInit()

int sceSdInit ( int  flag)

Definition at line 20 of file ps2snd.c.

◆ sceSdSetIRQCallback()

SdIntrCallback sceSdSetIRQCallback ( SdIntrCallback  cb)

Definition at line 923 of file freesd.c.

◆ sceSdSetTransCallback()

SdIntrCallback sceSdSetTransCallback ( s32  core,
SdIntrCallback  cb 
)

Definition at line 564 of file spu2.c.

◆ sceSdSetParam()

void sceSdSetParam ( u16  entry,
u16  value 
)

Definition at line 48 of file ps2snd.c.

◆ sceSdGetParam()

u16 sceSdGetParam ( u16  entry)

Definition at line 56 of file ps2snd.c.

◆ sceSdSetCoreAttr()

void sceSdSetCoreAttr ( u16  entry,
u16  value 
)

Definition at line 96 of file ps2snd.c.

◆ sceSdGetCoreAttr()

u16 sceSdGetCoreAttr ( u16  entry)

Definition at line 104 of file ps2snd.c.

◆ sceSdClearEffectWorkArea()

int sceSdClearEffectWorkArea ( int  core,
int  channel,
int  effect_mode 
)

Definition at line 218 of file ps2snd.c.

◆ sceSdSetAddr()

void sceSdSetAddr ( u16  entry,
u32  value 
)

Definition at line 80 of file ps2snd.c.

◆ sceSdGetAddr()

u32 sceSdGetAddr ( u16  entry)

Definition at line 88 of file ps2snd.c.

◆ sceSdSetSwitch()

void sceSdSetSwitch ( u16  entry,
u32  value 
)

Definition at line 64 of file ps2snd.c.

◆ sceSdGetSwitch()

u32 sceSdGetSwitch ( u16  entry)

Definition at line 72 of file ps2snd.c.

◆ sceSdNote2Pitch()

u16 sceSdNote2Pitch ( u16  center_note,
u16  center_fine,
u16  note,
s16  fine 
)

Definition at line 112 of file ps2snd.c.

◆ sceSdPitch2Note()

u16 sceSdPitch2Note ( u16  center_note,
u16  center_fine,
u16  pitch 
)

Definition at line 123 of file ps2snd.c.

◆ sceSdSetEffectAttr()

int sceSdSetEffectAttr ( int  core,
sceSdEffectAttr attr 
)

Definition at line 201 of file ps2snd.c.

◆ sceSdGetEffectAttr()

void sceSdGetEffectAttr ( int  core,
sceSdEffectAttr attr 
)

Definition at line 210 of file ps2snd.c.

◆ sceSdProcBatch()

int sceSdProcBatch ( sceSdBatch batch,
u32 *  rets,
u32  num 
)

Definition at line 43 of file batch.c.

◆ sceSdProcBatchEx()

int sceSdProcBatchEx ( sceSdBatch batch,
u32 *  rets,
u32  num,
u32  voice 
)

Definition at line 98 of file batch.c.

◆ sceSdVoiceTrans()

int sceSdVoiceTrans ( s16  chan,
u16  mode,
u8 *  iopaddr,
u32 *  spuaddr,
u32  size 
)

Definition at line 155 of file ps2snd.c.

◆ sceSdBlockTrans()

int sceSdBlockTrans ( s16  chan,
u16  mode,
u8 *  iopaddr,
u32  size,
  ... 
)

Definition at line 168 of file ps2snd.c.

◆ sceSdVoiceTransStatus()

u32 sceSdVoiceTransStatus ( s16  channel,
s16  flag 
)

Definition at line 178 of file ps2snd.c.

◆ sceSdBlockTransStatus()

u32 sceSdBlockTransStatus ( s16  channel,
s16  flag 
)

Definition at line 188 of file ps2snd.c.

◆ sceSdSetTransIntrHandler()

sceSdTransIntrHandler sceSdSetTransIntrHandler ( int  channel,
sceSdTransIntrHandler  func,
void *  arg 
)

Definition at line 828 of file freesd.c.

◆ sceSdSetSpu2IntrHandler()

sceSdSpu2IntrHandler sceSdSetSpu2IntrHandler ( sceSdSpu2IntrHandler  func,
void *  arg 
)

Definition at line 337 of file freesd.c.