Commit ff4a4d5b authored by Ben Avison's avatar Ben Avison
Browse files

Support for FileCore API relaxations

Detail:
  * Previously, SCSIFS always set the "No directory state" startup option
    bit in FileCore_Create, even though from the PRM's description of the
    *Configure Dir/NoDir options, it should have been setting it according
    to the shared bit in CMOS byte &0B. However, since RISC OS 3.00, FileCore
    has not done anything with this information, so I'm retiring the bit.
  * No longer passes hard disc map sizes in R6 to FileCore_Create. This means
    it no longer reads them from CMOS, and nor does it update the CMOS when
    discs are mounted. This is safe because FileCore hasn't actually used
    these values since RISC OS 4.00. For consistency with ADFS (which stopped
    using its equivalent CMOS at RISC OS 5.00) the code is switched out via
    the BigDisc switch. This means we can free up a whole 4 bytes of CMOS!
Admin:
  Tested briefly via a softload on an OMAP3 machine.

Version 1.25. Tagged as 'SCSIFS-1_25'
parent 63e4ebc0
| Copyright 2012 Castle Technology 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.
|
Dir <Obey$Dir>
amu_machine gpa_debug THROWBACK=-throwback
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.24"
Module_Version SETA 124
Module_MajorVersion SETS "1.25"
Module_Version SETA 125
Module_MinorVersion SETS ""
Module_Date SETS "19 Mar 2012"
Module_ApplicationDate SETS "19-Mar-12"
Module_Date SETS "21 Mar 2012"
Module_ApplicationDate SETS "21-Mar-12"
Module_ComponentName SETS "SCSIFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
Module_FullVersion SETS "1.24"
Module_HelpVersion SETS "1.24 (19 Mar 2012)"
Module_FullVersion SETS "1.25"
Module_HelpVersion SETS "1.25 (21 Mar 2012)"
END
/* (1.24)
/* (1.25)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.24
#define Module_MajorVersion_CMHG 1.25
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Mar 2012
#define Module_Date_CMHG 21 Mar 2012
#define Module_MajorVersion "1.24"
#define Module_Version 124
#define Module_MajorVersion "1.25"
#define Module_Version 125
#define Module_MinorVersion ""
#define Module_Date "19 Mar 2012"
#define Module_Date "21 Mar 2012"
#define Module_ApplicationDate "19-Mar-12"
#define Module_ApplicationDate "21-Mar-12"
#define Module_ComponentName "SCSIFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
#define Module_FullVersion "1.24"
#define Module_HelpVersion "1.24 (19 Mar 2012)"
#define Module_LibraryVersionInfo "1:24"
#define Module_FullVersion "1.25"
#define Module_HelpVersion "1.25 (21 Mar 2012)"
#define Module_LibraryVersionInfo "1:25"
......@@ -232,7 +232,9 @@ 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
]
Service_SCSIAttached * &20102
Service_SCSIDetached * &20103
......@@ -248,6 +250,8 @@ Upcall_DriveRemoved * 25
org
ENTRY
;Module Header
ASSERT {PC}-org=0
& 0 ;no start entry
......@@ -557,7 +561,9 @@ 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
]
FileCorePrivate a4 4
WinnieCallAfter a4 4
[ BigDisc
......
......@@ -266,6 +266,7 @@ ReadCMOSflags ROUT
]
Pull "R1,PC"
[ :LNOT: BigDisc
; ===============
; ReadMapSizeCMOS
; ===============
......@@ -291,6 +292,7 @@ ReadMapSizeCMOS ROUT
]
95
Pull "R1-R3,PC"
]
; ============
......
......@@ -64,6 +64,7 @@ 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
......@@ -82,6 +83,7 @@ LowLevelOp2 ;another internal entry point
BLNE UpdateMapSize ;(R2,R7,R8) if not we update it
10
]
sbaddr R7, BlockSizes-4 ;if not examined drive yet
LDRB R8, [R7,R2, LSR #(32-3)]
......@@ -482,6 +484,7 @@ BadDrive
B LowError
]
[ :LNOT: BigDisc
UpdateMapSize
Push "R0-R2,LR"
STRB R8, [R7,R2, LSR #(32-3)]
......@@ -496,6 +499,7 @@ UpdateMapSize
MOV R2, R8
SWI XOS_Byte ;(R0-R2->R0-R2,V)
Pull "R0-R2,PC"
]
[ IgnoreRecoveredError
;
......
......@@ -127,12 +127,6 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
|
MOV R3, R5, LSL #16
]
ORR R3,R3,#DriveConfig_StartupOpt_NoDir ;>>>RCM see what happens
[ LeftToDo
! 0, "Left to do - think about Dir/NoDir bit"
; Should we Set it, Clear it or read it from CMOS???
; for now, set it (above)
]
ORR R3, R3, R4, LSL #8 ;OR in number of drives
BL ReadDirCMOS ;(->R0,R4,V)
BL ReadFileCMOS ;(->R0,R5,V)
......@@ -143,8 +137,12 @@ 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
]
baddr R0, FSCreateBlock
baddr R1, org
MOV R2, R11
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment