Changes

38 bytes added ,  03:01, 27 August 2013
m
no edit summary
Line 34: Line 34:     
=Type0 Commands=
 
=Type0 Commands=
=Command 0x0=
+
==Command 0x0==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 56: Line 56:  
User processes use this command prior to cmd3 for initializing looping.
 
User processes use this command prior to cmd3 for initializing looping.
   −
=Command 0x1=
+
==Command 0x1==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 78: Line 78:  
This command starts playing the audio channel with value=1. Once the audio channel is playing, value=0 pauses the audio channel playback, and value=1 resumes the audio channel playback. Value=1 has no affect when the audio channel is already playing, likewise for value=0 when the audio channel is not playing.
 
This command starts playing the audio channel with value=1. Once the audio channel is playing, value=0 pauses the audio channel playback, and value=1 resumes the audio channel playback. Value=1 has no affect when the audio channel is already playing, likewise for value=0 when the audio channel is not playing.
   −
=Command 0x2=
+
==Command 0x2==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 100: Line 100:  
This sets the encoding field in the [[CSND]] channel CNT register(that field is cleared to zero first), command 0xE also sets this field.
 
This sets the encoding field in the [[CSND]] channel CNT register(that field is cleared to zero first), command 0xE also sets this field.
   −
=Command 0x3=
+
==Command 0x3==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 122: Line 122:  
This initializes state for looping, when looping is used. This command is used immediately after command 0x8. CSND module writes these fields to the channel [[CSND|register]] for the second physical-address, and the channel register for the byte-size.
 
This initializes state for looping, when looping is used. This command is used immediately after command 0x8. CSND module writes these fields to the channel [[CSND|register]] for the second physical-address, and the channel register for the byte-size.
   −
=Command 0x4=
+
==Command 0x4==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 145: Line 145:       −
=Command 0x5=
+
==Command 0x5==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 167: Line 167:  
When value=0, CSND module will clear bit7 in the channel CNT register. Otherwise, CSND module sets bit7 in the channel CNT register.
 
When value=0, CSND module will clear bit7 in the channel CNT register. Otherwise, CSND module sets bit7 in the channel CNT register.
   −
=Command 0x6=
+
==Command 0x6==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 189: Line 189:  
This is the same as cmd5, except this updates channel CNT bit6 instead. CSND module will only update CNT here if bit15=0 in CNT.
 
This is the same as cmd5, except this updates channel CNT bit6 instead. CSND module will only update CNT here if bit15=0 in CNT.
   −
=Command 0x7=
+
==Command 0x7==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 211: Line 211:  
This is similar to cmd2, except this updates channel CNT bit1-bit0.
 
This is similar to cmd2, except this updates channel CNT bit1-bit0.
   −
=Command 0x8=
+
==Command 0x8==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 229: Line 229:  
This sets the sample rate. This value is written to the channel CNT high-u16, which command 0xE also writes to. This command is used immediately after command 0xE.
 
This sets the sample rate. This value is written to the channel CNT high-u16, which command 0xE also writes to. This command is used immediately after command 0xE.
   −
=Command 0x9=
+
==Command 0x9==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 251: Line 251:  
This command must be used after command 0x8(user processes use cmd8 a second time before using this command). The parameter values seem to have no affect when not using IMA-ADPCM encoding?
 
This command must be used after command 0x8(user processes use cmd8 a second time before using this command). The parameter values seem to have no affect when not using IMA-ADPCM encoding?
   −
=Command 0xA=
+
==Command 0xA==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 277: Line 277:  
Like command 0xE, this writes the specified parameters to the [[CSND]] channel slot registers for the main audio-data physical address, and the register for the data byte-size.
 
Like command 0xE, this writes the specified parameters to the [[CSND]] channel slot registers for the main audio-data physical address, and the register for the data byte-size.
   −
=Command 0xB=
+
==Command 0xB==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 303: Line 303:  
This command is used for initializing IMA-ADPCM state(when IMA-ADPCM encoding is used), prior to using command 0xE. [[CSND]] <nowiki>channelslotregister+0x18 = (u16)cmdword[3] | ((cmdword[4] & 0xFF)<<16)</nowiki>. [[CSND]] channelslotregister+0x1C = 0.
 
This command is used for initializing IMA-ADPCM state(when IMA-ADPCM encoding is used), prior to using command 0xE. [[CSND]] <nowiki>channelslotregister+0x18 = (u16)cmdword[3] | ((cmdword[4] & 0xFF)<<16)</nowiki>. [[CSND]] channelslotregister+0x1C = 0.
   −
=Command 0xC=
+
==Command 0xC==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 329: Line 329:  
This is used for initializing looping state for IMA-ADPCM encoding. <nowiki>channelslotregister+0x18 = (1<<31) | (u16)cmdword[3] | ((cmdword[4] & 0xFF)<<16)</nowiki>.
 
This is used for initializing looping state for IMA-ADPCM encoding. <nowiki>channelslotregister+0x18 = (1<<31) | (u16)cmdword[3] | ((cmdword[4] & 0xFF)<<16)</nowiki>.
   −
=Command 0xD=
+
==Command 0xD==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 343: Line 343:  
This command is invalid, using this command would result in CSND module immediately continuing to process the command(s) following this one(if any).
 
This command is invalid, using this command would result in CSND module immediately continuing to process the command(s) following this one(if any).
   −
=Command 0xE=
+
==Command 0xE==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 381: Line 381:  
This initializes the [[CSND]] channel registers located at: 0x1EC03400 + (channel_index*0x20). Whether mono/stereo audio is used is determined via an unknown flag. When looping is used, audio playback initially begins with playing from the first physical address(using the byte-size from the channel register when audio playback was triggered). Once looping begins after the initial audio playback finishes, the second physical address is used for the beginning of the audio data instead(using the same byte-size used with the initial audio playback).
 
This initializes the [[CSND]] channel registers located at: 0x1EC03400 + (channel_index*0x20). Whether mono/stereo audio is used is determined via an unknown flag. When looping is used, audio playback initially begins with playing from the first physical address(using the byte-size from the channel register when audio playback was triggered). Once looping begins after the initial audio playback finishes, the second physical address is used for the beginning of the audio data instead(using the same byte-size used with the initial audio playback).
   −
==Parameter word 0x8==
+
===Parameter word 0x8===
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 406: Line 406:  
|}
 
|}
   −
==Parameter word 0xC==
+
===Parameter word 0xC===
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 419: Line 419:  
|}
 
|}
   −
==Parameter word 0x10==
+
===Parameter word 0x10===
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 432: Line 432:  
|}
 
|}
   −
=Command 0x300=
+
==Command 0x300==
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-