UPGRADE: Pokey Stereo Sound

From: Craig Lisowski (aa853@cleveland.Freenet.Edu)
Date: 01/05/94-03:12:30 AM Z


From: aa853@cleveland.Freenet.Edu (Craig Lisowski)
Subject: UPGRADE: Pokey Stereo Sound
Date: Wed Jan  5 03:12:30 1994



  POKEY STEREO UPGRADE by C. Steinman (GEnie User:  DataQue.1)
  Presented 12/16/1989

  Information file for adding stereo to an Atari 8-bit computer
  using two pokey chips.  Note:  Installation of this modification will
  void any warrenty you may have on your computer.  Chuck Steinman,
  DataQue Software, or GEnie telecommunication service cannot be
  held responsible for the installation of this upgrade or any incidental
  or concequential damage to any equipment or persons using this
  upgrade or any variation of it.  In other words.... you are on your own.

  This is upgrade version #1.  It will only provide stereo output for
  software written specifically for this upgrade.  It will not produce
  stereo output for existing software.  Also, the keyclick will NOT
  be fed into the stereo outputs, as it does not originate from POKEY.

  A) Parts Needed:

   1) Second Atari POKEY Audio Chip
      a) BEST                    CO12294         $5.00
      b) B&C ComputerVisions     C2294           $3.50
   2) 74LS14/74HCT14 Inverter
      a) BEST       (74LS14)     CO16541         $0.30
      b) Jameco     (74HCT14)    74HCT14         $0.29
   3) 1000 Ohm, 1/4 Watt Metal Film 2-5% Tolerance
      a) Jameco     (10 lot)     R1.0K           $0.50 for 10
      b) Radio Shack (2 lot)     Dont know P# or $
   4) Two RCA style phono jacks
      a) Radio Shack, Jameco or other electronics outlet
      b)
   5) Two 0.01 (or close) 16V (or more) bypass capacitors.
      Jameco                     DC.01           $0.10 each
   6) Two short (6-12" each) sections of shielded audio cable.
   7) A standard dual RCA to RCA patch cable.
   8) Optionally two 50k single turn trimmer pots.
      Jameco                     63P50K          $0.89 each

  B) Hardware

   1) Inverter Information

    a) Bend up all pins of the inverter except for pins 7 and 14.
    b) Cut off the narrow part of the pins which were bent up.
    c) Install the inverter over top of the existing 74LS14
       (or another 74LS part if more convenient) on the motherboard.
       Make sure that the new chip has its locator notch/dot on the
       same end as the chip below it.
    d) Solder pins 7 and 14 of the inverter to the same pins of the
       lower IC.
    e) Run a small wire (wire wrap type works best) from pin-1 of the
       inverter to pin-13 of the CPU.  The CPU is part number CO14806
       on the XL/XE series.
    f) On the old POKEY there is a 3k pullup resistor connected between
       pin-31 and Vcc.  You will need to unsolder this resistor and
       remove it.
    g) Run a small wire from pin-2 of the inverter to pin-3 of the
       inverter, and then on to POKEY pin-31.  Note, you can use the
       pad where the resistor was just removed.  Be sure to get the
       correct one.

   2) POKEY Information

    a) Bend up all pins on the new POKEY which are marked with a
       minus on the diagram.  This includes POKEY pins:  8,9,10,
       11,12,13,14,15,16,18,19,20,21,22,23,24,25,26,27,28, and 29.
    b) Cut off the narrow part of each pin bent up.
    c) Tin each  lead which was NOT bent up.  This includes pins
       1,2,3,4,5,6,7,17,30,31,32,33,34,35,36,37,38,39 and 40.
       These pins are marked in the diagram as *,>>, or <<.
    d) Now, bend up the pins indicated by the >> and << symbols.
       Do NOT cut these pins short.
    e) Place the new POKEY on top of the old POKEY in a piggy-back style.
    f) Solder the unbent pins of the new POKEY to the old POKEY.
       If your original POKEY was in a socket, then it is easier
       to connect the two if it is removed.  Make sure no excess
       solder flows down the pins to the narrow part of the OLD POKEY.
       Reinsert both POKEYs into the original socket.
    g) Solder the 1k resistor from pin 37 to Vcc.  The most convenient
       location to pick up Vcc is where the 3k resistor was removed
       earlier.
    h) Solder a wire from pin-31 of the new POKEY to pin-4 of the
       inverter.
    i) Mount the two RCA jacks on the rear of the case, preferably
       in an area close to the POKEYs.
    j) Solder a bypass capacitor to each of the center conductors
       of the RCA jacks.
 *  k) With the trim-pot knob facing you, pin 1 should be to the
       left side.  Solder a wire from this pin on each trimmer, to a
       ground trace on the motherboard.
 *  l) Connect the free end of the bypass capacitor to the center
       pin of the trimmer (one capacitor to each trimmer).
 *  m) Connect the shields of the audio cables to the provided solder
       lugs on each RCA connector, and the center conductor of the free
       terminal of each trimmer.
    n) Connect the center conductor of the free end of the audio cable
       which is connected to the left RCA jack/trimmer/cap to pin-37 of
       the OLD POKEY.
    p) Connect the center conductor of the free end of the audio cable
       which is connected to the right RCA jack/trimmer/cap to pin-37 of
       the NEW POKEY.
    q) The shield of the audio cable on the POKEY end, should be cut and
       taped (or heat shrinked) so that it does not touch anything.
    r) Run a 18-20 AWG wire from the ground lug of the RCA jacks
       to the wide ground area on the motherboard.  This normally
       makes contact with the shield box that covers the motherboard.
    s) You will now be able to connect the two RCA cables to an
       AUX (or Tape) level input of a stereo or boom box.
 *  t) I would suggest centering the trimmers in their travel, and
       adjusting them as needed to get the best clarity.  You may
       want to glue the trimmers to the back of the cabinet to keep
       them from moving around.

 * NOTE: On my system the POKEY outputs worked fine without the trimmers.
         So I just connected the bypass capacitor on each RCA jack to
         the apropriate audio cable center conductor.  This was driving
         an AUX 350mV input of a Pioneer SPEC-1 preamplifier.

                   POKEY Pinout
                    ____  ____
                   |    \/    |
              Vss *| 01    40 |* D2
               D3 *| 02    39 |* D1
               D4 *| 03    38 |* D0
               D5 *| 04    37 |>> Audio Out
               D6 *| 05    36 |* A0
               D7 *| 06    35 |* A1
               02 *| 07    34 |* A2
            Pot-6 -| 08    33 |* A3
            Pot-7 -| 09    32 |* R/W
           Pot-4 <<| 10    31 |<< CS1
            Pot-5 -| 11    30 |* /CS0
            Pot-2 -| 12    29 |- /IRQ
            Pot-3 -| 13    28 |- Serial Data Out
            Pot-0 -| 14    27 |- A Clock
            Pot-1 -| 15    26 |- B Clock
     Key Strobe 2 -| 16    25 |- Key Strobe 1
              Vcc *| 17    24 |- Serial Data In
       Keyboard-5 -| 18    23 |- Keyboard-0
       Keyboard-4 -| 19    22 |- Keyboard-1
       Keyboard-3 -| 20    21 |- Keyboard-2
                   |__________|

  C) POKEY Registers:

      I will only elaborate on registers used to produce sound
      in the stereo upgrade.  All registers which were in the
      original POKEY will appear in the second POKEY 16 bytes
      higher in memory.  The extra UART, key scanner, and pot scanner
      could be used for all kinds of neat projects.

      Location   Name   R/W  Function
      --------  ------  ---  ----------------------------------------------
       $D200    AUDF1    W   Audio Channel #1 Frequency  (Divide F/n)
       $D201    AUDC1    W   Audio Channel #1 Control    (Vol/Distort)
       $D202    AUDF2    W   Audio Channel #2 Frequency  (Divide F/n)
       $D203    AUDC2    W   Audio Channel #2 Control    (Vol/Distort)
       $D204    AUDF3    W   Audio Channel #3 Frequency  (Divide F/n)
       $D205    AUDC3    W   Audio Channel #3 Control    (Vol/Distort)
       $D206    AUDF4    W   Audio Channel #4 Frequency  (Divide F/n)
       $D207    AUDC4    W   Audio Channel #4 Control    (Vol/Distort)
       $D208    AUDCT1   W   Audio control for channels 1-4
       $D20F    SKCTL1   W   Serial Port Control
       $D210    AUDF5    W   Audio Channel #5 Frequency  (Divide F/n)
       $D211    AUDC5    W   Audio Channel #5 Control    (Vol/Distort)
       $D212    AUDF6    W   Audio Channel #6 Frequency  (Divide F/n)
       $D213    AUDC6    W   Audio Channel #6 Control    (Vol/Distort)
       $D214    AUDF7    W   Audio Channel #7 Frequency  (Divide F/n)
       $D215    AUDC7    W   Audio Channel #7 Control    (Vol/Distort)
       $D216    AUDF8    W   Audio Channel #8 Frequency  (Divide F/n)
       $D217    AUDC8    W   Audio Channel #8 Control    (Vol/Distort)
       $D218    AUDCT2   W   Audio control for channels 5-8
       $D21F    SKCTL2   W   Serial Port Control


     Each Audio Channel Frequency Register is an 8-bit value which is
     a divisor of the primary frequency.

     Each Audio Channel Control Register Controls the Volume and
     Distortion of each channel.  The bits are assigned as follows:

       76543210
       ----vvvv   Volume control bits.  Range controls volume as follows:

                  0000  lowest volume level
                   \/
                  1111  highest volume level

       ---s----   Volume only bit.  Directly controls audio output:

                     0  Speaker output is off
                     1  Speaker output is on

       ddd-----   Distortion code.  Code is assigned as follows:

                   000  5-bit/17-bit poly noise
                   001  5-bit poly noise
                   010  5-bit/4-bit poly noise
                   011  5-bit poly noise
                   100  17-bit poly noise
                   101  pure tone
                   110  4-bit poly noise
                   111  pure tone

     The AUDCTn register controls all channels.  There are several
     functions assigned to this register as follows:

        bit-7   Makes 17-bit poly into 9-bit poly counter
        bit-6   Clock Channel-1 with 1.79 MHz (CPU rate)
        bit-5   Clock Channel-3 with 1.79 MHz (CPU rate)
        Bit-4   Join channel 1 and 2 to form 16-bit range
        Bit-3   Join channel 3 and 4 to form 16-bit range
        Bit-2   Insert filter in channel-1, clocked by channel-2
        Bit-1   Insert filter in channel-2, clocked by channel-4
        Bit-0   Switch clock base from 64kHz to 15kHz

     The SKCTLn register controls various functions of the POKEY
     device, and only has to be initialized to a value of three
     to assure all four channels of POKEY are active.

     Note:  To detect if the upgrade is installed, look at the
            8 extra pots, they will be all zero.  Also the key
            code register will be also zero.  If you compare
            the keycode at $D209 with that of $D219, and $D219
            is zero, the upgrade is installed.  You may want
            to mask IRQ's during the test for safety.

      Let me know what wild things you all come up with for this
      upgrade... and in a few days I will try to have the version
      2 upgrade, if it is possible.

      thanks,
        Chuck


-----------------------------------------
Return to message index