Commits (4)
  • John Ballance's avatar
    Altered interaction with PartMan. PartMan now tells SCSIFS when it can attempt... · da6e6c3a
    John Ballance authored
    Altered interaction with PartMan. PartMan now tells SCSIFS when it can attempt to mount a newly connected disc.
    
    Detail:
      In order to be certain that the partition table has been fully analysed
      before SCSIFS attempts to mount a newly connected disc, if Partman is
      detected, SCSIFS waits for a service call from PartMan before it attempts
      to mount any partitions on the disc. If PartMan interaction is not compiled,
      in, or PartMan is not detected, SCSIFS behaviour is unaltered.
    Admin:
     tested on iMx6
    
    Version 1.33. Tagged as 'SCSIFS-1_33'
    da6e6c3a
  • John Ballance's avatar
    Extended SCSIFS_Partitions SWI reason 1 to be fully aware of partitions · 17022331
    John Ballance authored
    Detail:
      Reason 1 did not check whether the given partition offset matched, so did not
      differentiate between different partitions on a disc
    Admin:
      tested on iMx6
    
    Version 1.34. Tagged as 'SCSIFS-1_34'
    17022331
  • John Ballance's avatar
    Added method to find SCSI ID and partition offset from icon number · 4283a9df
    John Ballance authored
    Detail:
       SCSIFS_Partitions reason code 1 already provides the icon number
       for a given SCSI ID and partition offset. Reason code 2 provides
       the inverse function to this.
    Admin:
      tested on iMx6
    
    
    Version 1.35. Tagged as 'SCSIFS-1_35'
    4283a9df
  • Robert Sprowson's avatar
    [464] Restore documented enumeration SWI behaviour · 92870ae9
    Robert Sprowson authored
    SCSI_Partitions 1 was changed in SCSIFS 1.34 to tie new significance to R2, which was previously undefined. Thus any clients of this subreason failed in various amusing ways (the ticket references SystemDisc and Fat32Formatte, and inspection of HForm suggests this would have altered behaviour because BASIC zeros unused registers).
    
    Since the only client of this extension is the SCSI specific PartMan, and the module already has a variety of assembly time switches in order to complete the other half of the dialogue to work out which partition is which, just make the significant R2 depend on that switch too. Therefore the previously documented SWI behaviour is restored otherwise.
    
    Also, tidy the docs up, and paste those tidied docs into the relevant place in the sources.
    
    Version 1.36. Tagged as 'SCSIFS-1_36'
    92870ae9
