Disc Image Manager

discuss pc<>acorn file transfer issues and the use of other utils
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Disc Image Manager

Post by geraldholdsworth »

Splitting this from this thread:
Accessing DFS images on MAC OS

First thing, is that it is getting a name change - as it was original meant as a reader, it got called Disc Image Reader. But, I have begun coding the writing parts, so "Reader" doesn't really fit...so it is now Disc Image Manager.

I've now created a GitHub repository. The code still refers to Reader, as this is just everything I've done uploaded. I've included the original Delphi source, as well as the new, converted, Lazarus source. I've also written a script to create a nice application for it, and a DMG (for macOS).
GitHub
It still needs a licence - can anyone suggest a suitable one?

What can it do right now? It can read and extract files from:
  • Acorn DFS
  • Acorn ADFS, floppy formats S, M, L, D, E, E+, F, F+ and Hard Discs
  • Commodore 1541
  • Commodore 1571
  • Commodore 1581
  • Commodore AmigaDOS floppy and hard discs
What have I still to do?
  • I need to write and implement the above (DFS already written, but not tested)
  • Output .inf file when extracting files
  • Omit the backslash at the start of an extracted file
So, for now, here is the nicely packaged Mac OS binary (just the same as what I put up yesterday, but in a DMG):
Disc Image Reader.dmg.zip
(3.72 MiB) Downloaded 24 times
And the Windows one (the original, 64 bit, built with Delphi):
DiscImageReader.exe.zip
(1.37 MiB) Downloaded 37 times
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
0xC0DE
Posts: 862
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Disc Image Manager

Post by 0xC0DE »

Are you considering adding command line functionality to the Windows version? So I can integrate writing DFS and ADFS disk images (for instance) in my workflow?
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

0xC0DE wrote:
Tue Dec 08, 2020 9:50 am
Are you considering adding command line functionality to the Windows version?
Hadn't thought about it. I can certainly look into doing that - I'll add it to the list.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
0xC0DE
Posts: 862
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Disc Image Manager

Post by 0xC0DE »

geraldholdsworth wrote:
Tue Dec 08, 2020 9:56 am
0xC0DE wrote:
Tue Dec 08, 2020 9:50 am
Are you considering adding command line functionality to the Windows version?
Hadn't thought about it. I can certainly look into doing that - I'll add it to the list.
Great, thanks! It would be great to have one tool to rule them all :mrgreen:
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

We are now at version 1.05. Think I might need to append something after the version number as I reckon there could be a fair few updates.
lurkio wrote:
Mon Dec 07, 2020 4:29 pm
Also, I wonder if it would be better to omit the backslash at the start of the filename of the exported file?
The forward slash/back slash issue has been resolved. Windows and macOS use different characters for path separation and the Windows one was assumed, as this was originally aimed at Windows.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

I've decided to use the Lazarus (and Delphi) versioning style - so we are now at 1.05.1.
Not many major changes:
  • Try to match the colours on the main form
  • Slight change on the About box (including platform info)
  • Code changes to remove Delphi compatibility and make it a Lazarus project
  • There was a bug (introduced by conversion to Lazarus) where the search boxes could not allow text to be entered
  • Another bug (introduced by conversion to Lazarus) where the button hints did not show up
  • Added a button to save the image, but no code is behind it - I may change the code so that when an image is opened it doesn't load the entire image into memory and only accesses what it needs...much like a real floppy/hard drive head. This may slow it down, but it will then be able to handle larger images (hopefully)
The macOS binary is up. I'm off to install the Windows version of Lazarus and compile it there, see what crashes.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
danielj
Posts: 8590
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Disc Image Manager

Post by danielj »

Brilliant stuff Gerald - I'll have a play with this later :)

d.
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

And now, as if like magic, we have a binary for Linux.

I'm still learning Linux, so I may not have packaged it properly. It's just a program in a zip file. Any advice here would be appreciated.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
danielj
Posts: 8590
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Disc Image Manager

Post by danielj »

geraldholdsworth wrote:
Tue Dec 08, 2020 9:21 am
It still needs a licence - can anyone suggest a suitable one?
Depends what you want to indicate you want to happen with your code - have a look here: https://choosealicense.com/

GPL if you want to be quite firm about your code and derivations, through to essentially waiving everything (which is what Keir Fraser does with GreaseWeazle/FlashFloppy) - by putting your code out there in the first place most people will be inclined to submit improvements to the original base, and there's little incentive for people to attempt to commercialise it as you've already got something working that does the job.

d.
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

danielj wrote:
Fri Dec 11, 2020 10:06 am
Depends what you want to indicate you want to happen with your code - have a look here: https://choosealicense.com/
Thanks Daniel - I've gone for the GNU GPL v3.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

lurkio wrote:
Mon Dec 07, 2020 4:29 pm
Are you planning to output a .INF metadata file together with the actual base file when the user wants to export a file from a .SSD?
Version 1.05.2, which now outputs an .inf file for any extracted files. Currently this is not optional, but I will in future add a preferences window to deselect this function. It outputs said files no matter what format the disc image is, so it will do it for DFS (ssd and dsd), ADFS (all formats), C64, and AmigaDOS.

A few other changes too, not very major.

64 bit binaries for macOS, Windows and Linux are also included. I will also be, once I've installed the correct 'extras' to Lazarus, be compiling this for 32 bit Windows and, hopefully, 32 bit Linux.

OK, I know, I'm procrastinating on doing the writing files stuff...
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
lurkio
Posts: 3230
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Disc Image Manager

Post by lurkio »

geraldholdsworth wrote:
Fri Dec 11, 2020 7:37 pm
Version 1.05.2, which now outputs an .inf file for any extracted files.
It's coming along nicely!

:D =D> =D>
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

Just popping in to say that I've now successfully managed to get the code to write a file back to a DFS disc image. Still needs a bit of testing (I've only tried adding a file to a blank single sided disc, then adding a second file), and a some sanity checks (it is possible to write two or more files with the same filename). So, it's not published yet, but hopefully I'll be in a position to do this by tomorrow night.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

Just uploaded source and binaries for 1.05.3.

You can now add files to a DFS image (single and interlaced double sided, both Acorn and Watford).

I haven't fully tested it - only tried on some test images, then opening them into BeebEm. They all seem to open OK. I also deleted a file from one image in BeebEm, then loaded this into Disc Image Manager, added the file back, and compared the hexdumps - they were identical (except for the counter, which gets increased by DFS when a file operation happens - I don't increase this).

Disc Image Manager on GitHub
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

Another update - 1.05.4.

I found a bug when writing files - if you are using a Watford DFS format image and you have over the 31 files, writing the catalogue will trample all over the data. This has been fixed.
Other changes - I've moved the screen layout around a bit. The image details is now in the status bar at the bottom, and the buttons have been moved to a Toolbar at the top, and more have been added.
I've also added in the facility to rename and delete files, and to change their attributes...OK, for DFS that is either locked or not. I've also tidied up the code a bit and now it all works a bit better. Still got some tidying up to do.

Adding new files, renaming and deleting can all be done via the pop-up menu, or by the toolbar buttons. Adding new files will only be enabled if you have the root selected, renaming will only work on single files (and not the root), and deletes will do a whole load of files (with confirmation first, of course). Renaming can also be done by slowly clicking on the name in the tree - not sure why but the first attempt takes about 4 clicks to get it going. Changing the attributes is simply clicking on the Locked tick box on the right.

I still need to look at dragging and dropping, both into and out of the application. I also noticed that the Linux fonts are tad bigger than their counterparts on Windows and macOS, so I need to look into tidying that up on Linux while keeping it looking nice on the other two.

I am also after some good icons for the buttons:
  • Load Image (will become, eventually, Open Image)
  • Save Image (will become, eventually, Close Image)
  • Download File(s)
  • Add New File(s)
  • Rename File
  • Delete File(s)
  • Info
and, eventually:
  • New Image
Gerald.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

Probably last update for a couple of days - got some paid work to do. So, for now, 1.05.5 is available.

Major changes:
  • You can now create new, blank, DFS images
  • Added a 'not saved' tracker
  • And I've compiled all three binaries in 'Release' mode, which has reduced the file size significantly.
I've researched on dragging and dropping out (already knew how to drag and drop in), and also reading the command line parameters. There is also one thing I keep meaning to do and that is remove any 'illegal' characters from files added to DFS images. So, hopefully, these will be on the next update probably at the weekend.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
0xC0DE
Posts: 862
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Disc Image Manager

Post by 0xC0DE »

Command line \:D/
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

