People might have spotted me just pop up at *. and I was pointed here (specifically this thread) as well.
Being a brand new recipient of TurboMMC I wanted, of course, to convert my existing hard disks. However I have a Solidisk DDFS, which is a 1770 based system so the disks are 320K in side. MMD format doesn't appear to allow for that (reading of some code makes it look like it's hard coded to 200K per image - ie SSD - and the images are at fixed offsets throughout the file).
What's worse is that Solidisk uses a "chained catalogue". When you create your 32nd file it will create a 2nd catalogue and use 2 bytes from the first to point to the sector where the second is found. And the same for the 3rd. And... So it's very easy to create a disk with 100+ files on it. Acorn DFS can't handle that.
Since I'm trying to reduce amount of reads on my floppies, I'm aiming of creating an image of the original disk, splitting it across 2 SSDs, then on my Linux machine I can extract and mangle data, build new SSDs and so on. All good fun.
The data extraction part isn't written yet (OSWORD &7F, here I come!) but I'm making some progress with reading MMB and SSDs.
Using the TurboMMC provided MMD as an example:
Code:
$ ./dcat.pl -f ../BEEB.MMB.ORIG
4: UTILS
20: ROMS1
$ ./get_ssd.pl -f ../BEEB.MMB.ORIG 4 utils.ssd
Getting disk 4: UTILS
utils.ssd created
$ ls -l utils.ssd
-rw-r--r-- 1 sweh sweh 204800 Mar 10 16:22 utils.ssd
$ ./getfile.pl -f utils.ssd utils
Saving $.MXR
Saving $.COP105
Saving $.COP112
Saving $.COP113
Saving $.FFIND
Saving $.BUTIL
Saving $.COPY
Saving $.COP109
Saving $.RLOAD
Saving $.AXR
Saving $.PBAS
Saving $.E00DFS
Saving $.RFS
Saving $.PATCH
$ ls utils
$.AXR $.COP105 $.COP112 $.COPY $.FFIND $.PATCH $.RFS
$.BUTIL $.COP109 $.COP113 $.E00DFS $.MXR $.PBAS $.RLOAD
The "get_ssd" code is simple:
Code:
#!/usr/bin/perl -w
use strict;
use lib '.';
use BeebUtils;
@ARGV=BeebUtils::init(@ARGV);
my $dr=$ARGV[0];
die "Syntax: $0 [-f MMB_file] image_number target_file\n" unless defined($dr);
die "Not a number\n" unless $dr=~/^[0-9]+$/;
my $target=$ARGV[1];
die "No target file\n" unless $target;
my %disk=BeebUtils::load_dcat();
die "Disk $dr not valid\n" unless $disk{$dr}{Formatted};
my $L=$disk{$dr}{Readonly}?" (L)":"";
print "Getting disk $dr: $disk{$dr}{DiskTitle}$L\n";
my $image=BeebUtils::read_ssd($dr);
open(T,">$target") or die "$!: $target\n";
syswrite T,$image;
print "$target created\n";
The "extract from SSD" code is similarly simple 'cos of the BeebUtils module I'm writing. This automatically handles the chained catalogs of Solidisk

I haven't written any "change" routines, yet. That's still to come. I've only been at this for 7 hours