......@@ -5,20 +5,29 @@ SWI SCSIFS_Partitions &40995
On entry
R0 = reason code
others depend on reason
Reason code: 0:Set Sector offset for drive N
R0 = 0
Reason code 0 = Set Sector offset for drive N
R1 = Drive number (0..7)
R2 = Sector offset to base of image
This offset is zero by default. It may be changed by this SWI
at any time, but changing this value after mounting the disc
is usually not wise!
Reason code: 1:Enquire SCSIFS disc number
R0 = 1
returns
Reason code 1 = Enquire SCSIFS disc number
R1 = Drive number (0..7)
[ PartitionManager
R2 = Sector offset to base of image
]
returns
R2 = SCSIFS disc icon (0..7), or -1 if none
Reason code 2 = Enquire Drive number and offset
R1 = SCSIFS disc number (0..7)
returns
R1 = Drive number (0..7)
R2 = Sector offset to base of image
New SCSIFS Service Call
......
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.1.
;
GBLS Module_MajorVersion
GBLA Module_Version
......@@ -10,14 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.32"
Module_Version SETA 132
Module_MajorVersion SETS "1.36"
Module_Version SETA 136
Module_MinorVersion SETS ""
Module_Date SETS "09 Sep 2017"
Module_ApplicationDate SETS "09-Sep-17"
Module_Date SETS "19 Aug 2020"
Module_ApplicationDate SETS "19-Aug-20"
Module_ComponentName SETS "SCSIFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
Module_FullVersion SETS "1.32"
Module_HelpVersion SETS "1.32 (09 Sep 2017)"
Module_FullVersion SETS "1.36"
Module_HelpVersion SETS "1.36 (19 Aug 2020)"
END
/* (1.32)
/* (1.36)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.32
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Sep 2017
#define Module_MajorVersion_CMHG 1.36
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Aug 2020
#define Module_MajorVersion "1.32"
#define Module_Version 132
#define Module_MajorVersion "1.36"
#define Module_Version 136
#define Module_MinorVersion ""
#define Module_Date "09 Sep 2017"
#define Module_Date "19 Aug 2020"
#define Module_ApplicationDate "09-Sep-17"
#define Module_ApplicationDate "19-Aug-20"
#define Module_ComponentName "SCSIFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
#define Module_FullVersion "1.32"
#define Module_HelpVersion "1.32 (09 Sep 2017)"
#define Module_LibraryVersionInfo "1:32"
#define Module_FullVersion "1.36"
#define Module_HelpVersion "1.36 (19 Aug 2020)"
#define Module_LibraryVersionInfo "1:36"
......@@ -37,8 +37,8 @@
GET Hdr:Portable
GET VersionASM
[ :LNOT::DEF: test_version
GBLL test_version
test_version SETL {FALSE}
]
LNK ScsiFs00.s
......@@ -188,6 +188,7 @@ Service_SCSIMounting * &20104
]
[ PartitionManager
XPartMan_MorePartitions * &79AC0
Service_MorePartitions * &59AC0
]
AREA |!!!SCSIFSModule|, CODE, READONLY, PIC
......
......@@ -651,6 +651,16 @@ MapInDevice
BNE %BT10
Pull "R0,R1,R3,R5,PC" ; Exit (with EQ)
[ PartitionManager
; In: R0 = device number
; R2 = device number mask
ServiceMorePartitions
getSB
Push "R0-R3,LR"
B DA1
]
ServiceAttachDetach
getSB
ASSERT Service_SCSIAttached:AND:1 = 0
......@@ -669,15 +679,23 @@ AttachedCBDataSz # 0
; R2 = device number mask
; Note the parameters (in an allocated block) to deal with on a callback
DoAttached ROUT
Push "R0-R2,LR"
Push "R0-R3,LR"
[ PartitionManager
MOV R1, #-1
; swi returns VS if not there
SWI XPartMan_MorePartitions
; if there then scan will be triggered by partition manager
Pull "R0-R3,PC",VC
]
DA1
LDRB R0, Dieing
TEQ R0, #0
Pull "R0-R2,PC",NE
Pull "R0-R3,PC",NE
MOV R0, #ModHandReason_Claim
MOV R3, #AttachedCBDataSz
SWI XOS_Module
Pull "R0-R2,PC",VS
Pull "R0-R3,PC",VS
LDR R0, [SP, #0]
LDR LR, [SP, #8]
STR R0, [R2, #ACBD_DevID]
......@@ -691,7 +709,7 @@ DoAttached ROUT
ADR R0, DoAttachedCallback
MOV R1, R2
SWI XOS_AddCallBack
Pull "R0-R2,PC"
Pull "R0-R3,PC"
DoAttachedCallback ROUT
Push "R0,R2,R3,R4,LR"
......@@ -705,7 +723,6 @@ DoAttachedCallback ROUT
MOV R3,#4
MOV R4,#4
BL ScanDrives2
MOV R0,#ModHandReason_Free
1
Pull "R2"
LDRB R0, AttCBCount
......
......@@ -257,6 +257,9 @@ ServiceTable
DCD Service_SCSIAttached
DCD Service_SCSIDetached
DCD Service_BootChoicesVarsSet
[ PartitionManager
DCD Service_MorePartitions
]
DCD 0
;>>>>>>>>>>>>
......@@ -278,6 +281,10 @@ ServiceEntry
CMPNE R1,LR
LDRNE LR,=Service_BootChoicesVarsSet
CMPNE R1,LR
[ PartitionManager
LDRNE LR,=Service_MorePartitions
CMPNE R1,LR
]
Pull "PC",NE
Pull "LR"
......@@ -290,6 +297,12 @@ ServiceEntry2
LDR LR, =Service_BootChoicesVarsSet
TEQ R1, LR
BEQ ServiceChoicesVarsSet
[ PartitionManager
LDR LR, =Service_MorePartitions
TEQ R1, LR
Pull "LR",EQ
BEQ ServiceMorePartitions
]
TEQ R1, #Service_Reset
Pull "LR",NE
BNE ServiceAttachDetach
......@@ -432,46 +445,79 @@ DoSwiTestReady
CLRV
Pull "R1,R2,PC"
[ AllowPartitions
[ AllowPartitions
; On entry
; R0 = reason code
; Reason code: 0 = Sector offset for drive 1 in R1 is in R2
; R1 = Drive number (0..7)
; R2 = sector offset to base of image
; This offset is zero by default. It may be changed by this swi
; at any time, but changing this value after mounting the disc
; is usually not wise!
;
; Reason code: 1 = report SCSIFS disc number
; returns
; R2 = SCSIFS disc icon (0..7), or -1 if none
; others depend on reason
;
DoSWIPartitions ROUT
Push "R1,R2,LR"
TEQ R0, #0 ; set partition base
TEQ R0, #0
BNE %ft1
; Reason code 0 = Set Sector offset for drive N
; R1 = Drive number (0..7)
; R2 = Sector offset to base of image
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
Pull "R1,R2,PC"
1
TEQ R0, #1 ; report icon used
Pull "R1,R2,PC",NE
Push "R3,R4"
TEQ R0, #1
BNE %FT6
; Reason code 1 = report SCSIFS disc number
; R1 = Drive number (0..7)
[ PartitionManager
; R2 = Sector offset to base of image
]
; returns
; R2 = SCSIFS disc icon (0..7), or -1 if none
Push "R3,R4,R5"
MOV R2, #MaxDriveNo-1
[ PartitionManager
LDR R5, [SP, #4*4] ; retrieve R2 off stack
]
2
DrvRecPtr R4, R2
LDRB R3, [R4, #:INDEX:DevNo]
TEQ R3, R1
BEQ %ft3
[ PartitionManager
BNE %ft4
ADD LR, SB, R2, LSL #2 ; word offset
LDR LR, [LR, #:INDEX:PartitionBaseAdd-:INDEX:SCSIFSWorkBase] ;
TEQ LR, R5 ; same start sector too?
]
BEQ %ft5
4
SUBS R2,R2,#1
BGE %bt2
3
Pull "R3,R4"
5
Pull "R3,R4,R5"
STR R2,[R13, #4] ; update R2 return value
Pull "R1,R2,PC"
]
6
TEQ R0, #2
Pull "R1,R2,PC",NE
; Reason code 2 = Enquire Drive number and offset
; R1 = SCSIFS disc number (0..7)
; returns
; R1 = Drive number (0..7)
; R2 = Sector offset to base of image
Push "R3,R4,R5"
DrvRecPtr R4, R1
ADD LR, SB, R1, LSL #2 ; word offset
LDRB R1, [R4, #:INDEX:DevNo]
LDR R2, [LR, #:INDEX:PartitionBaseAdd-:INDEX:SCSIFSWorkBase] ;
Pull "R3,R4,R5"
ADD sp, sp, #4*2 ; forget stored r1 and r2
Pull "PC"
]
; >>>>>>>>
; SwiEntry
......