Commits (6)
  • John Ballance's avatar
    Small changes to enable interaction with PartMan module · a290d023
    John Ballance authored
    Detail:
      Changes are compile time enabled with the compile time option
      PartitionManager set TRUE
    Admin:
    
    
    Version 1.29. Tagged as 'SCSIFS-1_29'
    a290d023
  • Jeffrey Lee's avatar
    Tidy things up a bit · f7507077
    Jeffrey Lee authored
    Detail:
      s/ScsiFs00, ScsiFs05, ScsiFs15, ScsiFs20, ScsiFs50 - Add comments for some of the different IDs which are used. Add MaxDriveNo constant, and make use of it where appropriate. Make BlockSizes non-braindead.
    Admin:
      Cosmetic changes only, binary unchanged.
    
    
    Version 1.29. Not tagged
    f7507077
  • Jeffrey Lee's avatar
    Strip some old code and options · 48d890c1
    Jeffrey Lee authored
    Detail:
      Since we only really care about the RISC OS 5 version of this module, there are various old switches stretching back 20+ years which can be removed to make the sources a bit easier on the eye:
      * OpticalMemorySupport (-> {TRUE})
      * IgnoreRecoveredError (-> {TRUE})
      * FloppySupport (-> {TRUE})
      * MediaLocking (-> {TRUE})
      * BigDisc (-> {TRUE})
      * AutoDetect (-> {TRUE})
      * HotPlug (-> {TRUE})
      Files changed:
      HelpText, hdr/mymacros, s/Fixes, s/Hdr_fst, s/ScsiFs00, s/ScsiFs05, s/ScsiFs15, s/ScsiFs20, s/ScsiFs50
    Admin:
      Resulting binary unchanged (for default options, at least)
    
    
    Version 1.29. Not tagged
    48d890c1
  • Jeffrey Lee's avatar
    Fix memory corruption when encountering a floppy-type device with SCSI ID >= 4 · 09740560
    Jeffrey Lee authored
    Detail:
      s/ScsiFs20 - Fix UnlockMedia to perform the correct translation between SCSI ID and FileCore drive number
    Admin:
      Tested on Raspberry Pi
      Fixes issue reported on forums when many drives connected:
      https://www.riscosopen.org/forum/forums/4/topics/3831
    
    
    Version 1.30. Tagged as 'SCSIFS-1_30'
    09740560
  • Jeffrey Lee's avatar
    Minor improvements · 3a1ef8f7
    Jeffrey Lee authored
    Detail:
      hdr/mymacros, s/ScsiFs05 - Remove some unused 26bit-only macros. Use REV instruction in RevBytes macro when possible. Replace most manual PSR manipulation with common macros.
      s/Hdr_fst, s/ScsiFs15 - Use Portable_Idle within 1s wait loop, to avoid thrashing the CPU
    Admin:
      Tested on Raspberry Pi
    
    
    Version 1.31. Tagged as 'SCSIFS-1_31'
    3a1ef8f7
  • Jeffrey Lee's avatar
    Make 'Hide' file feature more useful when SCSIFS in ROM · e952c055
    Jeffrey Lee authored
    Detail:
      s/ScsiFs05, s/ScsiFs50 - Listen out for Service_BootChoicesVarsSet and use it as a trigger to check for any devices which should be hidden by the Hide file. This ensures that devices which are detected prior to the boot sequence starting will get Hide-processed
    Admin:
      Tested on Raspberry Pi
      Partially resolves ticket #309 (there's still the problem that a multi-card reader could use up all available drive numbers during ROM init, preventing the boot drive from mounting)
    
    
    Version 1.32. Tagged as 'SCSIFS-1_32'
    e952c055
