; ; File: SCSIMgrInitDB.a ; ; Contains: DB Lite SCSI Manager c80 initialization routines ; ; Written by: James Blair ; ; Copyright: © 1992, 1994 by Apple Computer, Inc. All rights reserved. ; ; This file is used in these builds: ROM ; ; Change History (most recent first): ; ; 1/26/94 rab Removed padForOverpatch stuff from the end of this file ; (SuperMario does not use it…). ; 2/5/93 CSS Checkin from Horror. ;

3/3/92 SWC Added overpatch padding. ;

2/10/92 SWC jab/Added dual SCSI bus code for DBLite to HORROR. ; BLANKS ON ; assembler accepts spaces & tabs in operand field STRING ASIS ; generate string as specified PRINT OFF ; do not send subsequent lines to the listing file ; don't print includes IF (&TYPE('dbugSCSIDB') = 'UNDEFINED') THEN dbugSCSIDB EQU 0 ; for debugging purposes ENDIF LOAD 'StandardEqu.d' ; from StandardEqu.a and for building ROMs INCLUDE 'HardwareEqu.a' ; INCLUDE 'SCSI.a' ; CSS INCLUDE 'SCSIPriv.a' INCLUDE 'UniversalEqu.a' ; for TestFor PRINT ON ; do send subsequent lines to the listing files SCSIInitDB PROC EXPORT ; EXPORT InitMgr_SCSIDB IMPORT SCSIMgr_DB IMPORT DoSCSIReset_DB IMPORT DoSCSIGet_DB IMPORT DoSCSISelect_Dc80 WITH scsiGlobalRecord ;------------------------------------------------------------- ; ; Initialization code for the DB Lite SCSI Manager InitMgr_SCSIDB movem.l intrRegs, -(sp) ; save all registers, for convenience moveq.l #0, zeroReg ; initialize "zeroReg" movea.l SCSIGlobals, a4 ; get ptr to structure moveq.l #numSelectorsDB-1, d1 ; loop count lea.l SCSIMgr_DB, a1 ; get start of SCSI Mgr code move.l a1, d0 ; remember base address lea OffsetTblDB, a1 ; address of offset table movea.l a4, a0 ; point to base of old SCSI Mgr jump table @MakeJmpTbl moveq.l #0, d2 ; clear high word move.w (a1)+, d2 ; get the next offset add.l d0, d2 ; compute the address move.l d2, (a0)+ ; install it in the jump table dbra d1, @MakeJmpTbl ; loop for all vectors lea.l DoSCSISelect_Dc80, a1 ; point to Dual SCSIc80 Select proc move.l a1, jvSelect(a4) ; use this Select routine move.l SCSIBase,base5380_1(a4) ; load addresses for the internal controller move.l SCSIDMA,pdma5380_1(a4) ; move.l SCSIHsk,hhsk5380_1(a4) ; clr.l G_SCSIDevMap0(a4) ; initialize SCSI Device Map 0 clr.l G_SCSIDevMap1(a4) ; initialize SCSI Device Map 1 @InitDone movem.l (sp)+, intrRegs ; restore registers rts ;------------------------------------------------------------- ; OffsetTblDB DC.W DoSCSIReset_DB-SCSIMgr_DB ; 0: SCSIReset DC.W DoSCSIGet_DB-SCSIMgr_DB ; 1: SCSIGet DC.W DoSCSISelect_Dc80-SCSIMgr_DB ; 2: SCSISelect ;========================================================================== ENDWITH END