diff --git a/scsi2/AppleSCSI2.s b/scsi2/AppleSCSI2.s new file mode 100644 index 0000000..acf3cc4 --- /dev/null +++ b/scsi2/AppleSCSI2.s @@ -0,0 +1,1951 @@ +* +* Apple SCSI-2 +* +* (c) 2018, Brutal Deluxe Software +* Antoine Vignau & Olivier Zardini +* Visit http://www.brutaldeluxe.fr/ +* + + xc + xc + mx %00 + rel + typ DRV + dsk AppleSCSI2.l + lst off + +*---------------------------- + +DECBUSYFLG EQU $E10068 +GSOS EQU $E100A8 + + use 4/Int.Macs + use 4/Media.Macs + use 4/Mem.Macs + use 4/Util.Macs + +mcInChapters = 1 +mcInFrames = 2 +mcInTime = 3 + +mcSDeviceType = 0 +mcSPlayStatus = 1 +mcSDoorStatus = 2 +mcSDiscType = 3 +mcSDiscSize = 4 +mcSDiscSide = 5 +mcSVolumeL = 6 +mcSVolumeR = 7 + +mcSUnknown = 0 + +mcSLaserDisc = 1 +mcSCDAudio = 2 +mcSLaserCD = 3 +mcSVCR = 4 +mcSCamCorder = 5 + +mcSPlaying = 1 +mcSStill = 2 +mcSParked = 3 + +mcSDoorOpen = 1 +mcSDoorclosed = 2 + +mcS_CLV = 1 +mcS_CAV = 2 +mcS_CDV = 3 +mcS_CD = 4 + +mcSDisc3inch = 3 +mcSDisc5inch = 5 +mcSDisc8inch = 8 +mcSDisc12inch = 12 + +mcSSideOne = 1 +mcSSideTwo = 2 + +mcCInit = 1 ; init +mcCEject = 2 ; eject +mcCDisplayOn = 5 ; turn video position display on +mcCDisplayOff = 6 ; turn video position display off +mcCLockDev = 9 ; lock +mcCUnLockDev = 10 ; unlock + +AudioOff = 0 ; +AudioRight = 1 ; +AudioLinR = 2 ; +AudioMinR = 3 +AudioRinL = 4 ; +AudioRinLR = 5 ; +AudioReverse = 6 ; +AudioRinLMR = 7 +AudioLeft = 8 ; +AudioStereo = 9 ; +AudioLinLR = 10 +AudioLinLMR = 11 +AudioMinL = 12 +AudioMinLRinR = 13 +AudioMinLLinR = 14 +AudioMonaural = 15 + +mcUnImp = $2601 +mcBadAudio = $2606 +mcBadSelector = $2609 +mcInvalidPort = $260b +mcInvalidParam = $2612 + +*---------------------------- + + dw $0000 + dw $001B + jmp EntryStuff + + dw $0100 + str 'AppleSCSI2' + +L0013 ADRL MCGetName + ADRL MCDStartUp + ADRL MCDShutDown + ADRL MCGetFeatures + ADRL MCPlay + ADRL MCPause + ADRL MCSendRawData + ADRL MCGetStatus + ADRL MCControl + ADRL MCScan + ADRL MCGetSpeeds + ADRL MCSpeed + ADRL MCStopAt + ADRL MCJogN + ADRL MCSearchTo + ADRL MCSearchDone + ADRL MCSearchWait + ADRL MCGetPosition + ADRL MCSetAudio + ADRL MCGetTimes + ADRL MCGetDiscTOC + ADRL MCGetDiscID + ADRL MCGetNoTracks + ADRL MCRecord + ADRL MCStop + ADRL MCWaitRawData + ADRL MCSetVolume + +*---------------------------- + +EntryStuff PHD + PHB + PHK + PLB + TSC + SEC + SBC #$000A + TCS + INC + TCD + JMP (L0013,X) + +exit20 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $26,S + LDA $10,S + STA $24,S + LDA $0E,S + STA $22,S + TSC + CLC + ADC #$0014 + TCS + BRL Exit0x + +Exit16 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $22,S + LDA $10,S + STA $20,S + LDA $0E,S + STA $1E,S + TSC + CLC + ADC #$0010 + TCS + BRL Exit0x + +Exit14 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $20,S + LDA $10,S + STA $1E,S + LDA $0E,S + STA $1C,S + TSC + CLC + ADC #$000E + TCS + BRL Exit0x + +Exit12 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $1E,S + LDA $10,S + STA $1C,S + LDA $0E,S + STA $1A,S + TSC + CLC + ADC #$000C + TCS + BRL Exit0x + +Exit10 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $1C,S + LDA $10,S + STA $1A,S + LDA $0E,S + STA $18,S + PLA + PLA + PLA + PLA + PLA + BRL Exit0x + +Exit8 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $1A,S + LDA $10,S + STA $18,S + LDA $0E,S + STA $16,S + PLA + PLA + PLA + PLA + BRL Exit0x + +Exit6 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $18,S + LDA $10,S + STA $16,S + LDA $0E,S + STA $14,S + PLA + PLA + PLA + BRL Exit0x + +Exit4 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $16,S + LDA $10,S + STA $14,S + LDA $0E,S + STA $12,S + PLA + PLA + BRA Exit0x + +Exit2 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + LDA $12,S + STA $14,S + LDA $10,S + STA $12,S + LDA $0E,S + STA $10,S + PLA + BRA Exit0x + +Exit0 TAX + LDA $0A,S + PHA + PLB + PLB + LDA $0C,S + TCD + +Exit0x TSC + CLC + ADC #$000D + TCS + TXA + PHA + JSL DECBUSYFLG + PLA + CMP #$0001 + RTL + +*---------------------------- + +MCGetName + PEA ^DriverNamStr + PEA DriverNamStr + LDA $1A,S + PHA + LDA $1A,S + PHA + LDA #$0000 + PHA + LDA DriverNamStr + AND #$00FF + INC + PHA + _BlockMove + LDA #$0000 + JMP Exit6 + +DriverNamStr STR 'MCToolkit AppleSCSI2 1.0' +ConnectPort DS $24 +DriverNLen DW ConnectPort-DriverNamStr-1 ; $0017 + +*---------------------------- + +MCDStartUp + LDA BeenOpen + BEQ L0210 + BRL L02A6 + +L0210 LDA $14,S + STA L02B7 + LDA #$0000 + STA L02C1 + STA L0311 + LDA $18,S + PHA + LDA $18,S + PHA + PEA ^ConnectPort + PEA ConnectPort + PEA $0000 + PEA $0024 + _BlockMove + LDA ConnectPort + AND #$00FF + SEC + ADC DriverNLen + SEP #$30 + STA DriverNamStr + REP #$30 + LDA ConnectPort + AND #$FF00 + ORA #$0020 + STA ConnectPort + LDA $18,S + PHA + LDA $18,S + PHA + PEA ^L02D8 + PEA L02D8 + PEA $0000 + PEA $0024 + _BlockMove + LDA L02D7+1 + AND #$00FF + STA L02D7 + BEQ L0294 + LDA L02D7+2 + AND #$007F + CMP #$002E + BNE L0294 + JSL GSOS + DW $2020 ; GetDevNumber + ADRL L02FD + BCS L0297 + LDA L0303 + BRA L029A + +L0294 LDA #mcInvalidPort +L0297 JMP L02A9 + +L029A STA MyDevID + INC BeenOpen + LDA L02C1 + STA L0315 +L02A6 LDA #$0000 +L02A9 JMP Exit8 + +*---------------------------- + +MCDShutDown + lda #0 + sta BeenOpen + jmp Exit2 + +*--- New data + +BeenOpen DW $0000 +L02B7 DW $0000 +MyDevID DW $0000 + DW $0000 + DW $0000 + DW $0008 +L02C1 DW $0000 + ADRL L02D5 + DW $0000 + ADRL $00000000 + DW $0000 + DW $0000 + DW $0000 + DW $0000 + +L02D5 DW $0024 +L02D7 DS $01 +L02D8 DS $25 + +L02FD DW $0002 ; Parms for GetDevNumber + ADRL L02D7 ; device name +L0303 DW $0000 ; device num + DW $0003 + DW $0000 + ADRL L02D7 + DW $0003 + DW $0001 +L0311 DW $0000 + DW $0005 +L0315 DW $0000 + DW $0004 + ADRL L0325 + ADRL $00000002 + ADRL $00000000 +L0325 DW $8000 + DW $0004 + DW $0000 + ADRL L0337 + ADRL $00000001 + ADRL $00000000 +L0337 DW $0000 + +*---------------------------- + +HEX2BCD + phx + pha + and #$f0 + lsr + lsr + lsr + tax + lda HD,x + sta HSave + + pla + and #$0f + asl + tax + sed + lda HU,x + clc + adc HSave + cld + plx + rts + +*--- New data + +HD dw $0000 + dw $0016 + dw $0032 + dw $0048 + dw $0064 + dw $0080 + dw $0090 + +HU dw $0000 + dw $0001 + dw $0002 + dw $0003 + dw $0004 + dw $0005 + dw $0006 + dw $0007 + dw $0008 + dw $0009 + dw $0010 + dw $0011 + dw $0012 + dw $0013 + dw $0014 + dw $0015 + +HSave ds 2 + +*---------------------------- + +BCD2HEX + phx + pha + and #$0f + sta BSave + + pla + and #$f0 + lsr + lsr + lsr + tax + lda BD,x + clc + adc BSave + plx + rts + +*--- New data + +BD dw 00 + dw 10 + dw 20 + dw 30 + dw 40 + dw 50 + dw 60 + dw 70 + dw 80 + dw 90 + +BSave ds 2 + +*---------------------------- + +getCURRENTSTATUS + lda MyDevID + sta SubDNum + + jsl GSOS + dw $202D ; DStatus + adrl SubBlk + bcc getCS1 + sta errCODE + rts + +getCS1 + +*--- + + lda SubData+6 ; get current track + and #$ff + sta trackCURRENT + + lda SubData+1 ; return Audio status + and #$ff + rts + +*--- New data + +errCODE ds 2 ; GS/OS error code + +SubBlk DW $0005 ; Parms for DStatus +SubDNum DW $0000 ; device num + DW $8042 ; status code + ADRL SubList ; status list + ADRL 16 ; request count + ADRL $00000000 ; transfer count + +SubList DW $0000 + DB $42 + DB $02 ; MSF + DB $40 ; SubQ + DB $01 ; CD-ROM current position data format + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + ADRL SubData +SubData ds 16 + +*---------------------------- + +getTOC + sta TOCType ; 00-40-80 + stx TOCTrack ; 00-63 + + lda MyDevID + sta TOCDNum + + jsl GSOS + dw $202D ; DStatus + adrl ReadTOCBlk + bcc getTOC1 + rts + +getTOC1 + +*--- The TOC is read now + + sep #$20 ; $00: first and last tracks + lda TOCData+2 + sta trackFIRST + lda TOCData+3 + sta trackLAST + rep #$20 + +*--- + + lda TOCType ; $40: lead-out (end of disk) + cmp #$40 + beq getTOC2 + clc + rts + +getTOC2 lda TOCData+3 + and #$ff + asl + asl + asl ; *8 + clc + adc #8 ; 4 for header & 4 to reach hours + tay + + lda TOCData,y ; hour / minute + sta TOCData + lda TOCData+2,y ; second / frame + sta TOCData+2 + clc + rts + +*--- Old data + +TOCType ds 2 + +*--- New data + +ReadTOCBlk DW $0005 ; Parms for DStatus +TOCDNum DW $0000 ; device num + DW $8043 ; status code + ADRL TOCList ; status list + ADRL 1024 ; request count + ADRL $00000000 ; transfer count +TOCList DW $0000 + DB $43 + DB $02 ; in MSF + DB $00 + DB $00 + DB $00 +TOCTrack DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + ADRL TOCData +TOCData ds 1024 + +*---------------------------- + +doSTARTSTOP + lda MyDevID + sta StopDNum + + jsr getCURRENTSTATUS + bcc doSTOP1 + rts + +doSTOP1 ldx #0 ; stop + cmp #$11 ; Audio play in progress + beq doSTOP2 + cmp #$13 ; Audio play stopped + bne doSTOP3 + inx ; start + +doSTOP2 stx StopFlag + + jsl GSOS + dw $202E ; DControl + adrl StopBk + rts + +doSTOP3 lda #0 ; exit w/no error + rts + +*--- New data + +StopBk DW $0005 ; Parms for DControl +StopDNum DW $0000 ; device num + DW $801b ; control code + ADRL StopList ; control list + ADRL $00000000 ; request count + ADRL $00000000 ; transfer count + +StopList DW $0000 + DB $1b + DB $00 + DB $00 + DB $00 +StopFlag DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + ds 4 + +*---------------------------- + +doPAUSE + lda MyDevID + sta PauseDNum + + jsr getCURRENTSTATUS + bcc doPAUSE1 + rts + +doPAUSE1 ldx #0 ; pause + cmp #$11 ; Audio play in progress + beq doPAUSE2 + cmp #$12 ; Audio play paused + bne doPAUSE3 + inx ; resume + +*--- Alternate entry + +doPAUSE2 stx PauseFlag + + jsl GSOS + dw $202E ; DControl + adrl PauseBk +doPAUSE3 rts + +*--- New data + +PauseBk DW $0005 ; Parms for DControl +PauseDNum DW $0000 ; device num + DW $804b ; control code + ADRL PauseList ; control list + ADRL $00000000 ; request count + ADRL $00000000 ; transfer count + +PauseList DW $0000 + DB $4b + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 +PauseFlag DB $00 + DB $00 + DB $00 + DB $00 + ds 4 + +*---------------------------- + +MCGetFeatures + lda #0 ; init result + sta $18,s + sta $1a,s + + lda $14,s ; check if 0-9 + cmp #10 + bcc MCGF1 + + lda #mcBadSelector ; bad parameter if not + bra MCGF9 + +MCGF1 tax ; return handling of + lda tblFEATURES,x + and #$ff ; requested feature + sta $18,s + lda #$0000 + sta $1a,s +MCGF9 jmp Exit4 + +*--- Data + +tblFEATURES dfb $05 ; MCFTypes - Times and Chapters + dfb $00 + dfb $00 + dfb $00 + dfb $01 ; MCFEject - yes + dfb $01 ; MCFLock - yes + dfb $01 ; MCFVDisplay - yes + dfb $00 + dfb $00 + dfb $01 ; MCFVolume - yes + +*---------------------------- + +MCPlay + lda MyDevID + sta PlayDNum ; for PLAY AUDIO + + lda trackTOGO ; we must jog! + bne MCPlay2 + + lda fgRUNFROM ; 1 + ora fgRUNTO ; 2 + cmp #3 ; must be 3 to accept the Run button + beq MCPlay2 ; so, do as usual + + jsr getCURRENTSTATUS + bcs MCPlay9 + +*- If in pause, we resume and exit + + cmp #$12 ; Audio play paused + bne MCPlay1 + + ldx #1 ; call resume + jsr doPAUSE2 + bra MCPlay9 ; we exit + +MCPlay1 cmp #$11 ; Audio play in progress + beq MCPlay8 ; we exit w/o error + +*- If we're not already playing + +MCPlay2 lda #0 ; get full TOC + tax + jsr getTOC + bcs MCPlay9 + + lda trackTOGO ; we must jog! + bne MCPlay4 + + lda fgRUNFROM ; play MSF? + ora fgRUNTO + cmp #3 + bne MCPlay3 ; no + + jsr MCPlayMSF + bcc MCPlay8 + bcs MCPlay9 + +MCPlay3 lda trackFIRST ; get first and last tracks +MCPlay4 sta PlayFirst ; or trackTOGO and last tracks + lda trackLAST + sta PlayLast + + stz trackTOGO ; reset track to go + + jsl GSOS + dw $202E ; DControl + adrl PlayBk + bcs MCPlay9 + +MCPlay8 lda #0 +MCPlay9 jmp Exit2 + +*--- Play Audio MSF because Run was pressed + +MCPlayMSF + lda MyDevID + sta PlayMSFDNum ; for PLAY AUDIO MSF + + stz fgRUNFROM + stz fgRUNTO + + lda runFROM+1 ; MM:SS + sta fromMSF + lda runFROM+2 ; SS:FF + sta fromMSF+1 + + lda runTO+1 ; MM:SS + sta toMSF + lda runTO+2 ; SS:FF + sta toMSF+1 + + jsl GSOS + dw $202E ; DControl + adrl PlayMSFBk + rts + +*--- Track data + +trackFIRST ds 2 ; first track of a disk +trackLAST ds 2 ; last track of a disk +trackCURRENT ds 2 ; track the beam is on +trackTOGO ds 2 ; track to jog to + +*--- New data + +PlayBk DW $0005 ; Parms for DControl +PlayDNum DW $0000 ; device num + DW $8048 ; control code + ADRL PlayList ; control list + ADRL $00000000 ; request count + ADRL $00000000 ; transfer count + +PlayList DW $0000 + DB $48 + DB $00 + DB $00 + DB $00 +PlayFirst DB $00 + DB $00 + DB $00 +PlayLast DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + ds 4 + +*--- Play Audio MSF block + +PlayMSFBk DW $0005 ; Parms for DControl +PlayMSFDNum DW $0000 ; device num + DW $8047 ; control code + ADRL PlayMSFList ; control list + ADRL $00000000 ; request count + ADRL $00000000 ; transfer count + +PlayMSFList DW $0000 + DB $47 + DB $00 + DB $00 +fromMSF DB $00 ; MM + DB $00 ; SS + DB $00 ; FF +toMSF DB $00 ; MM + DB $00 ; SS + DB $00 ; FF + DB $00 + DB $00 + DB $00 + ds 4 + +*---------------------------- + +MCPause + jsr doPAUSE + lda #0 + jmp Exit2 + +*---------------------------- + +MCSendRawData + lda #mcUnImp + jmp Exit6 + +*---------------------------- + +MCGetStatus + lda #0 ; init result + sta $18,s + + lda $14,s ; which device? + cmp #mcSDeviceType + bne MCGS1 + +*--- device type + + ldx #mcSCDAudio + bra MCGS18 + +*--- play status + +MCGS1 cmp #mcSPlayStatus + bne MCGS2 + + jsr getCURRENTSTATUS + bcc MCGS11 + + ldx #mcSParked + lda errCODE + cmp #$002f ; device is offline + beq MCGS18 + cmp #$0027 ; I/O error + beq MCGS18 + bra MCGS19 ; other errors, exit + +MCGS11 ldx #mcSPlaying + cmp #$11 ; audio play operation in progress + beq MCGS18 + + ldx #mcSStill + cmp #$12 ; paused + beq MCGS18 + cmp #$13 ; stopped + beq MCGS18 + cmp #$14 ; stopped due to error + beq MCGS18 + +*--- generic return + +MCGS17 ldx #mcSUnknown +MCGS18 txa + sta $18,s + lda #$0000 +MCGS19 jmp Exit4 + +*--- door status + +MCGS2 cmp #mcSDoorStatus + beq MCGS17 ; we don't know + +*--- disc type + +MCGS3 cmp #mcSDiscType + bne MCGS4 + + jsr getCURRENTSTATUS + bcs MCGS19 + + ldx #mcS_CD + bra MCGS18 + +*--- disc size + +MCGS4 cmp #mcSDiscSize + bne MCGS5 + + jsr getCURRENTSTATUS + bcs MCGS19 + + ldx #mcSDisc5inch + bra MCGS18 + +*--- disc side + +MCGS5 cmp #mcSDiscSide + bne MCGS6 + + jsr getCURRENTSTATUS + bcs MCGS19 + + ldx #mcSSideOne + bra MCGS18 + +*--- left volume + +MCGS6 cmp #mcSVolumeL + bne MCGS7 + + jsr doSENSE ; mode sense + bcs MCGS9 + + lda SenseData+9,y ; left volume + bra MCGS79 + +*--- right volume + +MCGS7 cmp #mcSVolumeR + bne MCGS8 + + jsr doSENSE ; mode sense + bcs MCGS9 + + lda SenseData+11,y ; right volume + +MCGS79 and #$ff ; save volume + xba ; 00FF becomes FF00 + sta $18,s + lda #$0000 ; exit OK + bra MCGS9 + +*--- We exit + +MCGS8 lda #mcBadSelector +MCGS9 jmp Exit4 + +*---------------------------- + +doSENSE + lda MyDevID + sta SenseDNum + + jsl GSOS + dw $202D ; DStatus + adrl SenseBlk + pha + + lda SenseData+3 ; get block descriptor length + and #$ff + clc + adc #4 ; add param header length + tay ; make it our offset + + pla + rts + +*--- New data + +SenseBlk DW $0005 ; Parms for DStatus +SenseDNum DW $0000 ; device num + DW $801a ; status code + ADRL SenseList ; status list + ADRL 128 ; request count + ADRL $00000000 ; transfer count + +SenseList DW $0000 + DB $1a + DB $00 + DB $0e ; current values / page E + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + ADRL SenseData +SenseData ds 128 ; mode parameter header + ; page E is usually at offset 4+8 + +*---------------------------- + +SENSE2SELECT + ldx #0 ; copy the page +]lp lda SenseData,y + sta Select0E,x + iny + iny + inx + inx + cpx #16 + bcc ]lp + rts + +*---------------------------- + +doSELECT + lda MyDevID + sta SelectDNum + + jsl GSOS + dw $202E ; DControl + adrl SelectBlk + rts + +*--- New data + +SelectBlk DW $0005 ; Parms for DControl +SelectDNum DW $0000 ; device num + DW $8015 ; status code + ADRL SelectList ; status list + ADRL 20 ; request count + ADRL $00000000 ; transfer count + +SelectList DW $0000 + DB $15 + DB $10 ; page in SCSI-2 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + ADRL SelectData + +* Must start with 4 zeroes +* Then, we have the CD-ROM parameters page +* output port 0 at +8, volume at +9 +* output port 1 at +10, volume at +11 + +SelectData hex 00,00,00,00 +Select0E hex 0e,0e,04,00,00,00,00,00 + hex 01,ff,02,ff,00,00,00,00 + +*---------------------------- + +MCControl + lda MyDevID + sta EjectDNum + sta PreventDNum + + lda $14,s ; over 10, we don't handle + cmp #mcCUnLockDev+1 + bcc MCC1 + + lda #mcUnImp + jmp Exit4 + +*--- Init? + +MCC1 cmp #mcCInit + bne MCC2 + + stz trackTOGO + stz fgRUNFROM + stz fgRUNTO + bra MCC98 + +*--- Eject? + +MCC2 cmp #mcCEject + bne MCC9 + + jsr doUNLOCK + + jsl GSOS + dw $202E ; DControl + adrl EjectBk + bra MCC99 + +*--- Lock device? + +MCC9 cmp #mcCLockDev + bne MCC10 + + jsr doLOCK + bra MCC99 + +*--- Unlock device? + +MCC10 cmp #mcCUnLockDev + bne MCC5 + + jsr doUNLOCK + bra MCC99 + +*--- Video position display on/off? + +MCC5 cmp #mcCDisplayOn + beq MCC98 + cmp #mcCDisplayOff + beq MCC98 + + lda #mcBadSelector + bra MCC99 + +*--- Lock/Unlock + +doLOCK lda #1 + bne doPREVENT +doUNLOCK lda #0 +doPREVENT sta fgLOCK + + jsl GSOS + dw $202E ; DControl + adrl PreventBk + rts + +*--- We exit + +MCC98 lda #0 +MCC99 jmp Exit4 + +*--- New data for Eject + +EjectBk DW $0005 ; Parms for DControl +EjectDNum DW $0000 ; device num + DW $0002 ; control code + ADRL $00000000 ; control list + ADRL $00000000 ; request count + ADRL $00000000 ; transfer count + +*--- New data for PREVENT/ALLOW REMOVAL + +PreventBk DW $0005 ; Parms for DControl +PreventDNum DW $0000 ; device num + DW $801e ; control code + ADRL PreventList ; control list + ADRL $00000000 ; request count + ADRL $00000000 ; transfer count + +PreventList DW $0000 + DB $1e + DB $00 + DB $00 + DB $00 +fgLOCK DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + DB $00 + ds 4 + +*---------------------------- + +MCScan + lda #$40 ; get lead-out + ldx #0 + jsr getTOC + bcc MCS1 + jmp Exit4 + +*--- Get disc range + +MCS1 + lda TOCData+8 ; get disk start + xba + sta scanBEGIN+2 + lda TOCData+10 + xba + sta scanBEGIN + + lda TOCData ; get disk end + xba + sta scanEND+2 + lda TOCData+2 + xba + sta scanEND + +*--- And the status + + jsr getCURRENTSTATUS ; get status + + lda SubData+8 ; get current position + xba + sta scanCURRENT+2 + lda SubData+10 + xba + sta scanCURRENT + +*--- Now move the beast + + lda $14,s ; 0: forward, <0: rewind + bpl MCSFF + + jsr doREWIND ; scan backwards + bcc MCS7 + bcs MCS8 + +MCSFF jsr doFORWARD ; scan forward + bcs MCS8 ; cannot move, exit + +MCS7 + lda scanCURRENT+2 ; MM HH + xba + sta runFROM ; HH MM + lda scanCURRENT ; FF SS + xba + sta runFROM+2 ; SS FF + + jsr correctEND ; remove one frame + + lda scanEND+2 ; MM HH + xba + sta runTO ; HH MM + lda scanEND ; FF SS + xba + sta runTO+2 ; SS FF + + jsr MCPlayMSF ; move the beam and play + bra MCS9 + +MCS8 lda #0 +MCS9 jmp Exit4 + +*--- Scan forward (add 10 seconds) + +doFORWARD + sep #$20 + + lda scanCURRENT+1 ; add 10 seconds + clc + adc #10 + sta scanCURRENT+1 + cmp #60 ; above 59 seconds? + bcc doFORWARD5 + sec + sbc #60 + sta scanCURRENT+1 + + inc scanCURRENT+2 ; add 1 minute + lda scanCURRENT+2 + cmp #100 ; above 99 minutes? + bcc doFORWARD5 + lda #99 + sta scanCURRENT+2 + + inc scanCURRENT+3 ; add 1 hour + lda scanCURRENT+3 + cmp #100 ; above 99 hours? + bcc doFORWARD5 + lda #99 ; force 99 hours + sta scanCURRENT+3 + +doFORWARD5 ; Are we above disc end? + rep #$20 + + lda scanCURRENT+2 ; hhmm + cmp scanEND+2 + bcc doFORWARD9 + + lda scanCURRENT ; ssff + cmp scanEND + bcc doFORWARD9 + + sec ; force error +doFORWARD9 rts + +*--- Scan backwards (subtract 10 seconds) + +doREWIND + sep #$20 + + lda scanCURRENT+1 ; subtract 10 seconds + sec + sbc #10 + sta scanCURRENT+1 + bpl doREWIND5 + clc + adc #60 ; above 60 seconds + sta scanCURRENT+1 + + dec scanCURRENT+2 ; subtract 1 minute + bpl doREWIND5 + lda #99 ; 99 minutes + sta scanCURRENT+2 + + dec scanCURRENT+3 ; subtract 1 hour + bpl doREWIND5 + lda #99 ; 99 hours + sta scanCURRENT+3 + +*--- Are we above the disc start? + +doREWIND5 + rep #$20 + + lda scanCURRENT+2 + cmp #$6363 ; 9999 + beq doREWIND7 + + lda scanBEGIN+2 ; MM HH + cmp scanCURRENT+2 + bcc doREWIND9 ; <, exit + + lda scanBEGIN ; FF SS + cmp scanCURRENT + bcc doREWIND9 ; <, exit + +doREWIND7 sec +doREWIND9 rts + +*--- Correct the end of the disc + +correctEND + sep #$20 + + dec scanEND ; remove a frame + bpl correctEND9 + + lda #74 ; last frame + sta scanEND + dec scanEND+1 ; SS-- + bpl correctEND9 + + lda #59 ; last second + sta scanEND+1 + dec scanEND+2 ; MM-- + bpl correctEND9 + + lda #99 ; last minute + sta scanEND+2 + dec scanEND+3 ; HH-- + bpl correctEND9 + + lda #99 ; last hour + sta scanEND+3 + +correctEND9 rep #$20 + rts + +*--- New data + +scanBEGIN ds 4 +scanCURRENT ds 4 +scanEND ds 4 + +*---------------------------- + +MCGetSpeeds + lda #mcUnImp + jmp Exit6 + +*---------------------------- + +MCSpeed + lda #mcUnImp + jmp Exit4 + +*---------------------------- + +MCStopAt + stz fgRUNTO + +*- Track + + lda $18,s ; track? + cmp #mcInChapters + bne MCSA1 + + lda $14,s + sta runTO + bra MCSA8 + +*- Time + +MCSA1 cmp #mcInTime ; or time? + beq MCSA2 + + lda #mcUnImp ; it is frames, error + bra MCSA9 + +*- Convert from BCD time + +MCSA2 + lda $17,s ; get hours + jsr BCD2HEX + sta runTO + lda $16,s ; get minutes + jsr BCD2HEX + sta runTO+1 + lda $15,s ; get seconds + jsr BCD2HEX + sta runTO+2 + lda $14,s ; get frames + jsr BCD2HEX + sta runTO+3 + +*--- We exit + +MCSA8 lda #2 ; good init + sta fgRUNTO + + lda #0 ; exit OK +MCSA9 jmp Exit8 + +*---------------------------- + +MCJogN + lda $14,s ; mcJogRepeat must exit + sta dataJOGR ; times to repeat + bne MCJ1 + + lda #mcInvalidParam + jmp Exit10 + +*--- Which UnitType? + +MCJ1 lda $1a,s ; we support track + cmp #mcInChapters + beq MCJ2 + + lda #mcUnImp + jmp Exit10 + +*--- Jog in tracks + +MCJ2 lda $16,s + sta dataNJOG ; number of units to jog + + stz trackTOGO ; init destination track + + jsr getCURRENTSTATUS + bcc MCJ3 + jmp Exit10 + +MCJ3 lda #0 + tax + jsr getTOC + bcc MCJ4 + jmp Exit10 + +*--- Now jog + +MCJ4 lda dataJOGR ; move + or - + bmi MCJ4BACK + + lda trackCURRENT + clc + adc dataNJOG + sta trackTOGO ; where we must go + cmp trackLAST ; are we over + bcc MCJ4END ; the last track? + + lda trackLAST + sta trackTOGO ; yes, limit to last track +MCJ4END bra MCJ8 + +*--- Move backwards + +MCJ4BACK lda trackCURRENT + sec + sbc dataNJOG + sta trackTOGO ; where we must go + bmi MCJ5 ; are we < 0 + cmp trackFIRST ; or < first track + bcs MCJ8 + +MCJ5 lda trackFIRST + sta trackTOGO ; yes, limit to first track + +*--- We exit + +MCJ8 lda #$0000 +MCJ9 jmp Exit10 + +*--- Data + +dataJOGR ds 2 +dataNJOG ds 2 + +*---------------------------- + +MCSearchTo + stz fgRUNFROM + +*- Track + + lda $18,s ; track? + cmp #mcInChapters + bne MCST1 + + lda $14,s + sta runFROM + bra MCST8 + +*- Time + +MCST1 cmp #mcInTime ; time? + beq MCST2 + + lda #mcUnImp ; it is frames, error + bra MCST9 + +*- Convert from BCD time + +MCST2 + lda $17,s ; get hours + jsr BCD2HEX + sta runFROM + lda $16,s ; get minutes + jsr BCD2HEX + sta runFROM+1 + lda $15,s ; get seconds + jsr BCD2HEX + sta runFROM+2 + lda $14,s ; get frames + jsr BCD2HEX + sta runFROM+3 + +*--- We exit + +MCST8 lda #1 ; good init + sta fgRUNFROM + + lda #$0000 ; exit OK +MCST9 jmp Exit8 + +*--- Data + +runFROM ds 5 ; HH MM SS FF 00 +runTO ds 5 ; HH MM SS FF 00 +fgRUNFROM ds 2 ; we did MCSearchTo (0 or 1) +fgRUNTO ds 2 ; we did MCSearchAt (0 or 2) + ; we'll run A-B if above result is 3 + +*---------------------------- + +MCSearchDone + lda #1 + sta $16,s + + lda #0 + jmp Exit2 + +*---------------------------- + +MCSearchWait + lda #0 + jmp Exit2 + +*---------------------------- + +MCGetPosition + lda #0 + sta $18,s + sta $1a,s + + lda $14,s ; which mcUnitType? + cmp #mcInFrames + bne MCGP2 + +MCGP1 lda #mcUnImp ; video frames not implemented + bne MCGP9 + +MCGP2 jsr getCURRENTSTATUS ; get current status + bcs MCGP9 + + lda $14,s + cmp #mcInChapters + bne MCGP3 + + lda trackCURRENT ; return current track + sta $18,s + bra MCGP8 + +MCGP3 cmp #mcInTime ; if not time, exit with error + bne MCGP1 + + lda SubData+11 ; frame + jsr HEX2BCD + sta currentPOS + lda SubData+10 ; seconds + jsr HEX2BCD + sta currentPOS+1 + lda SubData+9 ; minutes + jsr HEX2BCD + sta currentPOS+2 + lda SubData+8 ; hours + jsr HEX2BCD + sta currentPOS+3 + + lda currentPOS + sta $18,s + lda currentPOS+2 + sta $1a,s + +MCGP8 lda #0 +MCGP9 jmp Exit4 + +*--- + +currentPOS ds 5 ; makes a BCD of the HEX position + +*---------------------------- + +MCSetAudio + lda $14,s ; check value + cmp #AudioMonaural+1 + bcc MCSAU1 + + lda #mcBadAudio ; not within 0-15 + bra MCSAU9 + +MCSAU1 jsr doSENSE ; get audio values + bcs MCSAU9 + + jsr SENSE2SELECT + +*--- Now, do the work + + lda $14,s + asl + tax + sep #$20 + lda tblAUDIO+1,x ; copy value for left + sta Select0E+8 + lda tblAUDIO,x ; copy value for right + sta Select0E+10 + rep #$20 + + jsr doSELECT ; send the audio values +MCSAU9 jmp Exit4 + +*--- New data + +* High byte for left value +* Low byte for right value + +tblAUDIO dw $0000 ; 0 + dw $0002 ; 1 + dw $0001 ; 2 + dw $0003 ; 3 + dw $0200 ; 4 + dw $0202 ; 5 + dw $0201 ; 6 + dw $0203 ; 7 + dw $0100 ; 8 + dw $0102 ; 9 + dw $0101 ; 10 + dw $0103 ; 11 + dw $0300 ; 12 + dw $0302 ; 13 + dw $0301 ; 14 + dw $0303 ; 15 + +*---------------------------- + +MCGetTimes + lda #mcUnImp + jmp Exit4 + +*---------------------------- + +MCGetNoTracks + lda #0 + sta $16,s ; clear result + + lda #0 ; TOCType = 0 + tax ; Track = 0 + jsr getTOC + bcs MCGNT9 + + sep #$20 ; last - first + 1 + lda TOCData+3 + sec + sbc TOCData+2 + clc + adc #1 + rep #$20 + and #$00ff + sta $16,s + + lda #0 +MCGNT9 jmp Exit2 + +*---------------------------- + +MCGetDiscTOC + lda #0 ; clear result + sta $18,s ; if track = 0 + sta $1a,s + + lda $14,s ; which track? + tax + bne MCGDT1 + lda #mcInvalidParam + bne MCGDT9 + +MCGDT1 lda #0 ; TOCType = 0 + jsr getTOC + bcs MCGNT9 + + lda #0 ; space + pha + pha + lda TOCData+8 ; HH:MM + xba + pha + lda TOCData+10 ; SS:FF + xba + pha + _MCBinToTime + pla + plx + sta $18,s + txa + sta $1a,s + + lda #0 +MCGDT9 jmp Exit4 + +*---------------------------- + +MCGetDiscID + LDA #mcUnImp + jmp Exit2 + +*---------------------------- + +MCRecord + lda #mcUnImp + jmp Exit2 + +*---------------------------- + +MCStop + jsr doSTARTSTOP + bcs MCStop9 + + lda #0 +MCStop9 jmp Exit2 + +*---------------------------- + +MCWaitRawData + lda $18,s + sta $00 + lda $1A,s + sta $02 + + lda #0 + ldy #2 + sta [$00],y + + lda #mcUnImp + jmp Exit8 + +*---------------------------- + +MCSetVolume + +*--- First, get values (because output might be different) + + jsr doSENSE + bcs MCSV9 + + jsr SENSE2SELECT + +*--- Then, copy volume + + sep #$20 + + lda $15,s ; get right volume (high-byte only) + sta Select0E+11 + + lda $17,s ; get left volume (high-byte only) + sta Select0E+9 + + rep #$20 + + jsr doSELECT ; A=0 or not +MCSV9 jmp Exit6 + diff --git a/scsi2/BCD.S b/scsi2/BCD.S new file mode 100644 index 0000000..554e111 --- /dev/null +++ b/scsi2/BCD.S @@ -0,0 +1,191 @@ +* +* Playing with BCD +* +* (c) 2018, Brutal Deluxe Software +* + + xc + xc + mx %00 + org $1000 + lst off + +*--- + + clc + xce + rep #$30 + + lda #$1000 + jsr BCD2HEX + + lda #$9999 + jsr BCD2HEX + + lda #$270f + jsr HEX2BCD + + sec + xce + sep #$30 + rts + +*--- + + mx %00 + +BCD2HEX pha + +* milliers + + and #$f000 + lsr + lsr + lsr + xba + tax + lda tblBM,x + sta result + +* centaines + + lda 1,s + and #$0f00 + asl + xba + tax + lda tblBC,x + clc + adc result + sta result + +* dizaines + + lda 1,s + and #$00f0 + lsr + lsr + lsr + tax + lda tblBD,x + clc + adc result + sta result + +* unites + + lda 1,s + and #$000f + asl + tax + lda tblBU,x + clc + adc result + sta result + + plx + jmp printME + +*--- BCD 2 HEX table + +tblBM dw 0000,1000,2000,3000,4000,5000,6000,7000,8000,9000 +tblBC dw 0000,0100,0200,0300,0400,0500,0600,0700,0800,0900 +tblBD dw 0000,0010,0020,0030,0040,0050,0060,0070,0080,0090 +tblBU dw 0000,0001,0002,0003,0004,0005,0006,0007,0008,0009 + +*--- + +HEX2BCD pha + +* Step 1 + + and #$f000 + lsr + lsr + lsr + xba + tax + lda tblH1,x + sta result + +* Step 2 + + lda 1,s + and #$0f00 + asl + xba + tax + sed + lda tblH2,x + clc + adc result + sta result + cld + +* Step 3 + + lda 1,s + and #$00f0 + lsr + lsr + lsr + tax + sed + lda tblH3,x + clc + adc result + sta result + cld + +* Step 4 + + lda 1,s + and #$000f + asl + tax + sed + lda tblH4,x + clc + adc result + sta result + cld + +exit plx + jmp printME + +*--- HEX 2 BCD table + +tblH1 dw $0000,$4096,$8192 +tblH2 dw $0000,$0256,$0512,$0768,$1024,$1280,$1536,$1792 + dw $2048,$2304,$2560,$2816,$3072,$3328,$3584,$3840 +tblH3 dw $0000,$0016,$0032,$0048,$0064,$0080,$0096,$0112 + dw $0128,$0144,$0160,$0176,$0192,$0208,$0224,$0240 +tblH4 dw $0000,$0001,$0002,$0003,$0004,$0005,$0006,$0007 + dw $0008,$0009,$0010,$0011,$0012,$0013,$0014,$0015 + + +*--- + +printME sta result + + sec + xce + sep #$30 + + lda result+1 + jsr $fdda + lda result + jsr $fdda + + lda #$8d + jsr $fded + + clc + xce + rep #$30 + rts + +*--- + +result ds 2 + diff --git a/scsi2/CDSCSI2.S b/scsi2/CDSCSI2.S new file mode 100644 index 0000000..d8853d8 --- /dev/null +++ b/scsi2/CDSCSI2.S @@ -0,0 +1,2184 @@ +* +* CD SCSI-2 +* A test app for SCSI-2 audio commands +* +* (c) 2018, Brutal Deluxe Software +* Visit http://www.brutaldeluxe.fr/ +* + + xc + xc + mx %00 + + rel + dsk CDSCSI2.l + lst off + +*---------- + + use 4/Int.Macs + use 4/Locator.Macs + use 4/Mem.Macs + use 4/Misc.Macs + use 4/Text.Macs + use 4/Util.Macs + +Debut = $00 +GSOS = $e100a8 + +*---------- + +dcREMOVE = $0004 +dcONLINE = $0010 +devCDROM = $0007 + +maxDEVICES = 8 + +dcINQUIRY = $8012 +doMODESELECT = $8015 +dcMODESENSE6 = $801a +dcSTARTSTOP = $801b ; also eject/insert +dcREADCAPACITY = $8025 +dcSUBCHANNEL = $8042 +dcREADTOC = $8043 +dcPATI = $8048 +dcPAUSERESUME = $804b +dcMODESENSE10 = $805a + +*---------- + + phk + plb + + tdc + sta myDP + + _TLStartUp + pha + _MMStartUp + pla + sta appID + ora #$0100 + sta myID + + _MTStartUp + _TextStartUp + + _IMStartUp + + pha + pha + PushLong #$010000 + PushWord myID + PushWord #%11000000_00011100 + PushLong #0 + _NewHandle + phd + tsc + tcd + lda [3] + sta ptrBUFFER + ldy #2 + lda [3],y + sta ptrBUFFER+2 + pld + ply + sty haBUFFER + plx + stx haBUFFER+2 + +*---------- + + PushWord #$00FF + PushWord #$0080 + _SetInGlobals + PushWord #$00FF + PushWord #$0080 + _SetOutGlobals + PushWord #$00FF + PushWord #$0080 + _SetErrGlobals + + PushWord #0 + PushLong #3 + _SetInputDevice + PushWord #0 + PushLong #3 + _SetOutputDevice + PushWord #0 + PushLong #3 + _SetErrorDevice + + PushWord #0 + _InitTextDev + PushWord #1 + _InitTextDev + PushWord #2 + _InitTextDev + + PushWord #$0c ; home + _WriteChar + +* DEBUG + + lda #proCONTROL + stal $300 + lda #^proCONTROL + stal $302 + + lda ptrBUFFER + stal $304 + lda ptrBUFFER+2 + stal $306 + +*---------------------------- +* MAIN MENU +*---------------------------- + +mainMENU = * + + PushLong #strMAINMENU + _WriteCString + + jsr waitFORKEY + cmp #"Q" + beq doQUIT + cmp #"q" + beq doQUIT + cmp #"1" + bne mainMENU + + jmp searchMENU + +*--- Data + +strMAINMENU asc 0d'CD SCSI-2'0d + asc '(c) 2018, Brutal Deluxe Software'0d + asc ' 1. Search for SCSI CD-ROM drives'0d + asc ' Q. Quit'0d00 + +*---------------------------- +* QUIT PROGRAM +*---------------------------- + +doQUIT = * + + _IMShutDown + _TextShutDown + _MTShutDown + + PushWord myID + _DisposeAll + + PushWord appID + _MMShutDown + + _TLShutDown + + jsl GSOS + dw $2029 + adrl proQUIT + + brk $bd + +*---------------------------- +* SEARCH MENU +*---------------------------- + +searchMENU = * + + jsr initFG ; init flags + + PushLong #strSEARCHMENU + _WriteCString + + jsr pollCDSCSI ; show CD-ROM devices + +]lp jsr waitFORKEY ; is it 0-9 + cmp #"0" + bcc ]lp + bne searchMENU2 + jmp mainMENU ; or even 0 to exit +searchMENU2 cmp #"9"+1 + bcs ]lp + + sec ; we have our device ID + sbc #"0" + cmp nbDEVICES ; in the 1-nbDEVICES range + bcc searchMENU3 + bne ]lp + +searchMENU3 dec + asl + tax + lda tblDEVICES,x + sta theDEVICE ; we have our device now + jmp deviceMENU + +*---------- Routines + +pollCDSCSI stz nbDEVICES ; number of SCSI CD-ROM found + + lda #1 ; start with device 1 + sta proDINFO+2 + +]lp jsl GSOS ; do a DInfo + dw $202c + adrl proDINFO + bcc found + + cmp #$0011 ; no more devices + bne loop + rts + +loop inc proDINFO+2 + bra ]lp + +*---------- Check it is a CD-ROM + +found lda proDINFO+8 ; not removable + and #dcREMOVE + beq loop + + lda proDINFO+20 ; not CD-ROM + cmp #devCDROM + bne loop + +*--- We have a CDROM + + lda nbDEVICES + asl + tax + lda proDINFO+2 + sta tblDEVICES,x + + jsr showDEVICEINFO + + inc nbDEVICES + lda nbDEVICES + cmp #maxDEVICES + bcc loop ; loop again + rts + +*--- Sub routines +* +* x - $xxxx - .NAMEOFDEVICE + +showDEVICEINFO + pha ; from a word to a string + pha + pha + _HexIt + PullLong strDEVID + + PushWord #$20 ; space + _WriteChar + + lda nbDEVICES ; write device index + inc + ora #"0" + pha + _WriteChar + + PushLong #strDEV ; show the string + _WriteCString + + lda devINFO1 ; from a STRL to a STR + xba + sta devINFO1 + + PushLong #devINFO2 + _WriteString + + PushWord #$0d + _WriteChar + rts + +*---------- Data + +strDEV asc ' - $' +strDEVID asc '0000 - '00 + +nbDEVICES ds 2 ; number of devices +theDEVICE ds 2 ; the device to play with +tblDEVICES ds 16*2 ; we authorize 16 devices + +strSEARCHMENU + asc 0d'Searching for SCSI CD-ROM drives...'0d + asc ' 0. Go back to previous menu'0d00 + +*---------------------------- +* DEVICE MENU +*---------------------------- + +deviceMENU = * + + lda theDEVICE ; get our ID + sta proSTATUS+2 + sta proCONTROL+2 + + pha ; from a word to a string + pha + pha + _HexIt + PullLong strDEVMENU + + PushLong #strDEVICEMENU + _WriteCString + +*--- + +]lp jsr waitFORKEY ; is it 0-9 + cmp #"0" + bcc ]lp + bne deviceMENU2 + jmp searchMENU ; or even 0 to exit +deviceMENU2 cmp #"8"+1 + bcs ]lp + + sec ; call the routines + sbc #"1" + asl + tax + lda ptrCOMMANDS,x + sta deviceMENU3+1 +deviceMENU3 jsr $bdbd + jmp deviceMENU + +ptrCOMMANDS da doINQUIRY + da doCAPACITY + da doAUDIOPARMS + da doREADTOC + da doSUBCHANNEL + da doPLAYSTOP + da doPAUSERESUME + da doINSERTEJECT + +*---------------- +* SCSI COMMANDS +*---------------- + +doINQUIRY = * + + jsr initCOMMANDDATA + + ldx #6-2 ; put the inquiry data +]lp lda scsiINQUIRY,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcINQUIRY + jsr statusCALL + bcc doINQUIRY1 + rts + +doINQUIRY1 + +*--- Display data + +* Byte 0 + + PushLong #strPQ + _WriteCString + + lda commandBUFF + and #%11100000 + xba + ldx #3 + jsr showBITS + + PushLong #strPDT + _WriteCString + + lda commandBUFF + and #%00011111 + asl + asl + asl + xba + ldx #5 + jsr showBITS + +* Byte 1 + + PushLong #strRMB + _WriteCString + + lda commandBUFF+1 + and #%10000000 + xba + ldx #1 + jsr showBITS + + PushLong #strDTM + _WriteCString + + lda commandBUFF+1 + and #%01111111 + asl + xba + ldx #7 + jsr showBITS + +* Byte 2 + + PushLong #strISO + _WriteCString + + lda commandBUFF+2 + and #%11000000 + xba + ldx #2 + jsr showBITS + + PushLong #strECMA + _WriteCString + + lda commandBUFF+2 + and #%00111000 + asl + asl + xba + ldx #3 + jsr showBITS + + PushLong #strANSI + _WriteCString + + lda commandBUFF+2 + and #%00000111 + asl + asl + asl + asl + asl + xba + ldx #3 + jsr showBITS + +* Byte 3 + + PushLong #strAENC + _WriteCString + + lda commandBUFF+3 + and #%10000000 + xba + ldx #1 + jsr showBITS + + PushLong #strTRMIOP + _WriteCString + + lda commandBUFF+3 + and #%01000000 + asl + xba + ldx #1 + jsr showBITS + + PushLong #strRDF + _WriteCString + + lda commandBUFF+3 + and #%00001111 + asl + asl + asl + asl + xba + ldx #4 + jsr showBITS + +* Bytes 4..6 not used + +* Byte 7 + + PushLong #strRELADR + _WriteCString + + lda commandBUFF+7 + and #%10000000 + xba + ldx #1 + jsr showBITS + + PushLong #strWBUS32 + _WriteCString + + lda commandBUFF+7 + and #%01000000 + asl + xba + ldx #1 + jsr showBITS + + PushLong #strWBUS16 + _WriteCString + + lda commandBUFF+7 + and #%00100000 + asl + asl + xba + ldx #1 + jsr showBITS + + PushLong #strSYNC + _WriteCString + + lda commandBUFF+7 + and #%00010000 + asl + asl + asl + xba + ldx #1 + jsr showBITS + + PushLong #strLINKED + _WriteCString + + lda commandBUFF+7 + and #%00001000 + asl + asl + asl + asl + xba + ldx #1 + jsr showBITS + + PushLong #strCMDQUE + _WriteCString + + lda commandBUFF+7 + and #%00000010 + asl + asl + asl + asl + asl + asl + xba + ldx #1 + jsr showBITS + + PushLong #strSFTRE + _WriteCString + + lda commandBUFF+7 + and #%00000001 + asl + asl + asl + asl + asl + asl + asl + xba + ldx #1 + jsr showBITS + +* Bytes 8 + + PushLong #strVI + _WriteCString + + lda #8 ; offset is 8 + tax ; length is 8 + jsr showTEXT + +* Bytes 16 + + PushLong #strPI + _WriteCString + + lda #16 + tax + jsr showTEXT + +* Bytes 32 + + PushLong #strPRL + _WriteCString + + lda #32 + ldx #4 + jsr showTEXT + + jmp waitKEY + +*--- Data + +scsiINQUIRY hex 12,00,00,00,00,00 + +strPQ asc 0d' Peripheral qualifier: '00 +strPDT asc ' - Peripheral device type : '00 +strRMB asc 0d' RMB: '00 +strDTM asc ' - Device-type modifier: '00 +strISO asc 0d' ISO version: '00 +strECMA asc ' - ECMA version: '00 +strANSI asc ' - ANSI-approved version: '00 +strAENC asc 0d' AENC: '00 +strTRMIOP asc ' - TrmIOP: '00 +strRDF asc ' - Response data format: '00 +strRELADR asc 0d' RelAdr: '00 +strWBUS32 asc ' - WBus32: '00 +strWBUS16 asc ' - WBus16: '00 +strSYNC asc ' - Sync: '00 +strLINKED asc 0d' Linked: '00 +strCMDQUE asc ' - CmdQue: '00 +strSFTRE asc ' - SftRe: '00 +strVI asc 0d' Vendor identification: '00 +strPI asc 0d' Product identification: '00 +strPRL asc 0d' Product revision level: '00 + +*---------------- + +doCAPACITY = * + + jsr initCOMMANDDATA + + ldx #10-2 ; put the pause data +]lp lda scsiCAPACITY,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcREADCAPACITY + jsr statusCALL + bcc doCAPACITY1 + rts + +doCAPACITY1 + +*--- Display number of blocks + + PushLong #strNBBLOCKS + _WriteCString + + lda commandBUFF + xba + jsr showWORD + + lda commandBUFF+2 + xba + jsr showWORD + +*--- Display block length + + PushLong #strBLOCKSIZE + _WriteCString + + lda commandBUFF+4 + xba + jsr showWORD + + lda commandBUFF+6 + xba + jsr showWORD + +*--- We're done + + jmp waitKEY + +*--- Data + +scsiCAPACITY hex 25,00,00,00,00,00,00,00,00,00 + +strNBBLOCKS asc 0d' Number of blocks: $'00 +strBLOCKSIZE asc 0d' Size of a block: $'00 + +*---------------- + +doAUDIOPARMS = * + + jsr initCOMMANDDATA + +*--- Execute command + + ldx #6-2 ; put the stop data +]lp lda scsiAP,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcMODESENSE6 ; MODE SENSE(10) + jsr statusCALL + bcc doAP1 + rts + +doAP1 + +*--- Header + + PushLong #strAPMT ; Medium type + _WriteCString + + lda commandBUFF+1 + jsr showBYTE + + PushLong #strAPDPOFUA + _WriteCString + + lda commandBUFF+2 + and #%00010000 + asl + asl + asl + xba + ldx #1 + jsr showBITS + + PushLong #strAPEBC + _WriteCString + + lda commandBUFF+2 + and #%00000001 + asl + asl + asl + asl + asl + asl + asl + xba + ldx #1 + jsr showBITS + +*--- Parameter block descriptor + +*- Density code + + PushLong #strAPDC + _WriteCString + + lda commandBUFF+4 + jsr showBYTE + +*- Number of blocks + + PushLong #strNBBLOCKS + _WriteCString + + lda commandBUFF+5 + xba + jsr showWORD + + lda commandBUFF+7 + jsr showBYTE + +*- Block length + + PushLong #strBLOCKSIZE + _WriteCString + + lda commandBUFF+9 + xba + jsr showWORD + + lda commandBUFF+11 + jsr showBYTE + +*--- We begin at +12 (this could have been better handled) + +* Byte 0 + + PushLong #strAPPS + _WriteCString + + lda commandBUFF+12 + and #%10000000 + xba + ldx #1 + jsr showBITS + + PushLong #strAPPC + _WriteCString + + lda commandBUFF+12 + and #%00111111 + asl + asl + xba + ldx #6 + jsr showBITS + +* Byte 2 + + PushLong #strAPIMMED + _WriteCString + + lda commandBUFF+12+1 + and #%00000100 + asl + asl + asl + asl + asl + xba + ldx #1 + jsr showBITS + + PushLong #strAPSOTC + _WriteCString + + lda commandBUFF+12+1 + and #%00000010 + asl + asl + asl + asl + asl + asl + xba + ldx #1 + jsr showBITS + +* Byte 5 + + PushLong #strAPAPR + _WriteCString + + lda commandBUFF+12+5 + and #%10000000 + xba + ldx #1 + jsr showBITS + + PushLong #strAPLBA + _WriteCString + + lda commandBUFF+12+5 + and #%00001111 + jsr showBYTE + +* Byte 6 + + PushLong #strAPLBPS + _WriteCString + + lda commandBUFF+12+6 + xba + jsr showWORD + +* Bytes 8/9 + + PushLong #strAP0C + _WriteCString + + lda commandBUFF+12+8 + and #%00001111 + jsr showBYTE + + PushLong #strAP0V + _WriteCString + + lda commandBUFF+12+9 + and #%11111111 + jsr showBYTE + +* Bytes 10/11 + + PushLong #strAP1C + _WriteCString + + lda commandBUFF+12+10 + and #%00001111 + jsr showBYTE + + PushLong #strAP1V + _WriteCString + + lda commandBUFF+12+11 + and #%11111111 + jsr showBYTE + +* Byte 12/13 + + PushLong #strAP2C + _WriteCString + + lda commandBUFF+12+12 + and #%00001111 + jsr showBYTE + + PushLong #strAP2V + _WriteCString + + lda commandBUFF+12+13 + and #%11111111 + jsr showBYTE + +* Byte 14/15 + + PushLong #strAP3C + _WriteCString + + lda commandBUFF+12+14 + and #%00001111 + jsr showBYTE + + PushLong #strAP3V + _WriteCString + + lda commandBUFF+12+15 + and #%11111111 + jsr showBYTE + +*--- We're done + + jmp waitKEY + +*--- Data +* 4e is PC= changeable values, 0e=audio control parameters page + +scsiAP hex 1a,00,4e,00,00,00 + +strAPMT asc 0d' Medium type: $'00 +strAPDC asc 0d' Density code: $'00 +strAPDPOFUA asc 0d' DPOFUA: '00 +strAPEBC asc ' - EBC: '00 +ascAPDC asc 0d' CD-ROM density code: $'00 +strAPPS asc 0d' Parameters savable: '00 +strAPPC asc ' - Page code: '00 +strAPIMMED asc 0d' Immed: '00 +strAPSOTC asc ' - SOTC: '00 +strAPAPR asc 0d' APRVal '00 +strAPLBA asc ' - Format of LBA/Sec.: '00 +strAPLBPS asc 0d' Logical blocks per second of audio playback: $'00 +strAP0C asc 0d' Output port 0 / Channel selection: $'00 +strAP0V asc ' - Volume: $'00 +strAP1C asc 0d' Output port 1 / Channel selection: $'00 +strAP1V asc ' - Volume: $'00 +strAP2C asc 0d' Output port 2 / Channel selection: $'00 +strAP2V asc ' - Volume: $'00 +strAP3C asc 0d' Output port 3 / Channel selection: $'00 +strAP3V asc ' - Volume: $'00 + +*---------------- + +doREADTOC = * + + jsr initCOMMANDDATA + +*--- Select mode + + lda #"1" ; max key + ldx #^strMSFMODE + ldy #strMSFMODE + jsr keyINRANGE + sta fgMSF ; in return + + asl ; 0 means block + sep #$20 ; 1 means MSF + sta scsiTOC+1 + rep #$20 + +*--- Execute command + + ldx #10-2 ; put the stop data +]lp lda scsiTOC,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcREADTOC ; READ TOC + jsr statusCALL + bcc doREADTOC1 + rts + +doREADTOC1 + +*--- The TOC is read now + + sep #$20 ; get track index + lda commandBUFF+2 + sta trackFIRST + lda commandBUFF+3 + sta trackLAST + sta nbSONGS + rep #$20 + +*--- Check track number + + lda nbSONGS + cmp #64 + bcc doREADTOC2 + rts + +doREADTOC2 + +*--- Display the header + + PushLong #strFIRSTT + _WriteCString + + lda trackFIRST + jsr showDECIMAL + + PushLong #strLASTT + _WriteCString + + lda trackLAST + jsr showDECIMAL + + PushWord #$0d + _WriteChar + + jsr printLINE ; print the entry list + jsr waitKEY + +*--- The end + + lda #1 + sta fgTOCREAD ; say the TOC was read + rts + +*--- Print the song list + +printLINE lda fgMSF ; 0 for block + bne printLINE1 ; 1 for MSF + + PushLong #strSEPL + _WriteCString + PushWord #$0d + _WriteChar + PushLong #strHBLOCK + _WriteCString + PushLong #strSEPL + bra printLINE2 + +printLINE1 PushLong #strSEPL1 + _WriteCString + PushWord #$0d + _WriteChar + PushLong #strHMSF + _WriteCString + PushLong #strSEPL1 + +printLINE2 _WriteCString + + PushWord #$0d + _WriteChar + +*--- Now, print each entry + + lda #4 ; index is 4 + sta indexTOC + +printLINE5 PushLong #strSEPC + _WriteCString + + ldy indexTOC + lda commandBUFF+2,y + and #$ff + jsr showDECIMAL + + PushLong #strSEPC + _WriteCString + + ldy indexTOC ; ADR + lda commandBUFF+1,y + and #%11110000 + xba + ldx #4 + jsr showBITS + + PushLong #strSEPC + _WriteCString + + ldy indexTOC ; CONTROL + lda commandBUFF+1,y + and #%00001111 + asl + asl + asl + asl + xba + ldx #4 + jsr showBITS + + PushLong #strSEPC + _WriteCString + +*--- Block or MSF + + lda fgMSF ; 0 for block + bne printLINE6 ; 1 for MSF + + ldy indexTOC + lda commandBUFF+4,y + xba + jsr showWORD + + ldy indexTOC + lda commandBUFF+6,y + xba + jsr showWORD + brl printLINE8 + +*--- Show minute:second:frame + +printLINE6 ldy indexTOC ; minute + lda commandBUFF+5,y + and #$ff + sta minFROM + jsr showDECIMAL + jsr printSEP + + ldy indexTOC ; second + lda commandBUFF+6,y + and #$ff + sta secFROM + jsr showDECIMAL + jsr printSEP + + ldy indexTOC + lda commandBUFF+7,y + and #$ff + jsr showDECIMAL + +*--- Now, show length + + PushLong #strSEPC + _WriteCString + + ldy indexTOC ; second + lda commandBUFF+13,y + and #$ff + sta minTO + + lda commandBUFF+14,y + and #$ff + sta secTO + +*- Calc length + + lda minTO ; minutes + sec + sbc minFROM + sta minTO + + lda secTO + sec + sbc secFROM + sta secTO + bpl printLINE7 ; secTO < secFROM + + clc ; if so, + adc #60 ; correct + sta secTO + dec minTO + +*- Subtract the 2 sec gap of the beginning + +printLINE7 lda secTO + sec + sbc #2 + sta secTO + bpl printLINE7B ; secTO < secFROM + + clc ; if so, + adc #60 ; correct + sta secTO ; again + dec minTO + +*- Show results + +printLINE7B lda minTO + jsr showDECIMAL + jsr printSEP + lda secTO + jsr showDECIMAL + +*--- End of line + +printLINE8 PushLong #strSEPC + _WriteCString + + PushWord #$0d + _WriteChar + + lda indexTOC ; next index + clc + adc #8 + sta indexTOC + + dec nbSONGS ; nb songs-- + bmi printLINE9 ; another check + beq printLINE9 + jmp printLINE5 + +printLINE9 lda fgMSF + bne printLINEA + + PushLong #strSEPL + _WriteCString + rts + +printLINEA PushLong #strSEPL1 + _WriteCString + rts + +*--- + +printSEP PushWord #':' + _WriteChar + rts + +*--- Data + +scsiTOC hex 43,00,00,00,00,00,00,00,00,00 + +strMSFMODE asc 0d'Select mode (0=block, 1=MSF) '00 + +strFIRSTT asc ' First track: '00 +strLASTT asc ' Last track: '00 + +strHBLOCK asc ' | Tr | ADR | Ctrl | Abs Addr |'0d00 +strHMSF asc ' | Tr | ADR | Ctrl | Mi:Se:Fr | Duree |'0d00 +strSEPL asc ' +=============================+'00 +strSEPL1 asc ' +=====================================+'00 +strSEPC asc ' | '00 + +minFROM ds 2 +secFROM ds 2 +minTO ds 2 +secTO ds 2 + +*---------------- + +doSUBCHANNEL = * + + jsr initCOMMANDDATA + +*--- Select mode Block or MSF + + lda #"1" ; max key + ldx #^strMSFMODE + ldy #strMSFMODE + jsr keyINRANGE + + sta fgMSF ; in return + asl ; 0 means block + sep #$20 ; 1 means MSF + sta scsiSUB+1 + rep #$20 + +*--- Select SubQ + + lda #"1" ; max key + ldx #^strSUBQ + ldy #strSUBQ + jsr keyINRANGE + + asl + asl + asl + asl + asl + asl + sep #$20 + sta scsiSUB+2 + rep #$20 + +*--- Select mode + + lda #"3" ; max key + ldx #^strSUBMODE + ldy #strSUBMODE + jsr keyINRANGE + + sep #$20 ; 0-3 + sta scsiSUB+3 + rep #$20 + +*--- Sometimes, the track is needed + + sep #$20 + lda #1 + sta scsiSUB+6 + rep #$20 + +*--- Check current status and replace the track + + jsr getCURRENTSTATUS + bcs doREADSUB1 + + sep #$20 ; set the track + lda statusBUFF+6 + sta scsiSUB+6 + rep #$20 + +doREADSUB1 + +*--- Execute command + + ldx #10-2 ; put the sub data +]lp lda scsiSUB,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcSUBCHANNEL ; READ SUB CHANNEL + jsr statusCALL + bcc doREADSUB2 + rts + +doREADSUB2 + +*--- The SUB CHANNEL is read now + + jsr doSUBHEADER + jsr subBYTE04 ; for all + +*- Allow 0-3 + + lda commandBUFF+4 + and #$ff + cmp #4 + bcs doREADSUB9 + asl + tax + lda ptrSUB,x + sta doREADSUB8+1 +doREADSUB8 jsr $bdbd +doREADSUB9 jmp waitKEY + +ptrSUB da doSUB00 + da doSUB01 + da doSUB02 + da doSUB03 + +*--- Audio status always returned + +doSUBHEADER + PushLong #strAUDIOSTATUS + _WriteCString + + lda commandBUFF+1 + and #$ff + pha + jsr showBYTE + pla + + ldx #-2 +]lp inx + inx + cmp tblAUDIOSTATUS,x + bmi noAUDIOSTATUS + bne ]lp + + lda #^strAUDIOS00 + pha + lda ptrAUDIOSTATUS,x + pha + _WriteCString + +noAUDIOSTATUS + rts + +*--- Data + +tblAUDIOSTATUS + dw $0000 + dw $0011 + dw $0012 + dw $0013 + dw $0014 + dw $0015 + dw $ffff ; end of table + +ptrAUDIOSTATUS + da strAUDIOS00 + da strAUDIOS11 + da strAUDIOS12 + da strAUDIOS13 + da strAUDIOS14 + da strAUDIOS15 + +strAUDIOSTATUS asc 0d' Audio status $'00 +strAUDIOS00 asc ' (Audio status byte not supported or not valid)'00 +strAUDIOS11 asc ' (Audio play operation in progress)'00 +strAUDIOS12 asc ' (Audio play operation paused)'00 +strAUDIOS13 asc ' (Audio play operation successfully completed)'00 +strAUDIOS14 asc ' (Audio play operation stopped due to error)'00 +strAUDIOS15 asc ' (No current audio status to return)'00 + +*--- Sub-Q channel data format for mode 00 + +doSUB00 + jsr doSUB01 ; re-use + + lda #0 ; UPC/Barcode + ldx #16 ; at offset 16 + jsr checkMCTC + + lda #1 ; T ISRC + ldx #32 ; at offset 32 + jmp checkMCTC + +*--- Sub-Q channel data format for mode 01 + +doSUB01 + jsr subBYTE05 + jsr subBYTE06 + jsr subBYTE07 + +*- Show Absolute CD-ROM address + + PushLong #strABSADR + _WriteCString + + lda scsiSUB+1 + and #%00000010 + bne doSUB01A + + PushWord #'$' ; show in blocks + _WriteChar + + lda commandBUFF+8 + xba + jsr showWORD + lda commandBUFF+10 + xba + jsr showWORD + bra doSUB01B + +doSUB01A lda commandBUFF+9 + jsr showDECIMAL + jsr printSEP + lda commandBUFF+10 + jsr showDECIMAL + jsr printSEP + lda commandBUFF+11 + jsr showDECIMAL + +*- Show Track relative CD-ROM address + +doSUB01B PushLong #strTRELADR + _WriteCString + + lda scsiSUB+1 + and #%00000010 + bne doSUB01C + + PushWord #'$' ; show in blocks + _WriteChar + + lda commandBUFF+12 + xba + jsr showWORD + lda commandBUFF+14 + xba + jmp showWORD + +doSUB01C lda commandBUFF+13 + jsr showDECIMAL + jsr printSEP + lda commandBUFF+14 + jsr showDECIMAL + jsr printSEP + lda commandBUFF+15 + jmp showDECIMAL + +*--- Data + +strABSADR asc 0d' Absolute CD-ROM address: '00 +strTRELADR asc 0d' Track relative CD-ROM address: '00 + +*--- Sub-Q channel data format for mode 02 + +doSUB02 + lda #0 ; UPC/Barcode + ldx #8 ; at offset 8 + jmp checkMCTC + +*--- Sub-Q channel data format for mode 03 + +doSUB03 + jsr subBYTE05 + jsr subBYTE06 + lda #1 ; T ISRC + ldx #8 ; at offset 8 + jmp checkMCTC + +*--- Show sub channel data format code + +subBYTE04 PushLong #strSCDFC + _WriteCString + + lda commandBUFF+4 + jmp showBYTE + +*--- Data + +strSCDFC asc 0d' Sub channel data format code: $'00 + +*--- Show ADR and CONTROL + +subBYTE05 PushLong #strADR + _WriteCString + +*- ADR + + lda commandBUFF+5 + and #%11110000 + xba + ldx #4 + jsr showBITS + +*- Control + + PushLong #strCONTROL + _WriteCString + + lda commandBUFF+5 + and #%00001111 + asl + asl + asl + asl + xba + ldx #4 + jmp showBITS + +*--- Data + +strADR asc 0d' ADR: '00 +strCONTROL asc ' - Control: '00 + +*--- Show Track number + +subBYTE06 PushLong #strTNUMBER + _WriteCString + + lda commandBUFF+6 + jmp showBYTE + +*--- Data + +strTNUMBER asc 0d' Track number : $'00 + +*--- Show index number + +subBYTE07 PushLong #strINUMBER + _WriteCString + + lda commandBUFF+7 + jmp showBYTE + +*--- Data + +strINUMBER asc 0d' Index number: $'00 + +*--- Check and display MCVal or TCVal + +*- Show MCVal or TCVal: data is valid if 1 + +checkMCTC pha ; A is MC=0 or TC=1 + phx ; X is index + + cmp #1 + beq checkMCTC1 + + PushLong #strMCVal + bra checkMCTC2 +checkMCTC1 PushLong #strTCVal +checkMCTC2 _WriteCString + + plx ; show bit MC/TCVal + phx + + lda commandBUFF,x + xba + ldx #1 + jsr showBITS + + plx + pla + phx + +*- Show string now + + cmp #1 + beq checkMCTC5 + + PushLong #strMCN + bra checkMCTC6 +checkMCTC5 PushLong #strTISRC +checkMCTC6 _WriteCString + +*- If the bit is 0, no valid data, but show anyway + + plx + +* lda commandBUFF,x +* and #%10000000 +* beq checkMCTC9 + + inx ; offset is in X, add 1 + txa + ldx #15 ; length is 15 + jsr showTEXT +checkMCTC9 rts + +*--- Data + +strMCVal asc 0d' MCVal: '00 +strTCVal asc 0d' TCVal: '00 +strMCN asc 0d' Media catalogue number: '00 +strTISRC asc 0d' Track ISRC: '00 + +*--- Data + +scsiSUB hex 42,00,00,00,00,00,00,00,00,00 + +strSUBQ asc 'Select SubQ (0=off, 1=on) '00 +strSUBMODE asc 'Select Data mode'0d + asc ' 0- Sub-Q channel data'0d + asc ' 1- CD-ROM current position'0d + asc ' 2- Media catalogue number (UPC/bar code)'0d + asc ' 3- Track international standard recording code (ISRC)'0d + asc 'Select an entry: '00 + +*---------------- + +doPLAYSTOP = * + + jsr initCOMMANDDATA + + lda fgPLAY + eor #1 + sta fgPLAY + bne doPLAY + + ldx #6-2 ; put the stop data +]lp lda scsiSTOP,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcSTARTSTOP + jmp controlCALL + +*- Was TOC read? + +doPLAY lda fgTOCREAD ; was TOC already read for this disk? + bne doPLAY1 ; yes + + jsr doREADTOC + bcc doPLAY1 + + lda #1 ; error, say first track + sta trackFIRST + sta trackLAST + +doPLAY1 sep #$20 ; copy first/last tracks + lda trackFIRST + sta scsiPLAY+4 + lda trackLAST + sta scsiPLAY+7 + rep #$20 + +*--- + + ldx #10-2 ; put the play data +]lp lda scsiPLAY,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcPATI ; PLAY AUDIO TRACK INDEX + jmp controlCALL + +*--- Data + +scsiPLAY hex 48,00,00,00,01,00,00,02,00,00 + +*---------------- + +doPAUSERESUME = * + + jsr initCOMMANDDATA + + lda fgPAUSE + eor #1 + sta fgPAUSE + bne doPAUSE + + ldx #10-2 ; put the resume data +]lp lda scsiRESUME,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcPAUSERESUME + jmp controlCALL + +doPAUSE ldx #10-2 ; put the pause data +]lp lda scsiPAUSE,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcPAUSERESUME + jmp controlCALL + +*--- Data + +scsiPAUSE hex 4b,00,00,00,00,00,00,00,00,00 +scsiRESUME hex 4b,00,00,00,00,00,00,00,01,00 + +*---------------- +* The standard way would be +* to check if a media is online + +doINSERTEJECT = * + + jsr initCOMMANDDATA + + lda fgINSERT + eor #1 + sta fgINSERT + beq doINSERT + + ldx #6-2 ; put the eject data +]lp lda scsiEJECT,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcSTARTSTOP + jmp controlCALL + +doINSERT ldx #6-2 ; put the insert data +]lp lda scsiINSERT,x + sta commandDATA,x + dex + dex + bpl ]lp + + lda #dcSTARTSTOP + jmp controlCALL + +*--- Data + +scsiINSERT hex 1b,00,00,00,03,00 +scsiEJECT hex 1b,00,00,00,02,00 +scsiREADY hex 1b,00,00,00,01,00 +scsiSTOP hex 1b,00,00,00,00,00 + +*--- Are we already playing? + +getCURRENTSTATUS + + ldx #10-2 ; put the sub data +]lp lda scsiSTATUS,x + sta statusDATA,x + dex + dex + bpl ]lp + + lda #dcSUBCHANNEL ; READ SUB CHANNEL + jsr statusCALL2 + bcc getCS1 + rts + +getCS1 lda statusBUFF+1 + and #$ff + cmp #$11 ; play in progress + beq getCS2 + cmp #$12 + beq getCS2 + sec ; error + hex 24 +getCS2 clc ; we're playing + rts + +*--- Data + +scsiSTATUS hex 42,00,40,01,00,00,00,00,00,00 + +*--- Routines + +initFG stz fgMSF ; init all flags + stz fgSUB + stz fgPLAY + stz fgPAUSE + stz fgINSERT + stz fgTOCREAD ; consider TOC was not read + rts + +*--- SCSI routines + +initCOMMANDDATA ; clear SCSI command buffer + ldx #12-2 +]lp stz commandDATA,x + dex + dex + bpl ]lp + rts + +*--- DStatus +* Uses the DControl parm buffer + +statusCALL sta proCONTROL+4 ; SCSI driver command + sep #$20 ; SCSI commands are 8-bit + sta commandDATA ; SCSI command + rep #$20 + + jsl GSOS ; call it + dw $202d + adrl proCONTROL + bra showERR + +*--- DStatus +* Uses the DControl parm buffer + +statusCALL2 sta proSTATUS+4 ; SCSI driver command + sep #$20 ; SCSI commands are 8-bit + sta statusDATA ; SCSI command + rep #$20 + + jsl GSOS ; call it + dw $202d + adrl proSTATUS + rts + +*--- DControl + +controlCALL sta proCONTROL+4 ; SCSI driver command + sep #$20 ; SCSI commands are 8-bit + sta commandDATA ; SCSI command + rep #$20 + + jsl GSOS ; call it + dw $202e + adrl proCONTROL + +*--- Show GS/OS error code + +showERR bcc showNOERR + sta errCODE ; save error code + + PushLong #strERROR + _WriteCString + + lda errCODE + jsr showWORD ; display it + + PushWord #$0d + _WriteChar + sec ; force carry +showNOERR rts + +*--- Data + +fgMSF ds 2 ; 0/1 +fgSUB ds 2 ; 0/1/2/3 +fgPLAY ds 2 ; 0/1 +fgPAUSE ds 2 ; 0/1 +fgINSERT ds 2 ; 0/1 + +* For music + +fgTOCREAD ds 2 ; was TOC read? +trackFIRST ds 2 +trackLAST ds 2 +indexTOC ds 2 +nbSONGS ds 2 ; nb of songs on disc + +strDEVICEMENU + asc 0d'Using SCSI CD-ROM device $' +strDEVMENU asc '0000'0d + asc ' 0. Go back to previous menu'0d + asc ' 1. Inquiry disk'0d + asc ' 2. Disk capacity'0d + asc ' 3. Audio control parameters'0d + asc ' 4. Read TOC'0d + asc ' 5. Read Sub Channel'0d + asc ' 6. Play/Stop disk'0d + asc ' 7. Pause/Resume'0d + asc ' 8. Insert/Eject disk'0d00 + +*---------------------------- +* TEXT ROUTINES +*---------------------------- + +*---------- Display in string offset +* A: offset in +* X: nb of chars to print +* offset from commandBUFF + +showTEXT ldy #^commandBUFF + phy + clc + adc #commandBUFF + pha + PushWord #0 + phx + _TextWriteBlock + rts + +*---------- Display decimal +* A: word + +showDECIMAL and #$ff + pha + + lda #' ' ; space by default + sta strDECIMAL + + PushLong #strDECIMAL + PushWord #2 + PushWord #0 + _Int2Dec + + PushLong #strDECIMAL + _WriteCString + rts + +*--- Data + +strDECIMAL asc '00'00 + +*---------- Display bits +* A: word +* X: nb of bits to display (1-8) + +showBITS cpx #16 + bcc showBITS0 + rts + +showBITS0 ldy #0 ; index +]lp pha + asl ; bit in carry + bcs showBITS1 + + lda #'00' ; output 0 + bra showBITS2 +showBITS1 lda #'11' ; output 1 +showBITS2 sta strBITS,y + + pla + asl + iny + dex + bne ]lp + + lda #0 ; end C string + sta strBITS,y + + PushLong #strBITS ; show the string + _WriteCString + rts + +*--- Data + +strBITS ds 18 ; 16 bits + 2 zeros + +*---------- Display a byte + +showBYTE pha ; from a byte to a string + pha + pha ; <= here, really + _HexIt + + lda #' ' ; empty string by default + sta strBYTE + + pla ; we don't use + pla + sta strBYTE + + PushLong #strBYTEP ; show the string + _WriteString + rts + +*--- Data + +strBYTEP dfb 2 ; for a Pascal string +strBYTE asc ' ' + +*---------- Display a word + +showWORD pha ; from a word to a string + pha + pha ; <= here, really + _HexIt + PullLong strHEX + + PushLong #strHEX ; show the string + _WriteCString + rts + +*--- Data + +strHEX asc '0000'00 + +*---------- Wait for a key in a range 0-Acc +* A: high key +* X: high ptr to C string +* Y: low ptr to C string + +keyINRANGE sta keyHIGH + sty strKEY + stx strKEY+2 + +]lp PushLong strKEY + _WriteCString + + PushWord #0 + PushWord #1 ; echo char + _ReadChar + pla + and #$ff + cmp #"0" + bcc ]lp + cmp keyHIGH + bcc keyINRANGE9 + beq keyINRANGE9 + bra ]lp + +keyINRANGE9 sec + sbc #"0" + pha + bra waitKEY8 + +*--- Data + +strKEY ds 4 ; pointer to string +keyHIGH ds 2 + +*---------- Wait for a key + +waitKEY PushWord #$0d + _WriteChar + + PushWord #0 + PushWord #0 ; don't echo char + _ReadChar + bra waitKEY1 ; go below + +*---------- Wait for a key + +waitFORKEY PushLong #strINPUT + _WriteCString + + PushWord #0 ; wait for key + PushWord #1 ; echo char + _ReadChar + +waitKEY1 lda 1,s ; check CR + and #$ff ; of typed + sta 1,s ; in char + cmp #$8d + beq waitKEY9 + +waitKEY8 PushWord #$0d ; return + _WriteChar + +waitKEY9 pla ; restore entered char + rts + +*--- Data + +strINPUT asc 'Select an entry: '00 + +*---------------------------- +* DATA +*---------------------------- + +errCODE ds 2 ; GS/OS error code +strERROR asc 0d' GS/OS error code $'00 + +*--- + +proQUIT dw 2 ; pcount + ds 4 ; pathname + ds 2 ; flags + +proDINFO dw 8 ; Parms for DInfo + ds 2 ; 02 device num + adrl devINFO ; 04 device name + ds 2 ; 08 characteristics + ds 4 ; 0A total blocks + ds 2 ; 0E slot number + ds 2 ; 10 unit number + ds 2 ; 12 version + ds 2 ; 14 device id + +devINFO dw $0032 ; buffer size +devINFO1 db $00 ; length +devINFO2 db $00 +devINFO3 ds $30 ; data + +proSTATUS dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8000 ; 04 status/control code + adrl statusLIST ; 06 status list + adrl 1024 ; 0A request count + ds 4 ; 0E transfer count + +statusLIST ds 2 ; always 0000 +statusDATA hex 00 ; 00 + hex 00 ; 01 + hex 00 ; 02 + hex 00 ; 03 + hex 00 ; 04 + hex 00 ; 05 + hex 00 ; 06 + hex 00 ; 07 + hex 00 ; 08 + hex 00 ; 09 + hex 00 ; 10 + hex 00 ; 11 + adrl statusBUFF +statusBUFF ds 1234 ; more than 1024 + +proCONTROL dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8000 ; 04 status/control code + adrl controlLIST ; 06 status list + adrl 1024 ; 0A request count + ds 4 ; 0E transfer count + +controlLIST ds 2 ; always 0000 +commandDATA hex 00 ; 00 + hex 00 ; 01 + hex 00 ; 02 + hex 00 ; 03 + hex 00 ; 04 + hex 00 ; 05 + hex 00 ; 06 + hex 00 ; 07 + hex 00 ; 08 + hex 00 ; 09 + hex 00 ; 10 + hex 00 ; 11 +commandPTR adrl commandBUFF +commandBUFF ds 1234 ; more than 1024 + +*---------- + +appID ds 2 +myID ds 2 + +myDP ds 2 +ptrBUFFER ds 4 +haBUFFER ds 4 + diff --git a/scsi2/GSCSI2.S b/scsi2/GSCSI2.S new file mode 100644 index 0000000..f0d31e41 --- /dev/null +++ b/scsi2/GSCSI2.S @@ -0,0 +1,636 @@ +* +* GSCSI2 +* Test our new CD driver +* +* (c) 2018, Brutal Deluxe Software +* + + mx %00 + rel + dsk GSCSI2.l + lst off + +*---------------------------- + + use 4/Locator.Macs + use 4/Mem.Macs + use 4/Misc.Macs + use 4/Util.Macs + +GSOS = $e100a8 + +dcREMOVE = $0004 +dcONLINE = $0010 +devCDROM = $0007 + +*---------------------------- + +*---------- Start up + + phk + plb + + clc + xce + rep #$30 + + tdc + sta myDP + + _TLStartUp + pha + _MMStartUp + pla + sta appID + ora #$0100 + sta myID + + _MTStartUp + + jsr playNOW + jsr waitKEY + +*---------- Shut down + + _MTShutDown + + PushWord myID + _DisposeAll + + PushWord appID + _MMShutDown + + _TLShutDown + + jsl GSOS + dw $2029 + adrl proQUIT + + brk $bd ; because + +*--- + +waitKEY ldal $e0bfff + bpl waitKEY + stal $e0c00f + rts + + +*---------------------------- +* 202c DInfo +* 202d DStatus +* 202e DControl +* 202f DRead +* 2030 DWrite +* 2036 DRename + +playNOW + lda #proQUIT + stal $300 + lda #^proQUIT + stal $302 + + lda #1 + sta proDINFO+2 + +]lp jsl GSOS + dw $202c + adrl proDINFO + bcc found + + cmp #$0011 ; no more devices + bne loop + rts ; none, we exit + +loop inc proDINFO+2 + bra ]lp + +*---------- + +found lda proDINFO+8 + and #dcREMOVE + beq loop + + lda proDINFO+20 + cmp #devCDROM + bne loop + +*--- We have our CDROM + + lda proDINFO+2 + sta proREADTOC+2 + sta proSUB+2 + sta proHEADER+2 ; for data cd only + sta proPLAY10+2 + sta proPLAY12+2 + sta proPLAYMSF+2 + sta proPLAYTR10+2 + sta proPLAYTR12+2 + sta proCONTROL+2 + sta proPAUSE+2 + sta proRESUME+2 + +* READ TOC 43 + + jsl GSOS + dw $202d + adrl proREADTOC + sta errCODE + +* READ SUB CHANNEL 42 + + jsl GSOS + dw $202d + adrl proSUB + sta errCODE1 + +* READ HEADER 44 + +* jsl GSOS +* dw $202d +* adrl proHEADER +* sta errCODE2 + +* PLAY AUDIO(10) 45 + +* jsl GSOS +* dw $202e +* adrl proPLAY10 +* sta errCODE3 +* jsr waitKEY + +* PLAY AUDIO(12) A5 + +* jsl GSOS +* dw $202e +* adrl proPLAY12 +* sta errCODE4 +* jsr waitKEY + +* PLAY AUDIO MSF 47 + +* jsl GSOS +* dw $202e +* adrl proPLAYMSF +* sta errCODE5 +* jsr waitKEY + +* PLAY TRACK RELATIVE(10) 49 + + jsl GSOS + dw $202e + adrl proPLAYTR10 + sta errCODE6 + jsr waitKEY + +* PLAY TRACK RELATIVE(12) A9 + + jsl GSOS + dw $202e + adrl proPLAYTR12 + sta errCODE7 + jsr waitKEY + +* PLAY AUDIO TRACK INDEX 48 + + jsl GSOS + dw $202e + adrl proCONTROL + sta errCODE9 + +* PAUSE RESUME 4B + +* jsr waitKEY + +* jsl GSOS +* dw $202e +* adrl proPAUSE +* sta errCODE10 + +* jsr waitKEY + +* jsl GSOS +* dw $202e +* adrl proRESUME +* sta errCODE11 + + rts + +*---------------------------- + +*---------- Program + +myDP ds 2 +appID ds 2 +myID ds 2 + +*---------- GS/OS + + asc "proQUIT" + +proQUIT dw 2 ; pcount + ds 4 ; pathname + ds 2 ; flags + + asc "errorCODE" + +errCODE ds 2 +errCODE1 ds 2 +errCODE2 ds 2 +errCODE3 ds 2 +errCODE4 ds 2 +errCODE5 ds 2 +errCODE6 ds 2 +errCODE7 ds 2 +errCODE8 ds 2 +errCODE9 ds 2 +errCODE10 ds 2 +errCODE11 ds 2 + + asc "proDINFO" + +proDINFO dw 8 ; Parms for DInfo + ds 2 ; 02 device num + adrl devINFO ; 04 device name + ds 2 ; 08 characteristics + ds 4 ; 0A total blocks + ds 2 ; 0E slot number + ds 2 ; 10 unit number + ds 2 ; 12 version + ds 2 ; 14 device id + + asc "devINFO" + +devINFO dw $0032 ; buffer size +devNAMEopen db $00 ; length +devNAMEopen1 db $00 +devNAMEopen2 ds $30 ; data + + asc "proDSTATUS" + +proDSTATUS dw 5 ; 00 pcount + ds 2 ; 02 device num + ds 2 ; 04 status code + adrl devSTATUS ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "devSTATUS" + +devSTATUS ds 8 + +*--- + + asc "proHEADER" + +proHEADER dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8044 ; 04 status code + adrl headerLIST ; 06 status list + adrl 1024 ; 0A request count + ds 4 ; 0E transfer count + + asc "headerLIST" + +headerLIST ds 2 ; 00 + hex 44 ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 00 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 04 ; 7 + hex 00 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl headerBUFF ; 04 +headerBUFF ds 1024 + ds 8 + +*--- + + asc "proSUB" + +proSUB dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8042 ; 04 status code + adrl subLIST ; 06 status list + adrl 1024 ; 0A request count + ds 4 ; 0E transfer count + + asc "subLIST" + +subLIST ds 2 ; 00 + hex 42 ; 0 + hex 00 ; 1 + hex 40 ; 2 + hex 01 ; 3 + hex 00 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 04 ; 7 + hex 00 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl subBUFF ; 04 +subBUFF ds 1024 + ds 8 + +*--- PAUSE + + asc "proPAUSE" + +proPAUSE dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $804b ; 04 status code + adrl pauseLIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "pauseLIST" + +pauseLIST ds 2 ; 00 + hex 4b ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 00 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 00 ; 7 + hex 00 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl pauseBUFF ; 04 +pauseBUFF ds 1024 + ds 8 +*--- + + asc "proRESUME" + +proRESUME dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $804b ; 04 status code + adrl resumeLIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "resumeLIST" + +resumeLIST ds 2 ; 00 + hex 4b ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 00 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 00 ; 7 + hex 01 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl resumeBUFF ; 04 +resumeBUFF ds 1024 + ds 8 + +*--- READ TOC + +proREADTOC dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8043 ; 04 status code + adrl readtocLIST ; 06 status list + adrl 1024 ; 0A request count + ds 4 ; 0E transfer count + + asc "readtocLIST" + +readtocLIST ds 2 ; 00 + hex 43 ; 0 + hex 02 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 00 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 04 ; 7 + hex 00 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl readtocBUFF ; 04 +readtocBUFF ds 1024 + ds 8 + +*--- PLAY AUDIO TRACK INDEX + + asc "proCONTROL" + +proCONTROL dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8048 ; 04 status code + adrl controlLIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "controlLIST" + +controlLIST ds 2 ; 00 +commandDATA hex 48 ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 01 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 01 ; 7 + hex 00 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl commandBUFF +commandBUFF ds 1024 + ds 8 + +*--- PLAY AUDIO(10) + + asc "proPLAY10" + +proPLAY10 dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8045 ; 04 status code + adrl play10LIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "play10LIST" + +play10LIST ds 2 ; 00 + hex 45 ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 30 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 20 ; 7 + hex 00 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl play10BUFF +play10BUFF ds 1024 + ds 8 + +*--- PLAY AUDIO(12) + + asc "proPLAY12" + +proPLAY12 dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $80a5 ; 04 status code + adrl play12LIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "play12LIST" + +play12LIST ds 2 ; 00 + hex a5 ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 20 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 10 ; 7 + hex 08 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl play12BUFF +play12BUFF ds 1024 + ds 8 + +*--- PLAY AUDIO MSF + + asc "proPLAYMSF" + +proPLAYMSF dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8047 ; 04 status code + adrl playmsfLIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "playmsfLIST" + +playmsfLIST ds 2 ; 00 + hex 47 ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 14 ; 3 + hex 15 ; 4 + hex 00 ; 5 + hex 17 ; 6 + hex 16 ; 7 + hex 00 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl playmsfBUFF +playmsfBUFF ds 1024 + ds 8 + +*--- PLAY AUDIO TRACK RELATIVE(10) + + asc "proPLAYTR10" + +proPLAYTR10 dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $8049 ; 04 status code + adrl playtr10LIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "playtr10LIST" + +playtr10LIST ds 2 ; 00 + hex 49 ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 00 ; 4 + hex 08 ; 5 + hex 01 ; 6 + hex 00 ; 7 + hex 10 ; 8 + hex 00 ; 9 + hex 00 ; A + hex 00 ; B + + adrl playtr10BUFF +playtr10BUFF ds 1024 + ds 8 + +*--- PLAY AUDIO TRACK RELATIVE(12) + + asc "proPLAYTR12" + +proPLAYTR12 dw 5 ; 00 pcount + ds 2 ; 02 device num + dw $80a9 ; 04 status code + adrl playtr12LIST ; 06 status list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "playtr12LIST" + +playtr12LIST ds 2 ; 00 + hex a9 ; 0 + hex 00 ; 1 + hex 00 ; 2 + hex 00 ; 3 + hex 06 ; 4 + hex 00 ; 5 + hex 00 ; 6 + hex 00 ; 7 + hex 80 ; 8 + hex 00 ; 9 + hex 01 ; A + hex 00 ; B + + adrl playtr12BUFF +playtr12BUFF ds 1024 + ds 8 + +*--- + + asc "proDCONTROL" + +proDCONTROL dw 5 ; 00 pcount + ds 2 ; 02 device num + ds 2 ; 04 control code + adrl devCONTROL ; 06 control list + ds 4 ; 0A request count + ds 4 ; 0E transfer count + + asc "devCONTROL" + +devCONTROL ds 512 + +*---------- + diff --git a/scsi2/SCSI Driver ERS 6.1 SCSI-2.pdf b/scsi2/SCSI Driver ERS 6.1 SCSI-2.pdf new file mode 100644 index 0000000..36e7b81 Binary files /dev/null and b/scsi2/SCSI Driver ERS 6.1 SCSI-2.pdf differ diff --git a/scsi2/SCSI.Drivers/SCSI Command Table b/scsi2/SCSI.Drivers/SCSI Command Table new file mode 100644 index 0000000..9ae6472 --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSI Command Table @@ -0,0 +1 @@ + ;******************************************************* ; ; SCSI Driver 'Command Table'. ; ; Written by Matt Gulick. Started May 20,1988 ; ; Copyright Apple Computer, Inc. 1988,89 ; ;******************************************************* ;******************************************************* ; ; This file contains the Command Tables that actually ; drives the SCSI Driver when talking to a target ; device. By changing these tables, the SCSI Driver ; will be able to talk to almost any class of SCSI ; Device. There are actually two tables in this file. ; The first table is a list of a two word group for ; each command supported. ; ; The first word is the actual SCSI Command Number ; followed by the low word of that commands table ; address. We use the only the low word because the ; second table is in the same bank as the indexing ; table. ; ; The second table is the actual command translation ; data. The first word is a set of flags that ; indicate some of the translation and verification ; that needs to take place. ; ; Bit 15 = Data is being sent to the device ; 14 = Data is to be received by us ; 13 = This is a Status Command ; 12 = This is a Control Command ; 11 = Data I/O Command ; 10 = Device I/O Command ; 9 = Command Includes Block Number ; 8 = Must be first device if linked ; 7 = Internal Driver Command Only ; 6 = Must issue a DISK_SW with this call ; 5 = Results in device offline ; 4 = Reserved ; 3 = Command Data needs no translation ; 2 = Reserved ; 1 = Block request count goes into command ; 0 = Byte request count goes into command ; ; The second word is a time out tick count to be used by ; the SCSI Manager to determine when to abandone any SCSI ; Device transaction due to lack of response by the ; target. Each tick = 250 ms. ; ; Any additional words are only used if Bit 3 above is ; zero. The translation bytes conatin two offsets. A ; Source and a Destination offset. This is used by the ; driver to take information fron the caller's command ; (Source) and .OR. them in to their proper location in ; the SCSI Command Packet (Destination). ; ; MSBit LSBit ; %0000 0000 0000 0000 ; ; R S R D ; e o e e ; s u s s ; e r e t ; r c r i ; v e v t ; e e i ; d d n ; a ; t ; i ; o ; n ; ; A NULL Word at any location in the command entry ; will terminate translation for that command. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; May 20, 1988 File started. ; Feb 28, 1989 Added Tape Drive Tables STRING PASCAL BLANKS OFF PAGESIZE 70 PRINT NOGEN PRINT NOMDIR MACHINE M65816 PRINT OFF INCLUDE 'scsihd.equates' INCLUDE 'M16.MEMORY' INCLUDE 'M16.UTIL' PRINT ON EJECT ;******************************************************* ; ; List of Commands Supported: ; ;******************************************************* EXPORT cmd_t_tbl cmd_t_tbl PROC ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; ; ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $002A ; Command $2A 'WRITE (EXTENDED)' dc.w scsi_cmd2A ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $000A ; Command $0A 'WRITE' dc.w scsi_cmd0A ; Mandatory ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0025 ; Command $25 'READ CAPACITY' dc.w scsi_cmd25 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0004 ; Command $04 'FORMAT UNIT' dc.w scsi_cmd04 ; Mandatory ; dc.w $001E ; Command $1E 'PREVENT/ALLOW REMOVAL' dc.w scsi_cmd1E ; Optional ; dc.w $0001 ; Command $01 'REZERO UNIT' dc.w scsi_cmd01 ; Optional ; dc.w $0007 ; Command $07 'REASSIGN BLOCKS' dc.w scsi_cmd07 ; Optional ; dc.w $000B ; Command $0B 'SEEK' dc.w scsi_cmd0B ; Optional ; dc.w $002B ; Command $2B 'SEEK (EXTENDED)' dc.w scsi_cmd2B ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $001B ; Command $1B 'START/STOP UNIT' dc.w scsi_cmd1B ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $002E ; Command $2E 'WRITE AND VERIFY' dc.w scsi_cmd2E ; Optional ; dc.w $002F ; Command $2F 'VERIFY' dc.w scsi_cmd2F ; Optional ; dc.w $0033 ; Command $33 'SET LIMITS' dc.w scsi_cmd33 ; Optional ; dc.w $0034 ; Command $34 'PRE-FETCH' dc.w scsi_cmd34 ; Optional ; dc.w $0035 ; Command $35 'SYNCHRONIZE CACHE' dc.w scsi_cmd35 ; Optional ; dc.w $0036 ; Command $36 'LOCK/UNLOCK CACHE' dc.w scsi_cmd36 ; Optional ; dc.w $0037 ; Command $37 'READ DEFECT DATA' dc.w scsi_cmd37 ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $003E ; Command $3E 'READ LONG' dc.w scsi_cmd3E ; Optional ; dc.w $003F ; Command $3F 'WRITE LONG' dc.w scsi_cmd3F ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE' dc.w scsi_cmd5A ; Mandatory ; dc.w $00B3 ; Command $B3 'SET LIMITS' dc.w scsi_cmdB3 ; Optional ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd\ OR scsi_dtype = changer THEN ; ; ; Commands added for SCSI-2 Audio-CD support ; BD 201811 ; ; dc.w $0042 ; Command $42 'READ SUB-CHANNEL' dc.w scsi_cmd42 ; Mandatory ; dc.w $0043 ; Command $43 'READ TOC' dc.w scsi_cmd43 ; Mandatory ; dc.w $0044 ; Command $44 'READ HEADER' (FOR DATA DISCS ONLY) dc.w scsi_cmd44 ; Mandatory ; dc.w $0045 ; Command $45 'PLAY AUDIO(10)' dc.w scsi_cmd45 ; Mandatory ; dc.w $00A5 ; Command $A5 'PLAY AUDIO(12)' dc.w scsi_cmdA5 ; Mandatory ; dc.w $0047 ; Command $47 'PLAY AUDIO MSF' dc.w scsi_cmd47 ; Mandatory ; dc.w $0048 ; Command $48 'PLAY AUDIO TRACK/INDEX' dc.w scsi_cmd48 ; Mandatory ; dc.w $0049 ; Command $49 'PLAY TRACK RELATIVE(10)' dc.w scsi_cmd49 ; Mandatory ; dc.w $00A9 ; Command $A9 'PLAY TRACK RELATIVE(12)' dc.w scsi_cmdA9 ; Mandatory ; dc.w $004B ; Command $4B 'PAUSE/RESUME' dc.w scsi_cmd4B ; Mandatory ; dc.w $0D8 ; Command $D8 'READ CD-DA' dc.w scsi_cmdD8 ; Mandatory ; dc.w $00D9 ; Command $D9 'READ CD-DA MSF' dc.w scsi_cmdD9 ; Mandatory ; ; end of BD 201811 ; dc.w $00CC ; Command $CC 'AUDIO STATUS' dc.w scsi_cmdCC ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0025 ; Command $25 'READ CAPACITY' dc.w scsi_cmd25 ; Mandatory ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $00C0 ; Command $C0 'EJECT DISK' dc.w scsi_cmdC0 ; Mandatory ; dc.w $001E ; Command $1E 'PREVENT/ALLOW REMOVAL' dc.w scsi_cmd1E ; Optional ; dc.w $00C9 ; Command $C9 'AUDIO PLAY' dc.w scsi_cmdC9 ; Mandatory ; dc.w $00CE ; Command $CE 'AUDIO CONTROL' dc.w scsi_cmdCE ; Mandatory ; dc.w $00CA ; Command $CA 'AUDIO PAUSE' dc.w scsi_cmdCA ; Mandatory ; dc.w $00CB ; Command $CB 'AUDIO STOP' dc.w scsi_cmdCB ; Mandatory ; dc.w $00CD ; Command $CD 'AUDIO SCAN' dc.w scsi_cmdCD ; Mandatory ; dc.w $0001 ; Command $01 'REZERO UNIT' dc.w scsi_cmd01 ; Optional ; dc.w $000B ; Command $0B 'SEEK' dc.w scsi_cmd0B ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $001B ; Command $1B 'START/STOP UNIT' dc.w scsi_cmd1B ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $002B ; Command $2B 'SEEK (EXTENDED)' dc.w scsi_cmd2B ; Optional ; dc.w $002F ; Command $2F 'VERIFY' dc.w scsi_cmd2F ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT (EXTENDED)' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE (EXTENDED)' dc.w scsi_cmd5A ; Optional ; dc.w $00C1 ; Command $C1 'READ TOC' dc.w scsi_cmdC1 ; Mandatory ; dc.w $01C2 ; Command $1C2 'READ Q SUBCODE VOLUME LEVEL' dc.w scsi_cmd1C2 ; Mandatory ; dc.w $00C2 ; Command $C2 'READ Q SUBCODE' dc.w scsi_cmdC2 ; Mandatory ; dc.w $00C3 ; Command $C3 'READ HEADER' dc.w scsi_cmdC3 ; Mandatory ; dc.w $00C8 ; Command $C8 'AUDIO TRACK SEARCH' dc.w scsi_cmdC8 ; Mandatory ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN ; ; ; ; dc.w $002A ; Command $2A 'WRITE (EXTENDED)' dc.w scsi_cmd2A ; Mandatory ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $002B ; Command $2B 'SEEK (EXTENDED)' dc.w scsi_cmd2B ; Optional ; dc.w $001B ; Command $1B 'LOAD/UNLOAD UNIT' dc.w scsi_cmd1B ; Optional ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0001 ; Command $01 'REZERO UNIT' dc.w scsi_cmd01 ; Optional ; dc.w $0025 ; Command $25 'READ CAPACITY' dc.w scsi_cmd25 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $000A ; Command $0A 'WRITE' dc.w scsi_cmd0A ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $000B ; Command $0B 'SEEK' dc.w scsi_cmd0B ; Optional ; dc.w $0004 ; Command $04 'FORMAT UNIT' dc.w scsi_cmd04 ; Mandatory ; dc.w $0007 ; Command $07 'REASSIGN BLOCKS' dc.w scsi_cmd07 ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $0037 ; Command $37 'READ DEFECT DATA' dc.w scsi_cmd37 ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $0005 ; Command $05 'Send QIC 100 Sys Data' dc.w scsi_cmd05 ; Optional ; dc.w $0006 ; Command $06 'Recv QIC 100 Sys Data' dc.w scsi_cmd06 ; Optional ; dc.w $0009 ; Command $09 'VERIFY UNIT' dc.w scsi_cmd09 ; Optional ; dc.w $000D ; Command $0D 'Read SCSI Defect (Vendor)' dc.w scsi_cmd0D ; Optional ; dc.w $000E ; Command $0E 'Read Controller Info' dc.w scsi_cmd0E ; Optional ; dc.w $000F ; Command $0F 'Write Controller Info' dc.w scsi_cmd0F ; Optional ; dc.w $0010 ; Command $10 'DRIVE PASS-THRU' dc.w scsi_cmd10 ; Optional ; dc.w $0011 ; Command $11 'READ DRIVE LINES' dc.w scsi_cmd11 ; Optional ; dc.w $0013 ; Command $13 'Read QIC INFO' dc.w scsi_cmd13 ; Optional ; dc.w $0014 ; Command $14 'Write QIC INFO' dc.w scsi_cmd14 ; Optional ; dc.w $0019 ; Command $19 'Read QIC Defect Data' dc.w scsi_cmd19 ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT (EXTENDED)' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE (EXTENDED)' dc.w scsi_cmd5A ; Optional ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN ; ; ; ; dc.w $0034 ; Command $34 'GET DATA STATUS' dc.w scsi_cmd34 ; Optional ; dc.w $0007 ; Command $07 'GET DATA STATUS' dc.w scsi_cmd07 ; Optional ; dc.w $000E ; Command $0E 'EXPLORATORY STATUS' dc.w scsi_cmd0E ; Optional ; dc.w $0011 ; Command $11 'SPACE' dc.w scsi_cmd11 ; Optional ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $000A ; Command $0A 'SEND' dc.w scsi_cmd0A ; Mandatory ; dc.w $0024 ; Command $24 'DEFINE WINDOW PARAMETERS' dc.w scsi_cmd24 ; Mandatory ; dc.w $001B ; Command $1B 'SCAN (EXTENDED)' dc.w scsi_cmd1B ; Optional ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0025 ; Command $25 'GET WINDOW PARAMETRS' dc.w scsi_cmd25 ; Optional ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $0031 ; Command $31 'MEDIUM POSSITION' dc.w scsi_cmd31 ; Optional ; dc.w $002A ; Command $2A 'SEND (EXTENDED)' dc.w scsi_cmd2A ; Optional ; dc.w $0018 ; Command $18 'COPY' dc.w scsi_cmd18 ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $0039 ; Command $39 'COMPARE' dc.w scsi_cmd39 ; Optional ; dc.w $003A ; Command $3A 'COPY AND VERIFY' dc.w scsi_cmd3A ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT (EXTENDED)' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE (EXTENDED)' dc.w scsi_cmd5A ; Optional ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN ; ; ; ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0001 ; Command $01 'RESET PRINTER' dc.w scsi_cmd01 ; Optional ; dc.w $0002 ; Command $02 'DOWN LOAD CODE' dc.w scsi_cmd02 ; Optional ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0004 ; Command $04 'FORMAT UNIT' dc.w scsi_cmd04 ; Mandatory ; dc.w $0005 ; Command $05 'DRAW BITS' dc.w scsi_cmd05 ; Optional ; dc.w $0006 ; Command $06 'CLEAR BITS' dc.w scsi_cmd06 ; Optional ; dc.w $000A ; Command $0A 'PRINT' dc.w scsi_cmd0A ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ENDIF ;------------------------------------------------------------------------------- dc.w $FFFF ; End of the List. dc.w $FFFF ; EJECT ;******************************************************* ; ; Command translation Table: ; ;******************************************************* ;******************************************************* ; ;scsi_cmdxx dc.w scsit_tx++\ ; SCSI Send Data Command ; scsit_rx++\ ; SCSI Receive Data Command ; scsit_stat++\ ; SCSI Status Command ; scsit_cont++\ ; SCSI Control Command ; scsit_data++\ ; SCSI Data I/O Command ; scsit_dvc++\ ; SCSI Device I/O Command ; scsit_blk++\ ; Command has a Block Number ; scsic_1st++\ ; Must be first device if linked ; scsic_int++\ ; Internal Driver Command only ; scsic_dsw++\ ; Issue DISK_SW with this call ; scsic_off++\ ; Device is going offline. ; scsic_tout++\ ; Adjust time out by block count ; scsid_asis++\ ; CMD Data is in SCSI format ; scsid_blk++\ ; Convert Trans Count to Blocks ; scsid_byte++\ ; Leave Trans Count in Bytes ; scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. ; dc.w scsi_endcmd ; End of SCSI Translation Table ; ;******************************************************* ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $01 'REZERO UNIT' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 2*one_min ; Time out = 2 minutes. dc.w scsi_endcmd ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 10*one_sec ; Time out = 10 second ticks. dc.w scsi_endcmd ; ; Command $04 'FORMAT UNIT' ; Mandatory ; scsi_cmd04 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 60*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $07 'REASSIGN BLOCKS' ; Optional ; scsi_cmd07 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_int++\ ; Internal Driver Command Only scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*one_sec ; Time out = one second. dc.w scsi_endcmd ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $0A 'WRITE' ; Mandatory ; scsi_cmd0A dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $0B 'SEEK' ; Optional ; scsi_cmd0B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*one_sec ; Time out = 1 second. dc.w scsi_endcmd ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 20*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $1B 'START/STOP UNIT' ; Optional ; scsi_cmd1B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1E 'PREVENT/ALLOW REMOVAL' ; Optional ; scsi_cmd1E dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $25 'READ CAPACITY' ; Mandatory ; scsi_cmd25 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $2A 'WRITE (EXTENDED)' ; Mandatory ; scsi_cmd2A dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $2B 'SEEK (EXTENDED)' ; Optional ; scsi_cmd2B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $2E 'WRITE AND VERIFY' ; Optional ; scsi_cmd2E dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $2F 'VERIFY' ; Optional ; scsi_cmd2F dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $33 'SET LIMITS' ; Optional ; scsi_cmd33 dc.w scsit_cont++\ ; It is a Control Command scsic_int++\ ; Internal Driver Command Only scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $34 'PRE-FETCH' ; Optional ; scsi_cmd34 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $35 'SYNCHRONIZE CACHE' ; Optional ; scsi_cmd35 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $36 'LOCK/UNLOCK CACHE' ; Optional ; scsi_cmd36 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $37 'READ DEFECT DATA' ; Optional ; scsi_cmd37 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3E 'READ LONG' ; Optional ; scsi_cmd3E dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3F 'WRITE LONG' ; Optional ; scsi_cmd3F dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w one_sec ; Time out = 4 qtr second tick. dc.w scsi_endcmd ; ; Command $5A 'MODE SENSE' ; Mandatory ; scsi_cmd5A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $B3 'SET LIMITS' ; Optional ; scsi_cmdB3 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd\ OR scsi_dtype = changer THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w qtr_sec ; Time out = 1 qtr second tick. dc.w 10*one_sec ; Time out = 10 seconds. dc.w scsi_endcmd ; ; Command $01 'REZERO UNIT' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*one_min ; Time out = 2 minutes. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks ; dc.w 4*qtr_sec ; Time out = 1 second/block. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $0B 'SEEK' ; Optional ; scsi_cmd0B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 1*one_sec ; Time out = 1 second. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1B 'START/STOP UNIT' ; Optional ; scsi_cmd1B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1E 'PREVENT/ALLOW REMOVAL' ; Optional ; scsi_cmd1E dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $25 'READ CAPACITY' ; Mandatory ; scsi_cmd25 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks ; dc.w 4*qtr_sec ; Time out = 1 second/block. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $2B 'SEEK (EXTENDED)' ; Optional ; scsi_cmd2B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $2F 'VERIFY' ; Optional ; scsi_cmd2F dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks ; scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 1 second/block. dc.w scsi_endcmd ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT (EXTENDED)' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $5A 'MODE SENSE (EXTENDED)' ; Optional ; scsi_cmd5A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C0 'EJECT DISK' ; Mandatory ; scsi_cmdC0 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $C1 'READ TOC' ; Mandatory ; scsi_cmdC1 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0205 dc.w $0307 dc.w $0408 dc.w $0509 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C2 'READ Q SUBCODE' ; Mandatory ; scsi_cmdC2 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C3 'READ HEADER' ; Mandatory ; scsi_cmdC3 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_byte ; Leave Trans Count in Bytes ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0202 dc.w $0303 dc.w $0404 dc.w $0505 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C8 'AUDIO TRACK SEARCH' ; Mandatory ; scsi_cmdC8 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C9 'AUDIO PLAY' ; Mandatory ; scsi_cmdC9 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; Command $CA 'AUDIO PAUSE' ; Mandatory ; scsi_cmdCA dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CB 'AUDIO STOP' ; Mandatory ; scsi_cmdCB dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0202 dc.w $0303 dc.w $0404 dc.w $0505 dc.w $0609 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CC 'AUDIO STATUS' ; Mandatory ; scsi_cmdCC dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CD 'AUDIO SCAN' ; Mandatory ; scsi_cmdCD dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CE 'AUDIO CONTROL' ; Mandatory ; scsi_cmdCE dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1C2 'READ Q SUBCODE' ; Mandatory ; scsi_cmd1C2 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; New SCSI-2 commands ; (c) 2018, Brutal Deluxe Software ; ; ; Command $42 'READ SUB-CHANNEL' (OK) ; Optional ; scsi_cmd42 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $43 'READ TOC' (OK) ; Optional ; scsi_cmd43 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $44 'READ HEADER' (OK) ; Optional ; scsi_cmd44 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $45 'PLAY AUDIO(10)' (OK) ; Optional ; scsi_cmd45 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is in Blocks but do not change size dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $47 'PLAY AUDIO MSF' (OK) ; Optional ; scsi_cmd47 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $48 'PLAY AUDIO TRACK/INDEX' (OK) ; Optional ; scsi_cmd48 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $49 'PLAY TRACK RELATIVE(10)' (DOES NOT RUN ON CD300E PLUS) ; Optional ; scsi_cmd49 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is in Blocks but do not change size dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4B 'PAUSE RESUME' (OK) ; Optional ; scsi_cmd4B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $A5 'PLAY AUDIO(12)' (OK) ; Optional ; scsi_cmdA5 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is in Blocks but do not change size dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $A9 'PLAY TRACK RELATIVE(12)' (DOES NOT RUN ON CD300E PLUS) ; Optional ; scsi_cmdA9 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is in Blocks dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; The two following commands are not added because it would break compatibility ; with the CD-SC drive ; Group 6 commands are set as 10-byte commands whereas those below would require 12 bytes ; ; Command $D8 'READ CD-DA' ; Optional ; scsi_cmdD8 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $D9 'READ CD-DA MSF' ; Optional ; scsi_cmdD9 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $01 'REZERO UNIT' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $04 'FORMAT UNIT' ; Mandatory ; scsi_cmd04 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsic_dsw++\ ; Issue DISK_SW with this call scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w one_min*50 ; Time out = 50 Minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $05 'Send QIC 100 Sys Data' ; Optional ; scsi_cmd05 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $06 'Recv QIC 100 Sys Data' ; Optional ; scsi_cmd06 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $07 'REASSIGN BLOCKS' ; Optional ; scsi_cmd07 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $09 'VERIFY UNIT' ; Optional ; scsi_cmd09 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w one_min*50 ; Time out = 50 Minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0A 'WRITE' ; Mandatory ; scsi_cmd0A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0B 'SEEK' ; Optional ; scsi_cmd0B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; Command has a Block Number scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0D 'Read SCSI Defect (Vendor)' ; Optional ; scsi_cmd0D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0E 'Read Controller Info' ; Optional ; scsi_cmd0E dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0F 'Write Controller Info' ; Optional ; scsi_cmd0F dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $10 'DRIVE PASS-THRU' ; Optional ; scsi_cmd10 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $11 'READ DRIVE LINES' ; Optional ; scsi_cmd11 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $13 'Read QIC INFO' ; Optional ; scsi_cmd13 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $14 'Write QIC INFO' ; Optional ; scsi_cmd14 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $19 'Read QIC Defect Data' ; Optional ; scsi_cmd19 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1B 'LOAD/UNLOAD UNIT' ; Optional ; scsi_cmd1B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $25 'READ CAPACITY' ; Mandatory ; scsi_cmd25 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $2A 'WRITE (EXTENDED)' ; Mandatory ; scsi_cmd2A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $2B 'SEEK (EXTENDED)' ; Optional ; scsi_cmd2B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; Command has a Block Number scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $37 'READ DEFECT DATA' ; Optional ; scsi_cmd37 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT (EXTENDED)' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $5A 'MODE SENSE (EXTENDED)' ; Optional ; scsi_cmd5A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $07 'GET DATA STATUS' ; Optional ; scsi_cmd07 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0A 'SEND' ; Mandatory ; scsi_cmd0A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0E 'SPACE' ; Mandatory ; scsi_cmd0E dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 8*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $11 'SPACE' ; Mandatory ; scsi_cmd11 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table dc.w $000E ; Command $0E 'EXPLORATORY STATUS' dc.w scsi_cmd0E ; Optional ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $18 'COPY' ; Optional ; scsi_cmd18 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1B 'SCAN' ; Optional ; scsi_cmd1B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 1*one_min ; Time out = 1 Minute. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $24 'DEFINE WINDOW PARAMETERS' ; Mandatory ; scsi_cmd24 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $25 'GET WINDOW PARAMETERS' ; Optional ; scsi_cmd25 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. ; dc.w 2*one_sec ; Time out = 2 seconds dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $2A 'WRITE (EXTENDED)' ; Mandatory ; scsi_cmd2A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 2*one_sec ; Time out = 2 seconds dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $31 'MEDIUM POSITION' ; Optional ; scsi_cmd31 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*one_min ; Time out = 1 Minute. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $34 'GET DATA STATUS' ; Optional ; scsi_cmd34 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 2*one_min ; Time out = 1 Minute. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $39 'COMPARE' ; Optional ; scsi_cmd39 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3A 'COPY AND VERIFY' ; Optional ; scsi_cmd3A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT (EXTENDED)' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $5A 'MODE SENSE (EXTENDED)' ; Optional ; scsi_cmd5A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $01 'RESET PRINTER' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $02 'DOWN LOAD CODE' ; Optional ; scsi_cmd02 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Leave Trans Count in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $04 'FORMAT UNIT' ; Mandatory ; scsi_cmd04 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $05 'DRAW BITS' ; Optional ; scsi_cmd05 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 10*one_min ; Time out = 10 Minute. dc.w scsi_endcmd ; ; Command $06 'CLEAR BITS' ; Mandatory ; scsi_cmd06 dc.w scsit_tx++\ ; It requests data from target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 10*one_min ; Time out = 10 Minute. dc.w scsi_endcmd ; ; Command $0A 'PRINT' ; Mandatory ; scsi_cmd0A dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 10*one_min ; Time out = 10 Minute. dc.w scsi_endcmd ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ENDIF ;------------------------------------------------------------------------------- ENDP EJECT ;******************************************************* ; ; Command Packet Size Table: ; ; This table is indexed by (Group Number * 6) ; ; The first word in an entry equals the Packet Size. ; This is used to set the command length in the data ; for the SCSI Manager calls. If this value is null, ; then the group is undefined for this driver. ; ; The next byte is the offset to the first and most ; significant byte of the requested block number if ; used in this packet. ; ; The byte following this is the number of bytes that ; make up a valid Block Number. ; ; The next byte is the offset to the first and most ; significant byte of the requested data length if ; used in this packet. ; ; The byte following this is the number of bytes that ; make up a valid request length. ; ;******************************************************* EXPORT cmd_ps_tbl cmd_ps_tbl PROC start_tbl ; ; Group 0 Commands ; dc.w 0006 ; 6 Byte Command. dc.b $03 ; Offset to last Block Parm EXPORT c_blk_len:EQU c_blk_len equ *-start_tbl ; Equated offset to Block Length dc.b $03 ; Length of Block Parm dc.b $04 ; Offset to last Length Parm EXPORT c_len_len:EQU c_len_len equ *-start_tbl ; Equated offset to Length Length ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN dc.b $02 ; Length of Length Parm ELSE ;------------------------------------------------------------------------------- dc.b $01 ; Length of Length Parm ENDIF ;------------------------------------------------------------------------------- ; ; Group 1 Commands ; dc.w 0010 ; 10 Byte Command. dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $08 ; Offset to last Length Parm dc.b $03 ; Length of Length Parm ; ; Group 2 Commands ; dc.w 0010 ; 10 Byte Command. dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $08 ; Offset to last Length Parm dc.b $03 ; Length of Length Parm ; ; Group 3 Commands ; dc.w 0000 ; Reserved Command. dc.b $00 ; Offset to last Block Parm dc.b $00 ; Length of Block Parm dc.b $00 ; Offset to last Length Parm dc.b $00 ; Length of Length Parm ; ; Group 4 Commands ; dc.w 0000 ; Reserved Command. dc.b $00 ; Offset to last Block Parm dc.b $00 ; Length of Block Parm dc.b $00 ; Offset to last Length Parm dc.b $00 ; Length of Length Parm ; ; Group 5 Commands ; dc.w 0012 ; 12 Byte Command. dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $09 ; Offset to last Length Parm dc.b $04 ; Length of Length Parm ; ; Group 6 Commands ; dc.w 0012 ; 10 Byte Command. BD 201811 (was 0010) dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $08 ; Offset to last Length Parm dc.b $03 ; Length of Length Parm ; ; Group 7 Commands ; dc.w 0000 ; Reserved Command. dc.b $00 ; Offset to last Block Parm dc.b $00 ; Length of Block Parm dc.b $00 ; Offset to last Length Parm dc.b $00 ; Length of Length Parm ENDP EJECT ;******************************************************* ; ; Internal Data Buffer: ; ; This buffer is used by the driver for all of it's ; maintainence I/O between it and the devices that it ; manages or communicates with. This is where any ; INQUIRY data will be received or blocks read in that ; are needed by the driver to make any kind of ; determination. There is also a section reserved for ; the REQUEST SENSE command for that last command sent. ; ;******************************************************* EXPORT internal_buff internal_buff PROC ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN dcb.b block_size+20,0 ;Incase 532 byte block ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd\ OR scsi_dtype = changer THEN dcb.b block_size*4,0 ;Worst case 2k Block size ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN dcb.b block_size,0 ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN dcb.b one_page*2,0 ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN dcb.b one_page*2,0 ENDIF ;------------------------------------------------------------------------------- ENDP END EJECT \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSI Command Table copy b/scsi2/SCSI.Drivers/SCSI Command Table copy new file mode 100644 index 0000000..dea7078 --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSI Command Table copy @@ -0,0 +1 @@ + ;******************************************************* ; ; SCSI Driver 'Command Table'. ; ; Written by Matt Gulick. Started May 20,1988 ; ; Copyright Apple Computer, Inc. 1988,89 ; ;******************************************************* ;******************************************************* ; ; This file contains the Command Tables that actually ; drives the SCSI Driver when talking to a target ; device. By changing these tables, the SCSI Driver ; will be able to talk to almost any class of SCSI ; Device. There are actually two tables in this file. ; The first table is a list of a two word group for ; each command supported. ; ; The first word is the actual SCSI Command Number ; followed by the low word of that commands table ; address. We use the only the low word because the ; second table is in the same bank as the indexing ; table. ; ; The second table is the actual command translation ; data. The first word is a set of flags that ; indicate some of the translation and verification ; that needs to take place. ; ; Bit 15 = Data is being sent to the device ; 14 = Data is to be received by us ; 13 = This is a Status Command ; 12 = This is a Control Command ; 11 = Data I/O Command ; 10 = Device I/O Command ; 9 = Command Includes Block Number ; 8 = Must be first device if linked ; 7 = Internal Driver Command Only ; 6 = Must issue a DISK_SW with this call ; 5 = Results in device offline ; 4 = Reserved ; 3 = Command Data needs no translation ; 2 = Reserved ; 1 = Block request count goes into command ; 0 = Byte request count goes into command ; ; The second word is a time out tick count to be used by ; the SCSI Manager to determine when to abandone any SCSI ; Device transaction due to lack of response by the ; target. Each tick = 250 ms. ; ; Any additional words are only used if Bit 3 above is ; zero. The translation bytes conatin two offsets. A ; Source and a Destination offset. This is used by the ; driver to take information fron the caller's command ; (Source) and .OR. them in to their proper location in ; the SCSI Command Packet (Destination). ; ; MSBit LSBit ; %0000 0000 0000 0000 ; ; R S R D ; e o e e ; s u s s ; e r e t ; r c r i ; v e v t ; e e i ; d d n ; a ; t ; i ; o ; n ; ; A NULL Word at any location in the command entry ; will terminate translation for that command. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; May 20, 1988 File started. ; Feb 28, 1989 Added Tape Drive Tables STRING PASCAL BLANKS OFF PAGESIZE 70 PRINT NOGEN PRINT NOMDIR MACHINE M65816 PRINT OFF INCLUDE 'scsihd.equates' INCLUDE 'M16.MEMORY' INCLUDE 'M16.UTIL' PRINT ON EJECT ;******************************************************* ; ; List of Commands Supported: ; ;******************************************************* EXPORT cmd_t_tbl cmd_t_tbl PROC ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; ; ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $002A ; Command $2A 'WRITE (EXTENDED)' dc.w scsi_cmd2A ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $000A ; Command $0A 'WRITE' dc.w scsi_cmd0A ; Mandatory ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0025 ; Command $25 'READ CAPACITY' dc.w scsi_cmd25 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0004 ; Command $04 'FORMAT UNIT' dc.w scsi_cmd04 ; Mandatory ; dc.w $001E ; Command $1E 'PREVENT/ALLOW REMOVAL' dc.w scsi_cmd1E ; Optional ; dc.w $0001 ; Command $01 'REZERO UNIT' dc.w scsi_cmd01 ; Optional ; dc.w $0007 ; Command $07 'REASSIGN BLOCKS' dc.w scsi_cmd07 ; Optional ; dc.w $000B ; Command $0B 'SEEK' dc.w scsi_cmd0B ; Optional ; dc.w $002B ; Command $2B 'SEEK (EXTENDED)' dc.w scsi_cmd2B ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $001B ; Command $1B 'START/STOP UNIT' dc.w scsi_cmd1B ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $002E ; Command $2E 'WRITE AND VERIFY' dc.w scsi_cmd2E ; Optional ; dc.w $002F ; Command $2F 'VERIFY' dc.w scsi_cmd2F ; Optional ; dc.w $0033 ; Command $33 'SET LIMITS' dc.w scsi_cmd33 ; Optional ; dc.w $0034 ; Command $34 'PRE-FETCH' dc.w scsi_cmd34 ; Optional ; dc.w $0035 ; Command $35 'SYNCHRONIZE CACHE' dc.w scsi_cmd35 ; Optional ; dc.w $0036 ; Command $36 'LOCK/UNLOCK CACHE' dc.w scsi_cmd36 ; Optional ; dc.w $0037 ; Command $37 'READ DEFECT DATA' dc.w scsi_cmd37 ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $003E ; Command $3E 'READ LONG' dc.w scsi_cmd3E ; Optional ; dc.w $003F ; Command $3F 'WRITE LONG' dc.w scsi_cmd3F ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE' dc.w scsi_cmd5A ; Mandatory ; dc.w $00B3 ; Command $B3 'SET LIMITS' dc.w scsi_cmdB3 ; Optional ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd THEN ; ; dc.w $00CC ; Command $CC 'AUDIO STATUS' dc.w scsi_cmdCC ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0025 ; Command $25 'READ CAPACITY' dc.w scsi_cmd25 ; Mandatory ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $00C0 ; Command $C0 'EJECT DISK' dc.w scsi_cmdC0 ; Mandatory ; dc.w $001E ; Command $1E 'PREVENT/ALLOW REMOVAL' dc.w scsi_cmd1E ; Optional ; dc.w $00C9 ; Command $C9 'AUDIO PLAY' dc.w scsi_cmdC9 ; Mandatory ; dc.w $00CE ; Command $CE 'AUDIO CONTROL' dc.w scsi_cmdCE ; Mandatory ; dc.w $00CA ; Command $CA 'AUDIO PAUSE' dc.w scsi_cmdCA ; Mandatory ; dc.w $00CB ; Command $CB 'AUDIO STOP' dc.w scsi_cmdCB ; Mandatory ; dc.w $00CD ; Command $CD 'AUDIO SCAN' dc.w scsi_cmdCD ; Mandatory ; dc.w $0001 ; Command $01 'REZERO UNIT' dc.w scsi_cmd01 ; Optional ; dc.w $000B ; Command $0B 'SEEK' dc.w scsi_cmd0B ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $001B ; Command $1B 'START/STOP UNIT' dc.w scsi_cmd1B ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $002B ; Command $2B 'SEEK (EXTENDED)' dc.w scsi_cmd2B ; Optional ; dc.w $002F ; Command $2F 'VERIFY' dc.w scsi_cmd2F ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT (EXTENDED)' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE (EXTENDED)' dc.w scsi_cmd5A ; Optional ; dc.w $00C1 ; Command $C1 'READ TOC' dc.w scsi_cmdC1 ; Mandatory ; dc.w $01C2 ; Command $1C2 'READ Q SUBCODE VOLUME LEVEL' dc.w scsi_cmd1C2 ; Mandatory ; dc.w $00C2 ; Command $C2 'READ Q SUBCODE' dc.w scsi_cmdC2 ; Mandatory ; dc.w $00C3 ; Command $C3 'READ HEADER' dc.w scsi_cmdC3 ; Mandatory ; dc.w $00C8 ; Command $C8 'AUDIO TRACK SEARCH' dc.w scsi_cmdC8 ; Mandatory ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN ; ; ; ; dc.w $002A ; Command $2A 'WRITE (EXTENDED)' dc.w scsi_cmd2A ; Mandatory ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $002B ; Command $2B 'SEEK (EXTENDED)' dc.w scsi_cmd2B ; Optional ; dc.w $001B ; Command $1B 'LOAD/UNLOAD UNIT' dc.w scsi_cmd1B ; Optional ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0001 ; Command $01 'REZERO UNIT' dc.w scsi_cmd01 ; Optional ; dc.w $0025 ; Command $25 'READ CAPACITY' dc.w scsi_cmd25 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $000A ; Command $0A 'WRITE' dc.w scsi_cmd0A ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $000B ; Command $0B 'SEEK' dc.w scsi_cmd0B ; Optional ; dc.w $0004 ; Command $04 'FORMAT UNIT' dc.w scsi_cmd04 ; Mandatory ; dc.w $0007 ; Command $07 'REASSIGN BLOCKS' dc.w scsi_cmd07 ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $0037 ; Command $37 'READ DEFECT DATA' dc.w scsi_cmd37 ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $0005 ; Command $05 'Send QIC 100 Sys Data' dc.w scsi_cmd05 ; Optional ; dc.w $0006 ; Command $06 'Recv QIC 100 Sys Data' dc.w scsi_cmd06 ; Optional ; dc.w $0009 ; Command $09 'VERIFY UNIT' dc.w scsi_cmd09 ; Optional ; dc.w $000D ; Command $0D 'Read SCSI Defect (Vendor)' dc.w scsi_cmd0D ; Optional ; dc.w $000E ; Command $0E 'Read Controller Info' dc.w scsi_cmd0E ; Optional ; dc.w $000F ; Command $0F 'Write Controller Info' dc.w scsi_cmd0F ; Optional ; dc.w $0010 ; Command $10 'DRIVE PASS-THRU' dc.w scsi_cmd10 ; Optional ; dc.w $0011 ; Command $11 'READ DRIVE LINES' dc.w scsi_cmd11 ; Optional ; dc.w $0013 ; Command $13 'Read QIC INFO' dc.w scsi_cmd13 ; Optional ; dc.w $0014 ; Command $14 'Write QIC INFO' dc.w scsi_cmd14 ; Optional ; dc.w $0019 ; Command $19 'Read QIC Defect Data' dc.w scsi_cmd19 ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT (EXTENDED)' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE (EXTENDED)' dc.w scsi_cmd5A ; Optional ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN ; ; ; ; dc.w $0034 ; Command $34 'GET DATA STATUS' dc.w scsi_cmd34 ; Optional ; dc.w $0007 ; Command $07 'GET DATA STATUS' dc.w scsi_cmd07 ; Optional ; dc.w $000E ; Command $0E 'EXPLORATORY STATUS' dc.w scsi_cmd0E ; Optional ; dc.w $0011 ; Command $11 'SPACE' dc.w scsi_cmd11 ; Optional ; dc.w $0028 ; Command $28 'READ (EXTENDED)' dc.w scsi_cmd28 ; Mandatory ; dc.w $0008 ; Command $08 'READ' dc.w scsi_cmd08 ; Mandatory ; dc.w $000A ; Command $0A 'SEND' dc.w scsi_cmd0A ; Mandatory ; dc.w $0024 ; Command $24 'DEFINE WINDOW PARAMETERS' dc.w scsi_cmd24 ; Mandatory ; dc.w $001B ; Command $1B 'SCAN (EXTENDED)' dc.w scsi_cmd1B ; Optional ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0025 ; Command $25 'GET WINDOW PARAMETRS' dc.w scsi_cmd25 ; Optional ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $0031 ; Command $31 'MEDIUM POSSITION' dc.w scsi_cmd31 ; Optional ; dc.w $002A ; Command $2A 'SEND (EXTENDED)' dc.w scsi_cmd2A ; Optional ; dc.w $0018 ; Command $18 'COPY' dc.w scsi_cmd18 ; Optional ; dc.w $001C ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' dc.w scsi_cmd1C ; Optional ; dc.w $001D ; Command $1D 'SEND DIAGNOSTICS' dc.w scsi_cmd1D ; Mandatory ; dc.w $0039 ; Command $39 'COMPARE' dc.w scsi_cmd39 ; Optional ; dc.w $003A ; Command $3A 'COPY AND VERIFY' dc.w scsi_cmd3A ; Optional ; dc.w $003B ; Command $3B 'WRITE BUFFER' dc.w scsi_cmd3B ; Optional ; dc.w $003C ; Command $3C 'READ BUFFER' dc.w scsi_cmd3C ; Optional ; dc.w $004C ; Command $4C 'LOG SELECT' dc.w scsi_cmd4C ; Optional ; dc.w $004D ; Command $4D 'LOG SENSE' dc.w scsi_cmd4D ; Optional ; dc.w $0055 ; Command $55 'MODE SELECT (EXTENDED)' dc.w scsi_cmd55 ; Optional ; dc.w $005A ; Command $5A 'MODE SENSE (EXTENDED)' dc.w scsi_cmd5A ; Optional ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN ; ; ; ; dc.w $0000 ; Command $00 'TEST UNIT READY' dc.w scsi_cmd00 ; Mandatory ; dc.w $0001 ; Command $01 'RESET PRINTER' dc.w scsi_cmd01 ; Optional ; dc.w $0002 ; Command $02 'DOWN LOAD CODE' dc.w scsi_cmd02 ; Optional ; dc.w $0003 ; Command $03 'REQUEST SENSE' dc.w scsi_cmd03 ; Mandatory ; dc.w $0004 ; Command $04 'FORMAT UNIT' dc.w scsi_cmd04 ; Mandatory ; dc.w $0005 ; Command $05 'DRAW BITS' dc.w scsi_cmd05 ; Optional ; dc.w $0006 ; Command $06 'CLEAR BITS' dc.w scsi_cmd06 ; Optional ; dc.w $000A ; Command $0A 'PRINT' dc.w scsi_cmd0A ; Mandatory ; dc.w $0012 ; Command $12 'INQUIRY' dc.w scsi_cmd12 ; Mandatory ; dc.w $0015 ; Command $15 'MODE SELECT' dc.w scsi_cmd15 ; Optional ; dc.w $0016 ; Command $16 'RESERVE UNIT' dc.w scsi_cmd16 ; Mandatory ; dc.w $0017 ; Command $17 'RELEASE UNIT' dc.w scsi_cmd17 ; Mandatory ; dc.w $001A ; Command $1A 'MODE SENSE' dc.w scsi_cmd1A ; Optional ENDIF ;------------------------------------------------------------------------------- dc.w $FFFF ; End of the List. dc.w $FFFF ; EJECT ;******************************************************* ; ; Command translation Table: ; ;******************************************************* ;******************************************************* ; ;scsi_cmdxx dc.w scsit_tx++\ ; SCSI Send Data Command ; scsit_rx++\ ; SCSI Receive Data Command ; scsit_stat++\ ; SCSI Status Command ; scsit_cont++\ ; SCSI Control Command ; scsit_data++\ ; SCSI Data I/O Command ; scsit_dvc++\ ; SCSI Device I/O Command ; scsit_blk++\ ; Command has a Block Number ; scsic_1st++\ ; Must be first device if linked ; scsic_int++\ ; Internal Driver Command only ; scsic_dsw++\ ; Issue DISK_SW with this call ; scsic_off++\ ; Device is going offline. ; scsic_tout++\ ; Adjust time out by block count ; scsid_asis++\ ; CMD Data is in SCSI format ; scsid_blk++\ ; Convert Trans Count to Blocks ; scsid_byte++\ ; Leave Trans Count in Bytes ; scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. ; dc.w scsi_endcmd ; End of SCSI Translation Table ; ;******************************************************* ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $01 'REZERO UNIT' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 2*one_min ; Time out = 2 minutes. dc.w scsi_endcmd ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 10*one_sec ; Time out = 10 second ticks. dc.w scsi_endcmd ; ; Command $04 'FORMAT UNIT' ; Mandatory ; scsi_cmd04 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 60*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $07 'REASSIGN BLOCKS' ; Optional ; scsi_cmd07 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_int++\ ; Internal Driver Command Only scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*one_sec ; Time out = one second. dc.w scsi_endcmd ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $0A 'WRITE' ; Mandatory ; scsi_cmd0A dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $0B 'SEEK' ; Optional ; scsi_cmd0B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*one_sec ; Time out = 1 second. dc.w scsi_endcmd ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 20*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $1B 'START/STOP UNIT' ; Optional ; scsi_cmd1B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1E 'PREVENT/ALLOW REMOVAL' ; Optional ; scsi_cmd1E dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $25 'READ CAPACITY' ; Mandatory ; scsi_cmd25 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $2A 'WRITE (EXTENDED)' ; Mandatory ; scsi_cmd2A dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $2B 'SEEK (EXTENDED)' ; Optional ; scsi_cmd2B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $2E 'WRITE AND VERIFY' ; Optional ; scsi_cmd2E dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $2F 'VERIFY' ; Optional ; scsi_cmd2F dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w one_sec ; Time out = 1 second/Block. dc.w scsi_endcmd ; ; Command $33 'SET LIMITS' ; Optional ; scsi_cmd33 dc.w scsit_cont++\ ; It is a Control Command scsic_int++\ ; Internal Driver Command Only scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $34 'PRE-FETCH' ; Optional ; scsi_cmd34 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $35 'SYNCHRONIZE CACHE' ; Optional ; scsi_cmd35 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $36 'LOCK/UNLOCK CACHE' ; Optional ; scsi_cmd36 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $37 'READ DEFECT DATA' ; Optional ; scsi_cmd37 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3E 'READ LONG' ; Optional ; scsi_cmd3E dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $3F 'WRITE LONG' ; Optional ; scsi_cmd3F dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w one_sec ; Time out = 4 qtr second tick. dc.w scsi_endcmd ; ; Command $5A 'MODE SENSE' ; Mandatory ; scsi_cmd5A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; ; Command $B3 'SET LIMITS' ; Optional ; scsi_cmdB3 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w qtr_sec ; Time out = 1 qtr second tick. dc.w 10*one_sec ; Time out = 10 seconds. dc.w scsi_endcmd ; ; Command $01 'REZERO UNIT' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*one_min ; Time out = 2 minutes. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks ; dc.w 4*qtr_sec ; Time out = 1 second/block. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $0B 'SEEK' ; Optional ; scsi_cmd0B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 1*one_sec ; Time out = 1 second. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1B 'START/STOP UNIT' ; Optional ; scsi_cmd1B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_1st++\ ; Must be first device if linked scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $1E 'PREVENT/ALLOW REMOVAL' ; Optional ; scsi_cmd1E dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $25 'READ CAPACITY' ; Mandatory ; scsi_cmd25 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks ; dc.w 4*qtr_sec ; Time out = 1 second/block. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $2B 'SEEK (EXTENDED)' ; Optional ; scsi_cmd2B dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $2F 'VERIFY' ; Optional ; scsi_cmd2F dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_tout++\ ; Adjust time out by block count scsit_blk++\ ; It has a Block Number scsid_asis++\ ; It is an as is Packet scsid_blk ; Length is in Blocks ; scsid_none ; Length is not in command dc.w 4*qtr_sec ; Time out = 1 second/block. dc.w scsi_endcmd ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_data++\ ; It is a Data I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT (EXTENDED)' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $5A 'MODE SENSE (EXTENDED)' ; Optional ; scsi_cmd5A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C0 'EJECT DISK' ; Mandatory ; scsi_cmdC0 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsic_dsw++\ ; Issue DISK_SW with this call scsic_off++\ ; Device is going offline. scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Length is not in command ; dc.w 2*qtr_sec ; Time out = 2 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; ; Command $C1 'READ TOC' ; Mandatory ; scsi_cmdC1 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0205 dc.w $0307 dc.w $0408 dc.w $0509 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C2 'READ Q SUBCODE' ; Mandatory ; scsi_cmdC2 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C3 'READ HEADER' ; Mandatory ; scsi_cmdC3 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_byte ; Leave Trans Count in Bytes ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0202 dc.w $0303 dc.w $0404 dc.w $0505 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C8 'AUDIO TRACK SEARCH' ; Mandatory ; scsi_cmdC8 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $C9 'AUDIO PLAY' ; Mandatory ; scsi_cmdC9 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CA 'AUDIO PAUSE' ; Mandatory ; scsi_cmdCA dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CB 'AUDIO STOP' ; Mandatory ; scsi_cmdCB dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; scsit_blk++\ ; Command has a Block Number ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0202 dc.w $0303 dc.w $0404 dc.w $0505 dc.w $0609 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CC 'AUDIO STATUS' ; Mandatory ; scsi_cmdCC dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CD 'AUDIO SCAN' ; Mandatory ; scsi_cmdCD dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w $0101 dc.w $0201 dc.w $0301 dc.w $0402 dc.w $0503 dc.w $0604 dc.w $0705 dc.w $0809 dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $CE 'AUDIO CONTROL' ; Mandatory ; scsi_cmdCE dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1C2 'READ Q SUBCODE' ; Mandatory ; scsi_cmd1C2 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $01 'REZERO UNIT' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $04 'FORMAT UNIT' ; Mandatory ; scsi_cmd04 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsic_dsw++\ ; Issue DISK_SW with this call scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w one_min*50 ; Time out = 50 Minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $05 'Send QIC 100 Sys Data' ; Optional ; scsi_cmd05 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $06 'Recv QIC 100 Sys Data' ; Optional ; scsi_cmd06 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $07 'REASSIGN BLOCKS' ; Optional ; scsi_cmd07 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $09 'VERIFY UNIT' ; Optional ; scsi_cmd09 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w one_min*50 ; Time out = 50 Minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0A 'WRITE' ; Mandatory ; scsi_cmd0A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0B 'SEEK' ; Optional ; scsi_cmd0B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; Command has a Block Number scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0D 'Read SCSI Defect (Vendor)' ; Optional ; scsi_cmd0D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0E 'Read Controller Info' ; Optional ; scsi_cmd0E dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0F 'Write Controller Info' ; Optional ; scsi_cmd0F dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $10 'DRIVE PASS-THRU' ; Optional ; scsi_cmd10 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $11 'READ DRIVE LINES' ; Optional ; scsi_cmd11 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $13 'Read QIC INFO' ; Optional ; scsi_cmd13 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $14 'Write QIC INFO' ; Optional ; scsi_cmd14 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $19 'Read QIC Defect Data' ; Optional ; scsi_cmd19 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1B 'LOAD/UNLOAD UNIT' ; Optional ; scsi_cmd1B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $25 'READ CAPACITY' ; Mandatory ; scsi_cmd25 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $2A 'WRITE (EXTENDED)' ; Mandatory ; scsi_cmd2A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsit_blk++\ ; Command has a Block Number scsic_tout++\ ; Adjust time out by block count scsid_asis++\ ; CMD Data is in SCSI format scsid_blk ; Convert Trans Count to Blocks dc.w 90*one_sec ; Time out = 90 seconds/Block. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $2B 'SEEK (EXTENDED)' ; Optional ; scsi_cmd2B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsit_blk++\ ; Command has a Block Number scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 90*one_sec ; Time out = 90 seconds. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $37 'READ DEFECT DATA' ; Optional ; scsi_cmd37 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT (EXTENDED)' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $5A 'MODE SENSE (EXTENDED)' ; Optional ; scsi_cmd5A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $07 'GET DATA STATUS' ; Optional ; scsi_cmd07 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $08 'READ' ; Mandatory ; scsi_cmd08 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0A 'SEND' ; Mandatory ; scsi_cmd0A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $0E 'SPACE' ; Mandatory ; scsi_cmd0E dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 8*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $11 'SPACE' ; Mandatory ; scsi_cmd11 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table dc.w $000E ; Command $0E 'EXPLORATORY STATUS' dc.w scsi_cmd0E ; Optional ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $18 'COPY' ; Optional ; scsi_cmd18 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1B 'SCAN' ; Optional ; scsi_cmd1B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 1*one_min ; Time out = 1 Minute. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1C 'RECEIVE DIAGNOSTIC RESULTS' ; Optional ; scsi_cmd1C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $1D 'SEND DIAGNOSTICS' ; Mandatory ; scsi_cmd1D dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD ; dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w 10*one_min ; Time out = 10 minutes. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $24 'DEFINE WINDOW PARAMETERS' ; Mandatory ; scsi_cmd24 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $25 'GET WINDOW PARAMETERS' ; Optional ; scsi_cmd25 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $28 'READ (EXTENDED)' ; Mandatory ; scsi_cmd28 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 10*one_min ; Time out = 10 minutes. ; dc.w 2*one_sec ; Time out = 2 seconds dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $2A 'WRITE (EXTENDED)' ; Mandatory ; scsi_cmd2A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 2*one_sec ; Time out = 2 seconds dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $31 'MEDIUM POSITION' ; Optional ; scsi_cmd31 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 1*one_min ; Time out = 1 Minute. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $34 'GET DATA STATUS' ; Optional ; scsi_cmd34 dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 2*one_min ; Time out = 1 Minute. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $39 'COMPARE' ; Optional ; scsi_cmd39 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3A 'COPY AND VERIFY' ; Optional ; scsi_cmd3A dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_none ; Transfer count does not go in CMD dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3B 'WRITE BUFFER' ; Optional ; scsi_cmd3B dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $3C 'READ BUFFER' ; Optional ; scsi_cmd3C dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4C 'LOG SELECT' ; Optional ; scsi_cmd4C dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $4D 'LOG SENSE' ; Optional ; scsi_cmd4D dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_data++\ ; SCSI Data I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $55 'MODE SELECT (EXTENDED)' ; Optional ; scsi_cmd55 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; SCSI Control Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ; ; Command $5A 'MODE SENSE (EXTENDED)' ; Optional ; scsi_cmd5A dc.w scsit_rx++\ ; SCSI Receive Data Command scsit_stat++\ ; SCSI Status Command scsit_dvc++\ ; SCSI Device I/O Command scsid_asis++\ ; CMD Data is in SCSI format scsid_byte ; Leave Trans Count in Bytes dc.w 4*qtr_sec ; Time out = 4 qtr second ticks. dc.w scsi_endcmd ; End of SCSI Translation Table ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN ; ; Command $00 'TEST UNIT READY' ; Mandatory ; scsi_cmd00 dc.w scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $01 'RESET PRINTER' ; Optional ; scsi_cmd01 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $02 'DOWN LOAD CODE' ; Optional ; scsi_cmd02 dc.w scsit_tx++\ ; SCSI Send Data Command scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Leave Trans Count in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $03 'REQUEST SENSE' ; Mandatory ; scsi_cmd03 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $04 'FORMAT UNIT' ; Mandatory ; scsi_cmd04 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $05 'DRAW BITS' ; Optional ; scsi_cmd05 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 10*one_min ; Time out = 10 Minute. dc.w scsi_endcmd ; ; Command $06 'CLEAR BITS' ; Mandatory ; scsi_cmd06 dc.w scsit_tx++\ ; It requests data from target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 10*one_min ; Time out = 10 Minute. dc.w scsi_endcmd ; ; Command $0A 'PRINT' ; Mandatory ; scsi_cmd0A dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 10*one_min ; Time out = 10 Minute. dc.w scsi_endcmd ; ; Command $12 'INQUIRY' ; Mandatory ; scsi_cmd12 dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $15 'MODE SELECT' ; Optional ; scsi_cmd15 dc.w scsit_tx++\ ; It sends data to the target scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $16 'RESERVE UNIT' ; Mandatory ; scsi_cmd16 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Transfer count does not go in CMD dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $17 'RELEASE UNIT' ; Mandatory ; scsi_cmd17 dc.w scsit_cont++\ ; It is a Control Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_none ; Length is not in command dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ; ; Command $1A 'MODE SENSE' ; Optional ; scsi_cmd1A dc.w scsit_rx++\ ; It requests data from target scsit_stat++\ ; It is a Status Command scsit_dvc++\ ; It is a Device I/O Command scsid_asis++\ ; It is an as is Packet scsid_byte ; Length is in Bytes dc.w 1*qtr_sec ; Time out = 1 qtr second ticks. dc.w scsi_endcmd ENDIF ;------------------------------------------------------------------------------- ENDP EJECT ;******************************************************* ; ; Command Packet Size Table: ; ; This table is indexed by (Group Number * 6) ; ; The first word in an entry equals the Packet Size. ; This is used to set the command length in the data ; for the SCSI Manager calls. If this value is null, ; then the group is undefined for this driver. ; ; The next byte is the offset to the first and most ; significant byte of the requested block number if ; used in this packet. ; ; The byte following this is the number of bytes that ; make up a valid Block Number. ; ; The next byte is the offset to the first and most ; significant byte of the requested data length if ; used in this packet. ; ; The byte following this is the number of bytes that ; make up a valid request length. ; ;******************************************************* EXPORT cmd_ps_tbl cmd_ps_tbl PROC start_tbl ; ; Group 0 Commands ; dc.w 0006 ; 6 Byte Command. dc.b $03 ; Offset to last Block Parm EXPORT c_blk_len:EQU c_blk_len equ *-start_tbl ; Equated offset to Block Length dc.b $03 ; Length of Block Parm dc.b $04 ; Offset to last Length Parm EXPORT c_len_len:EQU c_len_len equ *-start_tbl ; Equated offset to Length Length ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN dc.b $02 ; Length of Length Parm ELSE ;------------------------------------------------------------------------------- dc.b $01 ; Length of Length Parm ENDIF ;------------------------------------------------------------------------------- ; ; Group 1 Commands ; dc.w 0010 ; 10 Byte Command. dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $08 ; Offset to last Length Parm dc.b $03 ; Length of Length Parm ; ; Group 2 Commands ; dc.w 0010 ; 10 Byte Command. dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $08 ; Offset to last Length Parm dc.b $03 ; Length of Length Parm ; ; Group 3 Commands ; dc.w 0000 ; Reserved Command. dc.b $00 ; Offset to last Block Parm dc.b $00 ; Length of Block Parm dc.b $00 ; Offset to last Length Parm dc.b $00 ; Length of Length Parm ; ; Group 4 Commands ; dc.w 0000 ; Reserved Command. dc.b $00 ; Offset to last Block Parm dc.b $00 ; Length of Block Parm dc.b $00 ; Offset to last Length Parm dc.b $00 ; Length of Length Parm ; ; Group 5 Commands ; dc.w 0012 ; 12 Byte Command. dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $09 ; Offset to last Length Parm dc.b $04 ; Length of Length Parm ; ; Group 6 Commands ; dc.w 0010 ; 10 Byte Command. dc.b $05 ; Offset to last Block Parm dc.b $04 ; Length of Block Parm dc.b $08 ; Offset to last Length Parm dc.b $03 ; Length of Length Parm ; ; Group 7 Commands ; dc.w 0000 ; Reserved Command. dc.b $00 ; Offset to last Block Parm dc.b $00 ; Length of Block Parm dc.b $00 ; Offset to last Length Parm dc.b $00 ; Length of Length Parm ENDP EJECT ;******************************************************* ; ; Internal Data Buffer: ; ; This buffer is used by the driver for all of it's ; maintainence I/O between it and the devices that it ; manages or communicates with. This is where any ; INQUIRY data will be received or blocks read in that ; are needed by the driver to make any kind of ; determination. There is also a section reserved for ; the REQUEST SENSE command for that last command sent. ; ;******************************************************* EXPORT internal_buff internal_buff PROC ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN dcb.b block_size+20,0 ;Incase 532 byte block ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd THEN dcb.b block_size*4,0 ;Worst case 2k Block size ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN dcb.b block_size,0 ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN dcb.b one_page*2,0 ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN dcb.b one_page*2,0 ENDIF ;------------------------------------------------------------------------------- ENDP END EJECT \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSI Driver Mgmt b/scsi2/SCSI.Drivers/SCSI Driver Mgmt new file mode 100644 index 0000000..6aa544a --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSI Driver Mgmt @@ -0,0 +1 @@ + ;******************************************************* ; ; SCSI Driver Management Routines. ; ; Written by Matt Gulick. Started May 16,1988 ; ; Copyright Apple Computer, Inc. 1988,89 ; ;******************************************************* ;******************************************************* ; ; This file contains the subroutines needed by the ; SCSI Driver for things such as Getting RAM, Building ; data areas, calling outside routines for DIB ; management, as well as other generic routines that ; are used to make life easier for the driver. Also ; included in this file is the record definition for ; the DIB structure including all it's extensions. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; May 16, 1988 File started. ; May 17, 1988 DIB Record defined. ; June 6, 1988 Main Driver Written. ; Jun 20, 1988 Update Input/Output Data in Comments ; Apr 14, 1989 Added Conditional Logic to remove ; block routines from character device ; assemblies. STRING PASCAL BLANKS OFF PAGESIZE 70 PRINT NOGEN PRINT NOMDIR MACHINE M65816 IMPORT stat_cont IMPORT master_uid IMPORT scsi_uid IMPORT scsi_mgrnum IMPORT rout2_s_disp IMPORT hndl_offset IMPORT buff_len IMPORT page_cnt IMPORT dpi_overide IMPORT call_type IMPORT main_drvr IMPORT internal ; IMPORT disk_switch IMPORT ram_page_cnt IMPORT internal_buff IMPORT default_dib IMPORT first_time IMPORT only_one IMPORT part_cnt IMPORT t_dvc_blocks IMPORT f_partition IMPORT part_num IMPORT vPart_cnt IMPORT rebuild IMPORT trash_it IMPORT direct_page IMPORT exit_dpage IMPORT gsos_dpage IMPORT saved_zp IMPORT valid IMPORT dvc_ram IMPORT sense_data IMPORT dvc_count IMPORT result IMPORT divend IMPORT divsor IMPORT max_blk_cnt IMPORT tot_dib_cnt IMPORT dib_data_struct IMPORT main_caller IMPORT curr_hndl IMPORT new_dib IMPORT scratch0 IMPORT scratch1 IMPORT scratch2 IMPORT scratch3 IMPORT killer_blk IMPORT auto_sense_data IMPORT temp_acc IMPORT pdi_flag IMPORT new_list IMPORT new_dib_cnt IMPORT new_dib_list IMPORT real_unit ;************************* IMPORT m_blk_size IMPORT m_blk_cnt IMPORT m_rslt ENTRY zero_mem ENTRY get_space ENTRY make_dib ENTRY find_empty ENTRY chk_ram ENTRY rebld_dibs ENTRY dibicise_new_ram ENTRY dibicise_new_dib ENTRY set_link_ptrs ENTRY major_update ENTRY minor_update ENTRY fix_unit_1 ENTRY add_dib_ptr ENTRY do_post_install ENTRY read_pm_blk ENTRY rpm_blk_num ; ENTRY wpm_blk_num ENTRY chk_map ENTRY no_partition ENTRY check_map_entry ENTRY c_strt_buffer ENTRY c_strt_rqst_cnt ENTRY c_strt_blk_num ENTRY cache_valid ENTRY put_in_cache ENTRY get_from_cache ENTRY test_unit_rdy ENTRY read_capacity ENTRY mode_sense ENTRY mode_sense2 ENTRY start_unit ENTRY stop_unit ENTRY set_512_mode ENTRY notify_me ENTRY set_disk_sw ENTRY trash_volume ENTRY save_dp ENTRY restore_dp ENTRY set_our_dp ENTRY check_532_rw ENTRY munge_532 ENTRY divide PRINT OFF INCLUDE 'scsihd.equates' INCLUDE 'M16.MEMORY' INCLUDE 'M16.UTIL' INCLUDE 'M16.MISCTOOL' PRINT ON EJECT ;____Mem_Manager_____ ;******************************************************* ; ; This routine is used to Get a User ID from the ; memory manager for the SCSI Driver. This is ; required to get a userID for access reference. ; ; Inputs: None. ; ; Outputs: SCSID_uID = userID. ; Registers = Scrambled ; ; Errors: $0207 iderr Invalid userID. ; ;******************************************************* EXPORT get_mm_id get_mm_id PROC ; ; Get userID. ; pushword #$0000 pushword #scsi_duid _GetNewID pla sta |master_uid sta |scsi_uid @rts rts ENDP EJECT ;******************************************************* ; ; This routine is used to get the SCSI Manager Number ; from the Supervisory Dispatcher at startup time. ; ; Inputs: None. ; ; Outputs: scsi_mgrnum = SCSI Manager Number ; All Registers = scrambled ; ; Errors: None. ; ;******************************************************* EXPORT get_scsimgr get_scsimgr PROC ; ; Get userID. ; lda #$0000 ; Supervisor Driver Number (Unknown at this time) tax ; Supervisor Call Number ($0000) ldy #$0002 ; Spervisor ID for SCSI Manager ($0002) jsr |rout2_s_disp stx |scsi_mgrnum ; Preserve SCSI Driver Number for later use. rts ENDP EJECT ;******************************************************* ; ; 'zero_mem' ; ; This routine will fill a section of memory with ; $00s. ; ; Inputs: Acc = Buffer Size ; X = Low Byte of new RAM Address ; Y = High Byte of new RAM Address ; ; Outputs: scsi_zp0 = Long Pointer to new RAM ; Address ; Acc = Scrambled ; ; Errors: None. ; ;******************************************************* EXPORT zero_mem zero_mem PROC ; ; Save the buffer size. ; sta @buff_size ; ; Setup MOVE_INFO call for a ; non-incrementing source and an ; incrementing destination. ; pushlong #null_buff ;Source phy ;Destination High Word phx ;Destination Low Word ; ; Restore buffer size. If = 0 then ; we are to do an entire bank or at ; least 64k bytes. This may cross ; banks. ; lda @buff_size beq @do_64k pea $0000 pha bra @move_type @do_64k pea $0001 pea $0000 @move_type pea #move_scon_dinc jsl move_info @rts rts ; ; Data for this call ; @buff_size dc.w null null_buff dc.w null ENDP EJECT ;******************************************************* ; ; This routine is used to request a section of RAM from ; the memory manager for use by the driver. This ; routine allocates space for as requested by the byte ; count in the Acc. ; ; Inputs: Acc = Number of bytes requested. ; 0 = 1 bank ; ; Y = Offset to where the Handle ; should be stored within ; the allocated structure. ; ; Outputs: X = Low Word of new RAM Address ; Y = High Word of new RAM Address ; scsi_zp0 = Long Pointer to new RAM ; Address ; Acc = Scrambled ; ; Errors: Not enough memory if carry set. ; ;******************************************************* EXPORT get_space get_space PROC ; ; Request Acc bytes of RAM from ; Memory Manager. ; sty |hndl_offset pushlong #00000000 ;Space for result handle cmp $0000 ;Is it Null? beq @null ;Yes. Request 1 bank pushword #0000 ;Size in bytes of requested memory. bra @stuff_a @null pushword #0001 ;Request 1 bank @stuff_a sta |buff_len pha pushword scsi_uid ;Our User ID ;Attributes of requested mem. pea attrfixed++\ attrnospec++\ attrpage pushlong #00000000 ;Location Pointer. Unused. _newhandle plx ; Get handle ply bcs @rts ; Exit if an error. ; ; Save Handle for later ; phy phx ; ; DEREF the Handle and get a ; pointer for the new RAM. ; stx smgr_pl_ptr,x lda #^get_dev_lst sta >smgr_pl_ptr+2,x ; ; Load registers with their ; required values. ; lda |scsi_mgrnum ldx #cmd_get_dvc jsr |rout2_s_disp @rts_long bcs @rts ; ; Restore our direct page Device List ; lda |dvc_buff sta dvc_list,x lda dvc_list+2,x txa sta |direct_page sta |exit_dpage ; ; Undocumented feature. Store the SCSI ; Managers Direct Page in the Default DIB ; for external Access. ; clc adc #$0100 sta >default_dib+dib.handle ; ; Set our Direct Page with the first ; 'x' Bytes equal to the GS/OS DP ; settings. ; ; clc ; Calculate Source Address of GS/OS tdc ; Direct Page that we want. sta |gsos_dpage ; Preserving GS/OS DP for later use. adc #dev_num pea $0000 pha ; clc ; Calculate Destination Address of lda |direct_page ; our Direct Page that we want. adc #dev_num pea $0000 pha pushlong #dib_ptr+4 ;Length of the move pushword #move_sinc_dinc jsl move_info ;Move the data ; ; Restore the Direct Page that we ; borrowed until this was done. ; jsr restore_dp ; ; Set our Direct Page. ; lda |direct_page tcd ; ; Check for zero Devices. ; @we_did_it ldy #$0002 lda [dvc_list],y beq @no_devices ; ; Ensure that device count is ; in range. ; cmp #$0100+1 ;No more than 256 devices blt @count_ok lda #max_dvc_cnt ;Max Count @count_ok sta |dvc_count jsr |make_dib stx Low cmp #max_partitions+1 blt @cnt_ok @force_max lda #max_partitions @cnt_ok sta |part_cnt cmp #$0002+1 blt @non_linked dec @linked @non_linked dec |part_cnt bpl @main ; ; No valid entry. Set as if no ; partitions. ; @single jsr no_partition ;Marks DIB as online and switched also. jsr trash_volume ;Trash the volume if caller wishes. ;See |trash_it flag in trash_volume lda #null clc rts ; ; Check validity of partiton map. ; @main jsr check_map_entry bcc @chk_pdos ; ; It was undefined or unusable ; ; Is the Pointer good? ; ; Is it a cold DIB? ; ldy #dib.dvcflag lda [add_dib_here],y and #cold_dib beq @over_cold ;No. Skip clear code. ; ; Mark DIB to the Default. ; ldy #dib.dvcflag lda #wait_mode++\ ; Wait Mode is default cold_dib ; and they start cold. sta [add_dib_here],y ; ; Must set Head Link Ptr, Forward ; Device Link Ptr, and DIB Device ; Number to Null. ; lda #null ldy #dib.devnum sta [add_dib_here],y ldy #dib.headlnk sta [add_dib_here],y ldy #dib.fdvclnk sta [add_dib_here],y ; ; And skip it. ; Is there more to do? ; @over_cold dec |part_cnt bmi @do_dpi ;No! jmp @main_loop ;Yes! ; ; Check to see if the post driver install ; list contains any entries. ; @do_dpi jsr do_post_install ; ; Check the only one flag. If true ; then unlink it. ; lda |only_one bne @done ldy #dib.dvcchar lda [rebuild_zp],y and #linked_dvc--\ $ffff sta [rebuild_zp],y ; ; Clean exit. ; @done ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IF scsi_dtype = mcd_40\ OR scsi_dtype = direct_acc THEN jsr mode_sense lda |internal_buff+1 bpl @write_enable @write_protect ldy #dib.dvcchar lda [dib_ptr],y and #write_allow--\ $ffff bra @wp_chk @write_enable ldy #dib.dvcchar lda [dib_ptr],y ora #write_allow @wp_chk sta [dib_ptr],y lda #$0000 ENDIF ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ clc @rts rts ; ; Check the Overflow bit. If it is set, ; then this is a ProDOS Partition and we ; need to set the correct bit in the DIB. ; @chk_pdos bvc @over_1 ; ; Set the ProDOS Bit. ; ldy #dib.dvcflag lda [dib_ptr],y ora #pdos_part sta [dib_ptr],y ; ; Issue call to fix unit 1. This will ; guarantee that the first unit is also ; the first ProDOS Partition on the disk. ; jsr fix_unit_1 ; ; Get the Block Count for this ; Partition and store it in the ; DIB. The count as it exists ; in the partition data is stored ; High byte to Low byte. We will ; need to alter this to Low --> High ; format. ; @over_1 ldy #dib.blkcnt lda |pm.PartBlkCnt+2\ +internal_buff xba sta [dib_ptr],y ldy #dib.blkcnt+2 lda |pm.PartBlkCnt\ +internal_buff xba sta [dib_ptr],y ; ; Now we need to get the starting ; location for this partition. This ; will be added to the requested ; block to generate a real block ; address. Also in High --> Low format. ; ldy #dib.start_blk+2 lda |pm.PyPartStart+2\ +internal_buff sta [dib_ptr],y ldy #dib.start_blk lda |pm.PyPartStart\ +internal_buff sta [dib_ptr],y ; ; Get Location of this partition on disk. ; ldy #dib.part_blk lda |rpm_blk_num sta [dib_ptr],y ; ; Mark DIB as online and switched. ; ldy #dib.dvcflag lda [dib_ptr],y and #dvc_hardofl--\ $ffff ora #dvc_switch++\ dvc_online sta [dib_ptr],y ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; Set the Write Allow/Read Allow ; Mask byte to allow all bits to pass. ; ; This is used to filter or strip out the ; Write Enable bit in the case where the ; DIB Status says that the partition is ; write enabled but the disk is physically ; write protected. This can happen with a ; Partitioned Syquest Drive. ; lda #$ffff sta @mask_flag ; ; Is the device Removable? ; ldy #dib.dvcchar lda [dib_ptr],y and #removable beq @non_remove ;No. ; ; Issue the MODE SENSE Call to see if ; Write Protected. ; jsr mode_sense2 ;Issue call to use Sense Buffer bcs @non_remove ; ; Check the Write Protected Bit. ; lda |sense_data+\ mode.w_protect-1 ;But bit in Hi Byte bpl @non_remove ; ; Set the Write Allow/Read Allow ; Mask byte to filter the Write Allow out. ; lda #write_allow--\ $ffff sta @mask_flag ; ; Set the Characteristics to Match the ; Read and Write Enables in the Partition ; Status Field. ; @non_remove lda |pm.PartStatus+2\ +internal_buff xba and #vconf_wr_enable++\ vconf_rd_enable asl a sta @temp ldy #dib.dvcchar lda [dib_ptr],y and #write_allow++\ read_allow--\ $ffff ora @temp and @mask_flag sta [dib_ptr],y ENDIF ;------------------------------------------------------------------------------- ; ; Mark DIB as Linked. ; lda @linked bpl @skip_link ldy #dib.dvcchar lda [dib_ptr],y ora #linked_dvc sta [dib_ptr],y ; ; Inc the ONLY_ONE Flag. If it is ; null then save the dib_ptr. On ; exit we will check this flag and ; if = 0 we will use this pointer ; to clear the linked flag. ; inc |only_one bne @skip_link lda Low cmp #max_partitions+1 blt @cnt_ok @force_max lda #max_partitions @cnt_ok sta |part_cnt dec |part_cnt bpl @main ; ; No valid entry. Set as if no ; partitions. ; jsr no_partition clc rts ; ; Check validity of partiton map. ; @main jsr check_map_entry bcc @chk_pdos ; ; It was undefined or unusable ; Mark DIB to the Default. ; ldy #dib.dvcflag lda #wait_mode++\ ; Wait Mode is default cold_dib ; and they start cold. sta [next_dib],y ; ; Must set Head Link Ptr, Forward ; Device Link Ptr, and DIB Device ; Number to Null. ; lda #null ldy #dib.devnum sta [next_dib],y ldy #dib.headlnk sta [next_dib],y ldy #dib.fdvclnk sta [next_dib],y ; ; And skip it. ; Is there more to do? ; dec |part_cnt bpl @main_loop ; ; Clean exit. ; @done clc @rts rts ; ; Check the Overflow bit. If it is set, ; then this is a ProDOS Partition and we ; need to set the correct bit in the DIB. ; @chk_pdos bvc @over ; ; Set the ProDOS Bit. ; ldy #dib.dvcflag lda [next_dib],y ora #pdos_part sta [next_dib],y ; ; Issue call to fix unit 1. This will ; guarantee that the first unit is also ; the first ProDOS Partition on the disk. ; jsr fix_unit_1 ; ; Get the Block Count for this ; Partition and store it in the ; DIB. The count as it exists ; in the partition data is stored ; High byte to Low byte. We will ; need to alter this to Low --> High ; format. ; @over ldy #dib.blkcnt lda |pm.PartBlkCnt+2\ +internal_buff xba sta [next_dib],y ldy #dib.blkcnt+2 lda |pm.PartBlkCnt\ +internal_buff xba sta [next_dib],y ; ; Now we need to get the starting ; location for this partition. This ; will be added to the requested ; block to generate a real block ; address. Also in High --> Low format. ; ldy #dib.start_blk+2 lda |pm.PyPartStart+2\ +internal_buff sta [next_dib],y ldy #dib.start_blk lda |pm.PyPartStart\ +internal_buff sta [next_dib],y ; ; Get Location of this partition on disk. ; ldy #dib.part_blk lda |rpm_blk_num sta [next_dib],y ; ; Set this device to ONLINE. ; ldy #dib.dvcflag lda [next_dib],y ora #dvc_online sta [next_dib],y ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; Set the Characteristics to Match the ; Read and Write Enables in the Partition ; Status Field. ; lda |pm.PartStatus+2\ +internal_buff xba and #vconf_wr_enable++\ vconf_rd_enable asl a sta @temp ldy #dib.dvcchar lda [next_dib],y and #write_allow++\ read_allow--\ $ffff ora @temp sta [next_dib],y ENDIF ;------------------------------------------------------------------------------- ; ; Increment the partition count. ; inc |part_num beq @chk_ram ; ; Update the High seven bits of the ; unit number checking for the max ; value of 'max_partitions'. ; ldy #dib.unitnum lda [next_dib],y tax and #max_p_mask cmp #max_p_mask beq @all_done txa clc adc #p_mask_adder sta [next_dib],y inc |vPart_cnt ; ; All done with the DIB Update now ; do we have any more DIBs, and if ; so, do we have any more RAM left ; to build further DIBs? ; @chk_ram dec |part_cnt bmi @all_done dec |main_caller jsr chk_ram bcs @bad_call ;ERROR? jmp @main_loop ;No. Do the next one. @bad_call cmp #drvr_no_dev ;Yes. Then Exit bne @sec clc rts @sec sec rts ; ; Clean Exit ; @all_done clc rts ; ; Data Area ; @temp dc.w null ELSE ;------------------------------------------------------------------------------- ; ; Clean Exit ; lda #null clc rts ENDIF ;------------------------------------------------------------------------------- ENDP EJECT ;******************************************************* ; ; 'dibicise_new_ram' ; ; This routine takes the DIB located at [last_dib] and ; copies it into the new ram space. It does this ; while preserving the handle at offset 'dib.handle'. ; By so doing, it will be possible to free this ram ; space at some later time if that is deemed correct. ; ; Inputs: Low format *** ; lda |rpm_blk_num xba inc a xba sta |rpm_blk_num ; ; Set internal command flag ; @block_set stz |stat_cont ;We used the flag, now clear it. dec |internal ; ; Set the Partition call flag ; dec |f_partition ; ; Set the Call Type and Issue the ; READ BLOCK Command. ; lda #scsit_stat sta |call_type ; ; Issue the call. ; jsr check_532_rw @rts rts ; ; Data for the READ BLOCK Command ; @read_part dc.b $08 dc.b null EXPORT rpm_blk_num rpm_blk_num dc.w null dcb.b 10,null ENDP EJECT ;******************************************************* ; ; 'write_pm_blk' ; ; ; ; Inputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Outputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: Carry set if operation could not be ; completed. Out of memory for example. ; ;******************************************************* EXPORT write_pm_blk write_pm_blk PROC ; ; Tell the Main Driver where ; our command structure resides. ; lda #@write_part sta > Low. Must be switched ; to Low >> High). This is the last ; readable block number. Add 1 to ; it for comparison reasons. ; lda |block.count\ +internal_buff\ +2 xba adc #$0001 ldy #dib.blkcnt sta [dib_ptr],y lda |block.count\ +internal_buff xba adc #null ldy #dib.blkcnt+2 sta [dib_ptr],y @over_0 ldy #dib.start_blk lda #null sta [dib_ptr],y ldy #dib.start_blk+2 sta [dib_ptr],y ; ; Set Read and Write Enables ; lda >default_dib+dib.dvcchar ;Get Default Settings for and #write_allow++\ ;Write Enable read_allow++\ ;Read Enable format_allow ;And Format Allowed ldy #dib.dvcchar ora [dib_ptr],y ;Combine with the current sta [dib_ptr],y ;Settings for this device ; ; Mark DIB as online and switched. ; ldy #dib.dvcflag lda [dib_ptr],y and #dvc_hardofl--\ $ffff ora #dvc_switch++\ dvc_online sta [dib_ptr],y sec rts ENDP EJECT ;******************************************************* ; ; 'check_map_entry' ; ; Check the Partition Map Entry currently loaded in ; the internal buffer. If it is of type ; 'Apple_partition_map', 'Apple_Driver', 'Apple_Free', ; or 'Apple_Scratch', then this routine will return ; with the carry set. Any other type will return ; with the carry clear. In addition, 'Apple_ProDOS' ; will return with the overflow flag set. ; ; Inputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Outputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: Carry set if Partition Map Entry is not ; for a valid Volume. Overflow set if the ; Partition is a ProDOS Partition. ; ;******************************************************* EXPORT check_map_entry check_map_entry PROC ; ; This routine runs in ; 8 bit m and x only. ; short ; ; Is it ProDOS? ; ldx #@p_map-@prodos-2 ldy #null @loop lda |pm.PartType\ +internal_buff,y beq @over_0 ;Yes or null. Either way we do the rest. cmp @prodos,y beq @next eor #'A'--'a' cmp @prodos,y bne @over_0 ;No. Continue on. @next iny dex bpl @loop brl @pdos_part ;Skip over 8 bit code area to 16 bit area. ; ; Is it the Partition Map? ; @over_0 ldx #32-1 ldy #null @loop_0 lda |pm.PartType\ +internal_buff,y beq @skip ;Yes or null. Either way we skip it. cmp @p_map,y beq @next_0 eor #'A'--'a' cmp @p_map,y bne @over_1 ;No. Continue on. @next_0 iny dex bpl @loop_0 bra @skip ;Yes. Skip it. ; ; Is it a FREE Partition? ; @over_1 ldx #32-1 ldy #null @loop_1 lda |pm.PartType\ +internal_buff,y beq @skip ;Yes or null. Either way we skip it. cmp @free,y beq @next_1 eor #'A'--'a' cmp @free,y bne @over_2 ;No. Continue on. @next_1 iny dex bpl @loop_1 bra @skip ;Yes. Skip it. ; ; Is it a SCRATCH Partition? ; @over_2 ldx #32-1 ldy #null @loop_2 lda |pm.PartType\ +internal_buff,y beq @skip ;Yes or null. Either way we skip it. cmp @scratch,y beq @next_2 eor #'A'--'a' cmp @scratch,y bne @over_3 ;No. Continue on. @next_2 iny dex bpl @loop_2 ; ; Is it a Driver Partition? ; @over_3 ldx #32-1 ldy #null @loop_3 lda |pm.PartType\ +internal_buff,y beq @skip ;Yes or null. Either way we skip it. cmp @driver,y beq @next_3 eor #'A'--'a' cmp @driver,y bne @over_4 ;No. Continue on. @next_3 iny dex bpl @loop_3 ; ; At this point the Current Partition ; Type matched one of the three types ; checked for. Exit with the carry ; set. ; @skip longmx sec rts ; ; At this point the Current Partition ; Type did not match one of the three ; types checked for and it was not a ; ProDOS Partition.. Exit with the ; Carry and Overflow bits clear. ; @over_4 longmx clc clv rts ; ; At this point the Current Partition ; Type is a ProDOS Partition. Exit with ; the Carry clear and Overflow set. ; @pdos_part longmx clc sep #%01000000 ;Set the v flag rts ; ; Inactive Partion Types to check for. ; STRING ASIS @prodos dc.b 'Apple_ProDOS' dc.b $00 @driver dc.b 'Apple_Driver' dc.b $00 @p_map dc.b 'Apple_partition_map' dc.b $00 @free dc.b 'Apple_Free' dc.b $00 @scratch dc.b 'Apple_Scratch' dc.b $00 STRING PASCAL ENDP EJECT ELSE ;part_suprt = true ;------------------------------------------------------------------------------- EXPORT read_pm_blk read_pm_blk PROC EXPORT check_map_entry check_map_entry lda #null clc clv rts EXPORT rpm_blk_num rpm_blk_num dc.w null EXPORT chk_map chk_map ; ; We can't have a valid partition ; map, so this device will be ; treated as a single non-partitioned ; device. ; EXPORT no_partition ; ; Issue the READ CAPACITY Command. ; no_partition jsr read_capacity bcs @over_0 ;Was there an error? ; ; Get the Block Count (Stored ; High >> Low. Must be switched ; to Low >> High). This is the last ; readable block number. Add 1 to ; it for comparison reasons. ; lda |block.count\ +internal_buff\ +2 xba adc #$0001 ldy #dib.blkcnt sta [dib_ptr],y lda |block.count\ +internal_buff xba adc #null ldy #dib.blkcnt+2 sta [dib_ptr],y @over_0 ldy #dib.start_blk lda #null sta [dib_ptr],y ldy #dib.start_blk+2 sta [dib_ptr],y ; ; Mark DIB as online and switched. ; ldy #dib.dvcflag lda [dib_ptr],y and #dvc_hardofl--\ $ffff ora #dvc_switch++\ dvc_online sta [dib_ptr],y sec rts ENDIF ;part_suprt = true ;------------------------------------------------------------------------------- ;____Cache_Suport____ ;------------------------------------------------------------------------------- IF cache_blks = true THEN ;******************************************************* ; ; 'r_all_in_cache' ; ; This routine is used to check if the entire ; requested block count is in the cache. This routine ; will check each block individually, incrementing the ; block count and subtracting the block size from the ; request count until either a block is found that is ; not in the cache (Exit Carry Set) or request count ; has been exausted (Exit Carry Clear). ; ; On entry this routine clears some values to indicate ; it's starting point for this call. As it goes ; throughthe cache looking for blocks, it will fetch ; the block from the cache and advance the starting ; point. What this does is eliminate double searches ; throughthe cache and if a read is needed, these ; blocks will not have to be transfered. When this ; routine exits, the caller will think that the first ; block that we found that was not in the cache was ; the first block requested. For this reason, any ; code that uses this call will need to preserve those ; values so that they can be restored on exit. ; ; If we receive a Read Call for 256 blocks and the ; first 128 are in the cache, then we don't want to ; re-read them, and we don't want to do a find again ; later when we fetch them. let's fetch them now and ; advance our pointers. ; ; Inputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; 0 if any other error occurs. ; Error code is in Acc. ; ;******************************************************* EXPORT r_all_in_cache r_all_in_cache PROC ; ; Switch Direct Pages. ; lda |gsos_dpage tcd ; ; Get the requested count and devide ; by block size to get the loop counter. ; If Count = 0, then exit. ; lda buff_ptr,x sta |c_strt_buffer lda buff_ptr+2,x sta |c_strt_buffer+2 lda rqst_cnt,x sta |c_strt_rqst_cnt lda rqst_cnt+2,x sta |c_strt_rqst_cnt+2 lda block_num,x sta |c_strt_blk_num lda block_num+2,x sta |c_strt_blk_num+2 ; ; Validate Flag for the Read Cache ; Routines ; dec |cache_valid txa tcd plp pla rts ; ; Internal Data ; @blk_cnt dc.l null ; ; The following values are used to advance ; the starting point of the cache calls. ; EXPORT c_strt_buffer EXPORT c_strt_rqst_cnt EXPORT c_strt_blk_num EXPORT cache_valid c_strt_buffer dc.l null ;Starting Buffer Pointer c_strt_rqst_cnt dc.l null ;Starting Request Count c_strt_blk_num dc.l null ;Starting Block Number cache_valid dc.w null ENDP EJECT ;******************************************************* ; ; 'w_update_cache' ; ; This routine is used when writting data to the disk ; with a cache priority of $0000. If the block is in ; the cache, then the cache will be updated. If not, ; then nothing will happen. ; ; Inputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; Carry Clear = Always place in cache ; Carry set = Only place in cache if ; already there. ; ; Outputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: Carry set if requested block is not ; added to the cache. ; ;******************************************************* EXPORT w_update_cache w_update_cache PROC ; ; Zero Deferred Write failed flag. ; stz @deferred ; ; Preserve Carry Flag for later. ; php ; ; Set GS/OS Direct Page ; lda |gsos_dpage tcd ; ; Preserve Block Number and request ; count. Set count to 1 block per ; call. ; lda mcd_40 THEN jsr set_512_mode ENDIF ;------------------------------------------------------------------------------- ; ; Issue the READ CAPACITY Command. ; jsr read_capacity bcs @over_0 ;Was there an error? ; ; Get the Block Count (Stored ; High >> Low. Must be switched ; to Low >> High). This is the last ; readable block number. Add 1 to ; it for comparison reasons. ; lda |block.count\ +internal_buff\ +2 xba adc #$0001 sta |t_dvc_blocks lda |block.count\ +internal_buff xba adc #null sta |t_dvc_blocks+2 @over_0 stz |trash_it ;DO NOT TRASH THIS DISK. pei 3 = Carry set ; ; Restore the Direct Page Values. ; @restore_dp php jsr set_our_dp plp ; ; Restore Auto Sensing Pointer. ; ldy #dib.rslt_ptr+2 pla sta [dib_ptr],y ldy #dib.rslt_ptr pla sta [dib_ptr],y rts ; ; AUDIO STATUS Command Packet ; @chk_play dc.b $cc ;Command Number dc.b null ;SCSI Command Flags dcb.b 10,null ;Reserved ; ; Data received for this call ; @play_data dcb.b 6,null ENDP ENDIF ;------------------------------------------------------------------------------- EJECT ;******************************************************* ; ; The REQUEST SENSE Call is used to request any ; information from the target device that might tell ; us something about the way that the last call ; competed. This call should always be issued if any ; SCSI Command returns from the SCSI Manager with a ; CHECK CONDITION in the status result field. The ; data returned will be kept until the next REQUEST ; SENSE Command is issued. A flag however will be set ; if any other commands are received by the SCSI Driver ; indicating that this data is outdated. ; ; Inputs: Acc = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Outputs: Acc = Error Code if any ; |sense_data = Data returned by the device ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: Carry set if Unit no ready. ; ;******************************************************* EXPORT rqst_sense rqst_sense PROC ; ; Set Internal Command Flag ; dec |internal ; ; Set Parm Pointer. ; lda #@rqst_sens_p sta dev_num,x pha lda >dib_ptr,x pha lda >dib_ptr+2,x pha lda dev_num,x lda dib_ptr,x lda dib_ptr+2,x txa tcd jsl set_disksw tay lda |direct_page tcd ldx |gsos_dpage pla sta >dib_ptr+2,x pla sta >dib_ptr,x pla sta >dev_num,x stz leave_switched ;Clear this flag *** MSG 12/12/91 *** tya cmp #$0001 rts ; ; Data for this call ; EXPORT leave_switched leave_switched dc.w null ; *** MSG 12/12/91 *** ELSE ;------------------------------------------------------------------------------- lda #null clc rts ENDIF ;------------------------------------------------------------------------------- ENDP EJECT ;******************************************************* ; ; TRASH_VOLUME ; ; This routine write a non-formatted pattern to block ; 2 of the volume whose DIB is [dib_ptr]. This is to ; force the OS to re-format or lay down the OS data for ; that volume rather than using what is already there ; and appears to be valid. ; ; Inputs: $ff0500 ; ; Preserve Callers Data Bank ; and set ours. ; phb phk plb ; ; Check to see if we have our own ; Direct Page. If so then copy first ; 'x' bytes to our temp, switch DP and ; copy it back to ours. ; ldx |direct_page beq @chk_startup ;No DP. This must be a startup call. ; ; Set our Direct Page with the first ; 'x' Bytes equal to the GS/OS DP ; settings. ; pha ; clc ; Calculate Source Address of GS/OS tdc ; Direct Page that we want. sta |gsos_dpage ; Preserving GS/OS DP for later use. adc #dev_num pea $0000 pha ; clc ; Calculate Destination Address of lda |direct_page ; our Direct Page that we want. adc #dev_num pea $0000 pha pushlong #dib_ptr+4 ;Length of the move pushword #move_sinc_dinc jsl move_info ;Move the data ; ; Set our Direct Page. ; lda |direct_page tcd ; ; Continue with call. ; pla bra @do_command ; ; Validate for Startup Command. ; @chk_startup cmp #cmd_start bne @error1 ; ; Convert call number in Acc ; to an index into our jmp table ; @do_command cmp #max_d_cmd+1 bge @error @do_cmd1 asl a tax ; ; If this is a status call $0005 ; then don't clear these values. ; That's what they are trying to ; get. ; cmp #cmd_status*2 ;Account for the ASL bne @clear ;Not a status call lda $ff0502 ;*** Debug only rtl ; ; Error Exit ; ; Reset GS/OS Direct Page. ; @error lda |gsos_dpage tcd @error1 lda #drvr_bad_code @error2 sec plb ; ; Save Error Code for Get Last ; Result Call ; sta |lst_rslt_ec ; sta >$ff0502 ;*** Debug only rtl ;******************************************************* ; ; Jump table and code. ; ;******************************************************* @table dc.w startup dc.w Open dc.w Read dc.w Write dc.w Close dc.w Status dc.w Control dc.w Flush dc.w Shutdown EJECT ; ; Dispatcher Routing routine ; EXPORT rout2_s_disp rout2_s_disp pha lda |direct_page ;If this is the first time, then bne @use_ours pla jsl s_dispatch rts @use_ours lda |gsos_dpage tcd pla jsl s_dispatch pha lda |direct_page tcd pla rts ENDP EJECT ;******************************************************* ; ; The following statements are used to define the DIB ; structure. The structure contains the traditional ; DIB followed by an extension used for device ; maintainence. All together each DIB with the ; associated extensions will take one page of RAM. ; ;******************************************************* ; ; $00 ------------------------------------------------ ; | | ; | Device Information Block Data (DIB) | ; $3F | | ; ------------------------------------------------ ; $40 | Physical Block Number | ; | | ; $43 | that maps to logical block zero | ; ------------------------------------------------ ; $44 | | ; | Head Pointer | ; $47 | | ; ------------------------------------------------ ; $48 | | ; | Forward Pointer | ; $4B | | ; ------------------------------------------------ ; $4C | Memory DIB Count | ; ------------------------------------------------ ; $4E | Reserved | ; ------------------------------------------------ ; $50 | | ; | Memory Manager Handle for this DIB | ; $53 | | ; ------------------------------------------------ ; $54 | | ; | Block Size (Bytes) | ; $57 | | ; ------------------------------------------------ ; $58 | Max SCSI Command for this Device | ; ------------------------------------------------ ; $5A | | ; | Command Bitmap (See ERS for description) | ; $79 | | ; ------------------------------------------------ ; $7A | SCSI Command Data | ; | and | ; $D9 | SCSI Manager Call Buffer Structures | ; ------------------------------------------------ ; $DA | 'Busy' and other Flags | ; ------------------------------------------------ ; $DC | | ; | Completion Vector with Code | ; $FF | | ; ------------------------------------------------ ; ;******************************************************* EXPORT default_dib default_dib PROC ; ; Definition of DIB Structure. ; dc.l $00000000 ; DIB Link Pointer (LONG) dc.l drvr_main ; Pointer to Drvrs Main Entry (LONG) ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF warm_ss_suprt = true THEN dc.w restartable++\ ;Restartable from ram if Set (WORD) speed_ind++\ ;Device is speed ind if Set blk_device++\ ;Block Device if Set write_allow++\ ;Write is Allowed if Set read_allow++\ ;Read is Allowed if Set format_allow++\ ;Format is Allowed if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ELSE ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> dc.w speed_ind++\ ;Device is speed ind if Set (WORD) blk_device++\ ;Block Device if Set write_allow++\ ;Write is Allowed if Set read_allow++\ ;Read is Allowed if Set format_allow++\ ;Format is Allowed if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ENDIF ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ENDIF ;------------------------------------------------------------------------------- ; ; Is it a Write-once Read-multiple Device. ; IF scsi_dtype = apple_cd\ OR scsi_dtype = changer THEN ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF warm_ss_suprt = true THEN dc.w restartable++\ ;Restartable from ram if Set (WORD) speed_ind++\ ;Device is speed ind if Set blk_device++\ ;Block Device if Set read_allow++\ ;Read is Allowed if Set removable++\ ;Removable Media if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ELSE ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> dc.w speed_ind++\ ;Device is speed ind if Set (WORD) blk_device++\ ;Block Device if Set read_allow++\ ;Read is Allowed if Set removable++\ ;Removable Media if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ENDIF ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ENDIF ;------------------------------------------------------------------------------- ; ; Is it an MCD 40 Tape Drive ; IF scsi_dtype = mcd_40 THEN ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF warm_ss_suprt = true THEN dc.w restartable++\ ;Restartable from ram if Set (WORD) speed_ind++\ ;Device is speed ind if Set blk_device++\ ;Block Device if Set write_allow++\ ;Write is Allowed if Set read_allow++\ ;Read is Allowed if Set format_allow++\ ;Format is Allowed if Set removable++\ ;Removable Media if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ELSE ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> dc.w speed_ind++\ ;Device is speed ind if Set (WORD) blk_device++\ ;Block Device if Set write_allow++\ ;Write is Allowed if Set read_allow++\ ;Read is Allowed if Set format_allow++\ ;Format is Allowed if Set removable++\ ;Removable Media if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ENDIF ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN ; ; Is it a Scanner Device? ; dc.w speed_ind++\ ;Device is speed ind if Set read_allow++\ ;Read is Allowed if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN ; ; Is it a appl_laser Device? ; dc.w speed_ind++\ ;Device is speed ind if Set write_allow++\ ;Write is Allowed if Set driver_is_clean ;Follows guidelines if Set - 6-Mar-93 JCM ENDIF ;------------------------------------------------------------------------------- dc.l $00000000 ; Block Count for this device (LONG) ; Set to default. This can change ; ; Length of Descriptive Name (PSTR) ; Followed by the Descriptive ; Name for the device. This ; is a conditional Assembly. ; ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; Is it a Direct-Access Device. ; dc.b 'APPLESCSI.HD00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = seq_acc THEN ; ; Is it a Sequential-Access Device. ; dc.b 'SCSI.TAPE00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN ; ; Is it a LaserWriter Device. ; dc.b 'APPLESCSI.LW00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = proc_dvc THEN ; ; Is it a Processor Device. ; dc.b 'APPLESCSI.PROC00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = worm_dvc THEN ; ; Is it a Write-once Read-multiple Device. ; dc.b 'APPLESCSI.WORM00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd THEN ; ; Is it a Read-only Direct-Access Device. ; dc.b 'APPLESCSI.CDROM00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN ; ; Is it a Scanner Device. ; dc.b 'APPLESCSI.SCANNER00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = optic_mem THEN ; ; Is it a Optical Memory Device. ; dc.b 'APPLESCSI.OPTICAL00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = changer THEN ; ; Is it a Changer Device. ; dc.b 'APPLESCSI.CHANGER00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = comm_dvc THEN ; ; Is it a Communication Device. ; dc.b 'APPLESCSI.COM00.00' ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN ; ; Is it a Direct Access Magnetic ; Tape Device. ; dc.b 'APPLESCSI.TAPE00.00' ENDIF ;------------------------------------------------------------------------------- ; ; Pad space to fill gap to next field. ; dcb.b dib.slotnum+default_dib-*,$20 dc.w $8000 ; Device Slot Number from MGR. (WORD) ; By setting bit 15 in the slot ; number we can force the device ; dispatcher to keep it around. ; We will save this as a default ; dib. This will also allow us ; to remain loaded if there are ; no devices available at boot ; time. ; dc.w $0000 ; Device Unit Number from MGR. (WORD) dc.w drvr_vers ; Version Number for our Driver (WORD) ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN dc.w $0005 ; ID of Device we talk to (WORD) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd THEN dc.w $0007 ; ID of Device we talk to (WORD) ENDIF ;------------------------------------------------------------------------------- ; BD 201811 IF scsi_dtype = changer THEN dc.w $0021 ; ID of Device we talk to (WORD) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN dc.w $0020 ; ID of Device we talk to (WORD) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN dc.w $001A ; ID of Device we talk to (WORD) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN dc.w $001C ; ID of Device we talk to (WORD) ENDIF ;------------------------------------------------------------------------------- dc.w $0000 ; Head Device Link (WORD) dc.w $0000 ; Forward Device Link (WORD) ; ; Pointer to DIB Extension (LONG) ; dc.l dib.start_blk+default_dib dc.w $0000 ; DIB Device Number (WORD) ; ; The Starting Block Number for this device ; is maintained here. This is used to ; modify the requested block number from ; a logical to a physical number. ; dc.l $00000000 ; Starting Physical Block Num. (LONG) ; ; These two pointers are the compliment ; to the links in the standard DIB and ; will point to the actual DIB referenced ; in the Head and Forward Device Links. ; dc.l null ; Head Dvc Pointer (LONG) dc.l null ; Forward Dvc Pointer (LONG) dc.w null ; Number of active dibs in mem (WORD) dc.w null ; Block containing partition (WORD) ; ; Memory Manager Handle ; dc.l $00000000 ; (LONG) ; ; Block Size ; dc.l block_size ; (LONG) ; ; Maximum SCSI Command supported by ; the device for this DIB. ; dc.w $00FF ; (WORD) ; ; SCSI Command Group Bitmaps ; ;------------------------------------------------------------------------------- IF scsi_dtype = direct_acc THEN ; ; It is a Direct-Access Device. ; dc.B $D9,$B0,$27,$BE ; Group 0 (LONG) dc.B $04,$A3,$1E,$FB ; Group 1 (LONG) dc.B $00,$00,$04,$21 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = seq_acc THEN ; ; It is a Sequential-Access Device. ; dc.B $D4,$B1,$FF,$FF ; Group 0 (LONG) dc.B $00,$10,$08,$78 ; Group 1 (LONG) dc.B $00,$00,$04,$21 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = appl_laser THEN ; ; It is a LaserWriter Device. ; dc.B $FE,$20,$27,$20 ; Group 0 (LONG) dc.B $00,$00,$00,$00 ; Group 1 (LONG) dc.B $00,$00,$00,$00 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = proc_dvc THEN ; ; It is a Processor Device. ; dc.B $90,$A0,$20,$8C ; Group 0 (LONG) dc.B $00,$00,$00,$00 ; Group 1 (LONG) dc.B $00,$00,$04,$21 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = worm_dvc THEN ; ; It is a Write-once Read-multiple Device. ; dc.B $D1,$90,$27,$BE ; Group 0 (LONG) dc.B $04,$03,$10,$60 ; Group 1 (LONG) dc.B $00,$00,$04,$21 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd\ OR scsi_dtype = changer THEN ; ; It is a Read-only Direct-Access Device. ; ; dc.B $D0,$90,$27,$BE ; Group 0 (LONG) ; dc.B $04,$01,$10,$60 ; Group 1 (LONG) ; dc.B $00,$00,$04,$21 ; Group 2 (LONG) ; dc.B $00,$00,$00,$00 ; Group 3 (LONG) ; dc.B $00,$00,$00,$00 ; Group 4 (LONG) ; dc.B $00,$00,$00,$00 ; Group 5 (LONG) ; dc.B $00,$00,$00,$00 ; Group 6 (LONG) ; dc.B $00,$00,$00,$00 ; Group 7 (LONG) *** changed 15-Dec-92 DAL -- Hard-code capabilities of Apple CD-300 *** (page 18 of AppleCD 300 SCSI Spec v1.2) dc.B $D0,$90,$27,$BE ; Group 0 ;00,01,03,08,0B,12,15-17,1A-1E dc.B $04,$90,$00,$18 ; Group 1 ;25,28,2B,3B,3C dc.B $3F,$90,$04,$20 ; Group 2 ;42-48,4B ! BD 201811 49 55 5A dc.B $00,$00,$00,$00 ; Group 3 dc.B $00,$00,$00,$00 ; Group 4 dc.B $04,$C0,$00,$00 ; Group 5 ;A5,A8 ! BD 201811 A9 dc.B $00,$04,$00,$C1 ; Group 6 ;CD,D8,D9,DF dc.B $00,$00,$00,$00 ; Group 7 *** end 15-Dec-92 ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = scanner THEN ; ; It is a Scanner Device. ; dc.B $91,$82,$67,$BC ; Group 0 (LONG) dc.B $0C,$A0,$48,$78 ; Group 1 (LONG) dc.B $00,$00,$00,$00 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = optic_mem THEN ; ; It is a Optical Memory Device. ; dc.B $D9,$B0,$27,$BE ; Group 0 (LONG) dc.B $04,$0F,$1E,$FC ; Group 1 (LONG) dc.B $00,$00,$04,$21 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$AF,$11,$04 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = comm_dvc THEN ; ; It is a Communication Device. ; dc.B $90,$A0,$24,$2C ; Group 0 (LONG) dc.B $00,$00,$00,$18 ; Group 1 (LONG) dc.B $00,$00,$00,$00 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40 THEN ; ; It is a Direct Access Magnetic ; Tape Device. ; dc.B $DF,$F7,$FF,$7C ; Group 0 (LONG) dc.B $04,$B0,$01,$18 ; Group 1 (LONG) dc.B $00,$00,$00,$00 ; Group 2 (LONG) dc.B $00,$00,$00,$00 ; Group 3 (LONG) dc.B $00,$00,$00,$00 ; Group 4 (LONG) dc.B $00,$00,$00,$00 ; Group 5 (LONG) dc.B $00,$00,$00,$00 ; Group 6 (LONG) dc.B $00,$00,$00,$00 ; Group 7 (LONG) ENDIF ;------------------------------------------------------------------------------- ; ; SCSI Manager Call PList ; dc.w $0000 ; Same as our Slot Number (WORD) dc.w scsi_dtype ; Same as our Unit Number (WORD) dc.w $0000 ; Version of call issued (WORD) dc.w $0000 ; Flags from Command Table (WORD) dc.w $0000 ; Time Out Factor * xxx ms (WORD) ; Completion Routine Pointer (LONG) dc.l dib.complet\ +default_dib ; Pointer to Command Packet (LONG) dc.l dib.scsicmd\ +default_dib ; Ptr to Send/R'cv Structure (LONG) dc.l dib.trx_buff\ +default_dib dc.l $00000000 ; Users Send/R'cv Length (LONG) ; Pointer to Status Structure (LONG) dc.l auto_sense_data dc.l $00000000 ; Reserved space 1 (LONG) dc.l $00000000 ; Reserved space 2 (LONG) ; ; SCSI Command Packet ; dcb.b 12,$00 ; Room for any SCSI Command (BYTES) ; ; SCSI Manager Device Send/R'cv Buffers List ; dc.l $00000000 ; Users Send Buffer (LONG) dc.l $00000000 ; Request cnt for this buffer (LONG) dc.l $00000000 ; Offset for next pass (LONG) dc.l $00000000 ; Null (LONG) dc.l $00000000 ; Null (LONG) dc.l $00000000 ; Null (LONG) dc.l $00000000 ; Null (LONG) dc.l $00000000 ; Null (LONG) dcb.l 4,$00000000 ; Reserved Space * 4 for future (LONG) ; ; Device Busy and other Flags (WORD) ; dc.w wait_mode++\ ; Wait Mode is default cold_dib ; and they start cold. ; ; Completion Routine for this DIB. ; This takes the remaining space in ; the allocated RAM. Any routine can ; be placed here but must never go ; beyond offset $FF ; jsl g_dib_ptr pei scsi_zp0 pei scsi_zp1 stx dib_size THEN ; ; It's too long. Force an error ; bad dib length ENDIF ;------------------------------------------------------------------------------- IF @end-default_dib 0000. ; ; Called via 'JSR' ; ; Inputs: [dib_ptr] = Target DIB l (LONG) ; Acc = Unspecified ; Carry = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Returns via 'RTS' ; ; Outputs: Acc = 0 ; Carry = 0 ; or ; Acc = Error ; Carry = 1 ; ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: See Spec. ; ;******************************************************* EXPORT format_opt format_opt PROC ;------------------------------------------------------------------------------- IF block_dvc = true\ AND character_dvc = false THEN ;------------------------------------------------------------------------------- IF scsi_dtype = apple_cd\ OR scsi_dtype = changer THEN ; ; If the device is a CD_ROM, then there ; are no format options. stz > High. xba ; Send it out High >> Low. sta |c_block_num ; ; Set Main Driver Pointer to ; our data for the command. ; lda #cmd_$800A sta $8000 ; Otherwise check to see if they are ; all in the cache. If not we will ; need to issue a read call. If they ; are all there we will skip the read ; and go to the post processing ; section. ; bit > High. xba ; I Send it out High >> Low. sta |c_block_num_l+2 sta |c_block_num_s lda $80, ; then we need to break it into multiple ; calls. If not, then send it as is. ; lda |result+1 bne @gr8er_80 lda |result dec a cmp #$0080 blt @issue_call ; ; Set the max count for a single byte block ; count (Block size * $80). ; @gr8er_80 lda > LSB order. We need to add * ;* $100 to it. This is done by a simple * ;* increment. * ;***************************************** ; @over lda |c_block_num_s clc xba adc #$0080 xba sta |c_block_num_s brl @issue_call ; ; Restore the environment. ; @done lda @orig_rqst sta rqst_cnt,x sta rqst_cnt+2,x sta Low format. +sense_data\ +1 xba sta |scratch0 lda |gds.data_avail\ +sense_data\ -1 xba and #$00ff sta |scratch0+2 sec lda @r_rqst_cnt sbc |scratch0 sta @stuff lda @r_rqst_cnt+2 sbc |scratch0+2 ; ; Was the request count < than what is ; available in the scanner? If so then ; we will return request count bytes only. ; ; Were They equal? ; blt @do_rqst_cnt ;Yes. ora @stuff beq @do_rqst_cnt ;Yes. ; ; Well, it would apear that the request ; count is > then what is available. We ; will go ahead and get what is there ; and then we will check the wait flag. ; If we are in wait state, then we will ; loop around until we are able to get ; what the user has requested. If we are ; not in wait state, then we will exit ; after the read. ; ldx |scratch0 ldy |scratch0+2 sec lda @r_rqst_cnt sbc |scratch0 sta @r_rqst_cnt lda @r_rqst_cnt+2 sbc |scratch0+2 sta @r_rqst_cnt+2 dec @enough_data bra @do_read @do_rqst_cnt ldx @r_rqst_cnt ldy @r_rqst_cnt+2 stz @r_rqst_cnt stz @r_rqst_cnt+2 ; ; Set our Request Count for this call. ; @do_read stx warm_cold_flag and #$0001 beq @do_cold ;It's Cold ; ; Yeah, so it's a warm shutdown. But ; does this device know what that ; means? We'll see! ; ldy #dib.dvcchar lda [dib_ptr],y and #restartable beq @do_cold ;Not restartable. ; ; Mark as OFFLINE and Relaxing ; ldy #dib.dvcflag lda [dib_ptr],y and #dvc_online--\ $ffff ora #relaxing sta [dib_ptr],y ; ; Is the device removable? ; ; ldy #dib.dvcchar ; lda [dib_ptr],y ; and #removable ; beq @continue ;Not removable. ; ; Reinitialise DIB Device Number to ; zero. ; lda #null ldy #dib.devnum sta [dib_ptr],y ; ; Do the Head and Forward links also. ; ldy #dib.headlnk sta [dib_ptr],y ldy #dib.fdvclnk sta [dib_ptr],y ; ; Get out of here updating only ; the active DIB count not the ; total DIB Count. ; @continue jmp @update_acnt ENDIF ;------------------------------------------------------------------------------- ; ; It's a real DIB. Issue a $1B ; START/STOP Command. Ignor all ; errors, not all devices support ; this optional command. ; @do_cold jsr stop_unit ; ; Set Device to Default. ; ldy #dib.dvcflag lda #wait_mode++\ cold_dib sta [dib_ptr],y ; ; Shut it down. To do this we clear ; the DIB Device Number. ; ldy #dib.devnum lda [dib_ptr],y sta @this_device ;Save for a while lda #null sta [dib_ptr],y ; ; Dec Device count for this memory ; segment. ; ldy #dib.handle ;Set up to deref the handle to find lda [dib_ptr],y ;where this memory segment starts. sta warm_cold_flag and #$0001 bne @do_warm ;It's Warm @no_warm_start jmp @chk_dflt ;It's Cold ; ; Check to see if this is for the ; 'default_dib'. If it is, then we need ; to exit with an error. The error is so ; that our default DIB is purged from the ; startup list. ; @do_warm lda warm_cold_flag and #$0001 bne @links_done ;It's Warm. Skip the links ; ; Set the linked bit in both DIBs. ; ldy #dib.dvcchar lda [scsi_zp4],y ora #linked_dvc sta [scsi_zp4],y lda [dib_ptr],y ora #linked_dvc sta [dib_ptr],y ENDIF ;------------------------------------------------------------------------------- ; ; Not the first one, so increment the counter ; if we are not beyond what we have for an ; active dib count. ; @links_done lda |active_starts cmp |tot_dib_cnt beq @over_inc inc |active_starts @over_inc clc rts ; ; Local Data storage here. ; @current_dev dc.w null ;Device Number for this DIB @our_unit dc.w null ;His unit number less the partition bits. @our_slot dc.w null ;His slot number ; ; Check to see if we've been called before. ; If not then we need to get the gs/os ; direct page address. ; @im_a_virgin lda |direct_page bne @we_have_it ; ; Where is GS/OS Direct Page? ; tdc sta |gsos_dpage ; ; We also need to get the SCSI Managers ; ID for the S_DISPATCHER. ; jsr get_scsimgr bcs @rts ; ; Get ID from the memory manager. All that ; this does is request a new ID. ; @we_have_it jsr get_mm_id ; ; Call the get_dvc_ram subroutine. ; This will allocate the space ; that we need for the device list ; returned by the SCSI Manager. ; It then calculates a DIB count ; (Max 256) and allocates RAM for ; those structures. This can be ; increased later if it is needed. ; This can occur if some of the ; devices contain more than one ; partition. ; jsr get_dvc_ram bcc @do_dflt_dib ;Check for errors. jsr fre_dvc_ram ;Dump Get Devices Ram lda #drvr_no_dev ;Exit sec @rts rts ; ; Now we need to build the DIBs for ; these devices. The first one will ; not be built in the default_dib ; area. The default_dib will be ; copied first to the new memory that ; has been allocated. It is here ; that the first DIB will be built. ; After this the last DIB built will ; be copied into the space for the ; next DIB to be built and then ; updated accordingly. We do not use ; the default_dib because this will ; serve to keep this driver active ; even if no devices are present at ; boot time. Just in case a drive ; does come online later. ; @do_dflt_dib lda scanner THEN jsr start_unit ENDIF ;------------------------------------------------------------------------------- IF scsi_dtype = mcd_40\ OR scsi_dtype = apple_cd\ OR scsi_dtype = changer THEN ; ; Check for no-media ; bcc @cd_tape_ok ; ; Check for No Media Error ; lda |auto_sense_data+\ rqst_sens.sense_key beq @cd_tape_ok and #$00ff cmp #$0002 ;Is there Media? bne @cd_tape_ok ;Yes. ; ; No Media. Mark the DIB Hard Ofline also. ; ldy #dib.dvcflag lda [dib_ptr],y ora #dvc_hardofl sta [dib_ptr],y @cd_tape_ok ENDIF ;------------------------------------------------------------------------------- ; ; Check if unit Ready ; jsr test_unit_rdy ; ; Issue MODE SENSE Call ; jsr mode_sense bcs @rts ;Was there an error? ;------------------------------------------------------------------------------- IF scsi_dtype <> apple_cd\ AND scsi_dtype <> changer\ AND scsi_dtype <> scanner THEN ; ; Is the device writable? If CD-ROM ; then don't even bother with this ; code. ; lda |mode.w_protect\ +internal_buff and #bit_7 beq @over_1 ;No. ; ; Yes. Set the bit in the ; characteristics field. ; ldy #dib.dvcchar lda #write_allow ora [next_dib],y sta [next_dib],y ENDIF ;------------------------------------------------------------------------------- @over_1 ;Label must always be available. ;------------------------------------------------------------------------------- IF scsi_dtype <> mcd_40\ AND scsi_dtype <> scanner\ AND scsi_dtype <> appl_laser THEN ; ; Check to see if the device supports ; the page discriptors. ; lda |mode.blk_disc\ +internal_buff and #$00ff beq @clc ; ; Ensure that the device is in ; 512 mode if possible and send ; data from page 1 back to the ; device. ; lda |mode.page_number\ +internal_buff and #$ff3f ;Clear the invalid bits. sta |select_page_num lda |mode.page_number\ +internal_buff+2 ora #bit_6++\ ;Set AWRE and ARRE bits. bit_7 sta |select_page_num+2 lda |mode.page_number\ +internal_buff+4 sta |select_page_num+4 lda |mode.page_number\ +internal_buff+6 sta |select_page_num+6 jsr set_512_mode bcs @rts @clc ENDIF ;------------------------------------------------------------------------------- ; ; Exit ; clc @rts rts ; ; Data for the MODE SENSE Command ; @start_mode dc.b $1a dc.b $00 dc.b $01 dcb.b 9,$00 ENDP EJECT ;******************************************************* ; ; 'do_read_cap' ; ; This routine issues an READ CAPACITY call to the ; device and then uses the data returned to fill in ; some of the blank holes in the DIB. ; ; Inputs: scanner THEN ; ; Stuff the pointer to the dib ; that we are building into the ; Direct Page locations. The ; main driver will use this to ; build the SCSI READ CAPACITY ; Command that we will issue. ; lda > Low. Must be switched ; to Low >> High). This is the last ; readable block number. Add 1 to ; it for comparison reasons. ; @over_0 lda |block.count\ +internal_buff\ +2 xba adc #$0001 sta |t_dvc_blocks lda |block.count\ +internal_buff xba adc #null sta |t_dvc_blocks+2 ;------------------------------------------------------------------------------- IF block_dvc = true THEN beq @over_mo ; ; Some devices do not return a bitmap ; of the commands that they support. ; For these devices we use a default ; minimum command set. If the Block ; Count is > $ffff, then we need to ; update this to support the exrended ; read and write commands. ; ldy #dib.group1 lda [next_dib],y ora #$b000 ;Bit 15 = Extended Read ;Bit 13 = Extended Write ;Bit 12 = Extended Seek sta [next_dib],y @over_mo ENDIF ;------------------------------------------------------------------------------- ; ; Get the devices block size (This ; also needs to be switched from ; High >> Low to Low >> High) and ; place it in the dib. ; lda |block.size\ +internal_buff\ +2 xba ldy #dib.blksize sta [next_dib],y sta Bit 15, Bit 0 --> Carry bcs @bad_rqst_cnt ;No odd byte transfers asl a ;Carry <-- Bit 15, Bit 0 <-- 0 sta >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF scsi_dtype<>apple_cd\ AND scsi_dtype<>changer THEN @chk_for_6 cmp #$0006 beq @inserted ELSE ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @chk_for_6 cmp #$0006 bne @not_a_6 lda sense_data+\ ;Was it a RESET? rqst_sens.addnl_sens_code and #$00ff cmp #$00b0 ;Checking for $B0 (NO MEDIA) beq @fixit and #$00fe ;Checking for $28 (INSERTION) cmp #$0028 ;or $29 (RESET) beq @inserted ;Yes it was. @fixit jmp @chk_switch ; ; If the device is a CD_ROM device ; then check to see if the SENSE KEY ; = 5. If so, then treat it as no ; error. ; @not_a_6 cmp #$0005 bne @its_bs jmp @its_back @its_bs ENDIF ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> stz mcd_40 THEN jsr set_512_mode ENDIF ;scsi_dtype <> mcd_40 ;------------------------------------------------------------------------------- ; ; Issue the READ CAPACITY Command. ; jsr read_capacity bcs @no_capacity ;Was there an error? ; ; Get the Block Count (Stored ; High >> Low. Must be switched ; to Low >> High). This is the last ; readable block number. Add 1 to ; it for comparison reasons. ; lda |block.count\ +internal_buff\ +2 xba adc #$0001 ;Carry is Clear as a result sta |t_dvc_blocks ;of the 'READ CAPACITY' Call lda |block.count\ +internal_buff xba adc #null sta |t_dvc_blocks+2 @no_capacity jsr rebld_dibs ;Rebuild DIBs and Issue a DISK_SW php ;for each ; ; Restore the origonal Direct Page ; values. ; jsr set_our_dp plp bcc @set_switch jsr test_unit_rdy bcc @set_switch ; ; For some reason, we cannot talk to the ; device. It must be offline. ; @chk_switch ldy #dib.dvcflag lda [dib_ptr],y tax and #dvc_hardofl bne @opened txa and #dvc_online--\ $ffff ora #dvc_hardofl sta [dib_ptr],y lda #bit_4 ;Clear the Online bit trb @dvc_stat lda #bit_0 ;Set the Switch bit tsb @dvc_stat bra @opened ; ; Set Online Bit. If dvc_hard_sw is ; set, then clear it and return the ; disk switch bit. ; @its_back lda [dib_ptr],y pha and #dvc_hard_sw tax pla and #dvc_hard_sw--\ $ffff sta [dib_ptr],y txa bne @set_switch bra @opened ;Back in business @switch ; ; Is this device linked? If it is, ; then we need to mark them all as ; being offline. ; ; Start at the headptr if non-zero. ; ldy #dib.headptr lda [dib_ptr],y tax ldy #dib.headptr+2 lda [dib_ptr],y bne @set_pointer2 ;Should not be bank 0 ; ; Current pointer is the first. ; lda > LSB formatted. ; lda |mode.blocks\ ;High Byte +internal_buff\ -1 and #$ff00 ora |mode.blocks\ ;.OR.ed with the Low Word +internal_buff\ +1 beq @do_from_dib ; ; MODE SENSE is legal. Use it. ; ; Set Block Count in format ; option list. ; lda |mode.blocks\ +internal_buff\ +1 xba sta |opt1_blk_cnt sta |opt2_blk_cnt lda |mode.blocks\ +internal_buff\ -1 xba sta |opt1_blk_cnt+2 sta |opt2_blk_cnt+2 ; ; Set Block Size in format ; option list. ; lda |mode.blk_size\ +internal_buff\ +1 xba cmp #$0214 ;is it = 532? bne @not_532 ;No. lda #$0200 ;Yes. @not_532 sta |opt1_blk_siz sta |opt2_blk_siz bra @set_med_size ; ; Set Block Count in format ; option list from DIB. ; @do_from_dib ldy #dib.blkcnt lda [dib_ptr],y sta |opt1_blk_cnt sta |opt2_blk_cnt ldy #dib.blkcnt+2 lda [dib_ptr],y sta |opt1_blk_cnt+2 sta |opt2_blk_cnt+2 ; ; Set Block Size in format ; option list. ; ldy #dib.blksize lda [dib_ptr],y sta |opt1_blk_siz sta |opt2_blk_siz ; ; Set Media Size in format ; option list. ; @set_med_size lda |opt1_blk_cnt+3 and #$00ff sta @t_blocks lda |opt1_blk_cnt+1 lsr @t_blocks lsr a lsr @t_blocks lsr a lsr @t_blocks lsr a adc #$0000 sta |opt1_med_siz sta |opt2_med_siz ; ; Get Read Capacity ; jsr read_capacity ; ; Set Block Size in format ; option list. ; lda |block.size\ +internal_buff\ +2 xba sta |opt3_blk_siz cmp #$0200 bne @over ; ; Set display count to 2 ; lda #$0002 sta |display_cnt-2 sta |display_cnt ; ; Set Block Count in format ; option list. ; @over lda |block.count\ +internal_buff\ +2 xba sta |opt3_blk_cnt lda |block.count\ +internal_buff xba sta |opt3_blk_cnt+2 ; ; Set Media Size in format ; option list. ; lda |block.count\ +internal_buff\ -1 xba sta @t_blocks lda |block.count\ +internal_buff\ +1 xba lsr @t_blocks lsr a lsr @t_blocks lsr a lsr @t_blocks lsr a adc #$0000 sta |opt3_med_siz ; ; Restore Direct Page ; jsr set_our_dp ; ; Check Count range ; lda > High. xba ; I Send it out High >> Low. sta |c_block_num ; ; Set Main Driver Pointer to ; our data for the command. ; lda #cmd_$8008 sta apple_cd\ AND scsi_dtype <> changer\ AND scsi_dtype <> scanner THEN stz @cache ; ; Is the device Removable? ; ldy #dib.dvcchar lda [dib_ptr],y and #removable beq @write ;No. ; ; This device is removable. Now we ; need to check to see if the unit ; has gone offline, (then we need to ; report that to the OS) or if the ; unit has come back online (Rebuild ; the DIBs). ; jsr unit_state bcs @rts_out ; ; Is the device online? ; ldy #dib.dvcflag lda [dib_ptr],y and #dvc_hardofl bne @off_line ;Yes. lda [dib_ptr],y and #dvc_online bne @write ;Yes. ; ; Device is currently offline. ; @off_line lda #drvr_off_line sec @rts_out rts ; ; Let's check the request count. If ; this is $00000000, then exit clean ; with no data transfered. ; @write lda >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF scsi_dtype = direct_acc THEN ; ; Verify Block Size. ; @cnt_non_zero ldy #dib.blksize lda [dib_ptr],y ;Block Size cmp >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; ; Verify Block Size. ; @cnt_non_zero ldy #dib.blksize lda [dib_ptr],y ;Block Size cmp >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @blk_size_ok ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF cache_blks = true THEN ; ; Regardless of the Cache Priority, ; we need to see if it is in the cache. ; ; Set flag to cache the block only if ; it is already there. ; dec @cache lda >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @no_cache ; ; Build the (Write Data) Status ; Command $802A, and just in case ; it is not accepted, we will also ; build $800A. ; lda > High. xba ; I Send it out High >> Low. sta |c_block_num_l+2 sta |c_block_num_s lda >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF scsi_dtype = direct_acc THEN ; ; Issue the call. ; jsr check_532_rw bcc @deferred ;Everything went ok. cmp #drvr_bad_code ;Was it a Bad Command? beq @munge ;Yes. Do the Munging brl @crapped_out2 ;No. Then get out of here. @deferred jmp @completed ; ; At this point the extended call was not ; excepted. We must now issue the normal ; version of this command. First, we must ; check to see if the request is within the ; one byte block count range. If not, we ; will need to special process this request. ; ; Setup Divide routine while preserving the ; origonal count for later. ; @munge lda $80, ; then we need to break it into multiple ; calls. If not, then send it as is. ; lda |result+1 bne @gr8er_80 lda |result dec a cmp #$0080 blt @issue_call ; ; Set the max count for a single byte block ; count (Block size * $80). ; @gr8er_80 lda > LSB order. We need to add * ;* $80 to it. This is done by a simple * ;* increment. * ;***************************************** ; @over lda |c_block_num_s clc xba adc #$0080 xba sta |c_block_num_s brl @issue_call ; ; Restore the environment. ; @done lda @orig_rqst sta >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> jsr |main_drvr bcc @completed ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ IF scsi_dtype = mcd_40 THEN lda auto_sense_data+\ rqst_sens.addnl_sens_code and #$00ff ;Checking for $04, $A7, $A8, or $B0 cmp #$0004 ;This cover $04 beq @not_ready cmp #$0027 ;This cover $27 Write Protected beq @write_protect cmp #$00A7 ;This cover $A7 beq @not_ready cmp #$00A8 ;This cover $A8 beq @not_ready cmp #$00B0 ;This cover $B0 beq @not_ready lda #drvr_io sec rts ;There was an error! @write_protect ldy #dib.dvcchar lda [dib_ptr],y and #write_allow--\ $ffff sta [dib_ptr],y lda #drvr_wrt_prot sec rts @not_ready lda #drvr_off_line sec rts ENDIF ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lda #drvr_io rts ;There was an error! @deferred ENDIF ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; ; Update Transfer Count. ; @completed lda >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IF cache_blks = true THEN ; ; Check if cache bypassed. ; bit @cache bpl @out_of_here ;Yes. clc lda >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; ; Exit No Error. ; @out_of_here lda #$0000 clc @rts rts ; ; Variables and storage for short call. ; @cache dc.w null ;Cache flag @do_532 dc.w null ;532 byte block flag @orig_buff dc.l null ;Origonal Buffer Pointer @orig_rqst dc.l null ;Origonal Request Count @rem_rqst dc.l null ;Number of bytes remaining @trans_cnt dc.l null ;number of bytes transfered by device ;this time ; ; Command Data for this call. ; cmd_$800A dc.b $0A dc.b $00 c_block_num_s dc.w $0000 c_block_cnt_s dc.b $00 dcb.b 7,$00 ; ; Command Data for this call. ; cmd_$802A dc.b $2A dc.b $00 c_block_num_l dc.l $00000000 c_block_cnt_l dcb.b 3,$00 dcb.b 7,$00 ENDIF ;------------------------------------------------------------------------------- ENDP EJECT END \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSI Get Config b/scsi2/SCSI.Drivers/SCSI Get Config new file mode 100644 index 0000000..e8372ea --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSI Get Config @@ -0,0 +1 @@ + ;******************************************************* ; ; SCSI Driver Get Configuration Parms code. ; ; Written by Matt Gulick. Started June 22,1990 ; ; Copyright Apple Computer, Inc. 1990 ; ;******************************************************* ;******************************************************* ; ; This file contains the Get Configuration Parms as ; defined in the ERS. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; June 22, 1988 File started. IMPORT chk_count IMPORT bitmap IMPORT length IMPORT rqst IMPORT gc_buff_ptr IMPORT count IMPORT temp IMPORT error IMPORT ddm_index IMPORT pre_load_ddm IMPORT pdata_block IMPORT find_drvr_part EJECT ;******************************************************* ; ; 'g_config_parms' ; ; This routine is used to get information about the ; volume or disk in question. If this call is issued ; to get disk info, then the DIB Pointer must point to ; the head DIB if this is a linked device. Volume ; calls should have the DIB Pointer set to the volume ; for which the information is being requested. ; ; The structure of the parameter list is defined in the ; SCSI Driver ERS. The parameters are going to depend ; greatly on the type of device that this driver is ; written for. That means that the info for the Scanner ; will not be the same in any form as that for a Hard ; Disk, or a Tape drive. These calls will be particular ; for the device type supported. ; ; Called via 'JSR' ; ; Inputs: [dib_ptr] = Target DIB (LONG) ; [buff_ptr] = Data Buffer Pointer (LONG) ; Acc = Unspecified ; Carry = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Returns via 'RTS' ; ; Outputs: Acc = 0 ; Carry = 0 ; or ; Acc = Error ; Carry = 1 ; ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: See Spec. ; ;******************************************************* gcp ; ; Check the Request Count. Volume calls ; need at least 4 bytes. Disk calls need ; more and that will be verified there. ; lda smgr_pl_ptr,x lda smgr_pl_ptr+2,x ; ; Call the SCSI Manager via the ; S_DISPATCHER ; lda |scsi_mgrnum ;Get the Managers ID ldx |manager_cmd ;Get Manager Command Number jmp rout2_s_disp EJECT ; ; Bitmaps used to check ; for command errors. ; ; Offset into DIB to where ; the WORD is that holds the ; bit for this group. ; bm_cmd_offset dc.w dib.group0 ;group0 Low WORD dc.w dib.group0+2 ; High WORD dc.w dib.group1 ;group1 Low WORD dc.w dib.group1+2 ; High WORD dc.w dib.group2 ;group2 Low WORD dc.w dib.group2+2 ; High WORD dc.w dib.group3 ;group3 Low WORD dc.w dib.group3+2 ; High WORD dc.w dib.group4 ;group4 Low WORD dc.w dib.group4+2 ; High WORD dc.w dib.group5 ;group5 Low WORD dc.w dib.group5+2 ; High WORD dc.w dib.group6 ;group6 Low WORD dc.w dib.group6+2 ; High WORD dc.w dib.group7 ;group7 Low WORD dc.w dib.group7+2 ; High WORD ; ; Mask for commands $00 - $0F ; in the low word and commands ; $10 - $1F in the high word. ; bm_cmd_mask dc.w bit_7 ;CMD $x0 Bit 7 Low Byte dc.w bit_6 ;CMD $x1 Bit 6 Low Byte dc.w bit_5 ;CMD $x2 Bit 5 Low Byte dc.w bit_4 ;CMD $x3 Bit 4 Low Byte dc.w bit_3 ;CMD $x4 Bit 3 Low Byte dc.w bit_2 ;CMD $x5 Bit 2 Low Byte dc.w bit_1 ;CMD $x6 Bit 1 Low Byte dc.w bit_0 ;CMD $x7 Bit 0 Low Byte dc.w bit_15 ;CMD $x8 Bit 7 High Byte dc.w bit_14 ;CMD $x9 Bit 6 High Byte dc.w bit_13 ;CMD $xA Bit 5 High Byte dc.w bit_12 ;CMD $xB Bit 4 High Byte dc.w bit_11 ;CMD $xC Bit 3 High Byte dc.w bit_10 ;CMD $xD Bit 2 High Byte dc.w bit_9 ;CMD $xE Bit 1 High Byte dc.w bit_8 ;CMD $xF Bit 0 High Byte ENDP EJECT END \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSI Set Config b/scsi2/SCSI.Drivers/SCSI Set Config new file mode 100644 index 0000000..6e7b5ab --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSI Set Config @@ -0,0 +1 @@ + ;******************************************************* ; ; SCSI Driver Set Configuration Parms code. ; ; Written by Matt Gulick. Started June 22,1990 ; ; Copyright Apple Computer, Inc. 1990 ; ;******************************************************* ;******************************************************* ; ; This file contains the Set Configuration Parms as ; defined in the ERS. ; ;******************************************************* ;******************************************************* ; ; Revision History: ; ;******************************************************* ; June 22, 1988 File started. EJECT IMPORT ddm_data ;******************************************************* ; ; 's_config_parms' ; ; This routine is used to set information about the ; volume or disk in question. If this call is issued ; to set disk info, then the DIB Pointer must point to ; the head DIB if this is a linked device. Volume ; calls should have the DIB Pointer set to the volume ; for which the information is being requested. ; ; The structure of the parameter list is defined in the ; SCSI Driver ERS. The parameters are going to depend ; greatly on the type of device that this driver is ; written for. That means that the info for the Scanner ; will not be the same in any form as that for a Hard ; Disk, or a Tape drive. These calls will be particular ; for the device type supported. ; ; Called via 'JSR' ; ; Inputs: [dib_ptr] = Target DIB (LONG) ; [buff_ptr] = Data Buffer Pointer (LONG) ; Acc = Unspecified ; Carry = Unspecified ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Returns via 'RTS' ; ; Outputs: Acc = 0 ; Carry = 0 ; or ; Acc = Error ; Carry = 1 ; ; Y register = Unspecified ; X register = Unspecified ; P register = 0=M=X=e ; Direct Page = Ours ; Data Bank = Ours ; ; Errors: See Spec. ; ;******************************************************* scp ; ; Check the Request Count. Volume calls ; need at least 4 bytes. Disk calls need ; more and that will be verified there. ; lda High structure. ; Kind of confusing! ; immed_loc equ bit_8 ;**** Changable **** ; ; System Service Calls we need. ; ;******************************************************* ; ; ENTRY: move_info via 'jsl' ; ; LONGWORD - Source buffer pointer ; LONGWORD - Destination buffer pointer ; LONGWORD - Transfer length ; WORD - Source buffer pointer ; SP --> ; ; A Reg = Undefined ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x x 0 ; ; EXIT: move_info via 'rtl' ; ; A Reg = Error Code ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x 0 0 No Error ; x x 0 0 0 x x 1 0 Error ; ;******************************************************* move_info equ $01fc70 moveblkcmd equ $0800 ;Block Move Option move_sinc_dinc equ $0805 ;Source Inc, Dest Inc move_sinc_ddec equ $0809 ;Source Inc, Dest Dec move_sdec_dinc equ $0806 ;Source Dec, Dest Inc move_sdec_ddec equ $080a ;Source Dec, Dest Dec move_scon_dcon equ $0800 ;Source con, Dest con move_sinc_dcon equ $0801 ;Source Inc, Dest con move_sdec_dcon equ $0802 ;Source Dec, Dest con move_scon_dinc equ $0804 ;Source con, Dest Inc move_scon_ddec equ $0808 ;Source con, Dest Dec ;******************************************************* ; ; ENTRY: set_disksw via 'jsl' ; ; A Reg = Undefined ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x x 0 ; ; EXIT: set_disksw via 'rtl' ; ; A Reg = Undefined ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x 0 0 No Error ; ;******************************************************* set_disksw equ $01fc90 s_dispatch equ $01fca4 install_driver equ $01fca8 ; ; Direct Page Addresses. ; dev_num equ $0000 ;Device Number call_num equ $0002 ;Call Number buff_ptr equ $0004 ;Buffer Pointer rqst_cnt equ $0008 ;Request Count trans_cnt equ $000C ;Transfer Count block_num equ $0010 ;Block Number (Read/Write only) blk_size equ $0014 ;Block Size fst_num equ $0016 ;FST Number (Read/Write only) stat_code equ $0016 ;Status Command Code cont_code equ $0016 ;Control Command Code volume_id equ $0018 ;Volume ID (Read/Write only) cache_prio equ $001A ;Cache Priority Value (Read/Write only) cache_ptr equ $001C ;Cache Pointer (Read/Write only) dib_ptr equ $0020 ;DIB Pointer scsi_mdrvr equ $005A ;Main Driver Command Data Ptr goes here. dvc_list equ scsi_mdrvr+4;Get Devices List (Startup Command Only) scsi_zp0 equ dvc_list+4 ;User Defined Direct page scratch pad scsi_zp1 equ scsi_zp0+2 ;User Defined Direct page scratch pad scsi_zp2 equ scsi_zp1+2 ;User Defined Direct page scratch pad scsi_zp3 equ scsi_zp2+2 ;User Defined Direct page scratch pad scsi_zp4 equ scsi_zp3+2 ;User Defined Direct page scratch pad scsi_zp5 equ scsi_zp4+2 ;User Defined Direct page scratch pad scsi_zp6 equ scsi_zp5+2 ;User Defined Direct page scratch pad scsi_zp7 equ scsi_zp6+2 ;User Defined Direct page scratch pad first_dib equ scsi_zp7+2 ;Start of DIB RAM (Startup Command Only) next_dib equ first_dib+4 ;Next DIB to be used (Startup Command Only) last_dib equ next_dib+4 ;Pointer to Default DIB Structure sib_pointer equ $0074 smgr_pl_ptr equ $0078 ; ; Memory attribute equates ; attrlock equ bit_15 ;Block is locked down. attrfixed equ bit_14 ;Block can't move in mem attrpurg1 equ bit_8 ;Purge level 1 attrpurg2 equ bit_9 ;Purge level 2 attrpurg3 equ bit_8+bit_9 ;Purge level 3 attrnocross equ bit_4 ;May not cross banks attrnospec equ bit_3 ;don't use special mem attrpage equ bit_2 ;Page alligned attraddr equ bit_1 ;Remain at fixed address attrbank equ bit_0 ;Remain in fixed bank ; ; SCSI Command Translation Table Flags ; scsit_tx equ bit_15 ;SCSI Send Data Command scsit_rx equ bit_14 ;SCSI Receive Data Command scsit_stat equ bit_13 ;SCSI Status Command scsit_cont equ bit_12 ;SCSI Control Command scsit_data equ bit_11 ;SCSI Data I/O Command scsit_dvc equ bit_10 ;SCSI Device I/O Command scsit_blk equ bit_9 ;Command has a Block Number scsic_1st equ bit_8 ;Must be first device if linked scsic_int equ bit_7 ;Internal Driver Command only scsic_dsw equ bit_6 ;Issue DISK_SW with this call scsic_off equ bit_5 ;Device is going offline. scsic_tout equ bit_4 ;Adjust time out by block count scsid_asis equ bit_3 ;CMD Data is in SCSI format scsid_blk equ bit_1 ;Convert Trans Count to Blocks scsid_byte equ bit_0 ;Leave Trans Count in Bytes scsid_none equ null ;Transfer count does not go in CMD scsi_endcmd equ null ;End of SCSI Translation Table ; ; Device Characteristics. ; ram_rom_disk equ bit_15 ;RAM or ROM Disk if Set gened_drvr equ bit_14 ;Generated Driver if Set linked_dvc equ bit_13 ;Linked Device if Set call_active equ bit_12 ;Device Busy if Set mhz_1 equ null ;1 Mhz Device mhz_2_6 equ bit_8 ;2.6 Mhz Device mhz_gt_2_6 equ bit_9 ;>2.6 Mhz Device speed_ind equ bit_8+bit_9 ;Device is speed independent blk_device equ bit_7 ;Block Device if Set write_allow equ bit_6 ;Write is Allowed if Set read_allow equ bit_5 ;Read is Allowed if Set format_allow equ bit_3 ;Format is Allowed if Set removable equ bit_2 ;Removable Media if Set ; ; Device Flags for 'dvcflag'. All ; are considered true if set. ; int_busy equ bit_15 ;Internal busy flag for async wait_mode equ bit_14 ;Driver Wait/No Wait state dvc_online equ bit_13 ;Device Online Flag dvc_switch equ bit_12 ;Device Switched Flag dvc_hardofl equ bit_11 ;Device Hard Offline Flag ; Bits 0 - 10 are reserved at this time. ; ; Error Codes. ; no_error equ $0000 bad_dev_number equ $0011 drvr_bad_req equ $0020 drvr_bad_code equ $0021 drvr_bad_parm equ $0022 drvr_not_open equ $0023 drvr_prior_open equ $0024 drvr_io equ $0027 drvr_no_dev equ $0028 drvr_busy equ $0029 drvr_bad_cnt equ $002c drvr_off_line equ $002f ;******************************************************* ; ; The following statements are used to define the DIB ; structure. The structure contains the traditional ; DIB followed by an extension used for device ; maintainence. All together each DIB with the ; associated extensions will take one page of RAM. ; ;******************************************************* ; ; $00 ------------------------------------------------ ; | | ; | Device Information Block Data (DIB) | ; $3F | | ; ------------------------------------------------ ; $40 | Physical Block Number | ; | | ; $43 | that maps to logical block zero | ; ------------------------------------------------ ; $44 | | ; | Head Pointer | ; $47 | | ; ------------------------------------------------ ; $48 | | ; | Forward Pointer | ; $4B | | ; ------------------------------------------------ ; $4C | Memory DIB Count | ; ------------------------------------------------ ; $4E | Reserved | ; ------------------------------------------------ ; $50 | | ; | Memory Manager Handle for this DIB | ; $53 | | ; ------------------------------------------------ ; $54 | | ; | Block Size (Bytes) | ; $57 | | ; ------------------------------------------------ ; $58 | Max SCSI Command for this Device | ; ------------------------------------------------ ; $5A | | ; | Command Bitmap (See ERS for description) | ; $79 | | ; ------------------------------------------------ ; $7A | SCSI Command Data | ; | and | ; $D9 | SCSI Manager Call Buffer Structures | ; ------------------------------------------------ ; $DA | 'Busy' and other Flags | ; ------------------------------------------------ ; $DC | | ; | Completion Vector with Code | ; $FF | | ; ------------------------------------------------ ; ;******************************************************* dib RECORD $0000 ; ; Definition of DIB Structure. ; linkptr ds.l 1 ; DIB Link Pointer (LONG) entry ds.l 1 ; Pointer to Drvrs Main Entry (LONG) dvcchar ds.w 1 ; Device Characteristics (WORD) blkcnt ds.l 1 ; Block Count for this device (LONG) namelen ds.b 1 ; Length of Descriptive Name (PSTR) disname ds.b 31 ; Field for this devices Name (STR) slotnum ds.w 1 ; Device Slot Number from MGR. (WORD) unitnum ds.w 1 ; Device Unit Number from MGR. (WORD) versnum ds.w 1 ; Version Number for our Driver (WORD) dvcid ds.w 1 ; ID of Device we talk to (WORD) headlnk ds.w 1 ; Head Device Link (WORD) fdvclnk ds.w 1 ; Forward Device Link (WORD) ext_ptr ds.l 1 ; Pointer to DIB Extension (LONG) devnum ds.w 1 ; DIB Device Number (WORD) ; ; The Starting Block Number for this device ; is maintained here. This is used to ; modify the requested block number from ; a logical to a physical number. ; start_blk ds.l 1 ; Starting Physical Block Num. (LONG) ; ; These two pointers are the compliment ; to the links in the standard DIB and ; will point to the actual DIB referenced ; in the Head and Forward Device Links. ; headptr ds.l 1 ; Head Dvc Pointer (LONG) fdvcptr ds.l 1 ; Forward Dvc Pointer (LONG) mem_dib_cnt ds.w 1 ; Number of active dibs in mem (WORD) part_blk ds.w 1 ; Reserved (WORD) ; ; Memory Manager Handle ; handle ds.l 1 ; (LONG) ; ; Block Size ; blksize ds.l 1 ; (LONG) ; ; Maximum SCSI Command supported by ; the device for this DIB. ; maxcmd ds.w 1 ; (WORD) ; ; SCSI Command Group Bitmaps ; group0 ds.l 1 ; Group 0 (LONG) group1 ds.l 1 ; Group 1 (LONG) group2 ds.l 1 ; Group 2 (LONG) group3 ds.l 1 ; Group 3 (LONG) group4 ds.l 1 ; Group 4 (LONG) group5 ds.l 1 ; Group 5 (LONG) group6 ds.l 1 ; Group 6 (LONG) group7 ds.l 1 ; Group 7 (LONG) ; ; SCSI Manager Call PList ; scsiid ds.w 1 ; Same as our Unit Number (WORD) scsic_flgs ds.w 1 ; Flags from Command Table (WORD) time_out ds.w 1 ; Time Out Factor * xxx ms (WORD) compvec ds.l 1 ; Completion Routine Pointer (LONG) cp_ptr ds.l 1 ; Pointer to Command Packet (LONG) trx_ptr ds.l 1 ; Ptr to Send/R'cv Structure (LONG) trx_len trx_rqst ds.l 1 ; Users Send/R'cv Length (LONG) rslt_ptr ds.l 1 ; Pointer to Status Structure (LONG) msg_ptr ds.l 1 ; Pointer to Message Structure (LONG) reserv0 ds.w 1 ; Reserved space 0 (WORD) reserv1 ds.w 1 ; Reserved space 1 (WORD) ; ; SCSI Command Packet ; scsicmd ds.b 12 ; Room for any SCSI Command (BYTES) ; ; SCSI Manager Device Send/R'cv Buffers List ; trx_buff ds.l 1 ; Users Send Buffer (LONG) trx_length ds.l 1 ; Request cnt for this buffer (LONG) trx_offset ds.l 1 ; Offset for next pass (LONG) trx_null ds.l 1 ; Null (LONG) trx_stop ds.l 1 ; Null (LONG) ds.l 1 ; Null (LONG) ds.l 1 ; Null (LONG) ds.l 1 ; Null (LONG) trx_rsrv ds.l 4 ; Reserved Space * 4 for future (LONG) ; ; Device Busy and other Flags and results ; dvcflag ds.w 1 ; Device Busy and other Flags (WORD) ; ; Completion Routine for this DIB. ; This takes the remaining space in ; the allocated RAM. Any routine can ; be placed here but must never go ; beyond offset $FF ; end equ * complet ds.b $100-end ENDR pm RECORD $0000 ; ; All Values given below are ; in Macintosh High >> Low ; format. ; Sig ds.w 1 ;Signature Always $504d ; Apple II = $4d50 SigPad ds.w 1 ;Reserved for future use MapBlkCnt ds.l 1 ;Number of blocks in Map PyPartStart ds.l 1 ;First Physical Block of Partition PartBlkCnt ds.l 1 ;Number of Blocks in Partition PartName ds.b 32 ;Partition Name PartType ds.b 32 ;Partition Type LgDataStart ds.l 1 ;1st Logical Data Block DataCnt ds.l 1 ;Number of data blocks PartStatus ds.l 1 ;Partition Status Info LgBootStart ds.l 1 ;1st Logical Boot Block BootSize ds.l 1 ;Size of Boot Code in Bytes BootLoad ds.l 1 ;Boot Code Load Address BootLoad2 ds.l 1 ;Additional Boot Load Info BootEntry ds.l 1 ;Boot Code Entry Point BootEntry2 ds.l 1 ;Additional Boot Entry Info BootCksum ds.l 1 ;Boot Code Checksum Processor ds.b 16 ;Processor Type Args ds.b 128 ;Boot Specific Arguments end equ * ds.b $200-end ;Pad to 1 Block ENDR block RECORD $0000 count ds.l 1 ;Block Count High >> Low size ds.l 1 ;Block Size High >> Low ENDR mode RECORD $0000 sense_len ds.b 1 ;Sense Data Length med_type ds.b 1 ;Medium Type w_protect ds.b 1 ;Write Protect bit 7 ds.b 2 ;Unused data blocks ds.b 3 ;Block Count High >> Low ds.b 1 ;Unused data blk_size ds.b 3 ;Block Size High >> Low ENDR inq RECORD $0000 pd_type ds.b 1 ;Peripheral Device Type removable ds.b 1 ;Removable bit 7 ds.b $26-2 ;Unused data group ds.b 1 ;First Group Number ENDR ds RECORD $0000 version ds.w 1 ;Version Number of this structure ds.b 12 ;Command Bytes DCcode ds.l 1 ;1st DC Code DCcount ds.l 1 ;1st Count DCoffset ds.l 1 ;1st Offset DCreserved ds.l 1 ;1st Reserved ENDR EJECT \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSIChanger.Driver.make b/scsi2/SCSI.Drivers/SCSIChanger.Driver.make new file mode 100644 index 0000000..613e32c --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSIChanger.Driver.make @@ -0,0 +1 @@ +# File: SCSIChanger.Driver.make # Target: SCSIChgr.Driver # Sources: 'SCSI Driver main' # 'SCSI Command Table' # 'SCSI Filter startup' # 'SCSI Filter open' # 'SCSI Filter read' # 'SCSI Filter write' # 'SCSI Filter close' # 'SCSI Filter status' # 'SCSI Filter control' # 'SCSI Filter flush' # 'SCSI Filter shutdown' # 'SCSI Main Driver' # 'SCSI Driver Mgmt' # Created: Thursday, June 9, 1988 9:30:49 AM # Modified: Monday, November 21, 1988 7:05:00 AM SCSIChanger.Driver ÄÄ SCSIChanger.Driver.make ¶ :Chgr.Obj:'SCSIChgr Driver main.obj' ¶ :Chgr.Obj:'SCSIChgr Command Table.obj' ¶ :Chgr.Obj:'SCSIChgr Filter startup.obj' ¶ :Chgr.Obj:'SCSIChgr Filter open.obj' ¶ :Chgr.Obj:'SCSIChgr Filter read.obj' ¶ :Chgr.Obj:'SCSIChgr Filter write.obj' ¶ :Chgr.Obj:'SCSIChgr Filter close.obj' ¶ :Chgr.Obj:'SCSIChgr Filter status.obj' ¶ :Chgr.Obj:'SCSIChgr Filter control.obj' ¶ :Chgr.Obj:'SCSIChgr Filter flush.obj' ¶ :Chgr.Obj:'SCSIChgr Filter shutdown.obj' ¶ :Chgr.Obj:'SCSIChgr Main Driver.obj' ¶ :Chgr.Obj:'SCSIChgr Driver Mgmt.obj' LinkIIGS -t $bb -at $013f ¶ # LinkIIGS -t $bb -at $0105 ¶ :Chgr.Obj:'SCSIChgr Driver main.obj' ¶ :Chgr.Obj:'SCSIChgr Command Table.obj' ¶ :Chgr.Obj:'SCSIChgr Filter startup.obj' ¶ :Chgr.Obj:'SCSIChgr Filter open.obj' ¶ :Chgr.Obj:'SCSIChgr Filter read.obj' ¶ :Chgr.Obj:'SCSIChgr Filter write.obj' ¶ :Chgr.Obj:'SCSIChgr Filter close.obj' ¶ :Chgr.Obj:'SCSIChgr Filter status.obj' ¶ :Chgr.Obj:'SCSIChgr Filter control.obj' ¶ :Chgr.Obj:'SCSIChgr Filter flush.obj' ¶ :Chgr.Obj:'SCSIChgr Filter shutdown.obj' ¶ :Chgr.Obj:'SCSIChgr Main Driver.obj' ¶ :Chgr.Obj:'SCSIChgr Driver Mgmt.obj' ¶ -o 'SCSIChgr.Driver' # -o :Chgr.Obj:'SCSIChgr.Driver.lnk' # ExpressIIGS ¶ # ':Chgr.Obj:SCSIChgr.Driver.lnk' ¶ # -o 'SCSIChgr.Driver' duplicateiigs -y -m SCSIChgr.Driver SCSIChgr.Driver :Chgr.Obj:'SCSIChgr Driver main.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Driver main' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Driver main' ¶ -o :Chgr.Obj:'SCSIChgr Driver main.obj' :Chgr.Obj:'SCSIChgr Command Table.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Command Table' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Command Table' ¶ -o :Chgr.Obj:'SCSIChgr Command Table.obj' :Chgr.Obj:'SCSIChgr Filter startup.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter startup' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter startup' ¶ -o :Chgr.Obj:'SCSIChgr Filter startup.obj' :Chgr.Obj:'SCSIChgr Filter open.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter open' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter open' ¶ -o :Chgr.Obj:'SCSIChgr Filter open.obj' :Chgr.Obj:'SCSIChgr Filter read.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter read' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter read' ¶ -o :Chgr.Obj:'SCSIChgr Filter read.obj' :Chgr.Obj:'SCSIChgr Filter write.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter write' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter write' ¶ -o :Chgr.Obj:'SCSIChgr Filter write.obj' :Chgr.Obj:'SCSIChgr Filter close.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter close' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter close' ¶ -o :Chgr.Obj:'SCSIChgr Filter close.obj' :Chgr.Obj:'SCSIChgr Filter status.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter status' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter status' ¶ -o :Chgr.Obj:'SCSIChgr Filter status.obj' :Chgr.Obj:'SCSIChgr Filter control.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter control' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter control' ¶ -o :Chgr.Obj:'SCSIChgr Filter control.obj' :Chgr.Obj:'SCSIChgr Filter flush.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter flush' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter flush' ¶ -o :Chgr.Obj:'SCSIChgr Filter flush.obj' :Chgr.Obj:'SCSIChgr Filter shutdown.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Filter shutdown' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Filter shutdown' ¶ -o :Chgr.Obj:'SCSIChgr Filter shutdown.obj' :Chgr.Obj:'SCSIChgr Main Driver.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Main Driver' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Main Driver' ¶ -o :Chgr.Obj:'SCSIChgr Main Driver.obj' :Chgr.Obj:'SCSIChgr Driver Mgmt.obj' Ä ¶ 'SCSIChgr.Driver.make' ¶ 'SCSI Driver Mgmt' ¶ 'SCSIHD.Equates' AsmIIGS -d &type,type=5 'SCSI Driver Mgmt' ¶ -o :Chgr.Obj:'SCSIChgr Driver Mgmt.obj' \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSIHD.Driver.make b/scsi2/SCSI.Drivers/SCSIHD.Driver.make new file mode 100644 index 0000000..3b4456c --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSIHD.Driver.make @@ -0,0 +1 @@ +# File: SCSI.Driver.make # Target: SCSIHD.Driver # Sources: 'SCSI Driver main' # 'SCSI Command Table' # 'SCSI Filter startup' # 'SCSI Filter open' # 'SCSI Filter read' # 'SCSI Filter write' # 'SCSI Filter close' # 'SCSI Filter status' # 'SCSI Filter control' # 'SCSI Filter flush' # 'SCSI Filter shutdown' # 'SCSI Main Driver' # 'SCSI Driver Mgmt' # Created: Thursday, June 9, 1988 9:30:49 AM # Modified: Monday, November 21, 1988 7:05:00 AM SCSIHD.Driver ÄÄ SCSIHD.Driver.make ¶ :HD.Obj:'SCSIHD Driver main.obj' ¶ :HD.Obj:'SCSIHD Command Table.obj' ¶ :HD.Obj:'SCSIHD Filter startup.obj' ¶ :HD.Obj:'SCSIHD Filter open.obj' ¶ :HD.Obj:'SCSIHD Filter read.obj' ¶ :HD.Obj:'SCSIHD Filter write.obj' ¶ :HD.Obj:'SCSIHD Filter close.obj' ¶ :HD.Obj:'SCSIHD Filter status.obj' ¶ :HD.Obj:'SCSIHD Filter control.obj' ¶ :HD.Obj:'SCSIHD Filter flush.obj' ¶ :HD.Obj:'SCSIHD Filter shutdown.obj' ¶ :HD.Obj:'SCSIHD Main Driver.obj' ¶ :HD.Obj:'SCSIHD Driver Mgmt.obj' LinkIIGS -t $bb -at $013f ¶ :HD.Obj:'SCSIHD Driver main.obj' ¶ :HD.Obj:'SCSIHD Command Table.obj' ¶ :HD.Obj:'SCSIHD Filter startup.obj' ¶ :HD.Obj:'SCSIHD Filter open.obj' ¶ :HD.Obj:'SCSIHD Filter read.obj' ¶ :HD.Obj:'SCSIHD Filter write.obj' ¶ :HD.Obj:'SCSIHD Filter close.obj' ¶ :HD.Obj:'SCSIHD Filter status.obj' ¶ :HD.Obj:'SCSIHD Filter control.obj' ¶ :HD.Obj:'SCSIHD Filter flush.obj' ¶ :HD.Obj:'SCSIHD Filter shutdown.obj' ¶ :HD.Obj:'SCSIHD Main Driver.obj' ¶ :HD.Obj:'SCSIHD Driver Mgmt.obj' ¶ -o 'SCSIHD.Driver' duplicateiigs -y -m SCSIHD.Driver SCSIHD.Driver :HD.Obj:'SCSIHD Driver main.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Driver main' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Driver main' ¶ -o :HD.Obj:'SCSIHD Driver main.obj' :HD.Obj:'SCSIHD Command Table.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Command Table' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Command Table' ¶ -o :HD.Obj:'SCSIHD Command Table.obj' :HD.Obj:'SCSIHD Filter startup.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter startup' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter startup' ¶ -o :HD.Obj:'SCSIHD Filter startup.obj' :HD.Obj:'SCSIHD Filter open.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter open' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter open' ¶ -o :HD.Obj:'SCSIHD Filter open.obj' :HD.Obj:'SCSIHD Filter read.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter read' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter read' ¶ -o :HD.Obj:'SCSIHD Filter read.obj' :HD.Obj:'SCSIHD Filter write.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter write' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter write' ¶ -o :HD.Obj:'SCSIHD Filter write.obj' :HD.Obj:'SCSIHD Filter close.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter close' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter close' ¶ -o :HD.Obj:'SCSIHD Filter close.obj' :HD.Obj:'SCSIHD Filter status.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter status' ¶ 'SCSI Get Vol/Disk' ¶ # 'SCSI Get Config' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter status' ¶ -o :HD.Obj:'SCSIHD Filter status.obj' :HD.Obj:'SCSIHD Filter control.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter control' ¶ 'SCSI Set Vol/Disk' ¶ # 'SCSI Set Config' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter control' ¶ -o :HD.Obj:'SCSIHD Filter control.obj' :HD.Obj:'SCSIHD Filter flush.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter flush' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter flush' ¶ -o :HD.Obj:'SCSIHD Filter flush.obj' :HD.Obj:'SCSIHD Filter shutdown.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Filter shutdown' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Filter shutdown' ¶ -o :HD.Obj:'SCSIHD Filter shutdown.obj' :HD.Obj:'SCSIHD Main Driver.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Main Driver' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Main Driver' ¶ -o :HD.Obj:'SCSIHD Main Driver.obj' :HD.Obj:'SCSIHD Driver Mgmt.obj' Ä ¶ 'SCSIHD.Driver.make' ¶ 'SCSI Driver Mgmt' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=0 'SCSI Driver Mgmt' ¶ -o :HD.Obj:'SCSIHD Driver Mgmt.obj' \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSIHD.Equates b/scsi2/SCSI.Drivers/SCSIHD.Equates new file mode 100644 index 0000000..3cfbe44 --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSIHD.Equates @@ -0,0 +1 @@ + ;********************************************************************************* ; ; SCSI Driver 'Equates' file.. ; ; Written by Matt Gulick. Started August 13,1988 ; ; Copyright Apple Computer, Inc. 1988-93 ; All Rights Reserved ; ;********************************************************************************* ; ; *** 6.0.1 *** ; ; 15-Dec-92 DAL for 6.0.1d12 ; Changed apple_cd version number to $601a. ; ; 17-Feb-93 JCM for 6.0.1d14 ; Changed direct_acc, mcd_40, scanner and appl_laser (for good measure anyway) ; version numbers to $601a. ; ; 6-Mar-93 JCM for 6.0.1d14 ; Added equate for new characteristics bit ($0010) called "driver_is_clean". ; This indicates that we cleanly ignore/return errors when we get a command ; request from GS/OS or the Device Manager that we don't know about. This was ; specified in the guidelines since day one, but can people read and follow them? ; Of course not, that would make my job too easy. ; ; 2-Apr-93 SS for 6.0.1d16 ; ; Changed direct_acc, apple_cd, mcd_40, scanner and appl_laser ; version numbers to $6010 (final) ; ;********************************************************************************* ;********************************************************************************* ; ; This file contains all the global equates for the ; SCSI Driver. Only those items below that are marked ; as "**** Changable ****" can be altered safly ; without detailed intimate knowledge of how the ; generic driver functions. Any other values should ; only be modified by someone who understands how this ; generic driver functions. ; ;********************************************************************************* ; ; Bit Location equates ; null equ %0000000000000000 bit_0 equ %0000000000000001 bit_1 equ %0000000000000010 bit_2 equ %0000000000000100 bit_3 equ %0000000000001000 bit_4 equ %0000000000010000 bit_5 equ %0000000000100000 bit_6 equ %0000000001000000 bit_7 equ %0000000010000000 bit_8 equ %0000000100000000 bit_9 equ %0000001000000000 bit_10 equ %0000010000000000 bit_11 equ %0000100000000000 bit_12 equ %0001000000000000 bit_13 equ %0010000000000000 bit_14 equ %0100000000000000 bit_15 equ %1000000000000000 ; ; Partition Map Signature ; Part_sig equ $4d50 ;High-->Low ; ; Driver Descriptor Map Signature ; DDM_sig equ $5245 ;High-->Low ; ; Booleans ; true equ bit_0 false equ null ; ; Time definitions. ; qtr_sec equ $0001 one_sec equ 4*qtr_sec one_min equ 60*one_sec ; ; SCSI Driver dependent data ; cmd_start equ $0000 ;Driver Startup Call cmd_open equ $0001 ;Driver Open Call cmd_read equ $0002 ;Driver Read Call cmd_write equ $0003 ;Driver Write Call cmd_close equ $0004 ;Driver Close Call cmd_status equ $0005 ;Driver Status Call cmd_control equ $0006 ;Driver Control Call cmd_flush equ $0007 ;Driver Flush Call cmd_shutdown equ $0008 ;Driver Shutdown Call max_d_cmd equ $0008 ;Max Driver Command **** Changable **** max_s_cmd equ $0005 ;Max Status Code **** Changable **** max_c_cmd equ $0009 ;Max Control Code **** Changable **** max_config_cmd equ $0001 ;Max Config Code **** Changable **** ; ; Suppervisory Dispatcher IDs and ; SCSI Manager Command Numbers ; super_d_id equ $0000 ;Supervisory Dispatcher's ID get_sdrvr_id equ $0000 ;Get S Driver's ID Number set_sib_ptr equ $0001 ;Set SIB Pointer cmd_get_dvc equ $0002 ;SCSI Manager Get Devices Call cmd_claim_dvc equ $0003 ;SCSI Manager Claim Devices Call scsi_io_call equ $0004 ;SCSI Manager I/O Call ; ; SCSI Device Types from INQUIRY Call ; direct_acc equ $0000 ; Direct-Access Device seq_acc equ $0001 ; Sequential-Access Device print_dvc equ $0002 ; Printer Device proc_dvc equ $0003 ; Processor Device worm_dvc equ $0004 ; Write-once Read-multiple Device read_dacc equ $0005 ; Read-only Direct-Access Device scanner equ $0006 ; Scanner Device optic_mem equ $0007 ; Optical Memory Devices changer equ $0008 ; Changer Devices comm_dvc equ $0009 ; Communication Devices mcd_40 equ $0010 ; Apple's tape. Direct Access Magnetic Tape Device apple_cd equ read_dacc ; Apple's CD-ROM apple_scan equ scanner ; Apple's Scanner appl_laser equ $0002 ; Apple's LaserWriter SC data_dat equ $00ff ; Data Dat Device mag_optical equ direct_acc ; Magneto-Optical Device ; ; Type of Device we support in this driver. ; ;------------------------------------------------------------------------------- IF Type = 0 Then ; ; SCSI Driver Version Number. ; and other driver dependent data ; drvr_vers equ $6010 ;Driver 6.0.1 for GS/OS 6.0.1 - 2-Apr-93 SS scsi_dtype equ direct_acc block_dvc equ true character_dvc equ false part_suprt equ true ;Supports Partions TRUE/FALSE warm_ss_suprt equ true ;Supports Warm Shutdown/Startups ;warm_ss_suprt equ false ;Supports Warm Shutdown/Startups block_size equ $200 cache_blks equ true dibs_2_make equ 4 ;Number of dibs to make if growing max_dvc_cnt equ 100 ;Yes: that's decimal 100 p_mask_adder equ bit_10 ;First Bit of Partition Count. *** Changable *** max_p_mask equ p_mask_adder\ ;6 bits of unit number +p_mask_adder*2\ +p_mask_adder*4\ +p_mask_adder*8\ +p_mask_adder*16\ +p_mask_adder*32 max_partitions equ max_p_mask\ /p_mask_adder+1 interleave equ 1 max_timeout equ 60*one_min ;**** Changable **** ; ; IMMED Bit is bit 0 of byte 1 in ; the standard SCSI Command for ; Direct-Access Devices. ; That means the high byte because ; of the 65xxx Low -> High structure. ; Kind of confusing! ; immed_loc equ bit_0 ; IMMED Bit Usage ENDIF ;------------------------------------------------------------------------------- IF Type = 1 Then ; ; SCSI Driver Version Number. ; and other driver dependent data ; drvr_vers equ $6010 ;Driver 6.0.1 for GS/OS 6.0.1 (2-Apr-93 SS) scsi_dtype equ apple_cd block_dvc equ true character_dvc equ false part_suprt equ true ;Supports Partions TRUE/FALSE warm_ss_suprt equ true ;Supports Warm Shutdown/Startups ;warm_ss_suprt equ false ;Supports Warm Shutdown/Startups block_size equ $200 cache_blks equ true dibs_2_make equ 4 ;Number of dibs to make if growing max_dvc_cnt equ 100 ;Yes: that's decimal 100 p_mask_adder equ bit_10 ;First Bit of Partition Count. *** Changable *** max_p_mask equ p_mask_adder\ ;6 bits of unit number +p_mask_adder*2\ +p_mask_adder*4\ +p_mask_adder*8\ +p_mask_adder*16\ +p_mask_adder*32 max_partitions equ max_p_mask\ /p_mask_adder+1 interleave equ 0 ;Format not allowed max_timeout equ 60*one_min ;**** Changable **** ; ; IMMED Bit is bit 0 of byte 1 in ; the standard SCSI Command for ; Direct-Access Devices. ; That means the high byte because ; of the 65xxx Low -> High structure. ; Kind of confusing! ; immed_loc equ null ;No IMMED Bit Usage ENDIF ;------------------------------------------------------------------------------- IF Type = 2 Then ; ; SCSI Driver Version Number. ; and other driver dependent data ; drvr_vers equ $6010 ;Driver 6.0.1 for GS/OS 6.0.1 - 2-Apr-93 SS scsi_dtype equ mcd_40 block_dvc equ true character_dvc equ false part_suprt equ false ;Supports Partions TRUE/FALSE warm_ss_suprt equ false ;Supports Warm Shutdown/Startups block_size equ $2000 cache_blks equ false dibs_2_make equ 1 ;Number of dibs to make if growing max_dvc_cnt equ 10 ;Yes: that's decimal 10 p_mask_adder equ bit_10 ;First Bit of Partition Count. *** Changable *** max_p_mask equ p_mask_adder ;1 bit unit number max_partitions equ max_p_mask\ /p_mask_adder interleave equ 0 ;None for tape drive max_timeout equ 60*one_min ;**** Changable **** ; ; IMMED Bit is bit 0 of byte 1 in ; the standard SCSI Command for ; Direct-Access Devices. ; That means the high byte because ; of the 65xxx Low -> High structure. ; Kind of confusing! ; immed_loc equ bit_8 ;**** Changable **** immed_load equ bit_0 ;**** Changable **** ENDIF ;------------------------------------------------------------------------------- IF Type = 3 Then ; ; SCSI Driver Version Number. ; and other driver dependent data ; drvr_vers equ $6010 ;Driver 6.0.1 for GS/OS 6.0.1 - 2-Apr-93 SS scsi_dtype equ scanner block_dvc equ false character_dvc equ true part_suprt equ false ;Supports Partions TRUE/FALSE warm_ss_suprt equ false ;Supports Warm Shutdown/Startups block_size equ null cache_blks equ false dibs_2_make equ 1 ;Number of dibs to make if growing max_dvc_cnt equ 1 ;Yes: that's decimal 1 p_mask_adder equ bit_10 ;First Bit of Partition Count. *** Changable *** max_p_mask equ p_mask_adder ;1 bit unit number max_partitions equ max_p_mask\ /p_mask_adder interleave equ 0 ;None for Scanner max_timeout equ 60*one_min ;**** Changable **** ; ; IMMED Bit is bit 0 of byte 1 in ; the standard SCSI Command for ; Direct-Access Devices. ; That means the high byte because ; of the 65xxx Low -> High structure. ; Kind of confusing! ; immed_loc equ null ENDIF ;------------------------------------------------------------------------------- IF Type = 4 Then ; ; SCSI Driver Version Number. ; and other driver dependent data ; drvr_vers equ $6010 ;Driver 6.0.1 for GS/OS 6.0.1 - 2-Apr-93 SS scsi_dtype equ appl_laser block_dvc equ false character_dvc equ true part_suprt equ false ;Supports Partions TRUE/FALSE warm_ss_suprt equ false ;Supports Warm Shutdown/Startups block_size equ null cache_blks equ false dibs_2_make equ 1 ;Number of dibs to make if growing max_dvc_cnt equ 1 ;Yes: that's decimal 1 p_mask_adder equ bit_10 ;First Bit of Partition Count. *** Changable *** max_p_mask equ p_mask_adder ;1 bit unit number max_partitions equ max_p_mask\ /p_mask_adder interleave equ 0 ;None for appl_laser max_timeout equ 60*one_min ;**** Changable **** ; ; IMMED Bit is bit 0 of byte 1 in ; the standard SCSI Command for ; Direct-Access Devices. ; That means the high byte because ; of the 65xxx Low -> High structure. ; Kind of confusing! ; immed_loc equ null ENDIF ;------------------------------------------------------------------------------- ; BD 201811 - Changer type IF Type = 5 Then ; ; SCSI Driver Version Number. ; and other driver dependent data ; drvr_vers equ $6010 ;Driver 6.0.1 for GS/OS 6.0.1 (2-Apr-93 SS) scsi_dtype equ changer block_dvc equ true character_dvc equ false part_suprt equ true ;Supports Partions TRUE/FALSE warm_ss_suprt equ true ;Supports Warm Shutdown/Startups ;warm_ss_suprt equ false ;Supports Warm Shutdown/Startups block_size equ $200 cache_blks equ true dibs_2_make equ 4 ;Number of dibs to make if growing max_dvc_cnt equ 100 ;Yes: that's decimal 100 p_mask_adder equ bit_10 ;First Bit of Partition Count. *** Changable *** max_p_mask equ p_mask_adder\ ;6 bits of unit number +p_mask_adder*2\ +p_mask_adder*4\ +p_mask_adder*8\ +p_mask_adder*16\ +p_mask_adder*32 max_partitions equ max_p_mask\ /p_mask_adder+1 interleave equ 0 ;Format not allowed max_timeout equ 60*one_min ;**** Changable **** ; ; IMMED Bit is bit 0 of byte 1 in ; the standard SCSI Command for ; Direct-Access Devices. ; That means the high byte because ; of the 65xxx Low -> High structure. ; Kind of confusing! ; immed_loc equ null ;No IMMED Bit Usage ENDIF ;------------------------------------------------------------------------------- IF block_dvc = character_dvc THEN ; "These two can not be the same!" ENDIF ;------------------------------------------------------------------------------- ; ; Structure Sizes. ; one_page equ $00000100 dib_size equ one_page max_gdvc_buf equ $00000704 max_cmd_len equ 12 ;Yes: that's decimal 12 scsi_duid equ $3C00 ;**** Changable **** claim_dvc equ false ;**** Changable **** warm_cold_flag equ $e101d0 ;word: 0 = cold startup/shutdown ; 1 = warm startup/shutdown ; ; System Service Calls we need. ; ;******************************************************* ; ; ENTRY: move_info via 'jsl' ; ; LONGWORD - Source buffer pointer ; LONGWORD - Destination buffer pointer ; LONGWORD - Transfer length ; WORD - Source buffer pointer ; SP --> ; ; A Reg = Undefined ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x x 0 ; ; EXIT: move_info via 'rtl' ; ; A Reg = Error Code ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x 0 0 No Error ; x x 0 0 0 x x 1 0 Error ; ;******************************************************* move_info equ $01fc70 moveblkcmd equ $0800 ;Block Move Option move_sinc_dinc equ $0805 ;Source Inc, Dest Inc move_sinc_ddec equ $0809 ;Source Inc, Dest Dec move_sdec_dinc equ $0806 ;Source Dec, Dest Inc move_sdec_ddec equ $080a ;Source Dec, Dest Dec move_scon_dcon equ $0800 ;Source con, Dest con move_sinc_dcon equ $0801 ;Source Inc, Dest con move_sdec_dcon equ $0802 ;Source Dec, Dest con move_scon_dinc equ $0804 ;Source con, Dest Inc move_scon_ddec equ $0808 ;Source con, Dest Dec ;******************************************************* ; ; ENTRY: set_disksw via 'jsl' ; ; A Reg = Undefined ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x x 0 ; ; EXIT: set_disksw via 'rtl' ; ; A Reg = Undefined ; X Reg = Undefined ; Y Reg = Undefined ; Bank Reg = Undefined ; Dir Reg = GS/OS Direct Page ; P Reg = N V M X D I Z C E ; x x 0 0 0 x x 0 0 No Error ; ;******************************************************* cache_find_blk equ $01fc04 cache_add_blk equ $01fc08 cache_kil_blk equ $01fc14 cache_del_vol equ $01fc18 set_disksw equ $01fc90 s_dispatch equ $01fca4 install_driver equ $01fca8 ; ; Direct Page Addresses. ; dev_num equ $0000 ;Device Number call_num equ $0002 ;Call Number buff_ptr equ $0004 ;Buffer Pointer rqst_cnt equ $0008 ;Request Count trans_cnt equ $000C ;Transfer Count block_num equ $0010 ;Block Number (Read/Write only) blk_size equ $0014 ;Block Size fst_num equ $0016 ;FST Number (Read/Write only) stat_code equ $0016 ;Status Command Code cont_code equ $0016 ;Control Command Code volume_id equ $0018 ;Volume ID (Read/Write only) cache_prio equ $001A ;Cache Priority Value (Read/Write only) cache_ptr equ $001C ;Cache Pointer (Read/Write only) dib_ptr equ $0020 ;DIB Pointer start_our_zp equ $0030 scsi_mdrvr equ start_our_zp;Main Driver Command Data Ptr goes here. dvc_list equ scsi_mdrvr+4;Get Devices List (Startup Command Only) scsi_zp0 equ dvc_list+4 ;User Defined Direct page scratch pad scsi_zp1 equ scsi_zp0+2 ;User Defined Direct page scratch pad scsi_zp2 equ scsi_zp1+2 ;User Defined Direct page scratch pad scsi_zp3 equ scsi_zp2+2 ;User Defined Direct page scratch pad scsi_zp4 equ scsi_zp3+2 ;User Defined Direct page scratch pad scsi_zp5 equ scsi_zp4+2 ;User Defined Direct page scratch pad scsi_zp6 equ scsi_zp5+2 ;User Defined Direct page scratch pad scsi_zp7 equ scsi_zp6+2 ;User Defined Direct page scratch pad first_dib equ scsi_zp7+2 ;Start of DIB RAM (Startup Command Only) next_dib equ first_dib+4 ;Next DIB to be used (Startup Command Only) last_dib equ next_dib+4 ;Pointer to Default DIB Structure prev_dib equ last_dib+4 ;Pointer to previous DIB in linked list add_dib_here equ prev_dib+4 ;Pointer for DIB walking code rebuild_zp equ add_dib_here+4 ;Reserved for the use of rebuild dib code config_buff equ rebuild_zp+4;Pointer to the current Config Data ddm_buff equ config_buff+4 ;Pointer to DDM config_tcnt equ ddm_buff+4 ;Pointer to the Transfer Count word. end_our_zp equ config_tcnt+4 sib_pointer equ $0074 smgr_pl_ptr equ $0078 ; ; Memory attribute equates ; attrlock equ bit_15 ;Block is locked down. attrfixed equ bit_14 ;Block can't move in mem attrpurg1 equ bit_8 ;Purge level 1 attrpurg2 equ bit_9 ;Purge level 2 attrpurg3 equ bit_8+bit_9 ;Purge level 3 attrnocross equ bit_4 ;May not cross banks attrnospec equ bit_3 ;don't use special mem attrpage equ bit_2 ;Page alligned attraddr equ bit_1 ;Remain at fixed address attrbank equ bit_0 ;Remain in fixed bank ; ; SCSI Command Translation Table Flags ; scsit_tx equ bit_15 ;SCSI Send Data Command scsit_rx equ bit_14 ;SCSI Receive Data Command scsit_stat equ bit_13 ;SCSI Status Command scsit_cont equ bit_12 ;SCSI Control Command scsit_data equ bit_11 ;SCSI Data I/O Command scsit_dvc equ bit_10 ;SCSI Device I/O Command scsit_blk equ bit_9 ;Command has a Block Number scsic_1st equ bit_8 ;Must be first device if linked scsic_int equ bit_7 ;Internal Driver Command only scsic_dsw equ bit_6 ;Issue DISK_SW with this call scsic_off equ bit_5 ;Device is going offline. scsic_tout equ bit_4 ;Adjust time out by block count scsid_asis equ bit_3 ;CMD Data is in SCSI format scsid_blk equ bit_1 ;Convert Trans Count to Blocks scsid_byte equ bit_0 ;Leave Trans Count in Bytes scsid_none equ null ;Transfer count does not go in CMD scsi_endcmd equ null ;End of SCSI Translation Table ; ; Device Characteristics. ; ram_rom_disk equ bit_15 ;RAM or ROM Disk if Set gened_drvr equ bit_14 ;Generated Driver if Set linked_dvc equ bit_13 ;Linked Device if Set call_active equ bit_12 ;Device Busy if Set restartable equ bit_11 ;Restartable from ram if Set mhz_1 equ null ;1 Mhz Device mhz_2_6 equ bit_8 ;2.6 Mhz Device mhz_gt_2_6 equ bit_9 ;>2.6 Mhz Device speed_ind equ bit_8+bit_9 ;Device is speed independent blk_device equ bit_7 ;Block Device if Set write_allow equ bit_6 ;Write is Allowed if Set read_allow equ bit_5 ;Read is Allowed if Set driver_is_clean equ bit_4 ;Driver follows guidelines if Set format_allow equ bit_3 ;Format is Allowed if Set removable equ bit_2 ;Removable Media if Set ; ; Device Flags for 'dvcflag'. All ; are considered true if set. ; int_busy equ bit_15 ;Internal busy flag for async wait_mode equ bit_14 ;Driver Wait/No Wait state dvc_online equ bit_13 ;Device Online Flag dvc_switch equ bit_12 ;Device Switched Flag dvc_hardofl equ bit_11 ;Device Hard Offline Flag dvc_hard_sw equ bit_10 ;Device Hard Switch Flag relaxing equ bit_9 ;Device is relaxing (Warm Shutdown) cold_dib equ bit_8 ;Do cold startup regardless of warmstart play_mode equ bit_7 ;In Audio Play Mode if set pdos_part equ bit_6 ;ProDOS Partition if set. ; Bits 0 - 5 are reserved at this time. ; ; Config Bitmap Definitions ; conf_vol equ bit_15 ;Volume Config if set dconf_ddm equ bit_14 ;Disk DDM if set and 15 clear vconf_remount equ bit_14 ;Remount Vol if set and 15 set dconf_bvol equ bit_13 ;Boot Volume if set and 15 clear vconf_resv2 equ bit_13 ;RESERVED if set and 15 set dconf_drvr equ bit_12 ;Boot Driver if set and 15 clear vconf_resv3 equ bit_12 ;RESERVED if set and 15 set dconf_resv4 equ bit_11 ;RESERVED if set and 15 clear vconf_resv4 equ bit_11 ;RESERVED if set and 15 set dconf_resv5 equ bit_10 ;RESERVED if set and 15 clear vconf_resv5 equ bit_10 ;RESERVED if set and 15 set dconf_resv6 equ bit_9 ;RESERVED if set and 15 clear vconf_resv6 equ bit_9 ;RESERVED if set and 15 set dconf_resv7 equ bit_8 ;RESERVED if set and 15 clear vconf_set_stat equ bit_8 ;Set Stat Bits if set and 15 set dconf_resv8 equ bit_7 ;RESERVED if set and 15 clear vconf_resv8 equ bit_7 ;RESERVED if set and 15 set dconf_resv9 equ bit_6 ;RESERVED if set and 15 clear vconf_resv9 equ bit_6 ;RESERVED if set and 15 set dconf_resv10 equ bit_5 ;RESERVED if set and 15 clear vconf_wr_enable equ bit_5 ;Do Write Inhibit if set & 8 & 15 are set dconf_resv11 equ bit_4 ;RESERVED if set and 15 clear vconf_rd_enable equ bit_4 ;Do Read Inhibit if set & 8 & 15 are set dconf_resv12 equ bit_3 ;RESERVED if set and 15 clear vconf_resv12 equ bit_3 ;RESERVED if set and 15 set dconf_resv13 equ bit_2 ;RESERVED if set and 15 clear vconf_resv13 equ bit_2 ;RESERVED if set and 15 set dconf_resv14 equ bit_1 ;RESERVED if set and 15 clear vconf_resv14 equ bit_1 ;RESERVED if set and 15 set dconf_resv15 equ bit_0 ;RESERVED if set and 15 clear vconf_resv15 equ bit_0 ;RESERVED if set and 15 set ; ; Config Parm List ; disk_pl RECORD $0000 drvr_num ds.w 1 ;Driver Number ddm_buff_len ds.w 1 ;DDM Buffer Length ddm_trns_len ds.w 1 ;DDM Transfer Length ddm_buff_ptr ds.l 1 ;DDM Buffer Pointer vol_buff_len ds.w 1 ;Volume Buffer Length vol_trns_len ds.w 1 ;Volume Transfer Length vol_buff_ptr ds.l 1 ;Volume Buffer Pointer drvr_buff_len ds.w 1 ;Driver Buffer Length drvr_trns_len ds.w 1 ;Driver Transfer Length drvr_buff_ptr ds.l 1 ;Driver Buffer Pointer ENDR ; ; Error_Codes. ; no_error equ $0000 bad_dev_number equ $0011 drvr_bad_req equ $0020 drvr_bad_code equ $0021 drvr_bad_parm equ $0022 drvr_not_open equ $0023 drvr_prior_open equ $0024 drvr_io equ $0027 drvr_no_dev equ $0028 drvr_busy equ $0029 drvr_wrt_prot equ $002b drvr_bad_cnt equ $002c drvr_bad_blk equ $002d drvr_dsk_swch equ $002e drvr_off_line equ $002f ;******************************************************* ; ; The following statements are used to define the DIB ; structure. The structure contains the traditional ; DIB followed by an extension used for device ; maintainence. All together each DIB with the ; associated extensions will take one page of RAM. ; ;******************************************************* ; ; $00 ------------------------------------------------ ; | | ; | Device Information Block Data (DIB) | ; $3F | | ; ------------------------------------------------ ; $40 | Physical Block Number | ; | | ; $43 | that maps to logical block zero | ; ------------------------------------------------ ; $44 | | ; | Head Pointer | ; $47 | | ; ------------------------------------------------ ; $48 | | ; | Forward Pointer | ; $4B | | ; ------------------------------------------------ ; $4C | Memory DIB Count | ; ------------------------------------------------ ; $4E | Reserved | ; ------------------------------------------------ ; $50 | | ; | Memory Manager Handle for this DIB | ; $53 | | ; ------------------------------------------------ ; $54 | | ; | Block Size (Bytes) | ; $57 | | ; ------------------------------------------------ ; $58 | Max SCSI Command for this Device | ; ------------------------------------------------ ; $5A | | ; | Command Bitmap (See ERS for description) | ; $79 | | ; ------------------------------------------------ ; $7A | SCSI Command Data | ; | and | ; $D9 | SCSI Manager Call Buffer Structures | ; ------------------------------------------------ ; $DA | 'Busy' and other Flags | ; ------------------------------------------------ ; $DC | | ; | Completion Vector with Code | ; $FF | | ; ------------------------------------------------ ; ;******************************************************* dib RECORD $0000 ; ; Definition of DIB Structure. ; linkptr ds.l 1 ; DIB Link Pointer (LONG) entry ds.l 1 ; Pointer to Drvrs Main Entry (LONG) dvcchar ds.w 1 ; Device Characteristics (WORD) blkcnt ds.l 1 ; Block Count for this device (LONG) namelen ds.b 1 ; Length of Descriptive Name (PSTR) disname ds.b 31 ; Field for this devices Name (STR) slotnum ds.w 1 ; Device Slot Number from MGR. (WORD) unitnum ds.w 1 ; Device Unit Number from MGR. (WORD) versnum ds.w 1 ; Version Number for our Driver (WORD) dvcid ds.w 1 ; ID of Device we talk to (WORD) headlnk ds.w 1 ; Head Device Link (WORD) fdvclnk ds.w 1 ; Forward Device Link (WORD) ext_ptr ds.l 1 ; Pointer to DIB Extension (LONG) devnum ds.w 1 ; DIB Device Number (WORD) ; ; The Starting Block Number for this device ; is maintained here. This is used to ; modify the requested block number from ; a logical to a physical number. ; start_blk ds.l 1 ; Starting Physical Block Num. (LONG) ; ; These two pointers are the compliment ; to the links in the standard DIB and ; will point to the actual DIB referenced ; in the Head and Forward Device Links. ; headptr ds.l 1 ; Head Dvc Pointer (LONG) fdvcptr ds.l 1 ; Forward Dvc Pointer (LONG) mem_dib_cnt ds.w 1 ; Number of active dibs in mem (WORD) part_blk ds.w 1 ; Block containing partition (WORD) ; ; Memory Manager Handle ; handle ds.l 1 ; (LONG) ; ; Block Size ; blksize ds.l 1 ; (LONG) ; ; Maximum SCSI Command supported by ; the device for this DIB. ; maxcmd ds.w 1 ; (WORD) ; ; SCSI Command Group Bitmaps ; group0 ds.l 1 ; Group 0 (LONG) group1 ds.l 1 ; Group 1 (LONG) group2 ds.l 1 ; Group 2 (LONG) group3 ds.l 1 ; Group 3 (LONG) group4 ds.l 1 ; Group 4 (LONG) group5 ds.l 1 ; Group 5 (LONG) group6 ds.l 1 ; Group 6 (LONG) group7 ds.l 1 ; Group 7 (LONG) ; ; SCSI Manager Call PList ; scsi_slot ds.w 1 ; Same as our Slot Number (WORD) scsiid ds.w 1 ; Same as our Unit Number (WORD) version ds.w 1 ; Version of call issued (WORD) scsic_flgs ds.w 1 ; Flags from Command Table (WORD) time_out ds.w 1 ; Time Out Factor * xxx ms (WORD) compvec ds.l 1 ; Completion Routine Pointer (LONG) cp_ptr ds.l 1 ; Pointer to Command Packet (LONG) trx_ptr ds.l 1 ; Ptr to Send/R'cv Structure (LONG) trx_len trx_rqst ds.l 1 ; Users Send/R'cv Length (LONG) rslt_ptr ds.l 1 ; Pointer to Status Structure (LONG) ds.l 1 ; Reserved space 0 (LONG) ds.l 1 ; Reserved space 1 (LONG) ; ; SCSI Command Packet ; scsicmd ds.b 12 ; Room for any SCSI Command (BYTES) ; ; SCSI Manager Device Send/R'cv Buffers List ; trx_buff ds.l 1 ; Users Send Buffer (LONG) trx_length ds.l 1 ; Request cnt for this buffer (LONG) trx_offset ds.l 1 ; Offset for next pass (LONG) trx_null ds.l 1 ; Null (LONG) trx_stop ds.l 1 ; Null (LONG) ds.l 1 ; Null (LONG) ds.l 1 ; Null (LONG) ds.l 1 ; Null (LONG) trx_rsrv ds.l 4 ; Reserved Space * 4 for future (LONG) ; ; Device Busy and other Flags and results ; dvcflag ds.w 1 ; Device Busy and other Flags (WORD) ; ; Completion Routine for this DIB. ; This takes the remaining space in ; the allocated RAM. Any routine can ; be placed here but must never go ; beyond offset $FF ; end equ * complet ds.b $100-end ENDR pm RECORD $0000 ; ; All Values given below are ; in Macintosh High >> Low ; format. ; Sig ds.w 1 ;Signature Always $504d ; Apple II = $4d50 SigPad ds.w 1 ;Reserved for future use MapBlkCnt ds.l 1 ;Number of blocks in Map PyPartStart ds.l 1 ;First Physical Block of Partition PartBlkCnt ds.l 1 ;Number of Blocks in Partition PartName ds.b 32 ;Partition Name PartType ds.b 32 ;Partition Type LgDataStart ds.l 1 ;1st Logical Data Block DataCnt ds.l 1 ;Number of data blocks PartStatus ds.l 1 ;Partition Status Info LgBootStart ds.l 1 ;1st Logical Boot Block BootSize ds.l 1 ;Size of Boot Code in Bytes BootLoad ds.l 1 ;Boot Code Load Address BootLoad2 ds.l 1 ;Additional Boot Load Info BootEntry ds.l 1 ;Boot Code Entry Point BootEntry2 ds.l 1 ;Additional Boot Entry Info BootCksum ds.l 1 ;Boot Code Checksum Processor ds.b 16 ;Processor Type Args ds.b 128 ;Boot Specific Arguments end equ * ds.b $200-end ;Pad to 1 Block ENDR ; ; Structure of data from Read Capacity Call ; block RECORD $0000 count ds.l 1 ;Block Count High >> Low size ds.l 1 ;Block Size High >> Low ENDR ; ; Structure of data from Mode Sense Call ; mode RECORD $0000 sense_len ds.b 1 ;Sense Data Length med_type ds.b 1 ;Medium Type w_protect ds.b 1 ;Write Protect bit 7 blk_disc ds.b 1 ;Block Descriptor Length ds.b 1 ;Unused data blocks ds.b 3 ;Block Count High >> Low ds.b 1 ;Unused data blk_size ds.b 3 ;Block Size High >> Low page_number ds.b 1 ;Page number of mode sense data length ds.b 1 ;Length of data that follows ENDR ; ; Structure of data from Request Sense Call ; rqst_sens RECORD $0000 error_code ds.b 1 ;Bit 7 = Valid Flag ;Bits 0-6 = Error Code segment ds.b 1 ; = Segment Number sense_key ds.b 1 ;Bit 7 = Filemark bit ;Bit 6 = EOM bit ;Bit 5 = ILI bit ;Bit 4 = Reserved ;Bits 0-3 = Sense Key info_bytes ds.b 4 ; = Information Bytes addnl_sens_len ds.b 1 ; = Additional Sense Length (n-7) command_spec ds.b 4 ; = Command Specific Information addnl_sens_code ds.b 1 ; = Additional Sense Code addnl_code_qual ds.b 1 ; = Additional Sense Code Qualifier ENDR ; ; Structure of data from Inquiry Call ; inq RECORD $0000 pd_type ds.b 1 ;Peripheral Device Type removable ds.b 1 ;Removable bit 7 ds.b $26-2 ;Unused data group ds.b 1 ;First Group Number ENDR ; ; Structure of data from GET DATA STATUS Call ; gds RECORD $0000 ds.b 2 ;reserved data_len ds.b 1 ;Amount of data returned by this call block ds.b 1 ;bit 0 winw_id ds.b 1 ;Window Identifier ds.b 1 ;reserved buf_avail ds.b 3 ;Amount of available Scanner Buffer Space data_avail ds.b 3 ;Amount of Available Scan Data ENDR ; ; Structure of data from Device Specific Calls ; ds RECORD $0000 version ds.w 1 ;Version Number of this structure ds.b 12 ;Command Bytes DCcode ds.l 1 ;1st DC Code DCcount ds.l 1 ;1st Count DCoffset ds.l 1 ;1st Offset DCreserved ds.l 1 ;1st Reserved ENDR EJECT \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSIScanner.Driver.make b/scsi2/SCSI.Drivers/SCSIScanner.Driver.make new file mode 100644 index 0000000..4512e68 --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSIScanner.Driver.make @@ -0,0 +1 @@ +# File: SCSIScanner.Driver.make # Target: SCSIScan.Driver # Sources: 'SCSI Driver main' # 'SCSI Command Table' # 'SCSI Filter startup' # 'SCSI Filter open' # 'SCSI Filter read' # 'SCSI Filter write' # 'SCSI Filter close' # 'SCSI Filter status' # 'SCSI Filter control' # 'SCSI Filter flush' # 'SCSI Filter shutdown' # 'SCSI Main Driver' # 'SCSI Driver Mgmt' # Created: Monday, April 10, 1989 8:30:49 AM # Modified: Monday, April 10, 1989 8:30:49 AM SCSIScan.Driver ÄÄ SCSIScanner.Driver.make ¶ :Scanner.Obj:'SCSIScanner Driver main.obj' ¶ :Scanner.Obj:'SCSIScanner Command Table.obj' ¶ :Scanner.Obj:'SCSIScanner Filter startup.obj' ¶ :Scanner.Obj:'SCSIScanner Filter open.obj' ¶ :Scanner.Obj:'SCSIScanner Filter read.obj' ¶ :Scanner.Obj:'SCSIScanner Filter write.obj' ¶ :Scanner.Obj:'SCSIScanner Filter close.obj' ¶ :Scanner.Obj:'SCSIScanner Filter status.obj' ¶ :Scanner.Obj:'SCSIScanner Filter control.obj' ¶ :Scanner.Obj:'SCSIScanner Filter flush.obj' ¶ :Scanner.Obj:'SCSIScanner Filter shutdown.obj' ¶ :Scanner.Obj:'SCSIScanner Main Driver.obj' ¶ :Scanner.Obj:'SCSIScanner Driver Mgmt.obj' LinkIIGS -t $bb -at $0103 ¶ :Scanner.Obj:'SCSIScanner Driver main.obj' ¶ :Scanner.Obj:'SCSIScanner Command Table.obj' ¶ :Scanner.Obj:'SCSIScanner Filter startup.obj' ¶ :Scanner.Obj:'SCSIScanner Filter open.obj' ¶ :Scanner.Obj:'SCSIScanner Filter read.obj' ¶ :Scanner.Obj:'SCSIScanner Filter write.obj' ¶ :Scanner.Obj:'SCSIScanner Filter close.obj' ¶ :Scanner.Obj:'SCSIScanner Filter status.obj' ¶ :Scanner.Obj:'SCSIScanner Filter control.obj' ¶ :Scanner.Obj:'SCSIScanner Filter flush.obj' ¶ :Scanner.Obj:'SCSIScanner Filter shutdown.obj' ¶ :Scanner.Obj:'SCSIScanner Main Driver.obj' ¶ :Scanner.Obj:'SCSIScanner Driver Mgmt.obj' ¶ -o 'SCSIScan.Driver' # -o ':Scanner.Obj:SCSIScanner.Driver.lnk' # ExpressIIGS ¶ # ':Scanner.Obj:SCSIScanner.Driver.lnk' ¶ # -o 'SCSIScan.Driver' duplicateiigs -y -m SCSIScan.Driver SCSIScan.Driver :Scanner.Obj:'SCSIScanner Driver main.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Driver main' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Driver main' ¶ -o :Scanner.Obj:'SCSIScanner Driver main.obj' :Scanner.Obj:'SCSIScanner Command Table.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Command Table' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Command Table' ¶ -o :Scanner.Obj:'SCSIScanner Command Table.obj' :Scanner.Obj:'SCSIScanner Filter startup.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter startup' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter startup' ¶ -o :Scanner.Obj:'SCSIScanner Filter startup.obj' :Scanner.Obj:'SCSIScanner Filter open.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter open' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter open' ¶ -o :Scanner.Obj:'SCSIScanner Filter open.obj' :Scanner.Obj:'SCSIScanner Filter read.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter read' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter read' ¶ -o :Scanner.Obj:'SCSIScanner Filter read.obj' :Scanner.Obj:'SCSIScanner Filter write.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter write' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter write' ¶ -o :Scanner.Obj:'SCSIScanner Filter write.obj' :Scanner.Obj:'SCSIScanner Filter close.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter close' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter close' ¶ -o :Scanner.Obj:'SCSIScanner Filter close.obj' :Scanner.Obj:'SCSIScanner Filter status.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter status' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter status' ¶ -o :Scanner.Obj:'SCSIScanner Filter status.obj' :Scanner.Obj:'SCSIScanner Filter control.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter control' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter control' ¶ -o :Scanner.Obj:'SCSIScanner Filter control.obj' :Scanner.Obj:'SCSIScanner Filter flush.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter flush' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter flush' ¶ -o :Scanner.Obj:'SCSIScanner Filter flush.obj' :Scanner.Obj:'SCSIScanner Filter shutdown.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Filter shutdown' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Filter shutdown' ¶ -o :Scanner.Obj:'SCSIScanner Filter shutdown.obj' :Scanner.Obj:'SCSIScanner Main Driver.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Main Driver' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Main Driver' ¶ -o :Scanner.Obj:'SCSIScanner Main Driver.obj' :Scanner.Obj:'SCSIScanner Driver Mgmt.obj' Ä ¶ 'SCSIScanner.Driver.make' ¶ 'SCSI Driver Mgmt' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=3 'SCSI Driver Mgmt' ¶ -o :Scanner.Obj:'SCSIScanner Driver Mgmt.obj' \ No newline at end of file diff --git a/scsi2/SCSI.Drivers/SCSITape.Driver.make b/scsi2/SCSI.Drivers/SCSITape.Driver.make new file mode 100644 index 0000000..f387985 --- /dev/null +++ b/scsi2/SCSI.Drivers/SCSITape.Driver.make @@ -0,0 +1 @@ +# File: SCSITape.Driver.make # Target: SCSITape.Driver # Sources: 'SCSI Driver main' # 'SCSI Command Table' # 'SCSI Filter startup' # 'SCSI Filter open' # 'SCSI Filter read' # 'SCSI Filter write' # 'SCSI Filter close' # 'SCSI Filter status' # 'SCSI Filter control' # 'SCSI Filter flush' # 'SCSI Filter shutdown' # 'SCSI Main Driver' # 'SCSI Driver Mgmt' # Created: Friday, February 17, 1989 8:30:49 AM # Modified: Tuesday, May 2, 1989 8:090:49 AM SCSITape.Driver ÄÄ SCSITape.Driver.make ¶ :Tape.Obj:'SCSITape Driver main.obj' ¶ :Tape.Obj:'SCSITape Command Table.obj' ¶ :Tape.Obj:'SCSITape Filter startup.obj' ¶ :Tape.Obj:'SCSITape Filter open.obj' ¶ :Tape.Obj:'SCSITape Filter read.obj' ¶ :Tape.Obj:'SCSITape Filter write.obj' ¶ :Tape.Obj:'SCSITape Filter close.obj' ¶ :Tape.Obj:'SCSITape Filter status.obj' ¶ :Tape.Obj:'SCSITape Filter control.obj' ¶ :Tape.Obj:'SCSITape Filter flush.obj' ¶ :Tape.Obj:'SCSITape Filter shutdown.obj' ¶ :Tape.Obj:'SCSITape Main Driver.obj' ¶ :Tape.Obj:'SCSITape Driver Mgmt.obj' LinkIIGS -t $bb -at $0103 ¶ # LinkIIGS -t $bb -at $0105 ¶ :Tape.Obj:'SCSITape Driver main.obj' ¶ :Tape.Obj:'SCSITape Command Table.obj' ¶ :Tape.Obj:'SCSITape Filter startup.obj' ¶ :Tape.Obj:'SCSITape Filter open.obj' ¶ :Tape.Obj:'SCSITape Filter read.obj' ¶ :Tape.Obj:'SCSITape Filter write.obj' ¶ :Tape.Obj:'SCSITape Filter close.obj' ¶ :Tape.Obj:'SCSITape Filter status.obj' ¶ :Tape.Obj:'SCSITape Filter control.obj' ¶ :Tape.Obj:'SCSITape Filter flush.obj' ¶ :Tape.Obj:'SCSITape Filter shutdown.obj' ¶ :Tape.Obj:'SCSITape Main Driver.obj' ¶ :Tape.Obj:'SCSITape Driver Mgmt.obj' ¶ -o 'SCSITape.Driver' # -o ':Tape.Obj:SCSITape.Driver.lnk' # ExpressIIGS ¶ # ':Tape.Obj:SCSITape.Driver.lnk' ¶ # -o 'SCSITape.Driver' duplicateiigs -y -m SCSITape.Driver SCSITape.Driver :Tape.Obj:'SCSITape Driver main.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Driver main' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Driver main' ¶ -o :Tape.Obj:'SCSITape Driver main.obj' :Tape.Obj:'SCSITape Command Table.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Command Table' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Command Table' ¶ -o :Tape.Obj:'SCSITape Command Table.obj' :Tape.Obj:'SCSITape Filter startup.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter startup' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter startup' ¶ -o :Tape.Obj:'SCSITape Filter startup.obj' :Tape.Obj:'SCSITape Filter open.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter open' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter open' ¶ -o :Tape.Obj:'SCSITape Filter open.obj' :Tape.Obj:'SCSITape Filter read.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter read' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter read' ¶ -o :Tape.Obj:'SCSITape Filter read.obj' :Tape.Obj:'SCSITape Filter write.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter write' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter write' ¶ -o :Tape.Obj:'SCSITape Filter write.obj' :Tape.Obj:'SCSITape Filter close.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter close' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter close' ¶ -o :Tape.Obj:'SCSITape Filter close.obj' :Tape.Obj:'SCSITape Filter status.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter status' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter status' ¶ -o :Tape.Obj:'SCSITape Filter status.obj' :Tape.Obj:'SCSITape Filter control.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter control' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter control' ¶ -o :Tape.Obj:'SCSITape Filter control.obj' :Tape.Obj:'SCSITape Filter flush.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter flush' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter flush' ¶ -o :Tape.Obj:'SCSITape Filter flush.obj' :Tape.Obj:'SCSITape Filter shutdown.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Filter shutdown' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Filter shutdown' ¶ -o :Tape.Obj:'SCSITape Filter shutdown.obj' :Tape.Obj:'SCSITape Main Driver.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Main Driver' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Main Driver' ¶ -o :Tape.Obj:'SCSITape Main Driver.obj' :Tape.Obj:'SCSITape Driver Mgmt.obj' Ä ¶ 'SCSITape.Driver.make' ¶ 'SCSI Driver Mgmt' ¶ 'SCSIHD.equates' AsmIIGS -d &type,type=2 'SCSI Driver Mgmt' ¶ -o :Tape.Obj:'SCSITape Driver Mgmt.obj' \ No newline at end of file