0xC0DE wrote:
Wed Dec 16, 2020 6:17 pm
Command line \:D/
It's coming...

...along with a few bug fixes (a couple of bugs which have been present for a number of years, now finally fixed).

Drag and drop out of the application doesn't, currently, look likely. Just got dragging files into the application working OK (it's when I realised I'd done this before!!!).
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

Version 1.05.6

Mostly bug fixes:
  • Noticed that some files extracted from ADFS new map images where corrupt - it appeared that if it had the same indirect address as the root, it would download the root directory, repeated for the length of the file #-o
  • One bug, which has been there for a while but I never got around to fixing - if you multiselect a range of files, which included a directory, then the directory contents would be downloaded twice. After coming up with an ingenious solution, I then found a simple switch which is provided on the control #-o
  • Sorted the ADFS L interleaved issue
  • Another #-o moment - got my addressing wrong when creating a DD DFS image, then writing to it...I forgot to set a flag!
And some improvements:
  • When adding files, it won't add *.inf files. I've often found that you select a range of files (in Windows/macOS) by clicking on the first, pressing SHIFT then clicking on the last. Then when you add these, the application tries to add the inf files also.
  • You can now open images and add files by dragging them in.
  • And, started work on the command line facility - still got a lot of work to do with this.
I have noticed, and it has also since been pointed out, that you can't change the disc title or boot option. I'm planning on adding a new dialogue box which displays all the disc information, alongside a nice graphical display of the free space map. I'm also thinking about, if you double click on a file, then it opens it into a hex dump display (maybe become an editor eventually).
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

There is still much to do. My current list is:
  • Complete the command line automation
  • Drag and Drop facilities out of the application...currently looking unlikely for cross platform.
  • Complete BBC<->Windows file renaming
  • Write/Delete/Rename files/directories to ADFS images
  • Create blank ADFS images
  • Write/Delete/Rename files to Commodore images
  • Create blank Commodore images
  • Write/Delete/Rename files to Amiga images
  • Create blank Amiga images
  • Allow editing of Disc titles
  • Allow viewing and editiing of boot option
  • Copy/Move files within an image
  • Drag and Drop files within an image
  • Free Space Map and Details Image Information dialogue box
  • Double click on a file to open to display the contents as a hex dump
  • View/Edit directory titles
  • Conversion between formats - e.g. ssd to adf; ssd to dsd; dsd to 2xssd;etc.
  • Finalise *.inf structure
Some of these are just ideas which may, or may not, come to fruition. Any other suggestions gratefully received.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
PeterTheGrey
Posts: 8
Joined: Mon Jul 27, 2020 7:59 pm
Contact:

Re: Disc Image Manager

Post by PeterTheGrey »

I've been trying to use your program on a Mac, with macOS 13. I've been trying to work with an ADFS hard disc image - scsi0.dat/scsi0.dsc.

Couple of things

Trying to open the file - I have to change the selector settings from "All Images" to "All files" to allow the file dialog to recognise the files. Once open, the file appears to be correctly read and the contents correctly listed

However, whenever I try to add a file, however it is named etc, it fails to write to the image, which I think it is meant to be able to do. The image file is not locked or anything like that. I don't have any .inf files to go with the files that I am trying to copy, but I don't think that should make any difference, should it?

Thanks

Peter
dominicbeesley
Posts: 1449
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: Disc Image Manager

Post by dominicbeesley »

This is looking good. I should have spotted this earlier but when you mentioned disc image manager on the other thread I still didn't spot this

This certainly looks more comprehensive!

Have you given any thought to verify or fixing broken images?
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

PeterTheGrey wrote:
Mon Dec 21, 2020 7:13 pm
Trying to open the file - I have to change the selector settings from "All Images" to "All files" to allow the file dialog to recognise the files. Once open, the file appears to be correctly read and the contents correctly listed
Needs to have the extensions added to the list. Quick job, so I'll do that to the latest version in a mo'.
PeterTheGrey wrote:
Mon Dec 21, 2020 7:13 pm
However, whenever I try to add a file, however it is named etc, it fails to write to the image, which I think it is meant to be able to do.
Not quite yet, I'm afraid. Only writes to DFS images. Writing to ADFS is coming next.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

