|
|
|
@ -1331,6 +1331,9 @@ chip provides. |
|
|
|
| C: Audio Device Unit ID |
|
|
|
| HL: Pitch (0000=lowest note, FFFF=highest note) |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
|
|
|
|
This function sets the sound chip pitch parameter. The pitch will |
|
|
|
be applied when the next SNDPLAY function is invoked. |
|
|
|
|
|
|
|
@ -1344,14 +1347,17 @@ notes, use the SNDNOTE function. |
|
|
|
| C: Audio Device Unit ID |
|
|
|
| L: Note (0 to 255 quarter notes) |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
|
|
|
|
This function sets the sound chip pitch parameter according to |
|
|
|
standardized notes. |
|
|
|
|
|
|
|
The value corresponds to standard musical notes. The value allows |
|
|
|
for selection of a quarter of a semitone by giving a value between 0 |
|
|
|
The value corresponds to standard musical notes. The value allows |
|
|
|
for selection of a quarter of a semitone by giving a value between 0 |
|
|
|
and up to the drivers maximum supported value. The lowest note is (0). |
|
|
|
|
|
|
|
For the SN76490 chip, 0 corresponds to note A1# and the value 249 is |
|
|
|
For the SN76490 chip, 0 corresponds to note A1# and the value 249 is |
|
|
|
the maximum supported value, and it corresponds to note C7. |
|
|
|
|
|
|
|
### Function 0x54 -- Sound Play (SNDPLAY) |
|
|
|
@ -1359,7 +1365,10 @@ the maximum supported value, and it corresponds to note C7. |
|
|
|
| _Entry Parameters_ |
|
|
|
| B: 0x54 |
|
|
|
| C: Audio Device Unit ID |
|
|
|
| D: Channel |
|
|
|
| E: Channel |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
|
|
|
|
This function applies the previously specified volume and pitch by |
|
|
|
programming the sound chip with the appropriate values. The values |
|
|
|
@ -1374,6 +1383,81 @@ HBIOS B=53 C=00 L=69 ; Select Middle C (C4) assuming SN76489 |
|
|
|
HBIOS B=54 C=00 D=01 ; Play note on Channel 1 |
|
|
|
``` |
|
|
|
|
|
|
|
### Function 0x55 -- Sound Play (SNDQUERY) |
|
|
|
|
|
|
|
| _Entry Parameters_ |
|
|
|
| B: 0x54 |
|
|
|
| C: Audio Device Unit ID |
|
|
|
| E: Subfunction |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
|
|
|
|
This function will return the status of current pending command or |
|
|
|
key aspects of the specific Audio Device. |
|
|
|
|
|
|
|
#### SNDQUERY Subfunction 0x01 -- Get count of audio channels supported (SNDQ_CHCNT) |
|
|
|
|
|
|
|
| _Entry Parameters_ |
|
|
|
| B: 0x54 |
|
|
|
| E: 0x01 |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
| B: Count of standard tone channels |
|
|
|
| C: Count of noise tone channels |
|
|
|
|
|
|
|
#### SNDQUERY Subfunction 0x01 -- Get current volume setting (SNDQ_VOL) |
|
|
|
|
|
|
|
| _Entry Parameters_ |
|
|
|
| B: 0x54 |
|
|
|
| E: 0x02 |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
| H: 0 |
|
|
|
| L: Current volume setting |
|
|
|
|
|
|
|
#### SNDQUERY Subfunction 0x03 -- Get current pitch setting (SNDQ_PITCH) |
|
|
|
|
|
|
|
| _Entry Parameters_ |
|
|
|
| B: 0x54 |
|
|
|
| E: 0x03 |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
| HL: Current pitch setting |
|
|
|
|
|
|
|
#### SNDQUERY Subfunction 0x04 -- Get device details (SNDQ_DEV) |
|
|
|
|
|
|
|
| _Entry Parameters_ |
|
|
|
| B: 0x54 |
|
|
|
| E: 0x04 |
|
|
|
|
|
|
|
| _Returned Values_ |
|
|
|
| A: Status (0=OK, else error) |
|
|
|
| B: Driver identity |
|
|
|
| HL: Driver specific port settings |
|
|
|
| DE: Driver specific port settings |
|
|
|
|
|
|
|
Reports information about the audio device unit specified. |
|
|
|
|
|
|
|
At this stage, only one driver type is supported (SN76489), but is |
|
|
|
envisage that more will be added in the future. |
|
|
|
|
|
|
|
Register B reports the audio device type (see below). |
|
|
|
|
|
|
|
Registers HL and DE contain relevant port address for the hardware |
|
|
|
as such are specific to each device type. |
|
|
|
|
|
|
|
The currently defined audio device types are: |
|
|
|
|
|
|
|
AUDIO ID | Value | Device | Returned registers |
|
|
|
-------------- | ----- | ---------- | -------------------------------------------- |
|
|
|
SND_SN76489 | 0x01 | SN76489 | E: Left channel port, L: Right channel port |
|
|
|
SND_SNAY38910 | 0x02 | AY-3-8910 | D: Address port, E: Data port |
|
|
|
|
|
|
|
|
|
|
|
`\clearpage`{=latex} |
|
|
|
|
|
|
|
System (SYS) |
|
|
|
|