ADFS Image Filing System?
Pages: 1 2
Simon Willcocks (1499) 521 posts |
Has anybody ever written an image filing system for ADFS format images? |
Andrew Wickham (9184) 3 posts |
FCFS can create ADFS images but they are read only. |
Simon Willcocks (1499) 521 posts |
Hmm. Shareware, closed source, and 25 years old. I might try contacting the authors in a couple of weeks. Thanks, though. |
Gerald Holdsworth (2084) 81 posts |
Do mean something like ADFFS (for RISC OS)? |
Simon Willcocks (1499) 521 posts |
Thanks for those! https://github.com/geraldholdsworth/DiscImageManager looks like it will do very nicely, in particular. |
Steffen Huber (91) 1953 posts |
FCFS is the only RISC OS option I am aware of, but I was unsuccessful to contact Nick Craig-Wood in recent years. I have developed a piece of Java code named “FilecoreImageReader” which is similar to Gerald’s DiscImageManager (previously known as DiscImageReader). I can provide you with a test version if you are interested – I am aiming for a dual-release this year, a basic version open-source and for-free, and a commercial version with a lot of cool additional features (partition support for harddisc images, file browser for HostFS in addition to filecore images reading both as tree-based explorer-like and filer-like, export as ZIP or ISO, direct viewing of various native RISC OS formats like Arc, ZIP, Sprites, tokenized BASIC, StrongHelp…). There is also Python code by David Boddie available, I think it can act as a FUSE fs on Linux, but IIRC it was restricted to plain D/E format floppy images. And there is a Linux “ADFS” implementation by I think Phil Blundell, but again D/E format only restricted to floppy images. All of the offerings are currently read-only. |
Rick Murray (539) 13851 posts |
I did, about a decade ago, but unfortunately the code was part his and part Sergio’s, with some amount of it used in something commercial, so releasing the source code wasn’t really an option. It’s a shame, because it is bloody good at what it does. But, alas… |
Gerald Holdsworth (2084) 81 posts |
Disc Image Reader was read only. Disc Image Manager is read and write. |
Steffen Huber (91) 1953 posts |
Thanks for the correction! I somehow missed that, sorry for the misinformation. |
Simon Willcocks (1499) 521 posts |
I’m surprised that it’s not almost a trivial exercise, given that the ADFS code is now open source. Surely there’s a limited interface to the HAL that essentially allows reading and writing of sectors? I’d have expected it to be used for SD cards as well. |
Jon Abbott (1421) 2651 posts |
What are you actually after Simon? Are you after an Image Filing System running under RISCOS to read FileCore based HDF images for example? If so, that’s a lot of work as it would have to recreate FileCore. For those not aware, Image Filing Systems work at FileSwitch level (ie files) and Filing System work at FileCore level (sectors) A Filing System to read HDF is theoretically possible and a lot less coding, although I don’t think anyone has tried as it would have to overcome FileCore’s lack of reentrancy support. If not for the reentracy issue, yes it would be trivial, probably less than 100 lines of assembler.
ADF/JFD mounted with ADFFS are writable although it is not an Image Filing System its a Filing System – or more correctly, its a 1702 FDC emulator that parasitically attaches to ADFS’ Filing System. |
David J. Ruck (33) 1636 posts |
DiscKnight has code to read and write Filecore discs and image files, independently of FileCore. However, it’s not in a form which would be easy to turn in to an image filing system, and would be terribly non-optimal. Plus it used to terrify me! I split the reading code from the fixing code to make DiscReader, which could extract files from RISC OS disc images on non-native systems, I never included the directory and file creation code in case anyone used it on a real disc and broke something. |
Stuart Swales (8827) 1357 posts |
Isn’t an easy way to do this to implement an ADFS-HDF filing system atop FileCore? Double-click on an ADFS-HDF typed object on your disc to mount it under ADFS-HDF::madeupname.$. Not as good as having an image filing system that you can see its contents attached at the correct point in the tree, but better than nowt. [Also, isn’t there still an ADFS driver in the Linux kernel? I did bleat when someone threatened to take it out the other year.] |
Rick Murray (539) 13851 posts |
That could be pretty useful if it could run on, say, Windows (XP!) 1 and allow access to the contents of SD card images. 1 My use case. Sane people would probably want Linux or MacOS. |
Gerald Holdsworth (2084) 81 posts |
I’d love to be able to make Disc Image Manager access an SD card, but I’m just not sure how to go about doing it. It’s likely to be different on different OS and at the moment the same code is used to compile for Windows, macOS and Linux. |
David J. Ruck (33) 1636 posts |
On Linux you just read from the SD card’s device file, the same with Windows although the filename is a lot less obvious. I’d imagine there is a device file on MacOS too. |
Steffen Huber (91) 1953 posts |
I’m working on it…you will need a version of Java old enough to run on Windows XP, which will be Java 7 IIRC, but since I had that use case in mind from day 1, my code is compatible with Java 7. |
David J. Ruck (33) 1636 posts |
Java? Mine is in C, although I could do a Python port for a laugh. |
Steffen Huber (91) 1953 posts |
With the obvious problem of the 4 GiB limit on RISC OS for image filing systems. |
Steffen Huber (91) 1953 posts |
My main goal is to provide a good user-friendly and powerful UI, so Java is the obvious cross-platform choice. The low-level part of accessing filecore with Java’s insistence on “everything is signed” was certainly not the fun part, but I already had a minimal support lib to handle those things from long time ago when I created “Isofier”, an ISO9660/Joliet image creator. |
Jon Abbott (1421) 2651 posts |
That would create the circular reference I was referring too as FileCore will be called when the filing system is touched; I believe the call chain would something along the lines of: Touch ADFS-HDF::0.$ —> FileSwitch —> ADFS-HDF_DiscOp —> FileCore —> ADFS-HDF DiscOp handler —> OS_File —> FileSwitch —> SDFS_DiscOp —> FileCore Completely avoiding the usual circular call to FileCore in ADFS-HDF_DiscOp might work although I have a nagging suspicion FileCore still gets involved somewhere in the call chain. |
Stuart Swales (8827) 1357 posts |
Yes, but they are separate instances of the module here. |
Chris Johns (8262) 242 posts |
I do have some (very limited) Python code which I use to mess around with SD cards on Linux. It handles the E+ format (only). https://github.com/c-jo/adfs-tools.git Explore.py will let you nose around filecore disc. |
André Timmermans (100) 655 posts |
My thoughts exactly: is the re-entrance issue a global one or limited to the same instance? In the later case, creating a FileCore based image filing system, should not be a problem. |
Steffen Huber (91) 1953 posts |
“Global” as in “For the base filecore instance” or “global” as in “state held somewhere on system level” (zero page?)? If it is “just” in FileCore%Base, the pragmatic solution would be to duplicate the module as FileCore2 specifically for a FileCore Image Filing System. |
Pages: 1 2