dominicbeesley wrote:
Tue Dec 22, 2020 12:22 am
This is looking good. I should have spotted this earlier but when you mentioned disc image manager on the other thread I still didn't spot this
Like you, I started this more as an interest to myself and it kind of blossomed from there. It was intended for another project, and the GUI front end was just a demo of the back-end class structure I'd written.
dominicbeesley wrote:
Tue Dec 22, 2020 12:22 am
Have you given any thought to verify or fixing broken images?
I've wondered about fixing broken directories in ADFS, which shouldn't be too difficult. I hadn't thought of fixing those images that won't read at all.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

Merry Christmas everybody. A new version of the Disc Image Manager has now been made available - no I haven't been working on it solidly over Christmas...just now and again.

Version 1.05.7 changes:
  • Added *.dat and *.dsc extensions to the list of allowable images
  • You can now view and edit the disc title(s) and boot option(s) for the discs (DFS and ADFS)
  • Found a minor bug when displaying the details of the directories
  • Because of this, it can now display the disc address of the root
  • In preparation for writing to code to add files/directories to ADFS images, I needed to understand how the free space map works on both Old and New Maps. So, I have spent most of the time writing this nice graphical display of the free map, and changed the routine on how free space is calculated.
  • There was also a bug where the disc title for ADFS D images was not displayed correctly
I'll be working on some documentation for Disc Image Manager, and updating the Guide To Disc Images to incorporate what I have learned about the free space map...before I forget. Oh, and I'll stick in what we bashed out in another thread about *.inf files.

Happy New Year.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

Happy New Year.

It appears that I'm now updating this once a week - so I'll try and keep to that schedule.

Version 1.05.8 - didn't get as much into this version as I'd wanted, but I did manage this:
  • A few minor, and some major, bug fixes.
  • Changed colours, font sizes and label sizes so that it is uniform across platforms.
  • Can now create a blank ADFS floppy image.
  • Can now create a blank Commodore floppy image.
  • Can update the disc title and boot option of ADFS images.
  • Updated the inf file which is output.
  • Can now download the entire contents of an image just by selecting the root (and clicking download, obvs).
  • Added a main menu.
  • Sanity checks on the command line options.
As always, Windows 32 and 64 bit, macOS 32 and 64 bit, and Linux 64 bit binaries are available. Still trying to persuade Lazarus to compile to 32 bit Linux.

See you next weekend. :D
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
User avatar
alastairhm
Posts: 15
Joined: Fri Nov 22, 2019 1:28 pm
Contact:

Re: Disc Image Manager

Post by alastairhm »

This is great just what I am looking for :)
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

alastairhm wrote:
Tue Jan 05, 2021 9:37 am
This is great just what I am looking for :)
That is good to hear. If there's any functions you'd like to see on it, just post it here and I'll see what I can do.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
af0l
Posts: 13
Joined: Sat Dec 12, 2020 1:23 pm
Contact:

Re: Disc Image Manager

Post by af0l »

Holy smoke, i was looking for just this a couple of weeks ago :idea:

Got sorted another way, but great, I was thinking about picking up writing a tool like this. My pascal may be a bit rusty, though, it's been like that for the last 20 years 😁 You could muster more helping hands if you decided on a fresher language?

Anyway, good job, I'll be following this!
User avatar
geraldholdsworth
Posts: 799
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Disc Image Manager

Post by geraldholdsworth »

af0l wrote:
Thu Jan 07, 2021 11:42 pm
You could muster more helping hands if you decided on a fresher language?
I have often thought about learning C++, but it's never really got far. There was discussion of converting this project to BBC Basic for Windows, prior to me porting it to Lazarus thereby allowing me to compile it for other platforms beyond Windows.
Problem is, I'm comfortable with Pascal - I've been using since before Delphi version 1 right up to the very latest Delphi, version 10.4. Problem is with Delphi, is that it is Windows only (although will compile certain projects to multi-platform). Lazarus offered a neat solution as it is free, and compiled the project multiplatform as it was, with only a few minor changes.
af0l wrote:
Thu Jan 07, 2021 11:42 pm
Anyway, good job, I'll be following this!
Thank you - I've got the latest update coming here very soon. I've managed to write stuff to ADFS images, and delete it again. Plus I've finally managed to persuade Lazarus Linux to compile to 32 bit, as well as the 64 bit version that is already there.

Gerald.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk
Post Reply

Return to “software & utilities for the pc, mac or unix”