......@@ -28,12 +28,14 @@ new Service Call is issued:
Service_SCSIMounting &20104
R2 = SCSIFS disc icon (0..7) which is about to be mounted.
R3 = SCSI ID for this drive proposed
If a helper App wishes to mount a partition other than the base one
it should issue SWI SCSIFS_Partitions with
R0 = 0
R1 = SCSIFS disc icon (0..7) (R2 from the service call)
R2 = Desired sector offset to disc image base.
R3 = SCSI ID for this drive
This SWI MUST be issued immediately. On return from the service call
SCSIFS will use this value to mount the disc.
\ No newline at end of file
......@@ -9,14 +9,6 @@ SCSIFSBuffers_Syntax DCB "SBu", 0
]
SCSIFSDirCache_Help DCB "HDC", 0
SCSIFSDirCache_Syntax DCB "SDC", 0
[ :LNOT:HotPlug
[ FloppySupport
SCSIFSFloppies_Help DCB "HFl", 0
SCSIFSFloppies_Syntax DCB "SFl", 0
]
SCSIFSDiscs_Help DCB "HDi", 0
SCSIFSDiscs_Syntax DCB "SDi", 0
]
SCSIFSDrive_Help DCB "HDr", 0
SCSIFSDrive_Syntax DCB "SDr", 0
|
......@@ -49,27 +41,6 @@ SCSIFSDirCache_Syntax
= TokenEscapeChar,Token0
= " <size>[K]",0
[ :LNOT:HotPlug
[ FloppySupport
SCSIFSFloppies_Help
= "*Configure "
= TokenEscapeChar,Token0
= " sets the number of SCSI discs attached.",13
SCSIFSFloppies_Syntax
= "Syntax: *Configure "
= TokenEscapeChar,Token0
= " <SCSI discs>",0
]
SCSIFSDiscs_Help
= "*Configure "
= TokenEscapeChar,Token0
= " sets the number of SCSI discs attached.",13
SCSIFSDiscs_Syntax
= "Syntax: *Configure "
= TokenEscapeChar,Token0
= " <SCSI discs>",0
]
SCSIFSDrive_Help
= "*Configure "
= TokenEscapeChar,Token0
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.28"
Module_Version SETA 128
Module_MajorVersion SETS "1.32"
Module_Version SETA 132
Module_MinorVersion SETS ""
Module_Date SETS "06 Oct 2013"
Module_ApplicationDate SETS "06-Oct-13"
Module_Date SETS "09 Sep 2017"
Module_ApplicationDate SETS "09-Sep-17"
Module_ComponentName SETS "SCSIFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
Module_FullVersion SETS "1.28"
Module_HelpVersion SETS "1.28 (06 Oct 2013)"
Module_FullVersion SETS "1.32"
Module_HelpVersion SETS "1.32 (09 Sep 2017)"
END
/* (1.28)
/* (1.32)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.28
#define Module_MajorVersion_CMHG 1.32
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Oct 2013
#define Module_Date_CMHG 09 Sep 2017
#define Module_MajorVersion "1.28"
#define Module_Version 128
#define Module_MajorVersion "1.32"
#define Module_Version 132
#define Module_MinorVersion ""
#define Module_Date "06 Oct 2013"
#define Module_Date "09 Sep 2017"
#define Module_ApplicationDate "06-Oct-13"
#define Module_ApplicationDate "09-Sep-17"
#define Module_ComponentName "SCSIFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
#define Module_FullVersion "1.28"
#define Module_HelpVersion "1.28 (06 Oct 2013)"
#define Module_LibraryVersionInfo "1:28"
#define Module_FullVersion "1.32"
#define Module_HelpVersion "1.32 (09 Sep 2017)"
#define Module_LibraryVersionInfo "1:32"
......@@ -14,51 +14,6 @@
;
; >AdfsMacros
MACRO
SetBorder $r,$g,$b,$cond
Push "R0,R1",$cond
LDR$cond R0, =VIDC
MOV$cond R1, #bit30
ORR$cond R1, R1, #$g * 16 + $r
ORR$cond R1, R1, #$b * 256
STR$cond R1, [R0]
Pull "R0,R1",$cond
MEND
MACRO ;set some PSR bits
$lab setpsr $bits,$tempreg,$cond
$lab MOV$cond $tempreg,#$bits
ORR$cond $tempreg,$tempreg,PC
TEQ$cond.P PC,$tempreg
MEND
MACRO ;clear some PSR bits
$lab clrpsr $bits,$tempreg,$cond
$lab MVN$cond $tempreg,#$bits
TST$cond.P $tempreg,PC
MEND
MACRO ;toggle some PSR bits
$lab togpsr $bits,$tempreg,$cond
$lab MOV$cond $tempreg,#$bits
TEQ$cond.P $tempreg,PC
MEND
MACRO
$lab retfiq $cc
$lab SUB$cc.S PC, LR, #4
MEND
MACRO
nop
MOVNV R0,R0
MEND
;do an operation with 16 bit width const as an 8 bit width if possible
MACRO
......@@ -126,10 +81,14 @@ $lab * 1 :SHL: ($bitnum)
;
MACRO
$label RevBytes $arm, $t1,$t2
[ NoARMv6
$label MVN $t1,#&FF00 ;a3=&FFFF00FF
EOR $t2,$arm,$arm,ROR #16
AND $t2,$t1,$t2,LSR #8
EOR $arm,$t2,$arm,ROR #8
|
$label REV $arm,$arm
]
MEND
;------------------------------------------------------------------------------
......@@ -138,11 +97,7 @@ $label MVN $t1,#&FF00 ;a3=&FFFF00FF
;
MACRO
$label DoSCSIOp
[ FloppySupport
$label BL SCSIOp_HandlingAtn
|
$label SWI XSCSI_Op
]
MEND
;
......@@ -210,12 +165,7 @@ $label SWI XSCSI_Op
]
Pull "LR"
15
[ No32bitCode
TEQP PC, R0 ;restore PSR
nop ;delay in case mode change
|
MSR CPSR_cf, R0
]
RestPSR R0,,cf
Pull "R0,R1,LR"
21
]
......
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
;>Fixes Modification history of SCSIFS since V 1.03
MACRO
applyfix $number,$state,$description
GBLL fix_$number
fix_$number SETL $state
[ fix_$number
! 0,"Apply fix $number $description"
]
MEND
; ----------------------------------------------------------
;
; Version 1.03
; released dated 20 Oct 1989
;
; ----------------------------------------------------------
applyfix 1,{TRUE}, Support devices that return 'Optical memory'
applyfix 2,{TRUE}, Replace ORR/BIC with EOR for remapping
applyfix 3,{TRUE}, Ignore 'Recovered error' messages
applyfix 10,{TRUE}, Support for floppies
applyfix 11,{TRUE}, Do not let SCSIDriver source padding data
LNK ScsiFs00.s
......@@ -34,13 +34,11 @@
GET Hdr:SCSI
GET Hdr:SCSIErr
GET Hdr:OSRSI6
GET Hdr:Portable
GET VersionASM
GBLL test_version
test_version SETL {FALSE}
GBLA max_fix
max_fix SETA 11
LNK Fixes.s
LNK ScsiFs00.s
......@@ -16,20 +16,8 @@
TTL "Declarations and workspace allocation"
GBLL OpticalMemorySupport
OpticalMemorySupport SETL fix_1
GBLL IgnoreRecoveredError
IgnoreRecoveredError SETL fix_3
GBLL UseSpecialScatterBlk
UseSpecialScatterBlk SETL fix_11
GBLL FloppySupport
FloppySupport SETL fix_10
GBLL MediaLocking
MediaLocking SETL {TRUE}
UseSpecialScatterBlk SETL {TRUE}
GBLL DoBuffering
DoBuffering SETL {FALSE} ;Read-ahead/write-behind not supported
......@@ -46,18 +34,13 @@ XferLenMax64K SETL {TRUE}
GBLL RetryIfBusy
RetryIfBusy SETL {TRUE}
GBLL BigDisc
BigDisc SETL {TRUE}
GBLL AutoDetect
AutoDetect SETL {TRUE}
GBLL HotPlug
HotPlug SETL AutoDetect :LAND: {TRUE}
GBLL AllowPartitions
AllowPartitions SETL {TRUE}
[ :LNOT: :DEF: PartitionManager
GBLL PartitionManager
PartitionManager SETL {FALSE}
]
GBLL Ejecting
Ejecting SETL {FALSE}
......@@ -72,6 +55,7 @@ international_help SETL {TRUE} ; Default to RISC OS 3.60+ international
GBLL Dev
Dev SETL test_version
;Debug message switches
[ Dev
GBLL Debug
......@@ -149,13 +133,8 @@ EscapeBit bit 6 ;escape if this bit set in ESC_Status
K * 1024
M * K*K
[ BigDisc
BigBit * CreateFlag_BigDiscSupport
NewErrorBit * CreateFlag_NewErrorSupport
|
BigBit * 0
NewErrorBit * 0
]
[ Ejecting
EjectBit * CreateFlag_FloppyEjects
......@@ -188,6 +167,8 @@ OpMask * 2_1111 ;ops 0-15
DiscBits * 2_111 :SHL: (32-3) ;In all disc addresses
MaxDriveNo * 8 ; FileCore drive numbers 0-7
; CMOS allocation
^ ScsiFsCMOS
......@@ -198,14 +179,15 @@ CMOSflags # 1
; b7 unused
FileCMOS # 1 ;number of additional file cache buffers
DirCMOS # 1 ;dir cache size
[ :LNOT: BigDisc
MapSizeCMOS # 4 ;map sizes of discs in units of 256 bytes
]
# 4 ;spare (was used for map sizes, pre-BigDisc)
Service_SCSIAttached * &20102
Service_SCSIDetached * &20103
[ AllowPartitions
Service_SCSIMounting * &20104
]
[ PartitionManager
XPartMan_MorePartitions * &79AC0
]
AREA |!!!SCSIFSModule|, CODE, READONLY, PIC
......@@ -327,12 +309,14 @@ LostUnitAtn bit 0
ASSERT MiscOp_PollChanged_EmptyWorks_Flag = bit6
ASSERT MiscOp_PollChanged_ChangedWorks_Flag = bit7
DevNo # 3
DevNo # 3 ; SCSI device ID
;HeadPosition # 4
;PositionUnknown * bit31
DrvSequenceNum # 4
SzDrvRec # 0
; $rdr = drive record ptr
; $rd = SCSI device ID
MACRO
$lab STDevNo $rd,$rdr,$rtemp,$c
ASSERT $rtemp<>$rdr
......@@ -344,6 +328,7 @@ $lab LDRB$c $rtemp,[$rdr,#DrvFlags]
;point Rptr to start of drive record Rindex, must preserve flags
; $Rindex = FileCore drive number
MACRO
$lab DrvRecPtr $Rptr,$Rindex,$cond
......@@ -376,21 +361,14 @@ ParkDiscAdd # 4
^ 0, SB
SCSIFSWorkBase # 0
Padding # 4 ;>>>RCM stop 'sbaddr R7, BlockSizes-4' in ScsiFs15 from failing
BlockSizes a4 4 ;log to base two of block size for device or 0 if not
;mounted yet
[ :LNOT: BigDisc
MapSizes a4 4
]
BlockSizes a4 MaxDriveNo ;log2 of block size for device or 0 if not mounted yet
FileCorePrivate a4 4
WinnieCallAfter a4 4
[ BigDisc
FCFeatures a4 4
FC_Big * bit0
FC_NewErrors * bit1
]
[ AllowPartitions
PartitionBaseAdd a4 4*8
PartitionBaseAdd a4 4*MaxDriveNo
]
[ UseSpecialScatterBlk
ScatterFlag a4 4 ;Are we converting a save to use scatterblk ?
......@@ -401,20 +379,20 @@ WriteScatBlk a4 6*4 ;Here is the scatter special block
MsgFileOpen a4 4
MsgFileBlock a4 4*4
[ HotPlug
AttCBCount # 1
DetCBCount # 1
Dieing # 1
[ AllowPartitions
allowdupID # 1 ; next time through the loop will use same scsi id
|
myalign # 1
]
;Low level workspace
Winnies # 1
[ FloppySupport:LOR:AutoDetect
Floppies # 1
# 2
DrvRecs # SzDrvRec*8
]
DrvRecs # SzDrvRec*MaxDriveNo
[ UseSpecialScatterBlk
; Block of 0's used for padding writes in special scatter blocks
......@@ -460,7 +438,12 @@ CTL_BACKGROUND EQU &01 :SHL: 29
;
CTL_cnvt EQU 21 ;Shift (left) factor
[ AutoDetect
; mapDrvToDevLo:
; In:
; $rs = FileCore drive number
; $rdr = Drive record ptr (optional)
; Out:
; $rd = SCSI device ID
MACRO
$lab mapDrvToDevLo $rd, $rs, $rdr
[ "$rdr" = ""
......@@ -474,6 +457,11 @@ $lab mapDrvToDevLo $rd, $rs, $rdr
MOV $rd, $rd, ASR #8
MEND
; mapDevToDrvLo:
; In:
; $rs = SCSI device ID
; Out:
; $rd = FileCore drive number, or MaxDriveNo if not found
MACRO
$lab mapDevToDrvLo $rd, $rs
ASSERT $rd = R1
......@@ -481,30 +469,6 @@ $lab mapDevToDrvLo $rd, $rs
$lab BIC R1, R1, #&FF000000
BL MapDevToDrv
MEND
|
MACRO
$lab mapDrvToDevLo $rd, $rs
[ fix_2
$lab EOR $rd, $rs, #4
|
$lab BIC $rd, $rs, #4 ;map drives 4 to 7 to devices 0 to 3
]
MEND
MACRO
$lab mapDevToDrvLo $rd, $rs
[ fix_2
$lab EOR $rd, $rs, #4
|
$lab ORR $rd, $rs, #4 ;map drives 4 to 7 to devices 0 to 3
]
MEND
MACRO
$lab mapDrvToDevImm $rd, $im
$lab MOV $rd, $im :EOR: 4
MEND
]
LNK ScsiFs05.s
......@@ -41,15 +41,11 @@ PHEX
BNE PHEXIT1 ; return if IRQ thread
]
MOV R3, LR
; Switch to SVC mode, preserving flags (+ disabling IRQs?)
[ No32bitCode
ASSERT SVC_mode=3
ORR R0, LR, #SVC_mode
TEQP PC, R0 ; go to SVC mode preserving flags
nop
SetMode SVC_mode, R0
|
MRS R0, CPSR
ORR R0, R0, #SVC26_mode :OR: I32_bit
MSR CPSR_c, R0
SetModeSEI SVC32_mode, R0
]
Push "LR"
[ SpoolOff
......@@ -111,9 +107,9 @@ Mess1 ;R0,R1,LR stacked
[ No32bitCode
ORR LR, LR, #SVC_mode :OR: Z_bit
TEQP PC, LR ; go to supervisor mode, preserve FI, set EQ
nop ; delay for mode change
MOV R0, R0 ; delay for mode change
|
ORR LR, LR, #Z_bit
ORR LR, R0, #Z_bit
ORR LR, LR, #SVC26_mode :OR: I32_bit
MSR CPSR_cf, LR
]
......@@ -201,12 +197,9 @@ SetVOnR0
; exit R0,V result
; R2 = full byte
; R4 = number of drives
; R5 = default drive
[ FloppySupport
; R3 = number of removable media drives (floppies)
; R4 = number of fixed media drives (winnies)
]
; R5 = default drive
ReadCMOSflags ROUT
Push "R1,LR"
MOV R0, #OsByte_ReadCMOS
......@@ -214,55 +207,17 @@ ReadCMOSflags ROUT
SWI XOS_Byte ; (R0-R2->R0-R2,V)
MOVVS R2, #2_01000001 ; default NoDir, one drive
BVS %FT95
[ FloppySupport
MOV R3, R2, LSR #6
]
AND R4, R2, #2_00000111
CMPS R4, #4
MOVHI R4, #1
AND R5, R2, #2_00111000
MOV R5, R5, LSR #3
[ FloppySupport
|
CMPS R5, R4
MOVHS R5, #0
ADD R5, R5, #4
]
95
[ HotPlug
MOV R3, #4
MOV R4, #4
]
Pull "R1,PC"
[ :LNOT: BigDisc
; ===============
; ReadMapSizeCMOS
; ===============
; exit R0,V if error, R6 map size bytes
ReadMapSizeCMOS ROUT
Push "R1-R3,LR"
MOV R0, #OsByte_ReadCMOS
MOV R3, #3*8
MOV R6, #0
10
MOV R1, #MapSizeCMOS
ADD R1, R1, R3, LSR #3
SWI XOS_Byte ; (R0-R2->R0-R2,V)
BVS %FT95
ORR R6, R6, R2, LSL R3
SUBS R3, R3, #8
BPL %BT10
[ Debug2
wrhex R6
mess ,"MAP SIZES",NL
]
95
Pull "R1-R3,PC"
]
; ============
; ReadFileCMOS
......@@ -358,11 +313,7 @@ ParseAnyDrive ROUT
; Entry: R1-> string
; Exit: R1-> first char after
[ FloppySupport
; good => R0 drive number, V=0
|
; good => R0 drive number-4, V=0
]
; bad => R0 -> error, V=1
BL SkipSpaces ; (R1->R0,R1,C)
......@@ -376,13 +327,8 @@ ParseAnyDrive ROUT
SUBHS R0, R0, #"a"-"A"
CMPS R0, #"A"
SUBHS R0, R0, #"A"-"0"
[ FloppySupport
SUBS R0, R0, #"0"
RSBCSS LR, R0, #7
|
SUBS R0, R0, #"4"
RSBCSS LR, R0, #3
]
Pull "PC",CS
10
ADRL R0, ErrorBlock_SCSIFSBadDrive
......@@ -412,7 +358,10 @@ WrDec ROUT
STRVS R0,[SP]
Pull "R0-R2,PC"
[ AutoDetect
; In:
; R1 = SCSI device ID
; Out:
; R1 = FileCore drive number, or MaxDriveNo if not found
MapDevToDrv ROUT
Push "R2,R3,LR"
MOV R2, #0
......@@ -420,7 +369,7 @@ MapDevToDrv ROUT
mapDrvToDevLo R3, R2
TEQ R3, R1
ADDNE R2, R2, #1
TEQNE R2, #8
TEQNE R2, #MaxDriveNo
BNE %BT01
MOV R1, R2
Pull "R2,R3,PC"
......@@ -460,12 +409,20 @@ ScanLoop
TEQ R8, LR
BNE ScanNext
[ HotPlug
[ AllowPartitions
LDRB R8, allowdupID
TEQ R8, #0
MOVNE R8, #0
STRNEB R8,allowdupID
BNE BypassCheck ; partitions reuse same scsi drive
]
MOV R8, R1 ; check we've not already
BL MapDevToDrv ; spotted this drive
TEQ R1, #8
TEQ R1, #MaxDriveNo
MOV R1, R8
BNE ScanNext
[ AllowPartitions
BypassCheck
]
; I don't use SCSI_Initialise 2 as it will report errors from
......@@ -495,52 +452,39 @@ ScanCheck
mess ,"Type",NL
]
TEQ LR, #DevDirectAccess
[ OpticalMemorySupport
TEQNE LR, #DevOpticalMemory
]
BNE ScanNext
[ FloppySupport
LDRB LR, [SP, #1]
TST LR, #&80 ; Removable bit
BNE AddRemovable
]
AddFixed
[ Debug7
wrhex R6
mess ,"Adding fixed",NL
]
[ HotPlug
MOV R0, #4
BL MapInDevice
ADDNE R6, R6, #1
|
CMP R6, R4
BHS ScanNext
ADD LR, R6, #4
DrvRecPtr R0, LR
STDevNo R1,R0, LR
ADD R6, R6, #1
]
[ FloppySupport
B ScanNext
AddRemovable
[ Debug7
wrhex R5
mess ,"Adding removable",NL
]
[ HotPlug
MOV R0, #0
BL MapInDevice
ADDNE R5, R5, #1
|
CMP R5, R3
BHS ScanNext
DrvRecPtr R0, R5
STDevNo R1,R0, LR
ADD R5, R5, #1
]
]
ScanNext
[ PartitionManager
Push "R2"
MOV R2, #1
SWI XPartMan_MorePartitions
TEQ R2, #0 ; SWI returns 0 if more partitions to mount
MOVEQ r2, #1
STREQB R2, allowdupID
Pull "R2" ; SWI returns 1 if no more, or error if swi not there
BEQ ScanLoop
]
ADD R1, R1, #&20 ; move to next LUN
TST R1, #&100
BEQ ScanLoop
......@@ -576,11 +520,6 @@ CDB_Inquiry
DCB 36
DCB 0
ALIGN
] ; AutoDetect
[ HotPlug
[ {TRUE}
; check if this drive is 'disabled'. A drive is 'disabled' if its
......@@ -684,9 +623,6 @@ CDANotAllowed
ChoicesHide
DCB "Choices:SCSIFS.Hide",0
ALIGN
]
......@@ -821,29 +757,14 @@ DoDetachedCallback
10 AND LR,R1,R2
TEQ LR,R0 ; if the device number fits the mask
BNE %FT80
MOV R3,#7 ; then loop over all drives
MOV R3,#MaxDriveNo-1 ; then loop over all drives
20
DrvRecPtr R5,R3
mapDrvToDevLo LR,R3,R5
TEQ LR,R1 ; if this drive maps to the device
BNE %FT70 ; unmap it
MOV LR,#-1 ; clear the device field
STDevNo LR,R5, R4
LDRB LR, [R5,#DrvFlags]
ORR LR, LR, #LostUnitAtn
STRB LR, [R5,#DrvFlags]
sbaddr R5, BlockSizes-4
MOV LR, #0 ; blank the block size
STRB LR, [R5, R3]
Push "R0,R1,R8"
MOV R0, #2 ; release it (just in case)
MOV R8, R12
SWI XSCSI_Reserve
MOV R0, #UpCall_DriveRemoved
MOV R1, R3
BL UpcallDrive ; issue an upcall
Pull "R0,R1,R8"
BL DetachDevice
70 SUBS R3,R3,#1
BPL %BT20
......@@ -859,6 +780,29 @@ DoDetachedCallback
SWI XOS_Module
Pull "R0-R5,PC"
; In:
; R1 = SCSI device ID
; R3 = FileCore drive number
; R5 -> drive record
DetachDevice
Entry "R0,R1,R4,R5,R8"
MOV LR,#-1 ; clear the device field
STDevNo LR,R5, R4
LDRB LR, [R5,#DrvFlags]
ORR LR, LR, #LostUnitAtn
STRB LR, [R5,#DrvFlags]
sbaddr R5, BlockSizes
MOV LR, #0 ; blank the block size
STRB LR, [R5, R3]
MOV R0, #2 ; release it (just in case)
MOV R8, R12
SWI XSCSI_Reserve
MOV R0, #UpCall_DriveRemoved
MOV R1, R3
BL UpcallDrive ; issue an upcall
EXIT
; In: R0 = upcall number
; R1 = drive number
UpcallDrive
......@@ -875,6 +819,5 @@ UpcallDrive
SCSIPath_Template
DCB "SCSI::n",0 ; 2 words
] ; HotPlug
LNK ScsiFs15.s
......@@ -48,13 +48,11 @@ LowLevelOp2 ;another internal entry point
mess , "LowLevelEntry/LowLevelOp - "
]
[ HotPlug
MOV LR,R2,LSR #(32-3)
DrvRecPtr LR,LR
mapDrvToDevLo LR,LR,LR
CMP LR,#-1
BEQ BadDrive
]
CMPS R4, #0 ; IF 0 length
BICEQ R7, R1, #NoTimeOut :OR: NoEscape :OR: ScatterBit :OR: AltDefectBit
......@@ -64,43 +62,19 @@ LowLevelOp2 ;another internal entry point
CMPEQS R7, #DiscOp_ReadTrk ; AND verify, read/write secs, not background
Pull "R0-R8,R9,PC",LO ; THEN nothing to do
[ :LNOT: BigDisc
[ FloppySupport
TST R2, #bit31
BEQ %FT10
]
TEQS R6, #NIL
BEQ %FT10 ; if mount
LDRB R7, [R5,#Zones] ; Here we check that the winnie map size held in
LDRB R8, [R5,#SectorSize] ; CMOS is up to date
MOV R8, R7, LSL R8
MOVS R8, R8, LSR #8
MOVEQ R8, #2
sbaddr R7, MapSizes-4 ; N.B. R2 LSR #(32-3) gives winnie drive number 4..7
LDRB LR, [R7,R2, LSR #(32-3)]
TEQS LR, R8
BLNE UpdateMapSize ; (R2,R7,R8) if not we update it
10
]
sbaddr R7, BlockSizes-4 ; if not examined drive yet
sbaddr R7, BlockSizes ; if not examined drive yet
LDRB R8, [R7,R2, LSR #(32-3)]
CMPS R8, #0 ; V=0
BLEQ Examine ; (R2,R7->R0,R8,V) then do it now
BVS LowError
[ BigDisc
LDR R7, FCFeatures
]
ANDS R5, R1, #OpMask
CMPS R5, #DiscOp_Restore+1 ; moan if bad reason code
; LDRCCB R0, Winnies
;>>> RSBCCS R0, R0, R2, LSR #29 ; or if bad drive
[ FloppySupport
;>>>what about highest floppy number?
]
BCS BadParameters
MOV R0, R2, LSR #29
......@@ -117,11 +91,9 @@ LowLevelOp2 ;another internal entry point
BHS %FT20
;convert byte disc address to block address
BIC LR, R2, #DiscBits
[ BigDisc
TST R7, #FC_Big
MOVNE R7, LR
BNE %FT20
]
MOV R7, LR, LSR R8 ; block number
TEQS LR, R7, LSL R8
BNE BadParameters
......@@ -180,10 +152,8 @@ WriteTrackCase
B DoNOP
SeekCase
[ MediaLocking
MOV R1, R0
BL UnLockMedia
]
[ SeekIsNOP
[ Debug3
mess , "Seek !!NOT SUPPORTED - NOP !!", NL
......@@ -352,11 +322,7 @@ DontNeedScatBlk
SUBS R6,R4,R5,LSL R8
SUBGT R4,R4,R6
MOVLT R6,#0
[ BigDisc
Push "R6,R8"
|
Push "R6"
]
MOV R5, #0
......@@ -371,10 +337,8 @@ DontNeedScatBlk
30
Push "R0-R4" ; Stack incase we need to retry
DoSCSIOp
[ IgnoreRecoveredError
BLVS CheckRecovered ; If error is 'Recovered error' clear
; V and pretend it never happened
]
BVC %FT35 ; OK, so ditch stacked R0-R4 and continue
BL CheckRetry
Pull "R0-R4",VC ; Retry with stacked R0-R4
......@@ -384,10 +348,8 @@ DontNeedScatBlk
ADD SP,SP,#5*4 ; Ditch stacked R0-R4 before reporting error
|
DoSCSIOp
[ IgnoreRecoveredError
BLVS CheckRecovered ; If error is 'Recovered error' clear
; V and pretend it never happened
]
LDR LR, FCFeatures
]
......@@ -398,11 +360,7 @@ DontNeedScatBlk
TST LR, #FC_NewErrors
ORREQ R0, R0, #ExternalErrorBit
MOVVC R0, #0
[ BigDisc
LDR R8, [SP], #16 ; Pull blocksize & discard stacked CBD
|
ADD SP,SP,#12 ; Discard the stacked CBD
]
LDMIB SP, {R1-R2,R6-R7}
[ UseSpecialScatterBlk
......@@ -422,13 +380,9 @@ DontNeedScatBlk
]
SUB R7, R7, R4 ; Amount Xfered
[ BigDisc
TST LR, #FC_Big
ADDNE R2, R2, R7, LSR R8 ; Inc. disc address by amount transfered
ADDEQ R2, R2, R7 ; Inc. disc address by amount transfered
|
ADD R2, R2, R7 ; Inc. disc address by amount transfered
]
STMIA SP, {R0,R1-R2,R3-R4}
[ XferLenMax64K
......@@ -479,31 +433,11 @@ BadParameters
BL SetV
B LowError
[ HotPlug
BadDrive
MOV R0, #BadDriveErr
BL SetV
B LowError
]
[ :LNOT: BigDisc
UpdateMapSize
Push "R0-R2,LR"
STRB R8, [R7,R2, LSR #(32-3)]
MOV R0, #OsByte_WriteCMOS
MOV R1, R2, LSR #(32-3)
[ Debug2
wrhex R1
wrhex R8
mess ,"oldsize drive newsize",NL
]
ADD R1, R1, #MapSizeCMOS-4
MOV R2, R8
SWI XOS_Byte ; (R0-R2->R0-R2,V)
Pull "R0-R2,PC"
]
[ IgnoreRecoveredError
;
; CheckRecovered
; ==============
......@@ -520,7 +454,6 @@ CheckRecovered
Pull "R0,R1"
CMPEQ R0,#0 ; pretend it never happened (clear V)
MOV PC,LR ; else keep the error
]
;
; CheckRetry
......@@ -568,13 +501,13 @@ WaitOneSecond
SWI XOS_ReadMonotonicTime
ADD R1,R0,#100
Wait_10
SWI XPortable_Idle
SWI XOS_ReadMonotonicTime
CMP R0,R1
BLO Wait_10
Pull "R0,R1,PC",AL
[ FloppySupport
; =============
; DoPollChanged
; =============
......@@ -742,7 +675,7 @@ SCSIOp_HandlingAtn
Pull "R9,PC",NE
LDRB R2,[SP,#0] ; R2 = SCSI device of operation
MOV R1,#7 ; loop over 8 drives
MOV R1,#MaxDriveNo-1 ; loop over 8 drives
05
mapDrvToDevLo R0,R1
TEQ R0,R2 ; were we talking to this drive's device?
......@@ -757,6 +690,5 @@ SCSIOp_HandlingAtn
Pull "R0-R4" ; restore entry registers
SWI XSCSI_Op ; retry the operation
Pull "R9,PC"
]
LNK ScsiFs20.s
......@@ -45,19 +45,11 @@ MiscEntry ROUT
B %FT90
MiscTable
Misc Mount
[ FloppySupport
Misc PollChanged
Misc LockDrive
Misc UnlockDrive
Misc PollPeriod
Misc Eject
|
B %FT95
B %FT95
B %FT95
B %FT95
B %FT95
]
B %FT95
Misc DriveStatus
90
......@@ -93,43 +85,37 @@ MiscTable
DoMount ROUT
Push "R1-R4,R6-R8,LR"
[ HotPlug
BL Misc_CheckDrivePresent
Pull "R1-R4,R6-R8,PC",VS
]
[ BigDisc
MOV R8, #0
LDR LR, FCFeatures
TST LR, #FC_Big
BEQ %FT05
; fudgery - Mount gets passed a byte address; we need to convert to the
; sector/block address that LowLevelOp expects.
sbaddr R7, BlockSizes-4 ; if not examined drive yet
sbaddr R7, BlockSizes ; if not examined drive yet
LDRB R8, [R7,R2, LSR #(32-3)]
CMPS R8, #0 ; V=0
BLEQ Examine ; (R2,R7->R0,R8,V) then do it now
Pull "R1-R4,R6-R8,PC",VS
05
]
[ AllowPartitions
Push "R0, R1,R2"
Push "R0, R1,R2,R3"
MOV R2, R2, LSR #(32-3) ; disc number requested
DrvRecPtr R1, R2
LDRB R3, [R1, #:INDEX:DevNo]
LDR R1, =Service_SCSIMounting
SWI OS_ServiceCall ; announce our intentions
Pull "R0,R1,R2"
Pull "R0,R1,R2,R3"
]
[ FloppySupport
TSTS R2, #bit31
BEQ %FT20 ; Floppy
]
;read in the boot block as requested, will probably trigger Examine
10
[ BigDisc
AND LR, R2, #DiscBits
BIC R2, R2, #DiscBits
ORR R2, LR, R2, LSR R8
]
MOV R6, #NIL ; no defect list - empty for SCSI discs anyway
MOV R1, #DiscOp_ReadSecs :OR: DiscOp_Op_IgnoreEscape_Flag
CMP R4, #0
......@@ -142,7 +128,6 @@ DoMount ROUT
Pull "R1-R4,R6-R8,PC"
[ FloppySupport
20
;Read from DefectListDiscAdd &C00, size SzDefectList &200
;
......@@ -152,12 +137,8 @@ DoMount ROUT
mess ,NL
]
AND R2, R2, #DiscBits
[ BigDisc
MOV R4, #DefectListDiscAdd
ORR R2, R2, R4, LSR R8
|
ORR R2, R2, #DefectListDiscAdd
]
MOV R3, #ScratchSpace
MOV R4, #SzDefectList
MOV R1, #DiscOp_ReadSecs :OR: DiscOp_Op_IgnoreEscape_Flag
......@@ -220,7 +201,6 @@ DoMount ROUT
LDMFD SP, {R1-R4}
B %BT10
[ HotPlug
Misc_CheckDrivePresent
Push "LR"
mapDrvToDevLo LR,R1
......@@ -229,7 +209,6 @@ Misc_CheckDrivePresent
MOV R0, #BadDriveErr
BL SetV
Pull "PC"
]
; ========
; CheckSum
......@@ -259,7 +238,6 @@ CheckSum ROUT
CMPS R2, R3 ; check sum = old check byte ?
BLNE SetV
Pull "R1,R3,PC"
]
; =======
; Examine
......@@ -268,8 +246,8 @@ CheckSum ROUT
;do any initialisation required for drive including reading block size
;entry
; R2 drive (4 to 7) in top 3 bits
; R7 -> BlockSizes-4 (see ScsiFs15)
; R2 FileCore drive number in top 3 bits
; R7 -> BlockSizes
;exit
; R0, V set if error
......@@ -319,9 +297,7 @@ Examine
]
LDRB R0,[SP,#0] ; Device type
CMP R0,#DevDirectAccess ;
[ OpticalMemorySupport
CMPNE R0,#DevOpticalMemory
]
BNE %FT96 ; Error - 'Not a winnie'
LDR R0,[SP,#12] ; Block (sector) size
......@@ -375,7 +351,6 @@ Examine
BL CopyError
B %BT95
[ FloppySupport
; ===========
; DoLockDrive
......@@ -465,8 +440,6 @@ DoEject
MOV PC, LR
]
]
; =============
; DoDriveStatus
; =============
......@@ -474,17 +447,13 @@ DoEject
;entry
; R1 drive 0..7
DoDriveStatus
CMP R1, #8
CMP R1, #MaxDriveNo
MOVHS R2, #2
MOVHS PC, LR
[ HotPlug
mapDrvToDevLo R2, R1
CMP R2, #-1
MOVEQ R2, #2
MOVNE R2, #0
|
MOV R2, #0
]
MOV PC, LR
;
......@@ -512,7 +481,7 @@ DoDismount
ADD SP, SP, #(Dismount_end - Dismount_start)
sbaddr R2, BlockSizes-4 ; Zero the BlockSize table entry, to force
sbaddr R2, BlockSizes ; Zero the BlockSize table entry, to force
MOVVC R0, #0 ; an Examine and re-initialise of the
STRVCB R0, [R2,R1] ; ScsiDriver on next ScsiFs access
mapDrvToDevLo R1, R1 ; map drive onto device
......@@ -542,7 +511,6 @@ ReserveDevice ROUT
MOV R3, R12 ; R12 } Dismount & ReleaseDevice
MOV R8, R12 ; Good value for the access key
SWI XSCSI_Reserve
[ FloppySupport
BVS %FT95
LDR R3, [SP]
......@@ -551,23 +519,12 @@ ReserveDevice ROUT
MOVEQ R2, #1 ; Floppy - Auto Request-Sense, Return Unit-Attention
MOVNE R2, #2 ; Winnie - Auto Request-Sense, Ignore Unit-Attention
SWI XSCSI_Control
[ MediaLocking
TST R3, #4
BLNE LockMedia ; Lock winnies in place
]
|
MOVVC R0, #4 ; RC for ControlErrors
MOVVC R2, #2 ; Auto Request-Sense, Ignore Unit-Attention
SWIVC XSCSI_Control
[ MediaLocking
BLVC LockMedia
]
]
95
Pull "R2,PC"
[ MediaLocking
;
; On entry
; R1 = Scsi deviceID
......@@ -604,7 +561,7 @@ UnLockMedia
SavePSR R6
ADR R2, CDB_UnLockMedia
UnLocMed_10
AND R1, R1, #&FF ; Incase any high order bits are set
mapDevToDrvLo R1, R1
sbaddr R5, BlockSizes
MOV R4, #0
STRB R4, [R5,R1]
......@@ -675,7 +632,6 @@ CDB_EjectMedia
DCB 2 ; Power=0 (b7..b4), Reserved=0 (b3..b2), Load/Eject=1 (b1),
DCB 0 ; Start=0 (b0)
ALIGN
]
]
LNK TokHelpSrc.s
......@@ -55,13 +55,13 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
BNE %BT05
]
[ HotPlug
sbaddr R0, DrvRecs
MOV R1, #(-1:SHL:8)
MOV R2, #0
STRB R2, AttCBCount
STRB R2, DetCBCount
STRB R2, Dieing
ASSERT MaxDriveNo = 8
[ AllowPartitions
STR R2, PartitionBaseAdd+0
STR R2, PartitionBaseAdd+4
......@@ -80,12 +80,11 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
STMIA R0!, {R1,R2} ; 5
STMIA R0!, {R1,R2} ; 6
STMIA R0!, {R1,R2} ; 7
]
[ FloppySupport
MOV R2, #0
STR R2, Padding ; >>>>Init floppy BlockSizes
STR R2, BlockSizes ; Block (sector size) for ScsiFs::4..7
ASSERT MaxDriveNo = 8
STR R2, BlockSizes ; >>>>Init floppy BlockSizes
STR R2, BlockSizes+4 ; Block (sector size) for ScsiFs::4..7
ASSERT DrvFlags = 0
ASSERT DevNo = 1
......@@ -98,22 +97,6 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
STMIA R0!, {R1,R2} ; 1
STMIA R0!, {R1,R2} ; 2
STMIA R0!, {R1,R2} ; 3
|
MOV R0, #0
STR R0, BlockSizes
]
[ AutoDetect:LAND:{FALSE}
sbaddr R0, DrvRecs
MOV R2, #0
10
EOR R14, R2, #4 ; original behaviour: device = drive EOR 4
STDevNo R14, R0, R3
ADD R0, R0, #SzDrvRec
ADD R2, R2, #1
CMP R2, #8
BLO %BT10
]
MOV R0, #0
STR R0, MsgFileOpen ; No it isn't
......@@ -122,27 +105,17 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
BVS %FT85
]
BL ReadCMOSflags ; (->R0,R2,R3,R4,R5,V) read #floppies & winnies
[ AutoDetect
BL ScanDrives
]
[ HotPlug
MOV R3, #4
MOV R4, #4
]
[ FloppySupport
STRB R3, Floppies
]
STRB R4, Winnies
;Assume for the moment that user wants to start up with dir set as SCSI drives
;remain attached, unlike floppies.
[ FloppySupport
ORR R3, R3, R5, LSL #16 ; Combine floppy count and default drive
|
MOV R3, R5, LSL #16
]
ORR R3, R3, R4, LSL #8 ; OR in number of drives
BL ReadDirCMOS ; (->R0,R4,V)
BL ReadFileCMOS ; (->R0,R5,V)
......@@ -153,12 +126,7 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
MOV R5,#0 ; NO background Xfers
]
[ BigDisc
MVN R6, #0
|
BL ReadMapSizeCMOS ; (->R0,R6,V)
STR R6, MapSizes ; Map sizes for ScsiFs::4..7
]
ADR R0, FSCreateBlock
ADRL R1, Module_BaseAddr
MOV R2, R11
......@@ -166,7 +134,6 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
BVS %FT85
STR R0, FileCorePrivate
STR R2, WinnieCallAfter
[ BigDisc
MOV R8, R0
MOV R0, #6
SWI XFileCore_MiscOp ; (R0,R8->R0,V)
......@@ -177,7 +144,6 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
TST R0, #Feature_NewErrors
ORRNE R7, R7, #FC_NewErrors
STR R7, FCFeatures
]
[ Debug1
mess ,"InitEntry - Out",NL
]
......@@ -198,7 +164,6 @@ DieEntry
Push "R7-R11,SB,LR"
getSB
[ HotPlug
MOV R0, #1
STRB R0, Dieing ; prevent any further callbacks
LDRB R0, AttCBCount
......@@ -208,7 +173,6 @@ DieEntry
BEQ %ft1 ; none awaited
; need to let CBs in **********
1
]
MOV R10,#0 ; Delete "FileCore%SCSI"
......@@ -218,27 +182,23 @@ DieEntry
MOVVS R9, R0
MOV R5, #0
sbaddr R7, BlockSizes-4
sbaddr R7, BlockSizes
01
[ HotPlug
MOV R0, #UpCall_DriveRemoved
MOV R1, R5
BL UpcallDrive
]
LDRB R4, [R7, R5]
TST R4, #&FF
BEQ %FT02
mapDrvToDevLo R1, R5
[ MediaLocking
BL UnLockMedia
]
MOV R0, #2 ; RC for ReleaseDevice
MOV R8, R12 ; Access key
SWI XSCSI_Reserve
02
MOVVS R9, R0
ADD R5, R5, #1 ; Next drive
CMP R5, #8
CMP R5, #MaxDriveNo
BNE %BT01 ; Loop until no more drives
85
......@@ -287,16 +247,16 @@ ServiceTable
ASSERT Service_Reset < Service_ResourceFSStarting
ASSERT Service_ResourceFSStarting < Service_SCSIAttached
ASSERT Service_SCSIAttached < Service_SCSIDetached
ASSERT Service_SCSIDetached < Service_BootChoicesVarsSet
DCD 0
DCD ServiceEntry2 - Module_BaseAddr
DCD Service_Reset
[ standalone
DCD Service_ResourceFSStarting
]
[ HotPlug
DCD Service_SCSIAttached
DCD Service_SCSIDetached
]
DCD Service_BootChoicesVarsSet
DCD 0
;>>>>>>>>>>>>
......@@ -310,40 +270,40 @@ ServiceEntry
[ standalone
CMPNE R1, #Service_ResourceFSStarting
]
[ HotPlug
Push "LR"
ASSERT Service_SCSIAttached >= 0x10000
LDRNE LR,=Service_SCSIAttached
CMPNE R1,LR
ADDNE LR,LR,#Service_SCSIDetached - Service_SCSIAttached
CMPNE R1,LR
LDRNE LR,=Service_BootChoicesVarsSet
CMPNE R1,LR
Pull "PC",NE
Pull "LR"
|
MOVNE PC, LR
]
ServiceEntry2
[ standalone
TEQ R1, #Service_ResourceFSStarting
BEQ ServiceResFS
]
[ HotPlug
Push "LR"
LDR LR, =Service_BootChoicesVarsSet
TEQ R1, LR
BEQ ServiceChoicesVarsSet
TEQ R1, #Service_Reset
Pull "LR",NE
BNE ServiceAttachDetach
]
[ Debug1
mess ,"ServiceEntry, Service_Reset",NL
]
Push "R0-R5,R8,LR"
Push "R0-R5,R8"
getSB
[ {TRUE}
;
;Reservations are lost over reset, so Re-reserve each device/drive with
; a non-zero BlockSize entry
;
MOV R5, #0
sbaddr R4, BlockSizes-4
sbaddr R4, BlockSizes
101
LDRB LR, [R4, R5]
TST LR, #&FF
......@@ -352,12 +312,8 @@ ServiceEntry2
BL ReserveDevice
102
ADD R5, R5, #1 ; Next drive
CMP R5, #8
CMP R5, #MaxDriveNo
BNE %BT101 ; Loop until no more drives
|
MOV R0, #0 ; Reservation lost over reset, force 'Examine'
STR R0, BlockSizes ; on next access
]
Pull "R0-R5,R8,PC"
......@@ -370,6 +326,27 @@ ServiceResFS
Pull "R0,PC"
]
ServiceChoicesVarsSet ROUT
Push "R0-R5" ; LR already stacked
; Check all attached devices against the Hide file
getSB
MOV R3, #MaxDriveNo-1
sbaddr R4, BlockSizes
10
LDRB LR, [R4, R3]
TEQ LR, #&FF
BEQ %FT90
DrvRecPtr R5,R3
mapDrvToDevLo R1,R3,R5
BL CheckDriveAllowed
BNE %FT90
BL DoDismount
BLVC DetachDevice
90
SUBS R3, R3, #1
BGE %BT10
Pull "R0-R5,PC"
DoSwiRetryDiscOp ROUT
Push "R8,LR"
LDR R8, FileCorePrivate
......@@ -400,7 +377,6 @@ DoSwiMiscOp ROUT
SWI XFileCore_MiscOp
Pull "R8,PC"
[ BigDisc
DoSwiSectorDiscOp ROUT
Push "R8,LR"
LDR R8, FileCorePrivate
......@@ -418,7 +394,6 @@ DoSwiFreeSpace64 ROUT
LDR R8, FileCorePrivate
SWI XFileCore_FreeSpace64
Pull "R8,PC"
]
;Retry word = (Retry word BIC R0) EOR (R1 AND R0)
;exit R1 = R1 AND R0
......@@ -475,7 +450,7 @@ DoSWIPartitions ROUT
Push "R1,R2,LR"
TEQ R0, #0 ; set partition base
BNE %ft1
CMP R1, #7
CMP R1, #MaxDriveNo-1
Pull "R1,R2,PC", HI
ADD LR, SB, R1, LSL #2 ; word offset
STR R2, [LR, #:INDEX:PartitionBaseAdd-:INDEX:SCSIFSWorkBase] ; remember
......@@ -484,7 +459,7 @@ DoSWIPartitions ROUT
TEQ R0, #1 ; report icon used
Pull "R1,R2,PC",NE
Push "R3,R4"
MOV R2, #7
MOV R2, #MaxDriveNo-1
2
DrvRecPtr R4, R2
LDRB R3, [R4, #:INDEX:DevNo]
......@@ -526,7 +501,6 @@ SwiEntry ROUT
B UnknownSwi
B DoSwiMiscOp
[ BigDisc
B DoSwiSectorDiscOp
B UnknownSwi
B UnknownSwi
......@@ -537,18 +511,6 @@ SwiEntry ROUT
B UnknownSwi
B DoSwiDiscOp64
|
B UnknownSwi
B UnknownSwi
B UnknownSwi
B UnknownSwi
B UnknownSwi
B UnknownSwi
B UnknownSwi
B UnknownSwi
]
[ AllowPartitions
B DoSWIPartitions
|
......@@ -614,12 +576,6 @@ ComTab
Command SCSIFSBuffers, 0, 0, ihflag :OR: Status_Keyword_Flag
]
Command SCSIFSDirCache, 0, 0, ihflag :OR: Status_Keyword_Flag
[ :LNOT:HotPlug
[ FloppySupport
Command SCSIFSFloppies, 0, 0, ihflag :OR: Status_Keyword_Flag
]
Command SCSIFSDiscs, 0, 0, ihflag :OR: Status_Keyword_Flag
]
Command SCSIFSDrive, 0, 0, ihflag :OR: Status_Keyword_Flag
DCB 0
ALIGN
......@@ -780,106 +736,6 @@ SCSIFSDrive_Code ROUT
MOV R1, #CMOSflags
B ConWrite
[ :LNOT:HotPlug
[ FloppySupport
; >>>>>>>>>>>>>>>>>>>
; SCSIFSFloppies_Code
; >>>>>>>>>>>>>>>>>>>
ShortConSynSCSIFSFloppies
DCB "SCSIFSFloppies <D>",0
ALIGN
SCSIFSFloppies_Code ROUT
Push "R0-R6,SB,LR"
getSB
MOVS R1, R0
BNE %FT05
; print syntax message
ADR R0, ShortConSynSCSIFSFloppies