mirror of
https://github.com/elliotnunn/sys7.1-doc-wip.git
synced 2024-12-12 20:29:12 +00:00
141 lines
5.6 KiB
Plaintext
141 lines
5.6 KiB
Plaintext
|
;
|
|||
|
; File: IOPEqu.a
|
|||
|
;
|
|||
|
; Contains: equates used to interface with the IOPmgr
|
|||
|
;
|
|||
|
; Written by: Gary Davidian
|
|||
|
;
|
|||
|
; Copyright: © 1987-1990 by Apple Computer, Inc., all rights reserved.
|
|||
|
;
|
|||
|
; Change History (most recent first):
|
|||
|
;
|
|||
|
; <4> 1/30/91 gbm sab, #38: Change the ‘already including this file’ variable to
|
|||
|
; all uppercase (for security reasons)
|
|||
|
; <2> 3/15/90 djw Add some IOP SCC declarations needed in the patch file
|
|||
|
; <1.1> 5/20/89 GGD Moved the IOP manager trap definitions into Traps.a
|
|||
|
; <1.0> 11/9/88 CCH Adding to EASE.
|
|||
|
; <1.1> 11/6/88 GGD Moved some equates into HardwareEqu.a
|
|||
|
; <1.0> 9/24/88 rwh Entered into EASE for the first time
|
|||
|
;
|
|||
|
|
|||
|
IF &TYPE('__INCLUDINGIOPEQU__') = 'UNDEFINED' THEN
|
|||
|
__INCLUDINGIOPEQU__ SET 1
|
|||
|
|
|||
|
SccIopNum equ 0
|
|||
|
SwimIopNum equ 1
|
|||
|
MaxIopNum equ 7 ; we support up to 8 IOPs per system
|
|||
|
NumberOfIOPs equ MaxIopNum+1
|
|||
|
|
|||
|
MaxIopMsgNum equ 7 ; message numbers range 1..7
|
|||
|
MaxIopMsgLen equ 32 ; message length range is 0..32 bytes
|
|||
|
|
|||
|
IOPRequestInfo record 0,increment ; parameter block for _IOPMsgRequest
|
|||
|
irQLink ds.l 1 ; [long] link to next queue element [pointer]
|
|||
|
irQType ds.w 1 ; [word] queue element type [word]
|
|||
|
irIOPNumber ds.b 1 ; [byte] -> IOP Number (0..1 for now)
|
|||
|
|
|||
|
; irRequestKind encodings
|
|||
|
irSendXmtMessage equ 0 ; Send Transmit message, Read reply when done
|
|||
|
irSendRcvReply equ 1 ; Send Receive reply, Wait for next Receive Message
|
|||
|
irWaitRcvMessage equ 2 ; wait for Receive Message
|
|||
|
irRemoveRcvWaiter equ 3 ; remove wait for receive message request
|
|||
|
|
|||
|
irRequestKind ds.b 1 ; [byte] -> kind of request to perform
|
|||
|
irMsgNumber ds.b 1 ; [byte] -> Message number (1..7)
|
|||
|
irMessageLen ds.b 1 ; [byte] -> Message Buffer Length (0..32)
|
|||
|
irReplyLen ds.b 1 ; [byte] -> Reply Buffer Length (0..32)
|
|||
|
irReqActive ds.b 1 ; [byte] <- $FF when request active or queued, $00 when complete
|
|||
|
irMessagePtr ds.l 1 ; [long] -> Message Buffer Address
|
|||
|
irReplyPtr ds.l 1 ; [long] -> Reply Buffer Address
|
|||
|
irHandler ds.l 1 ; [long] -> Completion Routine Address
|
|||
|
|
|||
|
irReqInfoSize equ * ; size of IOPRequestInfo parameter block
|
|||
|
endr
|
|||
|
|
|||
|
|
|||
|
|
|||
|
IOPMoveInfo record 0,increment ; parameter block for _IOPMoveData
|
|||
|
|
|||
|
; imCopyKind encodings
|
|||
|
imIopToHost equ 0 ; move data from IOP memory to Host memory
|
|||
|
imHostToIop equ 1 ; move data from Host memory to IOP memory
|
|||
|
imCompare equ 2 ; compare data from Host memory and IOP memory
|
|||
|
imPatchIop equ 3 ; patch IOP memory
|
|||
|
|
|||
|
imCopyKind ds.b 1 ; [byte] -> kind/direction of move
|
|||
|
imIOPNumber ds.b 1 ; [byte] -> IOP Number (0..1 for now)
|
|||
|
imByteCount ds.w 1 ; [word] -> number of bytes to move/compare (not used for PatchIop)
|
|||
|
imHostAddr ds.l 1 ; [long] -> Host Buffer Address
|
|||
|
imIopAddr ds.w 1 ; [word] -> IOP Buffer Address (not used for PatchIop)
|
|||
|
imCompRel ds.b 1 ; [byte] <- -1 if IOP < HOST, 0 if IOP = HOST, 1 if IOP > HOST
|
|||
|
ds.b 1 ; [byte] unused, reserved.
|
|||
|
imMoveInfoSize equ * ; size of IOPMoveInfo parameter block
|
|||
|
endr
|
|||
|
|
|||
|
|
|||
|
IOPMsgEntry record 0,increment ; Handlers for Xmt/Rcv messages
|
|||
|
RcvMsgInfoPtr ds.l 1 ; [long] Ptr to receive message handler info
|
|||
|
ds.w 1 ; [word] filler
|
|||
|
XmtMsgQHdr ds.b qHeadSize ; [10 bytes] transmit message handler queue
|
|||
|
IOPMsgEntrySize equ *-IOPMsgEntry ; size of IOPMsgEntry
|
|||
|
endr
|
|||
|
|
|||
|
IOPInfo record 0,increment ; IOP information (1 per IOP)
|
|||
|
IopAddrRegPtr ds.l 1 ; [long] Ptr to IOP RAM Address Reg (word)
|
|||
|
IopDataRegPtr ds.l 1 ; [long] Ptr to IOP RAM Data Register (byte)
|
|||
|
IopCtlRegPtr ds.l 1 ; [long[ Ptr to IOP Control Register (byte)
|
|||
|
BypassHandler ds.l 1 ; [long] Ptr to Bypass Mode Interrupt handler
|
|||
|
MaxXmt ds.b 1 ; [byte] Highest Transmit message number
|
|||
|
MaxRcv ds.b 1 ; [byte] Highest Receive message number
|
|||
|
ds.b 2 ; unused, reserved.
|
|||
|
|
|||
|
MoveReqInfo ds IOPRequestInfo ; request info for rcv message 1
|
|||
|
MoveReqBuffer ds IOPMoveInfo ; message/reply buffer for rcv message 1
|
|||
|
|
|||
|
MsgTable equ *-IOPMsgEntry.IOPMsgEntrySize ; base for zero based indexing
|
|||
|
Msg1Info ds IOPMsgEntry ; info for handling (xmt/rcv) message 1
|
|||
|
Msg2Info ds IOPMsgEntry ; info for handling (xmt/rcv) message 2
|
|||
|
Msg3Info ds IOPMsgEntry ; info for handling (xmt/rcv) message 3
|
|||
|
Msg4Info ds IOPMsgEntry ; info for handling (xmt/rcv) message 4
|
|||
|
Msg5Info ds IOPMsgEntry ; info for handling (xmt/rcv) message 5
|
|||
|
Msg6Info ds IOPMsgEntry ; info for handling (xmt/rcv) message 6
|
|||
|
Msg7Info ds IOPMsgEntry ; info for handling (xmt/rcv) message 7
|
|||
|
IOPInfoSize equ *-IOPInfo ; size of IOPInfo record
|
|||
|
endr
|
|||
|
|
|||
|
|
|||
|
IOPAccessInfo record 0,increment ; parameter block for _IOPInfoAccess
|
|||
|
|
|||
|
; iaAccessKind encodings
|
|||
|
iaInstallIOP equ 0 ; install IOPInfo and initialize Hardware and Data Structures
|
|||
|
iaGetIOPInfo equ 1 ; return pointer to IOP Info for specified IOP
|
|||
|
iaRemoveIOP equ 2 ; de-install IOPInfo for specified IOP
|
|||
|
|
|||
|
iaAccessKind ds.b 1 ; [byte] -> kind of request to perform
|
|||
|
iaIOPNumber ds.b 1 ; [byte] -> IOP Number (0..1 for now)
|
|||
|
ds.b 2 ; unused, reserved
|
|||
|
iaIOPInfoPtr ds.l 1 ; [long] <-> Pointer to IOPInfo record
|
|||
|
iaAccessInfoSize equ * ; size of IOPAccessInfo parameter block
|
|||
|
endr
|
|||
|
|
|||
|
|
|||
|
;================================================================================================
|
|||
|
;
|
|||
|
; IOP SCC declarations
|
|||
|
;
|
|||
|
|
|||
|
SCCCtlMsg record 0,increment ; message block for SCC control of external clocking <2>
|
|||
|
msgNum ds.b 1 ; SCC IOP message number
|
|||
|
Driver ds.b 1 ; SCC port port A = 0, port B = 1
|
|||
|
GPI ds.b 1 ; state on GPi pin : 0 = internal, 1 = external clocking
|
|||
|
ds.b 1 ; unused, reserved
|
|||
|
SCCCtlMsgSize equ *
|
|||
|
endr
|
|||
|
|
|||
|
SCCCtlReply record 0,increment ; reply block for SCC control of external clocking <2>
|
|||
|
errNum ds.b 1 ; error code
|
|||
|
ds.b 3 ; unused, reserved
|
|||
|
SCCCtlReplySize equ *
|
|||
|
endr
|
|||
|
|
|||
|
ENDIF ; ...already included
|