Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Image filing system for .ADF files.

52 views
Skip to first unread message

Gazza

unread,
Sep 11, 2011, 5:32:44 AM9/11/11
to
Am I re-inventing the wheel when suggesting, that some time in the
future once UMoria was complete, to create an image filing system that
can mount ADF disc images as if they were real hardware. I have ADF
Imager, this is good for taking sector copies off floppy discs and
presenting them to a PC for emulation purposes. To extract files from
an ADF, I need a floppy disc to write the ADF file to, before copying
the files I want from the FDD to the HDD.

There MUST be a smarter way than this, the obvious thing to do would
be to write a image filing system as mentioned above, unless someone
hasn't already done so.

The sort of thing I'm thinking of would do exactly what ADF Imager
does now, but add the facility to mount these ADF files as PC based
emulators do (at least read only) on RISC OS hardware, thus
eliminating the writeback stage. This would make the sort of
development I do easier to do on my laptop PC away from home. (At
home, I just use real hardware.) I'd just take an ADF of the transfer
floppy I use to move project files to and from the club and mount it
on the emulator. Then just copy the file back to the A7000+ before
mounting it and reading the changed files back to the HDD.

If, as I suspect, the data in the ADF file is just a low level dump of
what's on an ADFS disc, surely it's just a matter of convincing ADFS
to mount a file rather than a physical device, for read only at any
rate. Writing might be a different story depending on how much extra
information an ADF file contains. E.G spare map entries, blank sectors
etc.

Maybe the original author of ADF Imager is reading this and could
supply me with the source code so I could make a start once I'm done
with my current project. Or at least get in touch and let me know what
he thinks of the idea.

druck

unread,
Sep 11, 2011, 6:16:44 AM9/11/11
to
On 11/09/2011 10:32, Gazza wrote:
> If, as I suspect, the data in the ADF file is just a low level dump of
> what's on an ADFS disc, surely it's just a matter of convincing ADFS
> to mount a file rather than a physical device, for read only at any
> rate. Writing might be a different story depending on how much extra
> information an ADF file contains. E.G spare map entries, blank sectors
> etc.

All ADFS does is read and write sectors using built in IDE and floppy
disc controllers, it has no knowledge of disc formats.

All the formatting is handled by the Filecore module. The way to get
Filecore to understand a Filecore formatted file image, is to implement
a FileCore Image Filing System. It's very straightforward, all the hard
work is done for you, you just have to open a file and read & write sectors.

---druck

Martin Bazley

unread,
Sep 11, 2011, 9:26:19 AM9/11/11
to
The following bytes were arranged on 11 Sep 2011 by druck :

> On 11/09/2011 10:32, Gazza wrote:
> > If, as I suspect, the data in the ADF file is just a low level dump of
> > what's on an ADFS disc, surely it's just a matter of convincing ADFS
> > to mount a file rather than a physical device, for read only at any
> > rate. Writing might be a different story depending on how much extra
> > information an ADF file contains. E.G spare map entries, blank sectors
> > etc.
>
> All the formatting is handled by the Filecore module. The way to get
> Filecore to understand a Filecore formatted file image, is to implement
> a FileCore Image Filing System. It's very straightforward, all the hard
> work is done for you, you just have to open a file and read & write sectors.

I thought I'd seen a very similar request somewhere else, and I would
find such a utility incredibly useful as well, but there was a good
reason it hasn't been developed yet. ISTR FileCore isn't re-entrant in
certain crucial points (if you try, you get - yes - "FileCore in use"),
thus effectively requiring you to write your own FileCore filing system
clone in order for the program to be functional.

--
__<^>__
/ _ _ \ It is written that Geeks shall inherit the Earth.
( ( |_| ) )
\_> <_/ ======================= Martin Bazley ==========================

David Holden

unread,
Sep 11, 2011, 10:23:55 AM9/11/11
to

On 11-Sep-2011, Gazza <use...@garethlock.com> wrote:

> There MUST be a smarter way than this, the obvious thing to do would
> be to write a image filing system as mentioned above, unless someone
> hasn't already done so.

One trick with an 800K E format disc image is to create an 800K RAM disc and
then dump the disc image into the memory used by the RAM disc. Unfortunately
this only works on RO versions pre RO 4.

This is done by ProCopy so you can try it using ProCopy to see if it works
with the images you're using. But be warned. Many so-called ADF images
aren't true 800K ADFS images.

--
David Holden - APDL - <http://www.apdl.co.uk>

Gazza

unread,
Sep 12, 2011, 9:59:07 AM9/12/11
to
That's what I was meaning by extra information required to write...
Still... I can't see why an ADF file can't be mounted as read-only.
After all it's just a file containing an image of a disc. be it 1.6M
or 800k. ArcFS was doing this sort of thing when I left the scene at
about the time that the Risc PC first appeared. I have returned to the
fray now and still this bridge between emulation and real hardware
hasn't been addressed.

Steffen Huber

unread,
Sep 12, 2011, 12:42:47 PM9/12/11
to
For older machines, there is FCFS which should be able to
do what you want to do, i.e. mount a .ADF image to copy
files from there to your harddisc.

See
http://www.craig-wood.com/nick/fcfs/
but I think the .ADF images must be postprocessed to be
mountable via FCFS - a Google search turns up the hint
that you must add FCFS followed by 252 NUL bytes to the
.ADF file.

And don't forget to give the file the correct filetype
(&fcd).

Steffen

--
Steffen Huber - http://www.huber-net.de/
hubersn Software - http://www.hubersn-software.com/

Gazza

unread,
Sep 16, 2011, 6:59:20 PM9/16/11
to
On Sep 12, 5:42 pm, Steffen Huber <s...@huber-net.de> wrote:
> For older machines, there is FCFS which should be able to
> do what you want to do, i.e. mount a .ADF image to copy
> files from there to your harddisc.
>
> Seehttp://www.craig-wood.com/nick/fcfs/
> but I think the .ADF images must be postprocessed to be
> mountable via FCFS - a Google search turns up the hint
> that you must add FCFS followed by 252 NUL bytes to the
> .ADF file.
>
> And don't forget to give the file the correct filetype
> (&fcd).
>
> Steffen
>
> --
> Steffen Huber -http://www.huber-net.de/
> hubersn Software -http://www.hubersn-software.com/

FCFS sounds like a good solution.

As far as filecore not being re-enterant, mounting the image would
load it entirely into RAM. We're dealing with floppy discs here!
Therefore any filecore operations would be dealing with a buffer in
RAM, not a filing system directly. The only three commands that would
directly deal with the filesystem would be along the lines of "Mount"
to allocate a buffer and load the image, "Unmount" to write the
changes back to file and unload the image and "Flush" to writeback the
changes without unloading the image. These would be implemented with
OS_File calls, like anything else.

The reason I want to be able to use .ADF files directly, is my choice
of emulator has direct support of these files.
0 new messages