This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_1:hdop [2010/11/07 17:25] (current)
george.gwilt created
Line 1: Line 1:
 +====== MT_IPCOM/SMS_HDOP ======
 +This trap communicates with the 8049 IPC chip on a QL. This Trap activates sound via SMSQ/E.
 +^Call Parameters^^Return Parameters^^
 +|D1.L|Unused.|D1.B|Return parameter.|
 +|A3.L|Pointer to command string.|A3.L|Preserved.|
 +===== Errors =====
 +No errors are returned by this trap.
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * The command string to which A3.L points is shown in more detail below. It consists of a command followed by the number of parameters, codes for the parameters, the parameters themselves and a code for the returned parameter.
 +  * There are only three commands useful for an application programmer. These are to start or stop sound and to read the keyboard.
 +===== Command String =====
 +|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:
 +|%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.
 +===== Commands =====
 +==  Read the Keyboard ==
 +|Number of parameters|1|
 +|Long word of codes|$00000000|
 +|Parameter|Keyboard row|
 +|Reply code|$02|
 +== Initiate Sound ==
 +|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.
 +== Kill sound ==
 +|Number of parameters|0|
 +|Long word of codes|$00000000|
 +|Reply code|$01|
  • qdosmsq/traps/trap_1/hdop.txt
  • Last modified: 2010/11/07 17:25
  • by george.gwilt