===========================================================================
Packet: ROMEO
Date: 08-24-93 (12:44)             Number: 1984
From: Bernie Pallek                Refer#: NONE
  To: All                           Recvd: NO
Subj: [3/3] GUS Programming          Conf: (26) 80xxx
---------------------------------------------------------------------------
<=- Gravis Ultrasound programming, part 3/3 -=>

Ports   As you can see, there are a lot of blanks to be
filled.  Hope Gravis -----   will take a hint soon.

BASE - write only, mix control

+---+---+---+---+---+---+---+---+
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 ----- 0 = Line in on.  1 =
Line in off. +-|-+-|-+-|-+-|-+-|-+-|-+-|-+---+
  |   |   |   |   |   |   +---------- 0 = Output on.   1 = Output off.
  ?   ?   ?   ?   ?   +-------------- 0 = Mic in off.  1 = Mic in on.   ???

BASE+102h - Active voice select (byte port)

BASE+103h - command port (byte port)
  Bitmap so far:    +---+---+---+------- Command for voice
                    |   |   |   |
  +---+---+---+---+-|-+-|-+-|-+-|-+
  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  +-|-+-|-+-|-+-|-+---+---+---+---+
    |   |   ?   ?
    |   +------------ Command for card.
    +---------------- Read from voice.

   0h - write voice mode (loop and data type)           - byte on 105h
  +---+---+---+---+---+---+---+---+
  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |     Designated as MODE through dox
  +-|-+-|-+-|-+-|-+-|-+-|-+-|-+-|-+
    |   |   |   |   |   |   |   +- Voice On/Off (If both set to 0, voice on.)
    ?   ?   ?   |   |   |   +----- Voice On/Off (If both set to 1, voice off.)
                |   |   +--------- 0 = 8 bit data.  1 = 16 bit data.
                |   +------------- 0 = No loop.     1 = Loop Sample.
                +----------------- 0 = Go forward.  1 = Go backward.
   1h - voice frequency                                 - word on 104h
   2h - loop start location / 80h                       - word on 104h
   3h - loop start location << 9                        - word on 104h
   4h - loop end location / 80h                         - word on 104h
   5h - loop end location << 9                          - word on 104h
   9h - voice volume                                    - word on 104h
  0ah - voice location / 80h                            - word on 104h
  0bh - voice location << 9                             - word on 104h
  0ch - voice balance                                   - byte on 105h
  0eh - Unsure.  Has something to do with turning       - byte on 105h
        stereo on and off.  See U_Reset for an example of usage.
  43h - low word of DRAM address                        - word on 104h
  44h - high byte of DRAM address                       - byte on 105h
  4Ch - Unsure exactly of what this does                - byte on 105h
        However, a 1 must be output to BASE+105h for the card to do memory
        writes.  At least, that's the only way I could get it to work.
  80h - read voice mode                                 - byte on 105h
  8ah - read voice location                             - bytes on 104h, 105h
  8bh - read voice location                             - bytes on 104h, 105h

Notes:  Any >= 80h plus a number might be the read mode of the value - 80h.
        In other words, to read the voice volume (this is untested), you'd
        output an 89h through BASE+103h and then read BASE+105h.

BASE+104h - word writes/reads  ......  BASE+105h - byte
writes/reads -----------------------------------------------
------------------------------
Extra Notes
-----------
- To stop an instrument when the sample ends (not immediately), change its
  loop type to 'no loop'.
- If you are making a lot of changes to just ONE voice, the
  OUT BASE+102h, Channel needs only to be done once.

<=- end of 3/3, "That's All, Folks!" -=>


--- Maximus 2.01wb
 * Origin: * idiot savant * +1 416 935 6628 * (1:247/128)
