supermario/base/SuperMarioProj.1994-02-09/OS/StartMgr/STEqu.a

287 lines
13 KiB
Plaintext
Raw Normal View History

2019-06-29 15:17:50 +00:00
;
; File: STEqu.a
;
; Contains: This file contains all the various equates required by the StartTest routines.
; Originally derived from STStartup.a.
;
; Written by: Russ L. Emmons
;
; Modified by: Scott Smyers
;
; Copyright: © 1983-1990, 1992 by Apple Computer, Inc., all rights reserved.
;
; Codes used in: ROM
;
; Change History (most recent first):
;
; <16> 1/13/92 RB Rolled in Terror version.
;
; ===================== Terror History ==========================
;
; <5> 2/18/91 djw Rolled in Scott Smyer's changes
; <4> 1/14/91 CCH Rolled in Scott Smyer's changes.
; <3> 12/14/90 HJR Removed FPU equates (they are now local in non-crittest.a,
; removed some hard coded equates for ROM sizes.
; <2> 9/5/90 CCH Removed hardcoded offsets for ROM checksums and ROM size.
; ———————————————————————————————————————————————————————————————————————————————————————
; Pre-Terror ROM comments begin here.
; ———————————————————————————————————————————————————————————————————————————————————————
; <4> 4/27/90 CV Rolling in changes from mainproj. Original comments below.
; {8} 4/24/90 SS Added equates for Critical, NonCritical and CritBit, which were
; previously defined in USTStartUp.a. Also, changed MyROMSums and
; MyROMEnd equates to offsets from the base of ROM instead of
; being hard coded addresses.
; {7} 4/20/90 SS Removed my local Egret equates and the SCSI equates. I'm now
; using the equates in the HWPrivateEqu and EgretEqu files as per
; suggestions which came up in the code review of 4/16/90.
; <3> 3/12/90 CV Rolling in changes from mainproj. Original comments below.
; {6} 3/9/90 SS Added equates for RBI support. Moved the SCSI register equates
; out of USTNonCritTsts.a into here.
; <2> 3/2/90 CV Rolling in changes from main project. Original comments below.
; {5} 2/27/90 SS Added equates for the new Egret test number and the sound
; interrupt test number. Also added 7 equates to support the
; Egret interface routines. I copied these equates from the
; EgretEqu.a file while they were still valid. I am now
; independant of that include file's future changes.
; <5> 1/3/90 SWC Rolled in changes from main project. Original comment below:
; {3} 12/28/89 SES Made changes for Mark Appleman. Added ErrFMCCacheTest.
; Removed ErrOSSCntrTest.
; <4> 12/27/89 SWC Rolled in changes from main project. Original comment below:
; {2} 12/26/89 GMR Added non-critical RPUTest error code. Removed the extra
; SizeMemory error codes (not needed any more).
; <3> 11/13/89 SWC Rolled in source changes from Reality. Original comments below:
; {1.5} 11/13/89 SES added error codes for FMC shift register test, OSS register test,
; OSS counter test and OSS interrupt test.
; {1.4} 8/18/89 rle added new error codes for use in reporting ram failures by bank
; <1.3> 5/16/89 rle changed V1DDRA again to make ok for test manager, keeping bit 4
; set for Gary; added new error codes for non-crit and critical
; tests; cut in floating point test equates; added bit definition
; (for 32-bit machines only!) to provide info that parity ram is
; installed
; <1.2> 4/30/89 GGD Changed V1DDRA to set bit 4 (vOverlay on MacII) to be an output
; to support universal ROM.
; <1.1> 4/28/89 rle moved initial stack pointer for RBV machines above screen;
; updated via data direction register for Aurora
; <1.0> 3/28/89 rle new file replaces equates previously found in StartTest files
;
;------------------------------------------------------------------------------
pOff EQU 2 ;VIA 2 power off bit
SV1 EQU 0 ;VIA 1 sound volume bit 0
SV2 EQU 1 ;VIA 1 sound volume bit 1
sync EQU 3 ;VIA 1 sync modem control bit
aStack EQU $2600 ;initial stack pointer
IF CPU ≥ 020 THEN ; <13>
TROMCode EQU $AAAA5555 ;special code in Test ROMs <13>
myIntMask EQU $2500 ;Power off ints only allowed <13>
ELSEIF onMac | onMacPP | onHcMac THEN ; <13>
TROMCode EQU $55AAAA55 ;special code in Test ROMs <13>
K512 EQU $00080000 ;512K <13>
Meg1 EQU $00100000 ;1 Meg <13>
Meg2 EQU $00200000 ;2 Meg <13>
V1DDRA EQU $09 ;VIA 1 DDRA, test code only <13>
myIntMask EQU $2700 ;no ints allowed for Aladdin <13>
IF hasPowerMgr THEN ; <13>
myROMEnd EQU $00040000 ;256K ROM <13>
V1DDRB EQU $3D ;VIA 1 DDRB <13>
Jumper EQU 2 ;testmode <13>
banksize equ 32*2*1024 ;smallest bank size for laguna <13>
ELSE
myROMEnd EQU $00040000 ;256K ROM <8>
ENDIF
ENDIF
;---------------------------------------------------------------------------------
;
; PRAM non-critical test equates
;
NCFailFlag equ $F9 ;location of NC test failure flag
NCFailHist equ $F0 ;Starting PRAM address of NC test failure history
NCHistBytes equ $8 ;Number of NC test numbers in the history log
NCLastFailure equ $FC ;Start address of error code for last NC test failure
NCLstFailBytes equ $4 ;number of bytes in failure code
;---------------------------------------------------------------------------------
; Some delay constants (using the VIA reg access as a time constant <7>
delay325uS equ $100 ;VIA based delay for 325µsecs <7>
delay1mS equ $320 ;Delay for 1 mS <7>
; Some handy equates
cr EQU $0D ;carriage return character
lf EQU $0A ;line feed character
sec EQU $0C ;timer count for one second
nak EQU '?' ;nak for invalid request
ast EQU '*' ;an asterisk
AutoVector2 EQU $68 ;offset to AutoVector location for level 2 interrupt <5>
; _TestManager trap a0 points to this record
Ops EQU 0 ;Trap record offset to options
NumPass EQU 2 ;Trap record offset to options
RAMLow EQU 4 ;Trap record offset to RAM low address
RAMHigh EQU 8 ;Trap record offset to RAM high address
spare EQU 12 ;Trap record offset to spare longint
; Flag bit assignments for register d7
MsgQ EQU 16 ;a message is queued for output
SCCok EQU 17 ;the SCC has been inited
nosleep EQU 18 ;prevent sleep on sad mac? (16-bit machines) <v1.3>
parity EQU 18 ;is parity ram installed? (32-bit machines) <v1.3>
star EQU 19 ;an asterisk * has been received
aski EQU 20 ;set if using hex ascii format
echo EQU 21 ;echo received parameters
timer EQU 22 ;timer active if set
crlf EQU 23 ;append <cr-lf> if set
excp EQU 24 ;unexpected exception received
nmi EQU 25 ;the NMI switch was hit
test EQU 26 ;the VIA loopback was found
beok EQU 27 ;a BusError is expected and is OK
stop EQU 28 ;stop on error if set
loop EQU 29 ;loop on error if set
pram EQU 30 ;store test results in clock pRAM
boot EQU 31 ;boot system when done with this test
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; end of generic equates
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Signatures for the ROM based NMI routine to determine if the NMI is the
; result of an expected parity error
PGCParity equ 'PGCp' ;PGC style parity error (IIci)
RPUParity equ 'RPUp' ;RPU style parity error (IIfx)
OrwellParity equ 'Orwl' ;Orwell style parity error (Eclipse/Spike)
; Equates used for ROM Based Burnin (RBI) <6>
SigBytes EQU 'RBBI' ;RBI signature <6>
SCSIBIBytes EQU 'SCBI' ;SCSI RBI signature
SigLocs EQU $007C00FC ;PRAM Locations of signature bytes <6>
SCSIBILocs EQU $007800F8 ;PRAM Locations of SCSI Burnin signature
; Error codes for d7.w
ErrROM EQU $0001 ;major error code ROM CheckSum Test
ErrRAMX EQU $0002 ;major error code RAM first chunk
ErrRAMA EQU $0003 ;major error code Bank A
ErrRAMB EQU $0004 ;major error code Bank B
ErrAddr EQU $0005 ;major error code RAM addressing
ErrVIA1 EQU $0006 ;major error code VIA 1 access
ErrVIA2 EQU $0007 ;major error code VIA 2 access
ErrRAMC EQU $0008 ;major error code data buss high RAM
ErrMap EQU $0009 ;major error code MMU failure
ErrNUB EQU $000A ;major error code NUBUS access
ErrSCSI EQU $000B ;major error code SCSI access
ErrIWM EQU $000C ;major error code IWM access
ErrSCC EQU $000D ;major error code SCC access
ErrData EQU $000E ;major error code Data Bus test
ErrMac EQU $000F ;reserved for Macintosh DS compatibility
ErrPmgrSt equ $0010 ;major error code for pwrmgr self test
ErrSizeMem equ $0011 ;major error code for sizing memory
ErrSccIop equ $0012 ;major error code for SCC PIC access
ErrDynBus equ $0013 ;major error code for dynamic bus sizing <v1.3>
ErrPmgrTurnOn equ $0014 ;major error code for turning on power <v1.3>
ErrParRAM equ $0015 ;major error code for parity ram <v1.3>
ErrEgretInit equ $0030 ;major error code for unresponsive Egret <9>
ErrMapRAM equ $0080 ;major error code for mapper ram
ErrMapAddr equ $0081 ;major error code for mapper ram addr
ErrVidRAM equ $0082 ;major error code video ram data
ErrVidAddr equ $0083 ;major error code video ram addressing
ErrSCCReg equ $0084 ;major error code for scc register test
ErrSCCLoop equ $0085 ;major error code for scc internal loop test
ErrSCCTimer equ $0086 ;major error code for scc timer test
ErrViaTest equ $0087 ;major error code for via test
ErrSCSITest equ $0088 ;major error code for scsi test
ErrASCTest equ $0089 ;major error code for asc test
ErrPramTest equ $008A ;major error code for pram test
ErrRBVTest equ $008B ;major error code for RBV chip <v1.3>
ErrSWIMTest equ $008C ;major error code for swim chip <v1.3>
ErrFPU equ $008D ;major error code for floating point proc <v1.3>
ErrPGCTest equ $008E ;major error code for parity generator <v1.3>
ErrFMCRegTest equ $008F ;major error code for FMC shift register test <v1.5>
ErrFMCCacheTest equ $0090 ;major error code for FMC cache test <v1.5><3>
ErrOSSRegTest equ $0091 ;major error code for OSS register test <v1.5><3>
ErrOSSIntTest equ $0092 ;major error code for OSS interrupt test <v1.5>
ErrRPUTest equ $0093 ;major error code for RPU test
ErrEgretTest equ $0094 ;major error code for Egret test <5>
ErrTestSndInts equ $0095 ;major error code for Sound Interrupts test <5>
ErrTestCLUT equ $0096 ;major error code for CLUT RAM test <10>
ErrTestVRAM equ $0097 ;major error code for V8 video RAM test <11>
;
;The following equates are used in the non critical test table. The bit equate is used
; to test the state of the "Critical" bit
;
ErrEX EQU $FF00 ;major error code exception
VTEntries EQU 64 ;#entries in exeception vector table
;the following exception codes should be used for all new cpu's after mac II
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;the following exception codes were redone for the modern victorian and laguna so that
;the test number would not be clobbered by an unexpected exception.
;this way, you will know what test you were running when an exception occurred
;d7.l now looks like this:
;d7.uw = flag bits as before
;d7.lwub = exception code
;d7.lwlb = current test #
;the following exception codes are ored in with the current test/error code no.
; SRC
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 68000/68020 exception codes used by Test Manager and power on tests
BECode EQU $0100 ;Bus Error exception code
ADCode EQU $0200 ;Address Error exception code
ILCode EQU $0300 ;illegal Error exception code
ZDCode EQU $0400 ;Zero divide Error exception code
CICode EQU $0500 ;Check inst Error exception code
TPCode EQU $0600 ;cpTrapcc,Trapcc,TrapV exception code
PVCode EQU $0700 ;Privilege violation exception code
TECode EQU $0800 ;Trace exception code
ATCode EQU $0900 ;Line A exception code
FTCode EQU $0A00 ;Line F exception code
UNCode EQU $0B00 ;unassigned exception code
CPCode EQU $0C00 ;CP protocol violation
FMCode EQU $0D00 ;format exception
SICode EQU $0E00 ;spurious interrrupt exception code
TNCode EQU $0F00 ;Trap inst exception code
L1Code EQU $1000 ;interrupt level 1
L2Code EQU $1100 ;interrupt level 2
L3Code EQU $1200 ;interrupt level 3
L4Code EQU $1300 ;interrupt level 4
L5Code EQU $1400 ;interrupt level 5
L6Code EQU $1500 ;interrupt level 6
L7Code EQU $1600 ;interrupt level 7
F1Code EQU $1700 ;FPCP bra or set on unordered cond
F2Code EQU $1800 ;FPCP inexact result
F3Code EQU $1900 ;FPCP divide by zero
F4Code EQU $1A00 ;FPCP underflow
F5Code EQU $1B00 ;FPCP operand error
F6Code EQU $1C00 ;FPCP overflow
F7Code EQU $1D00 ;FPCP signaling NAN
PCCode EQU $1E00 ;PMMU configuration
PICode EQU $1F00 ;PMMU illegal operation
PACode EQU $2000 ;PMMU access level violation