CSND Shared Memory: Difference between revisions
No edit summary |
No edit summary |
||
Line 202: | Line 202: | ||
| 0xC | | 0xC | ||
| 1 | | 1 | ||
| | | Duty value (3 bits), see below | ||
|- | |- | ||
| 0x10 | | 0x10 | ||
Line 209: | Line 209: | ||
|} | |} | ||
This | This command updates bit0 through (at least) bit2 of the channel's CNT register. These bits control the duty of a PSG square wave: | ||
0 12.5% "_______-_______-_______-" | |||
1 25.0% "______--______--______--" | |||
2 37.5% "_____---_____---_____---" | |||
3 50.0% "____----____----____----" | |||
4 62.5% "___-----___-----___-----" | |||
5 75.0% "__------__------__------" | |||
6 87.5% "_-------_-------_-------" | |||
7 0.0% "________________________" | |||
==Command 0x8== | ==Command 0x8== | ||
Line 407: | Line 416: | ||
| Sample rate clamped to the following range(by the user process): 0x42-0xFFFF. This is the same value used with Cmd 0x8, except clamped. | | Sample rate clamped to the following range(by the user process): 0x42-0xFFFF. This is the same value used with Cmd 0x8, except clamped. | ||
|} | |} | ||
Bits 0 through 5 are written as zero to the CNT register. | |||
PSG: Channels 8 through 13 play a square tone that is 16 samples long. Channels 14 and 15 play noise. It is currently unknown how to set the duty of the square tones. | PSG: Channels 8 through 13 play a square tone that is 16 samples long. Channels 14 and 15 play noise. It is currently unknown how to set the duty of the square tones. |