Program: SNDTEST3.BIN
Programmer: Clay Cowgill
Date: March 16th, 1997
Purpose: Test and help troubleshoot Bally/Midway SSIO boards

General Instructions:
---------------------
Remove the program ROM at location "A7" on the SSIO board.  Place the SNDTEST
ROM in the "A7" socket.  (Note: SSIO boards may be jumpered for use with 2732
or 2532 type EPROMs.  Your SNDTEST ROM type should match the rest of the ROMs
on the SSIO board you're going to test.)

Once the SNDTEST ROM is installed, locate dip-switch block SW3 near the edge
of the PCB and verify that all the switches are in the "OFF" position.

Apply power to the board.  The SSIO can remain connected to the rest of boards
in the system (CPU, Video Generator, etc.).  (The CPU will complain that
there is a problem with the sound board, don't worry about it.)  The LED at
location LED3 should be OFF.  

Once power is applied there are six tests that can be performed by the SNDTEST
ROM simply by pushing one of the first six switches on SW3.  (Switches 7 and 8
are not used.)

Note:  You'll definately want the schematics handy when you're working on
one of these boards to get full use out of the SNDTEST ROM!

Running the tests...
--------------------
When you want to run a test, set SW3 to all "OFF" and hit the reset switch.
LED3 will be dark and you can run a test by closing the appropriate switch.
When you're done with a test, return SW3 to all "OFF" and hit reset.  Then
choose another test with SW3.

Switch 1--  Test 8910 at F7
 Closing switch one will program the 8910 at location F7 to output three
 maximum volume square waves.  The outputs appear at Pins 3,4, and 38.  Each
 of the square waves output will have a different duty cycle so you should be
 able to see/hear the difference between them as you trace through the circuit.
 (Note:  I do all this testing with a scope, so I'm not real sure what it'll
 sound like with the amp connected.  I picked values to make the waves look
 ok on a scope, they might sound pretty nasty.  Let me know if it's annoying.)

 When the commands have all been sent to the sound chip, LED3 will light.

Switch 2--  Test 8910 at F6
 Same as above test, except for the sound chip as F6.

Switch 3--  Test LED3
 This test simply lights LED3 to make sure it's working.  It'll probably get
 replaced by another test when needed.  If LED3 does not light, there's either a 
problem with the latch driving the LED, or some other CPU error (bad Z80 at 
A12, bad buffers on the Z80 address/data lines, shorted lines etc.)

Switch 4--  Test 8910 I/O Ports
 Closing switch 4 starts an I/O port output test on both sound chips.  Pins 6
 through 21 will produce square waves, each twice the frequency of the
 previous, starting with pin 21 (IOA0) and pin 13 (IOB0).  (So on a scope,
 starting at pin 13 and working up to pin 6 you should series of square waves
 each twice the frequency of the previous.)

 If you encounter any "dead" lines during this test, try another 8910 chip.  If
 that doesn't help, look for shorted traces or bad IC's hanging off the line.

 LED3 will light when the test is running.

Switch 5--  Test RAM at A6
 Closing switch 5 runs a fairly thorough RAM test on the RAM chip at A6.  The
 test does pattern tests, walking bit tests, and full on/off tests and should
 find most bad RAMs.  The test only takes a fraction of a second to run (it's
 only 2K!) and LED3 will light IF THE RAM IS GOOD.  If LED3 doesn't come on
 immediately, return SW3 to all off, hit reset and close switch 5 again.  Watch
 LED3 very closely (or probe it with a scope) and you'll see a brief flash as
 the test runs.  Replace the RAM and try again.

Switch 6-- Test chip selects
 This test goes out and hits every location that the SSIO Z-80 uses in it's
 memory decoder arrangement.  (74ls138's at B12 and B13)  Using a scope or
 logic probe you can verify and trace chip selects for the following segments:

 SSIO Memory Map
  0xF000 SW3 switches (d0-d5 only)  B13 pin 7
  0xE000 Clear Processor Interrupt (CLPINT*)  B13 pin 9
  0xD000 LED Latch (d0-d5, d0 is LED 3) (TLED*)  B13 pin 10
  0xC000 Write Status Latch (WSTAT*)  B13 pin 11
  0xB000 8910 at F6  B13 pin 12
  0xA000 8910 at F7  B13 pin 13
  0x9000 Read Interface RAM (RIRAM*)  B13 pin 14
  0x8000 Program RAM select (PRAM*)  B13 pin 15

  0x3000-0x3fff  ROM3*  B12 pin 12
  0x2000-0x2fff  ROM2*  B12 pin 13
  0x1000-0x1fff  ROM1*  B12 pin 14
  0x0000-0x0fff  ROM0*  B12 pin 15

 Note that there's a large undecoded segment on B12 that has available chip
 selects for 0x4000-0x7fff.  Kinda interesting.

Conclusion:
-----------
I hope this code helps you out!  Let me know if you need a copy of the SSIO
schematics, since this ROM isn't very helpful without them.  I'm working on
an automated pan/filter test for SW3-3, but I wasn't very happy with it so
I'm leaving it out for now.  The most recent copy of the test ROM is located
at http://www.wwwpro.com/clay/MCR_test.html 

One thing to watch out for-- Pin 6 (IOB7) on F6 is used as a "MUTE" control
for the audio channels!  If you happen to have that line stuck, you won't get
any signals at all through the audio mixer.  Check it with the Sound I/O Port
Test as it goes into (and out of) the 7406 at A1 on pins 11 and 10.

Also, the square waves coming off the 8910's are pretty easy to follow around
the board until the final output filter at D3 (an LM3900).  There's a cap/diode
array that does some REALLY funky waveshaping.

Feel free to contact me if something isn't clear, or you need help!

-Clay
clay@supra.com