Make Images Writable - ADFS
geraldholdsworth opened this issue · 4 comments
The application needs to be able to write back to images.
As of version 1.05.9, it is now possible to write files, create directories, rename files/directories and delete file/directories with ADFS shapes S, M, L, and D (i.e. 'old map').
As of version 1.05.10, it is now possible to write files, create directories, rename files/directories and delete file/directories with ADFS Shapes E and F (i.e. 'new map'). It may also be possible, although this has not been tested, to rename and delete files and directories with ADFS Shapes E+ and F+ (i.e. 'big directories').
After a lot of hard work writing, and then testing, the code to expand big directories by moving them about the image, I then discovered that ADFS does indeed split directories instead of moving them. This creates two issues: first, all the code I have written to move directories is now invalid and wrong, and requires re-writing; and secondly, any images loaded into Disc Image Manager that has such split directories will result in "Broken Directory", where they are not.
Removing the code to move directories is easy. Then expanding directories by splitting them across fragments is also easy. Accessing split directories is a tad harder - the entire directory needs to be read into a buffer before accessing the contents.
So, beware that your ADFS Big Directory image ('+' varieties) may get corrupted if you try and write to them using Disc Image Manager.
As of version 1.22 all formats of ADFS (up to and including RISC OS 5.28) can now be read from and written to.