
   IFND   ROMDIAG_I
ROMDIAG_I   SET   1
*
******* Public EQUates ********************************************
*
* The Error Codes
OKAY            equ   0

READING         equ   0      * added to error code if reading
WRITING         equ   2      * added to error code if writing
BITCHECK         equ   4      * added to error code for bit checking

ERROR_TEST1      equ   $10   * testing alternate bits with A's as pattern
ERROR_TEST2      equ   $20   * testing alternate bits with 5's as pattern
ERROR_TEST3      equ   $30   * testing with All 1's as pattern
ERROR_TEST4      equ   $40   * testing sliding 0's
ERROR_TEST5      equ   $50   * testing with 0's as pattern
ERROR_TEST6      equ   $60   * testing sliding 1's
ERROR_TEST7      equ   $70   * testing with ADDRESS as pattern
ERROR_TEST8      equ   $80   * testing with /ADDRESS as pattern
ERROR_TEST9      equ   $90   * testing with byte writes of zeros
ERROR_TEST10    equ   $A0   * testing with word reads of zeros

ERROR_ADKCONC   equ   $101   * generally, on the register tests,
ERROR_ADKCONS   equ   $102   * ..an 'ERROR_x..xC' definition denotes
ERROR_CLXDAT   equ   $103   * ..the error occurred during bit 'CLEARING'
ERROR_DMACONC   equ   $104   * ..tests, and the 'ERROR_x..xS' denote
ERROR_DMACONS   equ   $105   * ..'SETTING' errors.
ERROR_INTREQC   equ   $106   *
ERROR_INTREQS   equ   $107   *
ERROR_INTENAC   equ   $108   *
ERROR_INTENAS   equ   $109   *
ERROR_JOYTEST   equ   $10A   *
ERROR_JOY0DAT1   equ   $10B   *
ERROR_JOY1DAT1   equ   $10C   *
ERROR_JOY0DAT2   equ   $10D   *
ERROR_JOY1DAT2   equ   $10E   *
ERROR_JOY0DAT3   equ   $10F   *
ERROR_JOY1DAT3   equ   $110   *
ERROR_JOY0DAT4   equ   $111   *
ERROR_JOY1DAT4   equ   $112   *
ERROR_POTGO      equ   $113   *
ERROR_POT0DAT   equ   $114   *
ERROR_POT1DAT   equ   $115   *

ERROR_XSUM      equ   $F000   * checksum error

*
**********************************************************************
*
*
******* Local EQUates ************************************************
*
SETBIT         equ   (1<<15)   * $8000
CLEARBIT         equ   $0

SETALL         equ   $FFFF
CLEARALL         equ   $7FFF
ALLON            equ   $7FFF
ALLOFF         equ   $0

SETDMA         equ   $87FF
CLEARDMA         equ   $07FF
DMAON            equ   $07FF
DMAOFF         equ   $0

SETENA         equ   $BFFF
ENAON            equ   $3FFF


JOYTEST_PATTERN1 equ   $FCFC      * all possible bits on
JOYTEST_PATTERN2 equ   $0         * all possible bits off
JOYTEST_PATTERN3 equ   $A8A8      * ones and zeros
JOYTEST_PATTERN4 equ   $5454      * zeros and ones


*
*
* Tone generation table containing note periods.  A note letter followed
* by a ".", is sharp, followed by a "_" is flat.
A. equ   453   * A sharp flat
B_ equ   453   * B flat
B  equ   428   * B
C  equ   404   * C
C. equ   381   * C sharp
D  equ   360   * D
D. equ   339   * D sharp
E_ equ   339   * E flat
E  equ   320   * E
F  equ   302   * F
F. equ   285   * F sharp
G  equ   269   * G
G. equ   254   * G sharp

a  equ   240   * a
a. equ   226   * a sharp
b_ equ   226   * b flat
b  equ   214   * b
c  equ   202   * c
c. equ   190   * c sharp
d  equ   180   * d
d. equ   170   * d sharp
e_ equ   170   * e flat
e  equ   160   * e
f  equ   151   * f
f. equ   143   * f sharp
g  equ   135   * g
g. equ   127   * g sharp
aa equ   120   * a - highest a

   ENDC

