Commit 01634dc2 authored by Ben Avison's avatar Ben Avison

Allow booting from DOS-formatted media

Detail:
  Rather than use its internal idea of the disc's boot option, FileCore now
  asks FileSwitch, which ends up asking either DOSFS or FileCore for the
  boot option, as appropriate for the format in use.
Admin:
  Tested on a beagleboard.

Version 3.51. Tagged as 'FileCore-3_51'
parent a6f1b1d7
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.50"
Module_Version SETA 350
Module_MajorVersion SETS "3.51"
Module_Version SETA 351
Module_MinorVersion SETS ""
Module_Date SETS "14 Apr 2012"
Module_ApplicationDate SETS "14-Apr-12"
Module_Date SETS "13 May 2012"
Module_ApplicationDate SETS "13-May-12"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.50"
Module_HelpVersion SETS "3.50 (14 Apr 2012)"
Module_FullVersion SETS "3.51"
Module_HelpVersion SETS "3.51 (13 May 2012)"
END
/* (3.50)
/* (3.51)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.50
#define Module_MajorVersion_CMHG 3.51
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Apr 2012
#define Module_Date_CMHG 13 May 2012
#define Module_MajorVersion "3.50"
#define Module_Version 350
#define Module_MajorVersion "3.51"
#define Module_Version 351
#define Module_MinorVersion ""
#define Module_Date "14 Apr 2012"
#define Module_Date "13 May 2012"
#define Module_ApplicationDate "14-Apr-12"
#define Module_ApplicationDate "13-May-12"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.50"
#define Module_HelpVersion "3.50 (14 Apr 2012)"
#define Module_LibraryVersionInfo "3:50"
#define Module_FullVersion "3.51"
#define Module_HelpVersion "3.51 (13 May 2012)"
#define Module_LibraryVersionInfo "3:51"
......@@ -644,24 +644,46 @@ DoOsFunRename ROUT
Pull "R1-R11,PC"
GBLL ReadBootOptFromFileSwitch
ReadBootOptFromFileSwitch SETL {TRUE}
[ ReadBootOptFromFileSwitch
dollar = "$", 0 ; we can only boot from the current drive on the current filing system, so there's no point constructing a more elaborate path
ALIGN
]
DoOsFunBootup ROUT
Push "R1-R7"
[ ReadBootOptFromFileSwitch
BL FileCoreExit ; not peeking internal FileCore workspace any more, so no need for interlock
]
MOV R7,#0
85
SWI XOS_ReadEscapeState
BCS %FT90
[ ReadBootOptFromFileSwitch
MOV R0, #FSControl_ReadBootOption
ADR R1, dollar
SWI XOS_FSControl
BVS %FT96
ANDS R0, R2, #3
|
BL IdentifyCurrentDisc
BVS %FT96
BL DiscAddToRec ;(R3->LR)
LDRB R0, [LR,#DiscRecord_BootOpt]
ANDS R0, R0, #3
BLEQ FileCoreExit ;if boot option 0 just return
]
Pull "R1-R7,SB,PC",EQ
baddr R1, (LoadText-16)
ASSERT RunText-LoadText=16*(2-1)
ASSERT ExecText-LoadText=16*(3-1)
ADD R0, R1, R0, LSL #4
[ :LNOT: ReadBootOptFromFileSwitch
BL FileCoreExit
]
SWI XOS_CLI
Pull "R1-R7,SB,PC"
......@@ -672,7 +694,9 @@ DoOsFunBootup ROUT
95
BL FindErrBlock ; (R0->R0,V)
[ :LNOT: ReadBootOptFromFileSwitch
BL FileCoreExit
]
Pull "R1-R7,SB,PC"
96
......@@ -694,7 +718,9 @@ DoOsFunBootup ROUT
MOVEQ R7,#1
ADREQL R0,RetryText
BLEQ message_gswrite0
[ :LNOT: ReadBootOptFromFileSwitch
BLVS FileCoreExit
]
Pull "R1-R7,SB,PC",VS
; Trigger callbacks otherwise the USB/SCSI system won't accept any new devices
SWI XOS_LeaveOS
......
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