Difference between revisions of "CSND Services"

From 3dbrew
Jump to navigation Jump to search
m
m (Add anchors)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Services]]
+
The CSND service talks to the DSP using the DSP FIFO to negotiate what CSND channels are allocated to the DSP, and this seems to be channels 0-7 (usually). The rest are dedicated to CSND services.
 +
 
 +
{{Anchor|CSND}}{{Anchor|csnd:SND}}
 
= CSND service "csnd:SND" =
 
= CSND service "csnd:SND" =
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 10: Line 12:
 
|-
 
|-
 
| 0x00020000
 
| 0x00020000
| Shutdown
+
| [[CSND:Shutdown|Shutdown]]
 
|-
 
|-
 
| 0x00030040
 
| 0x00030040
| This triggers processing for the command(0x20-bytes) written to [[CSND_Shared_Memory|shared-memory]], at the specified shared-mem offset(type0).
+
| [[CSND:ExecuteCommands|ExecuteCommands]]
 
|-
 
|-
 
| 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).
+
| [[CSND:PlaySoundDirectly|PlaySoundDirectly]]
 
|-
 
|-
 
| 0x00050000
 
| 0x00050000
| This returns an unknown bitmask u32 at responseword[2], this command is used for CSND initialization after command 0x00010140 is used.
+
| [[CSND:AcquireSoundChannels|AcquireSoundChannels]]
 
|-
 
|-
 
| 0x00060000
 
| 0x00060000
|  
+
| [[CSND:ReleaseSoundChannels|ReleaseSoundChannels]]
 
|-
 
|-
 
| 0x00070000
 
| 0x00070000
|  
+
| [[CSND:AcquireCapUnit|AcquireCapUnit]]
 
|-
 
|-
 
| 0x00080040
 
| 0x00080040
|  
+
| [[CSND:ReleaseCapUnit|ReleaseCapUnit]]
 
|-
 
|-
 
| 0x00090082
 
| 0x00090082
| FlushDCache
+
| [[CSND:FlushDataCache|FlushDataCache]]
 
|-
 
|-
 
| 0x000A0082
 
| 0x000A0082
| StoreDCache
+
| [[CSND:StoreDataCache|StoreDataCache]]
 
|-
 
|-
 
| 0x000B0082
 
| 0x000B0082
| InvalidateDCache
+
| [[CSND:InvalidateDataCache|InvalidateDataCache]]
 
|-
 
|-
 
| 0x000C0000
 
| 0x000C0000
|  
+
| [[CSND:Reset|Reset]]
 
|}
 
|}
  
For cache operations addresses must be in 0x14000000-0x1C000000 range. After [[8.0.0-18]] addresses in the range 0x30000000-0x40000000 are also allowed.
+
A maximum of 4 service sessions can be opened at the same time for this service.
 +
 
 +
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 [[BCWAV|CWAVs]]. The audio data must be located in the 0x14000000 virtual memory region, since CSND requires the physical address for playing the audio.
 
This service is normally used for playing [[BCWAV|CWAVs]]. The audio data must be located in the 0x14000000 virtual memory region, since CSND requires the physical address for playing the audio.
 +
 +
[[Category:Services]]

Latest revision as of 08:50, 19 September 2024

The CSND service talks to the DSP using the DSP FIFO to negotiate what CSND channels are allocated to the DSP, and this seems to be channels 0-7 (usually). The rest are dedicated to CSND services.

CSND service "csnd:SND"[edit]

Command Header Description
0x00010140 Initialize
0x00020000 Shutdown
0x00030040 ExecuteCommands
0x00040080 PlaySoundDirectly
0x00050000 AcquireSoundChannels
0x00060000 ReleaseSoundChannels
0x00070000 AcquireCapUnit
0x00080040 ReleaseCapUnit
0x00090082 FlushDataCache
0x000A0082 StoreDataCache
0x000B0082 InvalidateDataCache
0x000C0000 Reset

A maximum of 4 service sessions can be opened at the same time for this service.

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.