Source
...
Target
Commits (14)
  • Jeffrey Lee's avatar
    Combat slow USB devices on boot by making OS_FSControl 15 auto-retry when... · d386afa3
    Jeffrey Lee authored
    Combat slow USB devices on boot by making OS_FSControl 15 auto-retry when SCSIFS "drive empty" errors are generated
    
    Detail:
      s/FileCore60 - DoOsFunBootup now detects when a SCSIFS "drive empty" error is returned by IdentifyCurrentDisc. Instead of returning with an error, the boot operation will instead be retried, to give slow/unlucky USB devices a chance to finish initialising. Escape can be used to cancel the retry loop, just in case.
      Resources/UK/Messages - Added new 'RetryBoot' message which is shown when the retry loop starts
    Admin:
      Tested on rev A2 BB-xM. Machine now boots correctly in situations where the required USB device hasn't initialised by the time OS_FSControl 15 is called.
      New message token (RetryBoot) needs translating.
    
    
    Version 3.37. Tagged as 'FileCore-3_37'
    d386afa3
  • Steve Revill's avatar
    Fixed some code which could have unpredictable behaviour on 26 bit ARMs. · 90136a90
    Steve Revill authored
    Version 3.38. Tagged as 'FileCore-3_38'
    90136a90
  • Jeffrey Lee's avatar
    Update to work with zero page relocation · 82f55aab
    Jeffrey Lee authored
    Detail:
      s/FileCore, s/FileCore00, s/InitDieSvc - Try using OS_ReadSysInfo 6 to get IRQsema & CannotReset locations before falling back on legacy values. Store results in module workspace.
      s/FileCore05 - Commented out unused CheckEscape routine to avoid having to update it
      s/FileCore15 - Debugging code updated to use OS_ReadSysInfo 6 to fetch IRQsema ptr. Can't always rely on workspace version since workspace might not be set up yet.
      s/FileCore25, s/FileCore30, s/FileCore80 - Use IRQsema & CannotReset pointers from workspace
    Admin:
      Tested on rev A2 BB-xM
    
    
    Version 3.39. Tagged as 'FileCore-3_39'
    82f55aab
  • Ben Avison's avatar
    Fix for alignment exception on ARMv7 · 3bd0b704
    Ben Avison authored
    Detail:
      The Density field in the disc record is a byte at a non-word-aligned address
      but it was being loaded here with an LDR instruction. There is actually a
      pre-existing bug here, since the code at lines 904-905 would only have been
      executed on earlier CPUs if SectorSize, SecsPerTrk and Heads were all zero
      too. This would correspond to an implausibly small hard disc, so arguably
      this part of the branch should perhaps be removed altogether?
    Admin:
      Untested at ROOL.
      Submission from Willi Theiß [comments above are my own - BA]
    
    Version 3.40. Tagged as 'FileCore-3_40'
    3bd0b704
  • Robert Sprowson's avatar
    Delete s.AsmHdr, s.DevVersion, Version, s.ModHand · d752b027
    Robert Sprowson authored
    Delete Doc.!ReadMe, update Doc.!Implement
    Collapse dead switches.
    s.MyMacros:
     Remove 'nop' macro, use NOP.
    s.Defns:
     Some definitions taken from global headers.
    s.Commands:
     Indentation and function calling parameter comments reviewed.
    
    Still produces the same binary as 3.40.
    d752b027
  • Robert Sprowson's avatar
    Fix *DEFECT crashing when an object occupies the defect disc address. · ad94a5c8
    Robert Sprowson authored
    R5 was being reused as the loop exit instead of R9.
    Synced code with *CHECKMAP a bit since they have the same heritage.
    Untangle the spaghetti around TermCommon and UnTermCommon.
    In the module init, skip a store when the flags don't change.
    Tested with a RAM disc filled with autogenerated nested directories and a loop blindly trying to defect everything - works fine now. Ticket #114.
    
    Version 3.41. Tagged as 'FileCore-3_41'
    ad94a5c8
  • Robert Sprowson's avatar
    Make debug versions assemble again. · 55198f01
    Robert Sprowson authored
    Entry macro renamed as SemEntry to avoid conflict with Hdr:Proc.
    Other macro bit rot fixed up.
    Tidy up switches.
    DebugFx switch is the only one that doesn't work.
    Non debug binary same as 3.41.
    
    Version 3.42. Tagged as 'FileCore-3_42'
    55198f01
  • Robert Sprowson's avatar
    Suspicious PC fiddling exorcised. · 2acecd72
    Robert Sprowson authored
    R8 was being used to remember the C bit, by copying from the PC. Swapped to use RRX instead.
    
    Version 3.43. Tagged as 'FileCore-3_43'
    2acecd72
  • Robert Sprowson's avatar
    Fix bug in DetermineDiscType. · 44133774
    Robert Sprowson authored
    When failed to identify, and the last operation was format, the DiscSize2 field was not being copied (instead DiscSize is copied twice).
    Fix up some warnings from the assembler.
    Tested briefly with a RAM disc, still works.
    
    Version 3.44. Tagged as 'FileCore-3_44'
    44133774
  • Robert Sprowson's avatar
    Try again with more accurate keyboard use. · 99a68099
    Robert Sprowson authored
    Retagged as FileCore-3_44.
    99a68099
  • Robert Sprowson's avatar
    Revise exports in "hdr.FileCore". · 9ae2d7ca
    Robert Sprowson authored
    Now, for each SWI call there is a definition of any pertinent structures it asks for and definitions of any bitfields within those flags. This avoids the need for clients to endlessly redefine these locally (in practice it looks like sections of FileCore were simply copy and pasted into clients RAMFS/SCSIFS/ADFS). Delete private definitions.
    This binary was carefully checked to be identical since so many locations were changed.
    Then, the following additional changes:
    * InitDieSvc line 74, the floppy config is extracted using a mask and shift rather than reaching up the stack
    * Identify lin 1254, the superfluous instruction marked as such deleted
    * FileCore15 line 762 recoded the check for background op to not need the bit number defined any more
    * FileCore00 moved the label 'anull' to be word aligned guaranteed
    The duff pointer marker ('nowt' = &40000000) is no longer used to mark territory translation tables as invalid as that address is now quite reasonable. -1 is used ...
    9ae2d7ca
  • Robert Sprowson's avatar
    Teach FileCore_LayoutStructure and Service_IdentifyDisc how to do 1 zone fixed discs. · d52791ba
    Robert Sprowson authored
    From the change logs it was last fixed sometime around FileCore 2.50 era, but has been long broken.
    The boot block was in the right place, but was overwritten by the root directory, and the wrong size entry was claimed in the map, amongst other errors.
    Free'd up R6 in LayoutFreeSpaceMap to avoid having to keep reevaluating the number of zones - makes it a bit more readable. Corrected inaccurate comments. Checked the code paths for new map with and without boot block, with and without long filenames.
    Test app 'Make1Zone' generates a small disc image which can be inspected in a hex editor for correctness.
    In the identify code, be more strict about looking for a boot block only on fixed discs since they cannot occur on floppies (saves time, wasn't necessarily wrong).
    The concept of a boot block at &C00 only works when 2 copies of the map can be fitted underneath that address, for future 2k and 4k sector sizes these do not fit and it is likely that 1 zone fixed discs are forbidden (a drive with 4k sectors would typically be > 512GB and 1 zone would be ~32MB so spilling into a second zone would waste < 0.01%).
    Other minor changes:
    * Free command now groups the 'K' with 'bytes' to match OS_ConvertFileSize.
    * FileCore20 debug didn't assemble.
    * FileCore33 beefed up comments.
    * GenSWIs debug didn't assemble.
    Tested with a special cut of RAMFS manually loading various 1 zone images into its dynamic area and checking they mount, have a sensible *MAP and *FREE result, can be written to, and don't have broken directories.
    
    Version 3.46. Tagged as 'FileCore-3_46'
    d52791ba
  • Robert Sprowson's avatar
    Fold in old fixes. · a4d790ff
    Robert Sprowson authored
    From 1989, probably safe to keep them. Binary unchanged.
    
    Version 3.47. Tagged as 'FileCore-3_47'
    a4d790ff
  • Robert Sprowson's avatar
    Fix abort on unaligned LDR of DiscRecord_ZoneSpare. · 49fa5460
    Robert Sprowson authored
    Looks like a typo because there's a valid ASSERT above, and an LSR#16 below.
    
    Version 3.48. Tagged as 'FileCore-3_48'
    49fa5460
......@@ -13,18 +13,13 @@ This document has the following sections:
1) contents of source files
---------------------------
FileCore GETs all the source files
Version Version, date, and highest fix number to be applied
Fixes documents and sets switches for fixes since image became stable
AsmHdr more switches
DevVersion declares development version number for test versions, incremented
with each assembly and GETs system header files
BigDirCode Handling big directories
Commands Handling *commands
DebugOpts Declares T and F and sets the debugging options
MyMacros Macros not in Hdr:Macros
CoreHdr Exported FileCore values
Defns Definitions of constants
FileCore00 Start of module, allocates workspace, and GETs Errors
Errors declares error numbers and builds error table
FileCore GETs all the source files
FileCore00 Start of module, allocates workspace, and GETs Errors
FileCore05 useful subroutines
FileCore15 interfaces to low level disc op at various abstraction levels
FileCore20 routines maintaining disc <-> drive mapping
......@@ -36,11 +31,18 @@ FileCore33 new map primitives
FileCore35 old free space map operations
FileCore40 filename and directory operations
FileCore45 OSFILE and map/directory writing to disc
TekneHelp Tokenised help from HelpText
FileCore50 module interfaces and * commands
FileCore60 OSFUN
FileCore70 open files
FileCore80 new open file write behind/read ahead/caching
Fixes documents and sets switches for fixes since image became stable
FormSrvcs Image filing system services
FormSWIs Image filing system SWIs
GenSWIs SWI decod
Identify Identify
InitDieSvc Module init and finalisation and service calls
MsgsStuff MessageTrans glue
MyMacros Macros not in Hdr:Macros
TokHelpSrc Tokenised help generated from HelpText
2) use of workspace
-------------------
......
>!ReadMe
The exec file to produce a Filecore 2.00 as used in RISC OS 2.00 is Make_2,00.
The object produced is called Obj.
Version specific filenames are of the following type.
[Make/Hdr/Obj]_[v,vv/Test]
Make_v,vv is the make file which produces Obj
Hdr_v,vv sets the options for the assembly
Obj_v,vv is an copy of the object that should be produced. A binary comparison
of Obj with this file is done except for test versions.
v,vv is the version number or Test for a test version
;>HelpText
[ Module_Version < 209
HelpBack
= "*"
= TokenEscapeChar,Token0
= " swaps current and previous directories.",13
SynBack
= "Syntax: "
= "*"
= TokenEscapeChar,Token0
= 0
]
[ International_Help=0
HelpBackup
= "*"
......@@ -187,59 +175,6 @@ HelpVerify DCB "HFLCVER", 0
SynVerify DCB "SFLCVER", 0
]
[ Module_Version < 209
HelpNoDir
= "*"
= TokenEscapeChar,Token0
= " unsets the current directory.",13
SynNoDir
= "Syntax: "
= "*"
= TokenEscapeChar,Token0
= 0
HelpNoLib
= "*"
= TokenEscapeChar,Token0
= " unsets the library.",13
SynNoLib
= "Syntax: "
= "*"
= TokenEscapeChar,Token0
= 0
HelpNoURD
= "*"
= TokenEscapeChar,Token0
= " unsets the URD.",13
SynNoURD
= "Syntax: "
= "*"
= TokenEscapeChar,Token0
= 0
HelpTitle
= "*"
= TokenEscapeChar,Token0
= " sets the title of the current directory.",13
SynTitle
= "Syntax: "
= "*"
= TokenEscapeChar,Token0
= " [<text>]"
= 0
HelpURD
= "*"
= TokenEscapeChar,Token0
= " sets the user root directory.",13
SynURD
= "Syntax: "
= "*"
= TokenEscapeChar,Token0
= " [<directory>]"
= 0
]
ALIGN
ALIGN
END
......@@ -24,8 +24,8 @@ DC1:| hat einen Defekt an Position %0.|M|J
AreYouSure:Sind Sie sicher (J/N)?
FC0:Bytes frei &%0 = %1|M|J
FC1:Bytes benutzt &%0 = %1|M|J
FCK0:Bytes frei &%0 = %1K bytes|M|J
FCK1:Bytes benutzt &%0 = %1K bytes|M|J
FCK0:Bytes frei &%0 = %1 Kbytes|M|J
FCK1:Bytes benutzt &%0 = %1 Kbytes|M|J
MC0:( Start, Länge) altes Organisationsformat, alte Verzeichnisse|M|J
MC1:( Start, Länge) altes Organisationsformat, neue Verzeichnisse|M|J
MC2:( Start, Länge) neues Organisationsformat, alte Verzeichnisse|M|J
......
......@@ -28,8 +28,8 @@ DC1:| has defect at offset %0|M|J
AreYouSure:Are you sure (Y/N) ?
FC0:Bytes free &%0 = %1|M|J
FC1:Bytes used &%0 = %1|M|J
FCK0:Bytes free &%0 = %1K bytes|M|J
FCK1:Bytes used &%0 = %1K bytes|M|J
FCK0:Bytes free &%0 = %1 Kbytes|M|J
FCK1:Bytes used &%0 = %1 Kbytes|M|J
MC0:( start, length) old map, old directories|M|J
MC1:( start, length) old map, new directories|M|J
MC2:( start, length) new map, old directories|M|J
......@@ -95,3 +95,4 @@ FSLocked:The disc is write protected
FileTooBig:File too big
DirBuffer:%0 Dir Buffer
MapArea:%0 Map (Drive %1)
RetryBoot:|M|JWaiting for boot drive to be ready; press Escape to cancel.|M|J
File added
;>Version Version file for FileCore
GBLL test_version
test_version SETL {FALSE}
;test_version SETL {TRUE}
GBLA max_fix
max_fix SETA 5
END
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.36"
Module_Version SETA 336
Module_MajorVersion SETS "3.48"
Module_Version SETA 348
Module_MinorVersion SETS ""
Module_Date SETS "14 Nov 2009"
Module_ApplicationDate SETS "14-Nov-09"
Module_Date SETS "07 Jan 2012"
Module_ApplicationDate SETS "07-Jan-12"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.36"
Module_HelpVersion SETS "3.36 (14 Nov 2009)"
Module_FullVersion SETS "3.48"
Module_HelpVersion SETS "3.48 (07 Jan 2012)"
END
/* (3.36)
/* (3.48)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.36
#define Module_MajorVersion_CMHG 3.48
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Nov 2009
#define Module_Date_CMHG 07 Jan 2012
#define Module_MajorVersion "3.36"
#define Module_Version 336
#define Module_MajorVersion "3.48"
#define Module_Version 348
#define Module_MinorVersion ""
#define Module_Date "14 Nov 2009"
#define Module_Date "07 Jan 2012"
#define Module_ApplicationDate "14-Nov-09"
#define Module_ApplicationDate "07-Jan-12"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.36"
#define Module_HelpVersion "3.36 (14 Nov 2009)"
#define Module_LibraryVersionInfo "3:36"
#define Module_FullVersion "3.48"
#define Module_HelpVersion "3.48 (07 Jan 2012)"
#define Module_LibraryVersionInfo "3:48"
......@@ -48,97 +48,202 @@ SWIClass SETS FileCoreSWI_Name
AddSWI DiscFormat
AddSWI LayoutStructure
AddSWI MiscOp
AddSWI SectorDiscOp
AddSWI FreeSpace64
AddSWI SectorDiscOp
AddSWI FreeSpace64
AddSWI DiscOp64
AddSWI Features
;Layout of create FileCore incarnation descriptor block
^ 0
Create_Flags # 3
WinnieNeedsFiq * 1 :SHL: 0
FloppyNeedsFiq * 1 :SHL: 1
BackGroundTransfer * 1 :SHL: 2 ; background transfer supported (seems to be deprecated but now defined to avoid embarassment)
NoBigBuf * 1 :SHL: 3 ;set by RAM filing system, small data move buffer size
WinnieMounts * 1 :SHL: 4 ;Winnies mount like floppies
WinniePollChanges * 1 :SHL: 5 ; Winnies support poll change calls and lock calls
FloppyEjects * 1 :SHL: 6 ; Floppies support MiscOp_Eject
WinnieEjects * 1 :SHL: 7 ; Winnies support MiscOp_Eject
DriveStatusWorks * 1 :SHL: 8 ; Drive status supported
BigDiscSupport * 1 :SHL: 9
NewErrorSupport * 1 :SHL: 10
Create_Id # 1
Create_Title # 4
Create_BootText # 4
Create_LowLevel # 4
Create_Misc # 4
Create_Size # 0
; reason codes for DiscOp call
Param4Op * 0
VerifyOp * 0
ReadSecsOp * 1
WriteSecsOp * 2
Param3Op * 3
ReadTrkOp * 3
WriteTrkOp * 4
Param2Op * 5
FirstHeadMoveOp * 5
SeekOp * 5
Param1Op * 6
RestoreOp * 6
StepInOp * 7 ;floppy only
StepOutOp * 8 ;floppy only
CachedReadSecsOp * 9
SpecifyOp * 15 ;winnie only
; reason codes for misc call
^ 0
Misc_Mount # 1
Misc_PollChanged # 1
Misc_LockDrive # 1
Misc_UnlockDrive # 1
Misc_PollPeriod # 1
Misc_Eject # 1
Misc_ReadInfo # 1
Misc_DriveStatus # 1 ; for checking status of a drive
Misc_Unused # 0
; Poll changed status
Drv_NotChanged * 1 :SHL: 0
Drv_MaybeChanged * 1 :SHL: 1
Drv_Changed * 1 :SHL: 2
Drv_Empty * 1 :SHL: 3
Drv_Ready * 1 :SHL: 4
Drv_40Track * 1 :SHL: 5
Drv_EmptyWorks * 1 :SHL: 6
Drv_ChangedWorks * 1 :SHL: 7
Drv_HiDensity * 1 :SHL: 8
Drv_DensityWorks * 1 :SHL: 9
Drv_ReadyWorks * 1 :SHL: 10
NoDirBit * 1 :SHL: 6 ; If set *configure NoDir
; DiscFormat and LayoutStructure parameters
Format_L * 0
Format_D * 1
Format_E * 2
Format_F * 3
Format_G * 4
Format_Floppy * 1 :SHL: 7
; drive status bits
DriveReserved * 1 :SHL: 0
; features bits
Feature_NewErrors * 1 :SHL: 0
;
; FileCore_Create layout of incarnation descriptor block
^ 0
Create_Flags # 3
CreateFlag_FixedDiscNeedsFIQ * 1:SHL:0
CreateFlag_FloppyNeedsFIQ * 1:SHL:1
CreateFlag_Reserved * 1:SHL:2 ; Was background transfer supported in RO2
CreateFlag_NoBigBuf * 1:SHL:3 ; Use scratch space for small data moves
CreateFlag_FixedDiscsMountLikeFloppy * 1:SHL:4 ; And fill the geometry in the disc record
CreateFlag_FixedDiscPollChangeSupport * 1:SHL:5 ; Support poll change calls and lock calls
CreateFlag_FloppyEjects * 1:SHL:6 ; Floppies support MiscOp_Eject
CreateFlag_FixedDiscEjects * 1:SHL:7 ; Fixed discs support MiscOp_Eject
CreateFlag_DriveStatusWorks * 1:SHL:8 ; Drive status supported MiscOp_DriveStatus
CreateFlag_BigDiscSupport * 1:SHL:9 ; Uses sector addresses not byte addresses
CreateFlag_NewErrorSupport * 1:SHL:10 ; Errors in top bit set addresses
Create_Id # 1
Create_Title # 4
Create_BootText # 4
Create_LowLevel # 4
Create_Misc # 4
SzCreateDesc # 0
;
; FileCore_Create drive configuration register R3
DriveConfig_FloppyCount_Mask * &FF
DriveConfig_FloppyCount_Shift * 0
DriveConfig_FixedDiscCount_Mask * &FF
DriveConfig_FixedDiscCount_Shift * 8
DriveConfig_DefaultDrive_Mask * &FF
DriveConfig_DefaultDrive_Shift * 16
DriveConfig_StartupOpt_Mask * &FF
DriveConfig_StartupOpt_Shift * 24
DriveConfig_StartupOpt_NoDir * 1:SHL:30 ; Start with no directory
;
; FileCore_Create map size guesses in register R6 (unused with big discs)
MapSizeEstimate_Drive4_Mask * &FF
MapSizeEstimate_Drive4_Shift * 0
MapSizeEstimate_Drive5_Mask * &FF
MapSizeEstimate_Drive5_Shift * 8
MapSizeEstimate_Drive6_Mask * &FF
MapSizeEstimate_Drive6_Shift * 16
MapSizeEstimate_Drive7_Mask * &FF
MapSizeEstimate_Drive7_Shift * 24
;
; FileCore_DiscFormat format densities
DensityFixedDisc * 0
DensitySingle * 1
DensityDouble * 2 ; 250kbps
DensityDoublePlus * 3 ; 300kbps
DensityQuad * 4
DensityOctal * 8
;
; FileCore_DiscFormat format specifiers
Format_L * 0
Format_D * 1
Format_E * 2
Format_F * 3
Format_G * 4
Format_Floppy * 1:SHL:7
;
; FileCore_FloppyStructure flags in R2
FloppyStructure_Force_OldMap * 1:SHL:6
FloppyStructure_Force_OldDir * 1:SHL:7
;
; Defect list end markers
DefectList_End * &20000000
DefectList_BigMap_End * &40000000
;
; FileCore_Features bits
Feature_NewErrors * 1:SHL:0
;
; FileCore_DiscOp and FileCore_SectorOp legacy disc addresses
LegacyDiscAddress_DriveNumber_Mask * 2_111
LegacyDiscAddress_DriveNumber_Shift * (32 - 3)
LegacyDiscAddress_SectorOffset_Mask * &1FFFFFFF
LegacyDiscAddress_SectorOffset_Shift * 0
LegacyDiscAddress_ByteOffset_Mask * &1FFFFFFF
LegacyDiscAddress_ByteOffset_Shift * 0
;
; FileCore_DiscOp64 extended address block
^ 0
ExtendedDiscAddress_DriveNumber # 1
ExtendedDiscAddress_Reserved # 3 ; Must be zero
ExtendedDiscAddress_LowWord # 4
ExtendedDiscAddress_HighWord # 4
SzExtendedDiscAddress # 0
;
; FileCore disc record
^ 0
DiscRecord_Log2SectorSize # 1 ; log2 sector size
DiscRecord_SecsPerTrk # 1
DiscRecord_Heads # 1 ; n-1 for old adfs floppy format
DiscRecord_Density # 1 ; 0/1/2/3/4/8 fixed/single/double/double+/quad/octal
DiscRecord_IdLen # 1 ; Length in bits of id field in the map
DiscRecord_Log2bpmb # 1 ; log2 bytes for each bit in map, 0 for old format
DiscRecord_Skew # 1 ; track to track sector skew for random access
DiscRecord_BootOpt # 1 ; boot option for *OPT4
DiscRecord_LowSector # 1 ; Lowest sector number on a track and flags:
DiscRecord_LowSector_Shift * 0
DiscRecord_LowSector_Mask * &3F ; 0-5 Lowest numbered sector on a track
DiscRecord_SequenceSides_Flag * 1:SHL:6 ; 6 Tracks are numbered 0..s-1 on side 0, then s..2s-1 on side 1, etc
DiscRecord_DoubleStep_Flag * 1:SHL:7 ; 7 Double step
DiscRecord_NZones # 1 ; # zones in map
DiscRecord_ZoneSpare # 2 ; # bits in zones after 0 which are not map bits
DiscRecord_Root # 4 ; Disc address of the root directory
DiscRecord_DiscSize # 4 ; in bytes
DiscRecord_DiscId # 2 ; Cycle number
DiscRecord_DiscName # 10
SzDiscRecSig # 0
DiscRecord_DiscType # 4 ; FileType of disc: FileType_Data indicates
; that the disc is, as yet, unidentified.
; This may occur as a result of the identification
; process failing, or the identification process
; not yet happening. FileType_Data discs have no
; concept of a unique identifier so drive independance
; when accessing them is not possible.
DiscRecord_BigMap_DiscSize2 # 4 ; top 32bits of the disc size. This combines with
; DiscSize to give the full size of the disc.
DiscRecord_BigMap_ShareSize # 1 ; sharing granularity, in sectors
DiscRecord_BigMap_Log2ShareSize_Mask * &F
DiscRecord_BigMap_Log2ShareSize_Shift * 0
DiscRecord_BigMap_Flags # 1 ; flags
DiscRecord_BigMap_BigFlag * 1 ; 0 for small disc, 1 for big
DiscRecord_BigMap_NZones2 # 1 ; high byte of number of zones
DiscRecord_BigMap_Reserved # 1
DiscRecord_BigDir_DiscVersion # 4 ; version number of disc format
DiscRecord_BigDir_RootDirSize # 4 ; size of root dir
SzDiscRecSig2 # 0
DiscRecord_BigDir_Reserved # 8
SzDiscRegSigSpace # 0
ASSERT (DiscRecord_ZoneSpare :MOD: 4)=2
;
; FileCore_DiscOp reason codes
^ 0
DiscOp_Verify # 1
DiscOp_ReadSecs # 1
DiscOp_WriteSecs # 1
DiscOp_ReadTrk # 1
DiscOp_WriteTrk # 1
DiscOp_Seek # 1
DiscOp_Restore # 1
DiscOp_StepIn # 1 ; floppy only
DiscOp_StepOut # 1 ; floppy only
DiscOp_CachedReadSecs # 1
DiscOp_Reserved0 # 1
DiscOp_Reserved1 # 1
DiscOp_Reserved2 # 1
DiscOp_Reserved3 # 1
DiscOp_Reserved4 # 1
DiscOp_Specify # 1 ; fixed disc only
DiscOp_Op_Mask * &F
DiscOp_Op_AltDefectList_Flag * 1:SHL:4
DiscOp_Op_ScatterList_Flag * 1:SHL:5
DiscOp_Op_IgnoreEscape_Flag * 1:SHL:6
DiscOp_Op_IgnoreTimeout_Flag * 1:SHL:7
DiscOp_Op_Atomic_Flag * 3:SHL:6 ; ignore both escape and timeout
;
; FileCore_MiscOp reason codes
^ 0
MiscOp_Mount # 1
MiscOp_PollChanged # 1
MiscOp_PollChanged_NotChanged_Flag * 1:SHL:0
MiscOp_PollChanged_MaybeChanged_Flag * 1:SHL:1
MiscOp_PollChanged_Changed_Flag * 1:SHL:2
MiscOp_PollChanged_Empty_Flag * 1:SHL:3
MiscOp_PollChanged_Ready_Flag * 1:SHL:4
MiscOp_PollChanged_40Track_Flag * 1:SHL:5
MiscOp_PollChanged_EmptyWorks_Flag * 1:SHL:6
MiscOp_PollChanged_ChangedWorks_Flag * 1:SHL:7
MiscOp_PollChanged_HiDensity_Flag * 1:SHL:8
MiscOp_PollChanged_DensityWorks_Flag * 1:SHL:9
MiscOp_PollChanged_ReadyWorks_Flag * 1:SHL:10
MiscOp_LockDrive # 1
MiscOp_UnlockDrive # 1
MiscOp_PollPeriod # 1
MiscOp_Eject # 1
MiscOp_ReadInfo # 1
MiscOp_DriveStatus # 1 ; for checking status of a drive
MiscOp_DriveLocked_Flag * 1:SHL:0
MiscOp_FirstUnknown # 0
OPT OldOpt
END
......@@ -33,87 +33,66 @@ OldOpt SETA {OPT}
; 31-Jul-91 JSR Add flags field to enumformats block
; 16-Jan-92 JSR Add "Here's the *Format parameter" flag to enumformats
MACRO
$FName AFormat $TName
GBLS FormatName_$FName
FormatName_$FName SETS "$TName"
MEND
; Formats
;
; It is best if this list is kept in alphabetical order of
; the textual name, these being the ones we wish to keep unique.
;
DOSFS_A AFormat "A" ; Atari, 720K, DS
DOSFS_B AFormat "B" ; Atari, 360K, SS
ADFS_D AFormat "D" ; ADFS, 640K, Old map, Old dirs, floppy flavour
ADFS_E AFormat "E" ; ADFS, 800K, New map, New Dirs, floppy flavour
ADFS_F AFormat "F" ; ADFS, 1600K, New map, New Dirs, winnie flavour
ADFS_L AFormat "L" ; ADFS, 800K, Old map, New Dirs, floppy flavour
DOSFS_M AFormat "M" ; MS-DOS 3.20+, 720K, DS
DOSFS_N AFormat "N" ; MS-DOS 3.20+, 360K, SS
; An EnumFormatsBlock
;
; These blocks are generated during a Service_EnumerateFormats operation.
^ 0
EnumFormats_Link # 4
EnumFormats_MenuString # 4
EnumFormats_MenuHelp # 4
EnumFormats_DiscFormatSWI # 4
EnumFormats_DiscFormatParam # 4
EnumFormats_LayoutStructureSWI # 4
EnumFormats_LayoutStructureParam # 4
EnumFormats_Flags # 4
EnumFormats_IsNative * 1 :SHL: 0
EnumFormats_HasFormatParam * 1 :SHL: 1
EnumFormats_FormatParam # 4
SzEnumFormatsBlock # 0
^ 0
EnumFormats_Link # 4
EnumFormats_MenuString # 4
EnumFormats_MenuHelp # 4
EnumFormats_DiscFormatSWI # 4
EnumFormats_DiscFormatParam # 4
EnumFormats_LayoutStructureSWI # 4
EnumFormats_LayoutStructureParam # 4
EnumFormats_Flags # 4
EnumFormats_IsNative * 1:SHL:0
EnumFormats_HasFormatParam * 1:SHL:1
EnumFormats_FormatParam # 4
SzEnumFormatsBlock # 0
;
; This block is the format description of the hard part of a format
^ 0
FormatSectorSize # 4
FormatGap1Side0 # 4
FormatGap1Side1 # 4
FormatGap3 # 4
FormatSectorsPerTrk # 1
FormatDensity # 1
FormatOptions # 1
FormatIndexMark * 1:SHL:0
FormatDoubleStep * 1:SHL:1
FormatInterleaveSides * 0:SHL:2
FormatSide0Only * 1:SHL:2
FormatSide1Only * 2:SHL:2
FormatSequenceSides * 3:SHL:2
FormatLowSector # 1
FormatInterleave # 1
FormatSideSideSkew # 1 ; Signed
FormatTrackTrackSkew # 1 ; Signed
FormatFillValue # 1
TracksToFormat # 4
FormatReserved # 36
SzFormatBlock # 0
; This block is the format description for FS_DiscFormat
^ 0
FormatSectorSize # 4
FormatGap1Side0 # 4
FormatGap1Side1 # 4
FormatGap3 # 4
FormatSectorsPerTrk # 1
FormatDensity # 1 ; 1/2/3/4/8, see disc record defines
FormatOptions # 1
FormatOptIndexMark * 1:SHL:0
FormatOptDoubleStep * 1:SHL:1
FormatOptInterleaveSides * 0:SHL:2
FormatOptSide0Only * 1:SHL:2
FormatOptSide1Only * 2:SHL:2
FormatOptSequenceSides * 3:SHL:2
FormatOptSidesMask * 3:SHL:2
FormatLowSector # 1
FormatInterleave # 1
FormatSideSideSkew # 1 ; Signed
FormatTrackTrackSkew # 1 ; Signed
FormatFillValue # 1
FormatTracksToFormat # 4
FormatReserved # 36
SzFormatBlock # 0
ASSERT SzFormatBlock = 64
;
; This block is what's passed to _DiscOp format track
^ 0
DoFormatSectorSize # 4
DoFormatGap1 # 4
# 4 ; Reserved
DoFormatGap3 # 4
DoFormatSectorsPerTrk # 1
DoFormatDensity # 1
DoFormatOptions # 1
DoFormatFillValue # 1
DoFormatCylindersPerDrive # 4
DoFormatReserved0 # 4
DoFormatReserved1 # 4
DoFormatReserved2 # 4
DoFormatSectorList # 0
; This block is what's passed to FS_DiscOp format track
^ 0
DoFormatSectorSize # 4
DoFormatGap1 # 4
# 4 ; Reserved & must be zero
DoFormatGap3 # 4
DoFormatSectorsPerTrk # 1
DoFormatDensity # 1 ; 1/2/3/4/8, see disc record defines
DoFormatOptions # 1 ; As per FormatOptions above
DoFormatFillValue # 1
DoFormatCylindersPerDrive # 4
DoFormatReserved0 # 4
DoFormatReserved1 # 4
DoFormatReserved2 # 4
DoFormatSectorList # 0 ; List follows, one word per sector
OPT OldOpt
END
; 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.
;
;>AsmHdr
GBLA MOS_Version ;separate verion if 1.2 or earlier
MOS_Version SETA 121
END
This diff is collapsed.
This diff is collapsed.
......@@ -14,203 +14,168 @@
;
; >DebugOpts
; change log.
TTL "Debugging options"
; 15 May 1997: SBP: Added change log. Added BigMaps flag.
GBLL BigDisc ; Increased space efficiency
BigDisc SETL {TRUE}
TTL "Debugging options"
GBLL BigShare ; Look at share size in disc record
BigShare SETL {TRUE}
GBLL UseBigFlag ; Look at big flag in disc record
UseBigFlag SETL {TRUE}
GBLL T
T SETL {TRUE}
GBLL F
F SETL {FALSE}
GBLL TwoGigFix ; Clamp OS_Args at 2^31
TwoGigFix SETL {TRUE}
GBLL BigDisc
BigDisc SETL T
GBLL BigShare
BigShare SETL T
GBLL UseBigFlag
GBLL TwoGigFix
TwoGigFix SETL T
UseBigFlag SETL T
GBLL DriveStatus
GBLL ServicePolice ; Fast despatch table for service calls
ServicePolice SETL {TRUE}
GBLL ServicePolice
ServicePolice SETL T
GBLL BigMaps ; Big free space maps (allowing idlen to be more than 15)
BigMaps SETL {TRUE}
; for Big free space maps (allowing idlen to be more than 15):
GBLL BigDir ; Big directories
BigDir SETL {TRUE}
GBLL BigMaps
BigMaps SETL T
GBLL DynamicMaps ; Maps go in dynamic areas
DynamicMaps SETL {TRUE}
; for big directories
GBLL BinaryChop ; Faster search in big directories
BinaryChop SETL {TRUE}
GBLL BigDir
BigDir SETL T
GBLL WriteCacheDir ; Cached directories
WriteCacheDir SETL {FALSE}
GBLL DynamicMaps
DynamicMaps SETL T
GBLL BigDirFix ; Get the size of big directories right
BigDirFix SETL {TRUE}
GBLL BinaryChop
BinaryChop SETL T
GBLL BigDirFullBackup
BigDirFullBackup SETL {FALSE}
GBLL WriteCacheDir
WriteCacheDir SETL F
GBLL DriveStatus ; Use MiscOp_DriveStatus
DriveStatus SETL {TRUE}
; increased space efficiency
GBLL FullAtts ; Extended attributes for new format dirs
FullAtts SETL {TRUE}
GBLL BigDirFix
BigDirFix SETL T
GBLL NewErrors ; Errors can be in top bit set addresses
NewErrors SETL {TRUE}
GBLL BigDirFullBackup
BigDirFullBackup SETL F
GBLL ExtraSkew ; Extra skew in F/G format floppies to suit Tungsten better
ExtraSkew SETL {TRUE}
DriveStatus SETL T
GBLL FullAtts ;T for extended attributes for new format dirs
FullAtts SETL T
GBLL NewErrors
NewErrors SETL T
GBLL UseRMAForFCBs ; Whether RMA or System heap is used for fcbs
UseRMAForFCBs SETL {TRUE}
GBLL ExtraSkew
ExtraSkew SETL T ;T for F/G formats to suit Iyonix better
GBLL FixTBSAddrs ; Updated semantics of scatter list to allow background transfer
FixTBSAddrs SETL {TRUE} ; to/from top-bit set logical addresses
ScatterListNegThresh * &10000
GBLL Dev
Dev SETL test_version
GBLL FixTruncateOnBigDiscs
FixTruncateOnBigDiscs SETL {TRUE}
GBLL Debug
[ Dev
Debug SETL T
|
Debug SETL F
]
GBLL Dev ; Extra code to do postmortem when things go bang
Dev SETL {FALSE}
GBLL Debug ; Debugging printout
Debug SETL {FALSE} :LOR: Dev
GBLL ExceptionTrap
GBLL VduTrap
GBLL SpoolOff
GBLL IrqDebug
GBLL DebugSwitch
ExceptionTrap SETL Dev :LAND: {FALSE}
ExceptionTrap SETL Dev :LAND: {FALSE}
VduTrap SETL Dev :LAND: {FALSE}
SpoolOff SETL Dev :LAND: {TRUE}
IrqDebug SETL Dev :LAND: {TRUE}
DebugSwitch SETL Dev :LAND: {FALSE}
MACRO
$a switch $b
GBLL $a
[ Dev
[ Debug ;>>>F
$a SETL $b
|
$a SETL F
]
|
$a SETL F
]
$a SETL $b :LAND: Debug
MEND
Debug1 switch F ;communication with parent module
Debug2 switch F ;SWI call processing
Debug2D switch T ;DiscOp SWI call processing
Debug3 switch F ;disc accesses
Debug3L switch F ;low level discops into parent
Debug4 switch F ;disc and drive record operations
Debug5 switch F ;old free space map operations
Debug6 switch F ;pathname and directory operations
Debug6f switch F ; FindDiscByName
Debug7 switch F ;OsFile operations
Debug8 switch F ;File Level Disc Ops
Debug9 switch F ;Misc useful routines
DebugA switch F ;OsFun operations
DebugB switch F ;Random access files
DebugBA switch F ;OS_Args specifically
DebugBE switch F ;BPut/BGet entry
DebugBc switch F ;CloseAllByDisc
DebugBe switch F ;Ensure file size
DebugBv switch F ;Random access files verbose - details of PutBytes and GetBytes
DebugBs switch F ;Open file new map allocated size
DebugBt switch F ;Random access file I/O terse
DebugC switch F ;Directory cache
DebugD switch F ;Scatter buffer
DebugE switch F ;new free space map
DebugEa switch F ;new free space map random extension
DebugEx switch F ; verbose new free space map
DebugEs switch F ; debugging of SortDir use in NewClaimFree
DebugF switch F ;new free space map: auto compact
DebugFx switch F ;new free space map: check for this bug
DebugG switch F ;verbose file cache
DebugGu switch F ;UpdateProcess only
DebugGs switch F ; UpdateProcess scatter list ends only
DebugH switch F ;terse file cache
DebugI switch F ;terse FIQ claim/release
DebugJ switch F ;file cache consistency checks
DebugK switch F ;setting of Interlocks
DebugL switch F ; Mounting/Identifying/Dismounting/Verifying
DebugLi switch F ; Changes to DiscId information in disc records
DebugLm switch F ; matching disc agianst other records
DebugM switch F ; MultiFS extensions
DebugMt switch F ; MultiFS extensions (terse)
DebugN switch F ; Disc insertion / request for insertion thread
DebugO switch F ; MultiFS extensions - formatting SWIs
DebugP switch F ; Process activation/deactivation
DebugQ switch F ; *-commands
DebugR switch F ; reentrance
DebugU switch F ; UpCall
Debugb switch F ; break key action updates
DebugDR switch F ; check array bounds on drive and disc record ptr calculation
DebugDL switch F ; check for data lost problems with atapi
DebugX switch F ; debug long filenames
DebugXg switch F ; debug long filenames - growin dirs
DebugXm switch F ; debug long filenames - memory problems
DebugXb switch F ; debug long filenames - binary chop dir search
DebugXr switch F ; debug long filenames - rename
DebugXd switch F ; debug long filenames - directory names
DebugCW switch F ; debug write cacheing of dirs
GBLL ExceptionTrap
GBLL VduTrap
[ Dev
[ Debug
ExceptionTrap SETL F
|
ExceptionTrap SETL F
]
VduTrap SETL F ;RCM>>> was T
GBLL SpoolOff
SpoolOff SETL F ;T <=> disable spooling for debug messages
GBLL IrqDebug
IrqDebug SETL F
GBLL DebugSwitch
DebugSwitch SETL F
|
ExceptionTrap SETL F
VduTrap SETL F
]
GBLS GetAroundBleedingAAsmYetAgain
[ Debug
GetAroundBleedingAAsmYetAgain SETS " GET Hdr:Debug"
|
GetAroundBleedingAAsmYetAgain SETS "; No debug required"
]
$GetAroundBleedingAAsmYetAgain
; +++++++++++++++++++++++ For Tube work: ++++++++++++++++++++++++++++++++++++++
[ Debug
; Set to true for dubugging through the tube
Host_Debug SETL T
Debug_MaybeIRQ SETL T
]
GBLS Host_Inclusion
Host_Inclusion SETS "; No Host debug wanted"
[ Debug
[ Host_Debug
Host_Inclusion SETS " GET Hdr:HostFS"
]
]
$Host_Inclusion
Debug1 switch {FALSE} ; communication with parent module
Debug2 switch {FALSE} ; SWI call processing
Debug2D switch {FALSE} ; DiscOp SWI call processing
Debug3 switch {FALSE} ; disc accesses
Debug3L switch {FALSE} ; low level discops into parent
Debug4 switch {FALSE} ; disc and drive record operations
Debug5 switch {FALSE} ; old free space map operations
Debug6 switch {FALSE} ; pathname and directory operations
Debug6f switch {FALSE} ; FindDiscByName
Debug7 switch {FALSE} ; OsFile operations
Debug8 switch {FALSE} ; File Level Disc Ops
Debug9 switch {FALSE} ; Misc useful routines
DebugA switch {FALSE} ; OsFun operations
DebugB switch {FALSE} ; Random access files
DebugBA switch {FALSE} ; OS_Args specifically
DebugBE switch {FALSE} ; BPut/BGet entry
DebugBc switch {FALSE} ; CloseAllByDisc
DebugBe switch {FALSE} ; Ensure file size
DebugBv switch {FALSE} ; Random access files verbose - details of PutBytes and GetBytes
DebugBs switch {FALSE} ; Open file new map allocated size
DebugBt switch {FALSE} ; Random access file I/O terse
DebugC switch {FALSE} ; Directory cache
DebugD switch {FALSE} ; Scatter buffer
DebugE switch {FALSE} ; new free space map
DebugEa switch {FALSE} ; new free space map random extension
DebugEx switch {FALSE} ; verbose new free space map
DebugEs switch {FALSE} ; debugging of SortDir use in NewClaimFree
DebugF switch {FALSE} ; new free space map: auto compact
DebugFx switch {FALSE} ; new free space map: check for this bug [switch broken!]
DebugG switch {FALSE} ; verbose file cache
DebugGu switch {FALSE} ; UpdateProcess only
DebugGs switch {FALSE} ; UpdateProcess scatter list ends only
DebugH switch {FALSE} ; terse file cache
DebugI switch {FALSE} ; terse FIQ claim/release
DebugJ switch {FALSE} ; file cache consistency checks
DebugK switch {FALSE} ; setting of Interlocks
DebugL switch {TRUE} ; Mounting/Identifying/Dismounting/Verifying
DebugLi switch {FALSE} ; Changes to DiscId information in disc records
DebugLm switch {FALSE} ; matching disc agianst other records
DebugM switch {FALSE} ; MultiFS extensions
DebugMt switch {FALSE} ; MultiFS extensions (terse)
DebugN switch {FALSE} ; Disc insertion / request for insertion thread
DebugO switch {FALSE} ; MultiFS extensions - formatting SWIs
DebugP switch {FALSE} ; Process activation/deactivation
DebugQ switch {FALSE} ; *-commands
DebugR switch {FALSE} ; reentrance
DebugU switch {FALSE} ; UpCall
Debugb switch {FALSE} ; break key action updates
DebugDR switch {FALSE} ; check array bounds on drive and disc record ptr calculation
DebugDL switch {FALSE} ; check for data lost problems with atapi
DebugX switch {FALSE} ; debug long filenames
DebugXg switch {FALSE} ; debug long filenames - growin dirs
DebugXm switch {FALSE} ; debug long filenames - memory problems
DebugXb switch {FALSE} ; debug long filenames - binary chop dir search
DebugXr switch {FALSE} ; debug long filenames - rename
DebugXd switch {FALSE} ; debug long filenames - directory names
DebugCW switch {FALSE} ; debug write cacheing of dirs
GBLS NeedHdrDebug
GBLS NeedHdrProc
GBLS NeedHdrHostFS
[ Debug
NeedHdrProc SETS "GET Hdr:Proc"
NeedHdrDebug SETS "GET Hdr:Debug"
|
NeedHdrDebug SETS "; No"
NeedHdrProc SETS "; No"
]
[ :DEF: Host_Debug
Host_Debug SETL {FALSE}
Debug_MaybeIRQ SETL {FALSE}
NeedHdrHostFS SETS "GET Hdr:HostFS"
|
NeedHdrHostFS SETS "; No"
]
$NeedHdrProc
$NeedHdrDebug
$NeedHdrHostFS
END
......@@ -14,27 +14,7 @@
;
; >Defns
TTL "Definition of constants"
; change log:
; 15 May 1997: SBP: Added MaxFreeLinkBits (15)
EscapeBit bit 6 ;escape if this bit set in ESC_Status
MaxWinnies * 2
Single * 1
Double * 2
Quad * 4
Octal * 8
K * 1024
M * K*K
;Register allocation
SB RN 12
TTL "Definition of internal structures and constants"
bit0 bit 0
bit1 bit 1
......@@ -73,60 +53,28 @@ LF * 10
CR * 13
DeleteChar * 127
K * 1024
M * K*K
SzOldFs * &200
SzNewFloppyFs * &400
;Disc Operation Reason Codes
;Param4Op * VerifyOp
;VerifyOp * 0
;ReadSecsOp * 1
;WriteSecsOp * 2
;
;Param3Op * 3
;ReadTrkOp * 3
;WriteTrkOp * 4
;
;Param2Op * 5
;SeekOp * 5
;
;RestoreOp * 6
;StepInOp * 7 ;floppy only
;StepOutOp * 8 ;floppy only
;
; [ Version >= 205
;CachedReadSecsOp * 9
; ]
;
;SpecifyOp * 15 ;winnie only
ASSERT EscapeBit=&40
AltDefectBit bit 4 ;use alternative defect map, winnies only
ScatterBit bit 5
NoEscape bit 6
NoTimeOut bit 7
BackgroundBitNo * 8
BackgroundOp bit BackgroundBitNo ;internal use only
Atomic * NoEscape :OR: NoTimeOut
OpMask * 2_1111 ;ops 0-15
DiscOp_Op_BackgroundOp_Flag * 1:SHL:8 ;internal use only
DiscBits * 2_111 :SHL: (32-3) ;In all disc addresses
VerifyRetries * 5
EscapeBit bit 6 ; escape if this bit set in ESC_Status
; osbyte numbers
OsbyteAckEscape * &7E
OsbyteReadVdu * &A0
OsbyteReadResetType * &FD
OsbyteBreakAction * &F7
; osword numbers
OswordReadClock * 14
; load/exec file types
DataType * &FFFFFD00
FirstUnknown_fsfile * fsfile_ReadBlockSize+1 ;load mapped internally to this
FirstUnknown_fsargs * fsargs_ImageStampIs+1
[ BigDisc
......@@ -137,15 +85,15 @@ FirstUnknown_fsfunc * fsfunc_DirIs+1
UnsharedCreate * fsfile_CreateDir
;internal SaveCreate reason codes
; internal SaveCreate reason codes
CloseSmall * FirstUnknown_fsfile+1
CloseContig * FirstUnknown_fsfile+2
RandomAccessCreate * FirstUnknown_fsfile+3
RandomAccessExtend * FirstUnknown_fsfile+4
ASSERT RandomAccessExtend <= fsfile_Load
; Vdu workspace
[ T
; VDU workspace
[ {TRUE}
WindowWidth * &100
|
LeftColumn * 8
......@@ -162,11 +110,520 @@ ApplicStart * 32*K
; definition of size of maximum free link
MaxFreeLinkBits * 15
MaxFreeLinkBits * 15
; bad pointer indicator bits (used for list ends etc)
BadPtr * &FFFFFFFF
BadPtrBits * &00000003
;
; FileCore disc record
^ 0
DiscRecordExternal # SzDiscRecSig2 ; Per public header file
DiscFlags # 1
FloppyFlag bit 0
NeedNewIdFlag bit 1 ; Indicates that when this disc is next updated a new Id ought to be given it too
DiscNotFileCore bit 2 ; Indicates this isn't a FileCore disc (yet)
DiscNotIdentified bit 3 ; Indicates this Data disc hasn't been identified as something else yet.
AltMapFlag bit 5
OldMapFlag bit 6
OldDirFlag bit 7 ;set <=> old small dirs
ASSERT FloppyStructure_Force_OldDir = OldDirFlag
ASSERT FloppyStructure_Force_OldMap = OldMapFlag
;entries below must be valid even when disc rec is not in use
Priority # 1 ;0 DISC REC UNUSED
;1 to # floppies -> floppy priority level
;&FF good winnie
DiscsDrv # 1 ;0-7 => drive in, 8 => not in drive, OR DISC REC UNUSED
DiscUsage # 1 ;tasks using this disc, if >0 disc cant be forgotten
SzDiscRec # 0
DefDiscRecEnd * &00080000 ;default last word of disc record
; Preamble to disc rec for FORMAT
SzFormHdr * 8
^ -SzFormHdr
FormSig # 1 ;signature
FormChar # 1
HalfSide0Gap1 # 1
HalfSide1Gap1 # 1
Gap3 # 1
Skew # 1
# 2 ;unused
ASSERT @=0
SzFormDiscRec * SzDiscRec+SzFormHdr
L_Root * &200
D_Root * &400
L_Size * 640*K
D_Size * 800*K
NewMapRoot * &203 ;indirect disc add
NewFloppyRootDiscAdd * &800 ;physical disc add
; Drive Record
^ 0
DrvsDisc # 1
Uncertain bit 7 ; Contents of disc in drive uncertain - may have a disc record attached, but not certain it's the right one or that it's type is correct
Unknown bit 6 ; Contents of disc in drive not known (no attached disc record)
Empty bit 5 ; Disc definitely not in drive
Full bit 4 ; Disc definitely in drive, but no disc record attached to drive
DrvFlags # 1 ; Flags about drive
HasDefectList bit 0 ; Set if drive has a defect list
LastDiscOpWasFormat bit 1 ; Set if the last DiscOp was a format track operation
LockCount # 1 ; How many times the drive's been locked
PrevFormSectorSize # 1 ; SectorSize in previous format operation
PrevFormSecsPerTrk # 1 ; SecsPerTrk in previous format operation
PrevFormHeads # 1 ; Heads in previous format operation
PrevFormDensity # 1 ; Density in previous format operation
PrevFormLowSector # 1 ; LowSector in previous format operation
PrevFormDiscSize aw 4 ; DiscSize in previous format operation
[ BigDisc
PrevFormDiscSize2 aw 4 ; 2nd part of DiscSize in previous format operation
]
ChangedSeqNum aw 4
[ DynamicMaps
DrvsFsMapAddr aw 4 ;ptr to free space map
DrvsFsMapArea aw 4 ;dynamic area number
DrvsFsMapSize aw 4 ;size of the map
DrvsFsMapFlags aw 4 ;flags for the map
|
DrvsFsMap aw 4 ;ptr to free space maps
]
BadFs bit 31 ;set if corrupt on disc
EmptyFs bit 30 ;set if FS map buffer empty for old maps
FsMapMaxSize * 4*1024*1024
[ DynamicMaps
MemErrorFs bit 29 ;set if failed to load FSmap due to errors with dynamic areas
NewHiFsBits * BadFs :OR: EmptyFs
|
HiFsBits * BadFs :OR: EmptyFs
]
SzDrvRec # 0
; structure of dir cache obj
^ 0
CacheNext aw 4 ;->next obj, -1 marks end of cache
CachePriority aw 4 ;0 for free space, -1 marks end of cache
CacheMin # 0 ;min size for free space
; rest dont apply to free spaces
CacheRootStart # 0
CacheYounger aw 4 ;-> next youngest dir
CacheOlder aw 4 ;-> next oldest dir
CacheRootEnd # 0
CacheDir aw 4 ;disc address of dir
CacheBody # 0
; structure of a sector cache entry
^ 0
SectorCache_Next aw 4 ; Link to next cached sector, or 0
SectorCache_Address aw 4 ; disc address of this cached sector
SectorCache_Error aw 4 ; error encountered when reading this sector
SectorCache_Usage aw 4 ; Number of times this block's been used
SectorCache_HeaderSize # 0
SectorCache_Contents # 0
; DEFECT LIST
; The list consists of words containing the disc address ( in bytes ) of bad
; sectors, the end is marked by a value &200000xx, where &xx forms a check
; byte on the earlier list. The last 64 bytes describe the disc to FileCore.
; Any other bytes may be used as params for the low level drivers
DefectListDiscAdd * &400+&800
SzDefectList * &200
DefectEndMark bit 29
MaxStruc * 64
ASSERT SzDiscRec<=MaxStruc
^ 0
# SzDefectList-MaxStruc-4
ParkDiscAdd # 4
DefectStruc # MaxStruc-1
;DefectCheck
# 1
ASSERT @=SzDefectList
; OLD FS MAP
^ 0
FreeStart # 82*3 ;table of free space start sectors
EndSpaceList # 0
# 1 ;reserved
OldName0 # 5 ; RETRO DEFINITION
OldSize # 3 ;size in sectors
Check0 # 1 ;checksum on sector 0
FreeLen # 82*3 ;table of free space lengths
OldName1 # 5 ; RETRO DEFINITION
OldId # 2 ;disc id
OldBoot # 1 ;boot option
FreeEnd # 1 ;ptr to end of free space list
Check1 # 1 ;checksum on sector 1
ASSERT {VAR}=&200
; New map
ZoneDiscRecSz * 60 ;reserve additional bytes
Zone0Bits * ZoneDiscRecSz*8
ASSERT ZoneDiscRecSz >= SzDiscRec
^ 0
ZoneCheck # 1
FreeLink # 2 ;15 bit free space start link
CrossCheck # 1 ;EORing this byte for all zones should yield &FF
ZoneHead # ZoneDiscRecSz
;zones are followed in RAM by table of one byte of flags per zone
ZoneValid bit 0
ZoneCompacted bit 1
; Dir entry
^ 0
NameLen * 10
DirObName # NameLen
DirLoad # 4
DirExec # 4
DirLen # 4
DirIndDiscAdd # 3
OldDirObSeq # 1
OldDirEntrySz * {VAR}
ASSERT OldDirEntrySz=26
NewDirAtts * OldDirObSeq
ReadBit bit 0
WriteBit bit 1
IntLockedBit bit 2 ;the locked bit is held in bit 2 internally
ExtLockedBit bit 3 ;but is returned in bit 3 externally
DirBit bit 3
EBit bit 4 ;6502 ADFS E files are treated as if R
[ FullAtts ;extended attributes only for new dirs
Att4 bit 4
PublicReadBit * Att4
Att5 bit 5
PublicWriteBit * Att5
Att6 bit 6
Att7 bit 7
NewAtts * Att4 :OR: Att5 :OR: Att6 :OR: Att7
|
NewAtts * 0
]
IntDirAttMask * IntLockedBit :OR: DirBit :OR: NewAtts
IntAttMask * IntDirAttMask :OR: ReadBit :OR: WriteBit
ExtAttMask * ReadBit :OR: WriteBit :OR: ExtLockedBit :OR: NewAtts
NewDirEntrySz * {VAR}
; Directory Start
^ 0
StartMasSeq # 1
StartName # 4
DirFirstEntry # 0
; Old Directory End
^ 0
# -1
DirCheckByte # 0 ;RETRO DEFINITION was reserved
# -4
EndName # 0
# -1
EndMasSeq # 0
# -14 ;reserved
DirTitleSz * 19
# -DirTitleSz
OldDirTitle # 0
# -3
OldDirParent # 0
# -NameLen
OldDirName # 0
# -1
OldDirLastMark # 0 ;dummy last entry marker
; New Directory End
^ 0
# -1
ASSERT DirCheckByte=@
# -4
ASSERT EndName=@
# -1
ASSERT EndMasSeq=@
# -NameLen
NewDirName # 0
# -DirTitleSz
NewDirTitle # 0
# -3
NewDirParent # 0
# -1 ;reserved
# -1 ;reserved
# -1
NewDirLastMark # 0 ;dummy last entry marker
OldDirSize * &500
NewDirSize * &800
OldDirTabSz * (OldDirSize-DirFirstEntry+OldDirLastMark)
NewDirTabSz * (NewDirSize-DirFirstEntry+NewDirLastMark)
ASSERT OldDirTabSz :MOD: OldDirEntrySz = 0
ASSERT NewDirTabSz :MOD: NewDirEntrySz = 0
OldDirEntries * OldDirTabSz / OldDirEntrySz
NewDirEntries * NewDirTabSz / NewDirEntrySz
ASSERT OldDirEntries=47
ASSERT NewDirEntries=77
[ BigDir
; SBP: 28 Aug 1997: Added new directory type, known as 'big'
; Big directory header
^ 0
BigDirStartMasSeq # 1 ; master sequence number
BigDirVersion # 3 ; directory version number
BigDirStartName # 4 ; 'SBPr'
BigDirNameLen # 4 ; Length of the directory's name
BigDirSize # 4 ; Length of the directory
BigDirEntries # 4 ; Number of entries in a directory
BigDirNamesSize # 4 ; number of bytes allocated for names
BigDirParent # 4 ; indirect disc address of parent directory
BigDirName # 0 ; start of the dir name
BigDirHeaderSize # 0 ; size of the header
; Big directory entry
^ 0
[ {FALSE}
BigDirEntryName # 4 ; 'DirE'
]
BigDirLoad # 4 ; load address of object
BigDirExec # 4 ; exec address of object
BigDirLen # 4 ; length of object
BigDirIndDiscAdd # 4 ; indirect disc address of object
BigDirAtts # 4 ; attributes of object
BigDirObNameLen # 4 ; length of object name
BigDirObNamePtr # 4 ; offset into name heap for name
BigDirEntrySize # 0 ; size of entry
[ {FALSE}
; Big directory name heap entry
^ 0
BigDirHeapName # 4 ; 'Name'
BigDirHeapIndDiscAdd # 4 ; copy of indirect disc address
BigDirHeapObName # 0 ; name of file (padded with nulls to word boundary)
BigDirHeapHeaderSize # 0 ; size of the header for a name heap entry
]
; Big directory tail
^ 0
# -1
BigDirCheckByte # 0
# -2 ; reserved
# -1
BigDirEndMasSeq # 0
# -4
BigDirEndName # 0 ; 'oven'
BigDirTailSize * -@
[ Dev
! 0, "BigDirTailSize = " :CC: :STR: BigDirTailSize
]
; other useful definitions for big directories
BigDirMaxNameLen * 255 ; maximum name length is 255 chars
BigDirMinSize * &800
BigDirMaxSize * 4*1024*1024
]
BufSz RN 4
FileOff RN 5
DiscAdjust RN 6
TransferEnd RN 7
FragEnd RN 8
Fcb RN 9
BufOff RN 10
BufPtr RN 11
;FILE CACHE BUFFER
^ 0
BufFlags # 4 ;these 4 are in common with extended FCB
NextInFile # 4
PrevInFile # 4
BufFileOff # 4
BufFcb # 4
OlderBuf # 4
YoungerBuf # 4
BufPriority # 1
# 3
BufferData # 1*K ;data itself
BufScale * 5
ASSERT BufferData :SHL: BufScale = 1*K
^ 0 ;priority levels for buffers
EmptyChain # 1
MonotonicChain # 1
NormalChain # 1
AwaitsSeqChain # 1
ReadAheadChain # 1
WriteBehindChain # 1
EmptyBuf bit EmptyChain+2 ;priority level flags
UsedMonotonic bit MonotonicChain+2
NormalBuf bit NormalChain+2
AwaitsSeqRead bit AwaitsSeqChain+2
ReadAhead bit ReadAheadChain+2
WriteBehind bit WriteBehindChain+2
AllocFlags * EmptyBuf :OR: UsedMonotonic :OR: NormalBuf :OR:AwaitsSeqRead :OR: ReadAhead :OR: WriteBehind
ASSERT AllocFlags=2_11111100
; File Control Block
^ 0 ;FCB has header in common with file cache buffer
ASSERT BufFlags=@
# 4
ASSERT NextInFile=@
# 4
ASSERT PrevInFile=@
# 4
ASSERT BufFileOff=@
# 4
FcbNext aw 4 ;link to next FCB
FcbFlags # 1
FcbBufSz # 1
[ BigDir
ASSERT BigDirMaxNameLen<=255
FcbName # 258 ; make sure aligned
|
FcbName # 10
]
FcbLength aw 4 ;ASSUME LOWEST BYTE ZERO TO USE AS NAME TERMINATOR
FcbDir aw 4 ;dir containing file
FcbIndDiscAdd aw 4
FcbExtent aw 4
FcbExtHandle # 4 ;0 => Fcb kept around although file closed
NotHandle * 32*K ;1-NotHandle-1 => external handle and access<>R
;>=NotHandle => ptr to chain of external handles
LastReadEnd # 4
AccessHWM # 4
ReadAheadBufs # 1
DataLostFlag # 1
# 1
# 1
FcbSize # 0
; Flags
; b0 set <=> file has read access
; b1 set <=> file has write access
; b2 Indicates which controller
FcbFloppyBitNo * 2
FcbFloppyFlag bit FcbFloppyBitNo
; b3 set <=> dir
; b4 set <=> EXT needs ensuring
ASSERT ReadBit = bit0
ASSERT WriteBit = bit1
ASSERT DirBit = bit3
ExtFlag bit 4
Monotonic bit 5 ;set <=> all read access above HWM
SequentialBitNo * 6
Sequential bit SequentialBitNo ;set <=> reading sequentially
FcbDiscImage bit 7 ; set <=> Fcb is disc image
;object in handle chain if can be multiply open
^ 0
NextHandleBlk # 4
HandleBlkFcb # 4
ExtHandle # 4
HandleBlkSize # 0
HandleBlkBit bit 31 ;bit that marks internal handle as ptr to handle block
;Background process control block
;Both floppies and winnies have values of following
^ 0
Process # 1 ;AMENDED FROM INACTIVE BY RETRYDRIVEOP
Inactive bit 0
ASSERT ReadAhead = bit6
ASSERT WriteBehind = bit7
ProcessDirect # 1 ;0/&FF if process includes a direct transfer
ProcessDrive # 1 ;FILLED IN BY RETRYDRIVEOP
# 1
ShortProcessBlk # 0 ;when file cache not in use
ProcessEndPtr # 4
OldLength # 4
ProcessWriteBehindDrive # 1 ;Must be in same word for atomic write
ProcessWriteBehindDisc # 1
# 2 ;Not free for other use
ProcessWriteBehindLeft # 4
ProcessStartPtr # 4 ;DO NOT REORDER THESE
ProcessRamAdjust # 4
ProcessStartOff # 4
ProcessEndOff # 4
ProcessFragEnd # 4
ProcessFcb # 4
ProcessError # 4
ProcessStatus # 4
Active bit 31
CanExtend bit 30
ProcessPairs # 0
ExtraPairs * 2
END
; 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.
;
;>DevVersion
;this declares the development version number, incremented at each assembly
GBLS DevVersion
DevVersion SETS "3.0701"
END
......@@ -134,6 +134,7 @@ FD error WildCards,Wild cards
FE error BadCom,Bad command
& FileCoreModuleNum :SHL: 8 ;end of table marker
Text "FileCoreError" ;failsafe in case no match found
= "FileCoreError",0 ;failsafe in case no match found
ALIGN
END
......@@ -13,11 +13,6 @@
; limitations under the License.
;
GET VersionASM
GET Version
GET Fixes.s
GET AsmHdr.s
GET DevVersion.s
GET Hdr:ListOpts
GET Hdr:Macros
GET Hdr:System
......@@ -38,20 +33,24 @@ GetHAL SETS ""
GET Hdr:Tokens
GET Hdr:Wimp
GET Hdr:UpCall
GET Hdr:LowFSi
GET Hdr:LowFSI
GET Hdr:Heap
GET Hdr:FileCore
GET Hdr:MsgTrans
GET Hdr:FileTypes
GET Hdr:OsWords
GET Hdr:MultiFS
GET Hdr:NewErrors
GET Hdr:Territory
GET Hdr:CPU.Arch
GET Hdr:OSRSI6
GET VersionASM
GET DebugOpts.s
GET MyMacros.s
GET Defns.s
GET FileCore00.s
GET Errors.s
GET FileCore05.s
GET FileCore15.s
GET FileCore20.s
......
This diff is collapsed.