Difference between revisions of "CSND Services"

From 3dbrew
Jump to navigation Jump to search
Line 13: Line 13:
 
|-
 
|-
 
| 0x00030040
 
| 0x00030040
| This triggers processing for the command(0x20-bytes) written to [[CSND_Shared_Memory|shared-memory]], at the specified shared-mem offset(type0).
+
| ExecuteType0Commands
 
|-
 
|-
 
| 0x00040080
 
| 0x00040080
| This triggers processing for the command(0x3C-bytes) written to [[CSND_Shared_Memory|shared-memory]], at the specified shared-mem entry index(type1).
+
| ExecuteType1Commands
 
|-
 
|-
 
| 0x00050000
 
| 0x00050000
| This returns an unknown bitmask u32 at responseword[2], this command is used for CSND initialization after command 0x00010140 is used.
+
| AcquireSoundChannels. This function tries to acquire sound channels. Response cmdbuf[2] holds a bitmask to which channels were allocated to this process.
 
|-
 
|-
 
| 0x00060000
 
| 0x00060000
|  
+
| GetAcquiredSoundChannels. This function returns a bitmask in cmdbuf[1] describing which channels are currently allocated to this process.
 
|-
 
|-
 
| 0x00070000
 
| 0x00070000

Revision as of 20:40, 1 January 2015

CSND service "csnd:SND"

Command Header Description
0x00010140 Initialize
0x00020000 Shutdown
0x00030040 ExecuteType0Commands
0x00040080 ExecuteType1Commands
0x00050000 AcquireSoundChannels. This function tries to acquire sound channels. Response cmdbuf[2] holds a bitmask to which channels were allocated to this process.
0x00060000 GetAcquiredSoundChannels. This function returns a bitmask in cmdbuf[1] describing which channels are currently allocated to this process.
0x00070000
0x00080040
0x00090082 FlushDCache
0x000A0082 StoreDCache
0x000B0082 InvalidateDCache
0x000C0000

For cache operations addresses must be in 0x14000000-0x1C000000 range. Starting with 8.0.0-18 addresses in the range 0x30000000-0x40000000 are also allowed.

This service is normally used for playing CWAVs. The audio data must be located in the 0x14000000 virtual memory region, since CSND requires the physical address for playing the audio.