Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
RiscOS
S
Sources
F
FileSys
ImageFS
DOSFS
Commits
40493414
Commit
40493414
authored
Nov 02, 2014
by
Robert Sprowson
Browse files
Used Service_Serviced instead of 0, use FileType_MSDOSDisc instead of FC8
Not tagged.
parent
e06e5d22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
c/DOSFS
c/DOSFS
+11
-13
No files found.
c/DOSFS
View file @
40493414
...
...
@@ -28,9 +28,11 @@
#include "AsmUtils/rminfo.h"
#include "Global/CMOS.h"
#include "Global/OsBytes.h"
#include "Global/FileTypes.h"
#include "Global/Keyboard.h"
#include "Interface/HighFSI.h"
#include "Global/Variables.h"
#include "Global/Services.h"
#include "Interface/HighFSI.h"
#undef DOSFS_DiscFormat
#undef DOSFS_LayoutStructure
...
...
@@ -49,10 +51,6 @@
#include "Statics.h"
#include "DOSFShdr.h"
/*-------------------------------------------------------------------------*/
#define imagetype (0xFC8)
/* as allocated by Acorn : "DOSDisc" */
/*-------------------------------------------------------------------------*/
/* global (static) variables used within the module */
...
...
@@ -105,7 +103,7 @@ static _kernel_oserror *declare_FS(void *privateword)
/* register our module as an image filing system */
/* "OS_FSControl" reason 35 */
infoblock
[
0
]
=
(
word
)
0x00000000
;
/* bit27 is only significant flag */
infoblock
[
1
]
=
(
word
)
imagetype
;
infoblock
[
1
]
=
(
word
)
FileType_MSDOSDisc
;
infoblock
[
2
]
=
((
word
)
DOSFS_Open
-
(
word
)
Image_RO_Base
)
;
infoblock
[
3
]
=
((
word
)
DOSFS_GetBytes
-
(
word
)
Image_RO_Base
)
;
infoblock
[
4
]
=
((
word
)
DOSFS_PutBytes
-
(
word
)
Image_RO_Base
)
;
...
...
@@ -699,9 +697,9 @@ static void validatedosformat(ADFS_drecord *dr,_kernel_swi_regs *rset)
#endif
/* Claim the service and fill in the disc record. */
rset
->
r
[
1
]
=
0x00
;
/*
Service_Serviced
(claimed) */
rset
->
r
[
1
]
=
Service_Serviced
;
put_discID
(
dr
,
discID
);
/* Still pointed to by R5 */
rset
->
r
[
2
]
=
imagetype
;
/* filetype to be associated with the disc image */
rset
->
r
[
2
]
=
FileType_MSDOSDisc
;
/* filetype to be associated with the disc image */
rset
->
r
[
6
]
=
urset
.
r
[
6
]
;
/* sector cache handle returned from "FileCore_DiscOp{64}" */
return
;
}
...
...
@@ -910,7 +908,7 @@ void fs_service(int service_number,_kernel_swi_regs *rset,void *privateword)
if
(
rset
->
r
[
2
]
==
Image_RO_Base
)
{
dprintf
((
""
,
"DOSFS: Service_Memory (0x11): matched
\n
"
))
;
rset
->
r
[
1
]
=
0x00000000
;
/* claim this service */
rset
->
r
[
1
]
=
Service_Serviced
;
/* claim this service */
}
break
;
...
...
@@ -965,7 +963,7 @@ void fs_service(int service_number,_kernel_swi_regs *rset,void *privateword)
if
((
rerror
=
_kernel_swi
(
OS_GBPB
,
&
reglist
,
&
reglist
))
!=
NULL
)
{
rset
->
r
[
0
]
=
(
word
)
rerror
;
/* pointer to error block */
rset
->
r
[
1
]
=
0x00
;
/*
Service_
Claim
ed
*/
rset
->
r
[
1
]
=
Service_
Servic
ed
;
break
;
/* out of for loop */
}
}
...
...
@@ -1111,7 +1109,7 @@ void fs_service(int service_number,_kernel_swi_regs *rset,void *privateword)
{
dprintf
((
""
,
"DOSFS: Service_IdentifyFormat: %s
\n
"
,
DOS_formats
[
loop
].
idtext
))
;
rset
->
r
[
1
]
=
0x00
;
/*
Service_Serviced
(claimed) */
rset
->
r
[
1
]
=
Service_Serviced
;
rset
->
r
[
2
]
=
DOSFS_DiscFormat
;
/* our format SWI */
rset
->
r
[
3
]
=
loop
;
/* "DOS_formats" table index */
rset
->
r
[
4
]
=
DOSFS_LayoutStructure
;
/* our layout SWI */
...
...
@@ -1160,7 +1158,7 @@ void fs_service(int service_number,_kernel_swi_regs *rset,void *privateword)
if
(
rerror
!=
NULL
)
{
rset
->
r
[
0
]
=
(
word
)
rerror
;
/* pointer to standard error block */
rset
->
r
[
1
]
=
0x00
;
/*
Service_Serviced
*/
rset
->
r
[
1
]
=
Service_Serviced
;
return
;
}
}
...
...
@@ -1614,7 +1612,7 @@ _kernel_oserror *shutdown_fs(int fatal, int podule, void *pw)
/* Deregister our image type (ignoring errors) */
rset
.
r
[
0
]
=
FSControl_DeRegisterImageFS
;
rset
.
r
[
1
]
=
(
word
)
imagetype
;
/* image type we provide support for */
rset
.
r
[
1
]
=
FileType_MSDOSDisc
;
/* image type we provide support for */
(
void
)
_kernel_swi
(
OS_FSControl
,
&
rset
,
&
rset
)
;
/* Close messages file, remove from ResourceFS if RAM loaded */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment