CSND Shared Memory: Difference between revisions
No edit summary |
No edit summary |
||
Line 113: | Line 113: | ||
| 0xC | | 0xC | ||
| 4 | | 4 | ||
| Physical address of the | | Physical address of the second block of audio data | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| 4 | | 4 | ||
| Total byte-size of the | | Total byte-size of the block | ||
|} | |} | ||
This | 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 | ||
| | | Physical address of the second block of audio data | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
| 0x4 | | 0x4 | ||
| | | Total byte-size of the block | ||
|- | |- | ||
| 0x14 | | 0x14 | ||
Line 279: | Line 279: | ||
|} | |} | ||
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 | | Physical address for the first block of audio data. | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
| 4 | | 4 | ||
| Physical address for the | | Physical address for the second block of audio data. | ||
|- | |- | ||
| 0x1C | | 0x1C | ||
| 4 | | 4 | ||
| Total byte-size for the audio data | | Total byte-size for the audio data to play. | ||
|} | |} | ||
This initializes the [[CSND]] channel registers located at: 0x1EC03400 + (channel_index*0x20). It is unknown | 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 = | | 0 = disable playback, 1 = enable playback | ||
|- | |- | ||
| 15 | | 15 |