This trap communicates with the 8049 IPC chip on a QL. This Trap activates sound via SMSQ/E.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $11 | D0.L | Corrupted? |
D1.L | Unused. | D1.B | Return parameter. |
D5.L | Unused. | D5.L | Corrupted. |
D7.L | Unused. | D7.L | Corrupted. |
A3.L | Pointer to command string. | A3.L | Preserved. |
No errors are returned by this trap.
Length | Item |
---|---|
Byte | Command |
Byte | Number of parameters |
Long | Codes for each parameter |
Byte | 1st parameter |
Byte | 2nd parameter |
.. | .. |
Byte | Code for the reply |
The codes are each two bits long and indicate whether 0, 4 or 8 bits of each parameter are to be transferred. The value of the codes is:
Value | Meaning |
---|---|
%00 | 4 bits (least significant) |
%01 | 0 bits |
%10 | 8 bits |
%11 | 0 bits |
The codes for the parameters to be sent to the IPC are in a long word, which allows up to 16 parameters. The code for the first word is in the least significant two bits of the long word (bits 1 and 0), the code for the next parameter is in the next two bits (bits 3 and 2) and so on.
The code for the returned parameter is in the least significant two bits of the byte containing it.
Command | $09 |
Number of parameters | 1 |
Long word of codes | $00000000 |
Parameter | Keyboard row |
Reply code | $02 |
Command | $0A |
Number of parameters | 8 |
Long word of codes | $0000AAAA |
Parameter 1 | Pitch 1 |
Parameter 2 | Pitch 2 |
Parameters 3 & 4 | Interval between steps |
Parameters 5 & 6 | Duration |
Parameter 7 MSN | Step in pitch |
Parameter 7 LSN | Wrap |
Parameter 8 MSN | Randomness |
Parameter 8 LSN | Fuzziness |
Reply code | $01 |
Here MSN means Most significant Nibble and LSN means Least Significant Nibble.
Command | $0B |
Number of parameters | 0 |
Long word of codes | $00000000 |
Reply code | $01 |