ADF Reader

The inbuilt ADF reader is currently very basic, you can pull individual files, I basically added it so kickstart files could be loaded directly from ADF images, as always, you can do a little bit more from the CLI than the GUI, to load a file in the CLI, the command is “loadadf”;

Warning… if you attempt to load an ADF which is not DOS (FFS) then it will crash!

ADFs in the CLI

CapCLI> loadADF "ROMs/TOSEC.Kickstart-Disks/Kickstart v2.05 r37.210 (1991-11)(Commodore)[h FLT][developer][bootable].adf"
Opening ROMs/TOSEC.Kickstart-Disks/Kickstart v2.05 r37.210 (1991-11)(Commodore)[h FLT][developer][bootable].adf
ADF loaded:Kick2.0

To list the files on the disk, the command is “adflist”, it’s not a great amount of info here, you can’t even see the size of the files, I might improve this if I can be arsed.

CapCLI> adflist
[ 0] /.info
[ 1] /K20
[ 2] /warpsig
[ 3] /S/
[ 4] /S/Startup-sequence
[ 5] /zkick
[ 6] /LKick

You can then directly access files listed, for example, you can load a ROM directly, as if it was a normal file, just add ADF: to the path that adflist gave you.

CapCLI> loadrom ADF:/K20
FOUND 882 (524296 bytes) /K20
No declared format, assuming unencoded, unencrypted data
Unable to find hash

You can also add individual modules to a ROM directly from an ADF, using add ADF:

CapCLI> loadADF ADFs/ADF.3.2.1/ModulesA1200_3.2.1.adf
Opening ADFs/ADF.3.2.1/ModulesA1200_3.2.1.adf
ADF loaded:ModulesA1200_3.2.1

CapCLI> adflist
[  0] /C/
[  1] /C/BindDrivers
[  2] /C/Delete
[  3] /C/AddBuffers
...
[ 65] /LIBS/workbench.library
[ 66] /LIBS/graphics.library
[ 67] /LIBS/dos.library
[ 68] /Disk.info
[ 69] /ReadMe.txt
[ 70] /SYStoInstallDisk
[ 71] /Utilities/
[ 72] /Utilities/More

CapCLI> newrom 512k
CapCLI> add ADF:/LIBS/workbench.library
 FOUND  1617 (185668 bytes) /LIBS/workbench.library
Populating component 780 relocs first reloc=182376

CapCLI> rom
ROM  2 ROMBase:00000000 CRC32:0x00000000 (182480 of 524288/512k)
Unnamed
 0 workbench.library                   4:4:182476   780 0x2d6ca8ba Library:workbench.library
   workbench.library 47.36 (27.10.2021)

You can save (extract) individual files directly from an ADF, in this case you don’t need to prefix the path with ADF:

CapCLI> adfsavefile /Disk.info
FOUND 882 (388 bytes) /Disk.info
Adding data [512 Blocksize] from block 882 Type=2

CapCLI> exit
/home/Mikey/Capitoline$ ls -l Disk.info
-rwxr-xr-x 1 mikey mikey 388 Feb 17 18:34 Disk.info

If you want to save an entire ADF as a zip file, the command is adfsavezip, warning, consider this an alpha feature, I wrote this in about an hour and it’s incomplete, it doesn’t preserve dates/times, any special properties, permissions, and there’s at least one bug where I’m not storing the central file header properly, so it’s not a perfectly compliant zip file – but it works (sort of) and Windows doesn’t seem to complain! also, I’m not doing any compression, so don’t save a load of ADFs thinking that it’s a great archive alternative – it’s not, it’s really only useful for being able to extract lots of files easily.

CapCLI> adfsavezip test.zip
Adding dir... /C/
CRC32 00000000
Data 00000000 bytes
Name 00000002 bytes
Adding file... /C/BindDrivers
CRC32 dfd98649
Data 000004e0 bytes
Name 0000000d bytes
Adding file... /C/Delete
...
CRC32 6271f7e5
Data 0000008b bytes
Name 00000010 bytes
Adding dir... /Utilities/
CRC32 00000000
Data 00000000 bytes
Name 0000000a bytes
Adding file... /Utilities/More
CRC32 cbb36edc
Data 0000280c bytes
Name 0000000e bytes

CapCLI> exit
/home/Mikey/Capitoline$ ls -l test.zip
-rwxr-xr-x 1 mikey mikey 830102 Feb 17 18:34 test.zip

ADFs in the GUI

To load an ADF via the GUI, right-click on the ADF and select “Load ADF”

Once loaded, you’ll see the ADF: path populated with the disk label, you can expand this, right-click and extract files directly from the loaded ADF, at time of writing, the GUI has issues directly opening ROMs or adding files to ROMs, but hopefully I’ll get round to adding this functionality!

Scroll to Top