Line 113: |
Line 113: |
| | 0xC | | | 0xC |
| | 4 | | | 4 |
− | | Physical address of the first audio sample in the loop. | + | | Physical address of the second block of audio data |
| |- | | |- |
| | 0x10 | | | 0x10 |
| | 4 | | | 4 |
− | | Total byte-size of the loop sample-data. | + | | Total byte-size of the block |
| |} | | |} |
| | | |
− | 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 sets the address and size of the second block of an audio channel. The CSND module writes these fields to the channel [[CSND|register]] for the physical address of the second block and the register for the block size. The CSND module also sets to zero the address of the first block (working hypothesis). |
| | | |
| ==Command 0x4== | | ==Command 0x4== |
Line 268: |
Line 268: |
| | 0xC | | | 0xC |
| | 4 | | | 4 |
− | | Main physical address | + | | Physical address of the second block of audio data |
| |- | | |- |
| | 0x10 | | | 0x10 |
| | 0x4 | | | 0x4 |
− | | Audio data byte-size | + | | Total byte-size of the block |
| |- | | |- |
| | 0x14 | | | 0x14 |
Line 279: |
Line 279: |
| |} | | |} |
| | | |
− | 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.
| + | This sets the address and size of the first block of an audio channel. The CSND module writes these fields to the channel [[CSND|register]] for the physical address of the first block and the register for the block size. The CSND module also sets to zero the address of the second block (working hypothesis). |
| | | |
| ==Command 0xB== | | ==Command 0xB== |
Line 361: |
Line 361: |
| | 0x14 | | | 0x14 |
| | 4 | | | 4 |
− | | Physical address for the beginning of the audio data. | + | | Physical address for the first block of audio data. |
| |- | | |- |
| | 0x18 | | | 0x18 |
| | 4 | | | 4 |
− | | Physical address for the loop point of the sample. | + | | Physical address for the second block of audio data. |
| |- | | |- |
| | 0x1C | | | 0x1C |
| | 4 | | | 4 |
− | | Total byte-size for the audio data (one-shot), for the looped section (looped) | + | | Total byte-size for the audio data to play. |
| |} | | |} |
| | | |
− | This initializes the [[CSND]] channel registers located at: 0x1EC03400 + (channel_index*0x20). It is unknown how to use stereo samples. When looping is enabled, audio playback initially begins with playing from the first physical address (its length depends on bit14 of parameter 0x8, see below). Once the initial audio playback finishes, the looped section begins at the second physical address. The length of the loop is the byte-size specified at 0x1C. | + | This initializes the [[CSND]] channel registers located at: 0x1EC03400 + (channel_index*0x20). It is unknown if stereo samples are supported. When looping is disabled, the hardware plays the first block and then stops. When looping is enabled, the hardware plays blocks continuously, either alternating between them (first, second, first, etc) or playing the first once and then repeating the second forever (this is controlled by bit11 of word 0x8). Before playing any block, the hardware reads the corresponding address register and the byte-size register in order to know how many samples must be played and where are they located. |
| | | |
| ===Parameter word 0x8=== | | ===Parameter word 0x8=== |
Line 393: |
Line 393: |
| |- | | |- |
| | 11 | | | 11 |
− | | ? | + | | 0 = do not alternate between blocks, 1 = alternate between blocks |
| |- | | |- |
| | 13-12 | | | 13-12 |
Line 399: |
Line 399: |
| |- | | |- |
| | 14 | | | 14 |
− | | 0 = the non-looped section has the same length as the looped section, 1 = the non-looped section has length address2 - address1 | + | | 0 = disable playback, 1 = enable playback |
| |- | | |- |
| | 15 | | | 15 |