The POKEY test is in the Asteroids_Deluxe.s script...
John :-#)#
At 11:11 AM 03/03/2002 -0500, Kev wrote:
Okay, I've finally learned enough to sketch out a program outline. The hope is that fellow Flukers out here can develope programs or just modules that will be easily inserted into this outline, example a POKEY test routine.
Any & all comments/suggestions welcomed.
Kev
! BARE BONES ARCADE BOARD TESTER
! by Mowerman@erols.com
!
! This is not a running program but an outline that can be used
! to quickly create a running program for testing arcade boards.
! I have created a running program from this outline and compiled
! it using the RKSIC.exe program for the FLUKE 9010A.
!
!
! PROGRAM HOUSEKEEPING VARIABLES
!
! *GAMENAME....replace with current game name.
! *PROGRAMMER..replace with current author name.
! *DATE........replace with original program date.
! *MODDATE.....replace with revision date.
! *REVISION....replace with revision number.
! *POD.........replace with test pod required.
!
! BOARD SPECIFIC VARIABLES
!
! *RAMSTART1...replace with first RAM location.
! *RAMLENGTH1..replace with size of first RAM chip location.
! *ROMSTART1...replace with first ROM location.
! *ROMEND1.....replace with last location of first ROM.
! *ROMSIG1.....replace with Fluke Signature of first ROM.
! *IO1.........replace with first I/O byte location.
! *DIP1........replace with first Dip Switch byte location.
! *GAMENAME Test Routine
! Use *POD in CPU processor socket
! Program created by *PROGRAMMER
! Program written on *DATE
! Revision Date *MODDATE
! Revision number *REVISION
SETUP
TRAP ACTIVE FORCE LINE NO
TRAP ACTIVE INTERRUPT NO
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! MAIN LOOP ROUTINE
! Proposed standard
! 1 = RAM Test
! 2 = ROM Test
! 3 = SND Test
! 4 = I/O Test
! 5 = DIP Test
! 6 = PROBE Test
! 0 = Run UUT
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM 0
DPY-*GAMENAME TST
DPY-+-PRESS CONT
STOP
MAINLOOP:
DPY-MNU 1=RAM 2=ROM 3=SND 4=IO 5=DIP
IF REG1 = 1 GOTO 1
IF REG1 = 2 GOTO 2
IF REG1 = 3 GOTO 3
IF REG1 = 4 GOTO 4
IF REG1 = 5 GOTO 5
IF REG1 = 6 GOTO 6
IF REG1 = 0 GOTO A
GOTO MAINLOOP
1: LABEL 1
EXECUTE PROGRAM TSTRAM
GOTO MAINLOOP
2: LABEL 2
EXECUTE PROGRAM TSTROM
GOTO MAINLOOP
3: LABEL 3
EXECUTE PROGRAM TSTSND
GOTO MAINLOOP
4: LABEL 4
EXECUTE PROGRAM TSTIO
GOTO MAINLOOP
5: LABEL 5
EXECUTE PROGRAM TSTDIP
GOTO MAINLOOP
6: LABEL 6
EXECUTE PROGRAM TSTPRB
GOTO MAINLOOP
A: LABEL A
EXECUTE PROGRAM TSTRUN
GOTO MAINLOOP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! RAM TEST
!
! Display each (set) of RAMs as testing many Rams are 4 bit wide such as
! the common 2114s.
!
! RAM SHORT @ *RAMSTART1 - *RAMLENGTH1
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM TSTRAM
DPY-TESTING PGM RAM R3 M3#
RAM SHORT @ 0-1FFF
DPY- RAM TEST COMPLETE PRESS CONT#
STOP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! ROM TEST
!
! Promt for version of ROM (if needed). Response goes into REG1.
! REG1 used for GOTO jump to corresponding LABEL for proper test.
!
! Rom Test is done by removeable roms rather than blocks of memory this
! helps pinpoint the bad rom to replace.
!
! ROM TEST @ *ROMSTART1 - *ROMEND1 SIG *ROMSIG1
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM TSTROM
0: LABEL 0
DPY-ROM VERSION 1 OR 2 ? /1
IF REG1 = 1 GOTO 1
IF REG1 = 2 GOTO 2
GOTO 0
1: LABEL 1
DPY-TESTING ROM F1
ROM TEST @ 6800-6FFF SIG 53C9
DPY-TESTING ROM D E1
ROM TEST @ 7000-77FF SIG 3D7A
GOTO F
2: LABEL 2
! Insert Version 2 ROM test here
F: LABEL F
DPY-ROM TEST COMPLETE
STOP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! SND TEST
!
! Sound test very dependant on game. Some games will have a separate sound
! processor & some may be directly accessable from the main processor.
! This test is for directly accessable sound generators.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM TSTSND
REG1 = 40
DPY-Rivet SND. CONT=NEXT
DPY-+ SND%1#
0: LABEL 0
WRITE @7C00 = 05
IF REG1 = 25 GOTO 1
GOTO 0
1: LABEL 1
REG1 = 40
DPY-Springs SND. CONT=NEXT SND%1#
2: LABEL 2
WRITE @ 7C00 = 0A
IF REG1 = 25 GOTO 3
GOTO 2
F: LABEL F
REG1 = 40
DPY-SND TESTS COMPLETE. PRESS
DPY-+ CONT%1#
STOP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! I/O TEST
!
! This test may be configured to test all individual inputs one at a time or
! may just be configured to display the bytewide register of inputs. By
! looking at bytewide inputs for Normally Open momentary inputs (buttons /
! joysticks, coins etc) you can verify none are stuck on.
!
! READ @ *IO1
! REGE is contents of previous 9010A command, so display them.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM TSTIO
READ @ *IO1
DPY-IO2 = $E PRESS CONT
STOP
DPY-IO TESTS COMPLETE. PRESS
DPY-+ CONT%1#
STOP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! DIP SWITCH TEST
!
! The DIP Test is 3 stages, a All on test, All off test, Factory settings
!
! Set REGF = *DIP1 location
! REGE is contents of previous 9010A command, so use it.
!
! I could not get it to compare to REGE so I used REG1 = REGE and then
! compared to REG1.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM DIPTST
REGF = *DIP1
SW1ON:
DPY- TURN ALL DIPS ON AT SW1 #
STOP
READ @ REGF
REG1 = REGE
IF REG1 = FF GOTO SW1OFF
DPY- ERROR SW1 OFF PRESS CONT #
STOP
GOTO SW1ON
SW1OFF:
DPY- TURN ALL DIPS OFF AT SW1 #
STOP
READ @REGF
REG1 = REGE
IF REG1 = 0 GOTO SW1FACTORY
DPY- ERROR SW1 ON PRESS CONT #
STOP
GOTO SW1OFF
SW1FACTORY:
DPY- FACT SET SW1 00000001 #
STOP
READ @REGF
REG1 = REGE
IF REG1 = 80 GOTO SW2
DPY- ERROR SW1 FACT PRESS CONT #
STOP
GOTO SW1FACTORY
SW2:
! DONE
DPY-DIP TEST COMPLETE. PRESS
DPY-+ CONT%1#
STOP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! PROBE TEST
!
! Copied from Asteroids Test by *Sorry I don't have his name at the moment
!
! The probe test is designed to excercise given signals on the board, such
! as flip, enable, select etc to aid in finding faults.
!
! I'm not real clear on the implementation here, basically I belive the
! program does a set number of writes to trigger a signal & the probe counts
! to see if it recieves all of the triggered signals. I have noticed that
! it is possible to see the 'wrong' signal & thus get a false positive test.
!
! REG9 = *ProbeLocation1
! REGB = *Number of Triggers excercised
! REG0 = Number of triggers read by probe
!
! Improvement or use of Signatures here should be investigated.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM TSTPRB
SYNC ADDRESS
DPY-PLACE PROBE ON POINTS
DPY-+ SHOWN.#
STOP
DPY-FLIP 5J-6.#
STOP
REGB = 1
REG9 = 7D82
REGB = 40
EXECUTE PROGRAM 65
STOP
PROGRAM 65 116 BYTES
READ PROBE
REG1 = REGB
1: LABEL 1
IF REG8 = 0 GOTO 2
READ @ REG9
GOTO 3
2: LABEL 2
WRITE @ REG9 = REGA
3: LABEL 3
DEC REG1
IF REG1 > 0 GOTO 1
READ PROBE
REG0 = REG0 AND 7F
IF REG0 = REGB GOTO 4
DPY-+CNT BAD.
GOTO 5
4: LABEL 4
DPY-+ OK.
5: LABEL 5
DPY-+COUNT @0=@B#
STOP
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! RUN UUT TEST
!
! Simply runs Unit Under Test in operating mode
! May require a pointer, but watchdog/reset feature of board should start
! the board correctly
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
PROGRAM TSTRUN
DPY-RUNNING BOARD
RUN UUT
STOP