DFS ROM source code
DFS ROM source code
Does anyone have any source code for a DFS ROM? In my copious free time (hahaha) I'm thinking of writing a fresh DFS ROM for Steve Picton's TurboMMC card; in particular an SWR E00 version and a Master version that uses Hazel. I figure it would be easier to modify an existing ROM than reimplement from scratch.
(Of course I also have to reverse engineer how Steve's MMC board works 'cos it's different to the original designs and Steve appears to have lost his code).
(Of course I also have to reverse engineer how Steve's MMC board works 'cos it's different to the original designs and Steve appears to have lost his code).
Rgds
Stephen
Stephen
Re: DFS ROM source code
Code: Select all
$ bbcbasic
PDP11 BBC BASIC IV Version 0.36
(C) Copyright J.G.Harston 1989,2005-2020
>_
Re: DFS ROM source code
Hmm, thanks but they look more like disassemblies rather than real source code. Even if 245 can be run to re-assemble, there's just too much hard-coded cruft to be useful - eg "LDA &C000,Y :\ 8493= B9 00 C0 9.@"; I'd have to find every potential memory reference and determine if it's really memory or data or what...
Rgds
Stephen
Stephen
- retroclinic
- Posts: 3045
- Joined: Thu Jul 03, 2008 2:22 pm
- Location: East Riding of Yorkshire
- Contact:
Re: DFS ROM source code
This is DFS 0.98, as an assembler input file that works in Beebasm. It's the basis I used to write RamFS for DataCentre.
Mark.
Mark.
Re: DFS ROM source code
Interesting. Again a disassembly but with some nice annotations. Still has absolute memory references, however (eg absolute reference to &0E00, &1000, &1100 and so on). But this might be a starting point to convert those to configurable variables. So then I could compile one version that uses &C000 (for the master), one version for &0E00 (standard beeb) and one version for &B000 for SWR.
Hmm, I also spotted http://mdfs.net/Apps/Emulators/BBC/6502 ... S/VDFS04.S which looks interesting! (ETA: Or maybe not as useful as I originally thought...)
Thanks,
Hmm, I also spotted http://mdfs.net/Apps/Emulators/BBC/6502 ... S/VDFS04.S which looks interesting! (ETA: Or maybe not as useful as I originally thought...)
Thanks,
Rgds
Stephen
Stephen
- Rich Talbot-Watkins
- Posts: 1731
- Joined: Thu Jan 13, 2005 5:20 pm
- Location: Palma, Mallorca
- Contact:
Re: DFS ROM source code
I don't remember the exact details (maybe JGH can step in here), but I think the differences between Beeb and Master are a bit more involved than simply where workspace is claimed from, so it mightn't be trivial to create two versions.
I think different service calls are generated to claim workspace from HAZEL than to claim workspace from the bottom of main RAM. Also, on the Master, there are a number of new FSCV codes to handle things like *INFO, *EX, *RENAME etc. Also I think OS 3.20 on the Master automatically handles things like *DUMP, *TYPE etc (by calling OSBGET to read files byte by byte), so you don't need to do anything special there. On a Beeb these have to be written as regular filesystem *-commands. And also I remember something about a different version of FSCV which lives in HAZEL, but I don't remember if this is something that the OS deals with, or if it's something you have to do yourself.
I think different service calls are generated to claim workspace from HAZEL than to claim workspace from the bottom of main RAM. Also, on the Master, there are a number of new FSCV codes to handle things like *INFO, *EX, *RENAME etc. Also I think OS 3.20 on the Master automatically handles things like *DUMP, *TYPE etc (by calling OSBGET to read files byte by byte), so you don't need to do anything special there. On a Beeb these have to be written as regular filesystem *-commands. And also I remember something about a different version of FSCV which lives in HAZEL, but I don't remember if this is something that the OS deals with, or if it's something you have to do yourself.
Re: DFS ROM source code
Yes; service calls &21 and &22 (corresponding to calls &01 and &02) handle HAZEL allocation for shared and private workspace areas.Rich Talbot-Watkins wrote:I think different service calls are generated to claim workspace from HAZEL than to claim workspace from the bottom of main RAM.
*EX (A=9) and *INFO(A=10). There are a few more ROM service calls as well. I believe it's possible to code these into a generic ROM 'cos the B won't issue them or, worst case, conditional compilation logic. Page 159 of David Atherton's "Master Operating System" details the FS changes needed for a Master.Also, on the Master, there are a number of new FSCV codes to handle things like *INFO, *EX, *RENAME etc.
Rgds
Stephen
Stephen
Re: DFS ROM source code
I would strongly advise against creating seperate versions for seperate machines. If you want you code to run on both the BBC and the Master you can either use the workspace at &E00 regardless of what machine it's running on and just respond to service calls &01 and &02, or respond to &21/&22 as well as &01/&02 and use high or low workspace as appropriate. In fact, even with Master-only code you are supposed to be able to use low workspace if there is not enough high workspace. If all the high workspace is claimed, the MOS doesn't pass &21/&22 calls on to lower numbered ROMs.Yes; service calls &21 and &22 (corresponding to calls &01 and &02) handle HAZEL allocation for shared and private workspace areas.
The usual method of combining a private workspace pointer and an enabled flag into the ROM workspace byte at &DF0+rom is to use:
%00xxxxxx - low workspace at &0000-&3F00
%01xxxxxx - ROM disabled
%10xxxxxx - ROM disabled
%11xxxxxx - high workspace at &C000-&FF00
The best thing to do is implement all the FSC calls and also implement *INFO, *EX, *RENAME as stubs that just do, eg:*EX (A=9) and *INFO(A=10). There are a few more ROM service calls as well. I believe it's possible to code these into a generic ROM 'cos the B won't issue them or, worst case, conditional compilation logic.
Code: Select all
.ex:JSR F2toXY:LDA #9:JMP (FSCV)
.info:JSR F2toXY:LDA #10:JMP (FSCV)
.rename:JSR F2toXY:LDA #12:JMP (FSCV)
Code: Select all
$ bbcbasic
PDP11 BBC BASIC IV Version 0.36
(C) Copyright J.G.Harston 1989,2005-2020
>_
Re: DFS ROM source code
The "generic" TurboMMC-DFS ROM does appear to work adequately well on the Master. The problem, of course, is that it brings PAGE up to &1900 'cos it doesn't know about HAZEL. So my desire was to do a DFS version that would make use of HAZEL properly. (Which, yes, means falling back to 01/02 if there's not enough space in 21/22). I also wanted to a SWram version that would work on a B or B+ (similar to existing E00DFS versions); just need to make sure the ROM image stops at &AFFF to leave 4K for workspacejgharston wrote:I would strongly advise against creating seperate versions for seperate machines. If you want you code to run on both the BBC and the Master you can either use the workspace at &E00 regardless of what machine it's running on and just respond to service calls &01 and &02, or respond to &21/&22 as well as &01/&02 and use high or low workspace as appropriate. In fact, even with Master-only code you are supposed to be able to use low workspace if there is not enough high workspace. If all the high workspace is claimed, the MOS doesn't pass &21/&22 calls on to lower numbered ROMs.Yes; service calls &21 and &22 (corresponding to calls &01 and &02) handle HAZEL allocation for shared and private workspace areas.

It was your HADFS source (clever, BTW, to make use of other ROMS to do the physical communication to hardware, and you just do the higher level structures) which made me wonder and hope someone had done a DFS versionf you want to dive into some hairy code that's been updated and rewritten multiple times over 20-odd years, there's the HADFS source.

Rgds
Stephen
Stephen
Re: DFS ROM source code
I did start on a new version of the filing system last year for mmbeeb.
Not really tested it, or documented it, and it still needs some debugging.
But it's attached for all to play with.
regards
Martin
Not really tested it, or documented it, and it still needs some debugging.
But it's attached for all to play with.
regards
Martin
- Attachments
-
- mmfs100.zip
- (147.14 KiB) Downloaded 164 times
Re: DFS ROM source code
Neat. And you've already done MASTER SWR B versions! If it works, all I should need to do is modify the MMC interface routines!
Rgds
Stephen
Stephen
Re: DFS ROM source code
... and three years go by ....
Has anyone done any further development on Martin's MMFS? It looked like it was almost complete.
I'm looking for a SD/MMC filesystem that runs on the Master and leaves PAGE at &E00
I wonder how hard it would be to merge Dukkie's enhancements for SDHC cards into this?
Anyone interested?
Dave

Has anyone done any further development on Martin's MMFS? It looked like it was almost complete.
I'm looking for a SD/MMC filesystem that runs on the Master and leaves PAGE at &E00
I wonder how hard it would be to merge Dukkie's enhancements for SDHC cards into this?
Anyone interested?
Dave
Re: DFS ROM source code
MMFS seems to be working okay in its current state.
I tried it with the STH games menu and didn't see any problems.
If anyone else wants to give it a go, I've attached the ROM images here. There are separate versions for Model B, Master and SWRAM.
Paul.
I tried it with the STH games menu and didn't see any problems.
If anyone else wants to give it a go, I've attached the ROM images here. There are separate versions for Model B, Master and SWRAM.
Paul.
- Attachments
-
- mmfs-roms.zip
- (50.79 KiB) Downloaded 83 times
Re: DFS ROM source code
I'm guessing it won't work with newer SDHC cards (which is all my current BeebFPGA hardware supports).dv8 wrote: MMFS seems to be working okay in its current state.
The work Dukkie has been doing to transform SUPERMMC into SMARTSPI needs to be re-applied to MMFS I think.
I might have a look at what this would involve over the next few days....
Dave
Re: DFS ROM source code
It didn't work with SDHC cards, but it does nowhoglet wrote: I'm guessing it won't work with newer SDHC cards (which is all my current BeebFPGA hardware supports).
The work Dukkie has been doing to transform SUPERMMC into SMARTSPI needs to be re-applied to MMFS I think.
I might have a look at what this would involve over the next few days....

The changes are here:
https://github.com/hoglet67/BeebFpga/co ... 6beec524c3
It's working well enough to load programs from the STH archive on a FAT-16 SDHC card.
And PAGE remains at E00



FAT-32 is currently untested.
However, *INFO and *EX seem to be broken (they return immediately without any output).
Dave
Re: DFS ROM source code
Are you doing this on a Master-based MOS? If so then *INFO and *EX are built into the MOS and call OSFSC with A=10 or A=9; these aren't implemented on a Model B and so DFS's originating from a B probably won't handle them.hoglet wrote: However, *INFO and *EX seem to be broken (they return immediately without any output).
Rgds
Stephen
Stephen
Re: DFS ROM source code
Hi Stephen,
This is exactly what's happening.
BeebWiki's list of FSCV calls is:
Currently MMFS 1.00 implements:
So 09, 0A, 0B, and 0C need to be implemented. Excellent, something well defined to do!
Dave
Nice catch!sweh wrote:Are you doing this on a Master-based MOS? If so then *INFO and *EX are built into the MOS and call OSFSC with A=10 or A=9; these aren't implemented on a Model B and so DFS's originating from a B probably won't handle them.hoglet wrote: However, *INFO and *EX seem to be broken (they return immediately without any output).
This is exactly what's happening.
BeebWiki's list of FSCV calls is:
Code: Select all
&00 *OPT command. X and Y hold parameters.
&01 EOF on channel Y being checked with OSBYTE &7F. On exit, X=&FF if EOF, X=&00 otherwise. If Y=&00, (ie, EOF#0) action is implementation specific.
&02 */ command. XY points to the command text.
&03 Unrecognised OSCLI. XY points to the command text. The command has already been offered to the paged ROMs via service call &04, and none have responded.
&04 *RUN command. XY points to filename.
&05 *CAT command. XY points to any pathname.
&06 A new filing system is about to take over. This call is generated by filing systems themselves before they start their initialisation.
&07 File handle range request. Lowest returned in X, highest in Y.
&08 OSCLI command being processed. This is used to facilitate the *ENABLE command.
&09 *EX command. XY points to any pathname.
&0A *INFO command. XY points to the object name.
&0B *RUN from library. XY points to the filename.
&0C *RENAME command. XY points to the object names after the command.
Code: Select all
\ OSFSC table 1 low bytes
.fscv_table1
EQUB LO(fscv0_starOPT-1)
EQUB LO(fscv1_EOF_Yhndl-1)
EQUB LO(fscv2_4_starRUN-1)
EQUB LO(fscv3_unreccommand-1)
EQUB LO(fscv2_4_starRUN-1)
EQUB LO(fscv5_starCAT-1)
EQUB LO(fscv6_shutdownfilesys-1)
EQUB LO(fscv7_hndlrange-1)
EQUB LO(fscv_osabouttoproccmd-1)
Dave
- richardtoohey
- Posts: 4025
- Joined: Thu Dec 29, 2011 5:13 am
- Location: Tauranga, New Zealand
- Contact:
Re: DFS ROM source code
It's exhausting just watching you.hoglet wrote:Excellent, something well defined to do!



Re: DFS ROM source code
Not sure this one is part of Master MOS or if it comes from a later machine.hoglet wrote: &0C *RENAME command. XY points to the object names after the command.
Rgds
Stephen
Stephen
Re: DFS ROM source code
Thanks for that.sweh wrote:Not sure this one is part of Master MOS or if it comes from a later machine.hoglet wrote: &0C *RENAME command. XY points to the object names after the command.
The other three are now implemented and working I think:
https://github.com/hoglet67/BeebFpga/co ... 577ca051c4
Dave