{"id":25,"date":"2022-12-30T12:38:05","date_gmt":"2022-12-30T12:38:05","guid":{"rendered":"http:\/\/192.168.1.222\/Capitoline\/?page_id=25"},"modified":"2022-12-30T12:38:05","modified_gmt":"2022-12-30T12:38:05","slug":"adf-reader","status":"publish","type":"page","link":"http:\/\/capitoline.twocatsblack.com\/index.php\/adf-reader\/","title":{"rendered":"ADF Reader"},"content":{"rendered":"\n<p>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 &#8220;loadadf&#8221;;<br><br>Warning&#8230; if you attempt to load an ADF which is not DOS (FFS) then it will crash! <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ADFs in the CLI<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>CapCLI&gt;<\/strong> loadADF \"ROMs\/TOSEC.Kickstart-Disks\/Kickstart v2.05 r37.210 (1991-11)(Commodore)&#91;h FLT]&#91;developer]&#91;bootable].adf\"\nOpening ROMs\/TOSEC.Kickstart-Disks\/Kickstart v2.05 r37.210 (1991-11)(Commodore)&#91;h FLT]&#91;developer]&#91;bootable].adf\nADF loaded:Kick2.0<\/code><\/pre>\n\n\n\n<p>To list the files on the disk, the command is &#8220;adflist&#8221;, it&#8217;s not a great amount of info here, you can&#8217;t even see the size of the files, I might improve this if I can be arsed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>CapCLI&gt; <\/strong>adflist\n&#91; 0] \/.info\n&#91; 1] \/K20\n&#91; 2] \/warpsig\n&#91; 3] \/S\/\n&#91; 4] \/S\/Startup-sequence\n&#91; 5] \/zkick\n&#91; 6] \/LKick<\/code><\/pre>\n\n\n\n<p>You can then directly access files listed, for example, you can load a ROM directly, as if it was a normal file, just add <strong>ADF:<\/strong> to the path that adflist gave you.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>CapCLI&gt; <\/strong>loadrom <strong>ADF:<\/strong>\/K20\nFOUND 882 (524296 bytes) \/K20\nNo declared format, assuming unencoded, unencrypted data\nUnable to find hash\n<\/code><\/pre>\n\n\n\n<p>You can also add individual modules to a ROM directly from an ADF, using <strong>add ADF:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>CapCLI&gt; <\/strong>loadADF ADFs\/ADF.3.2.1\/ModulesA1200_3.2.1.adf\nOpening ADFs\/ADF.3.2.1\/ModulesA1200_3.2.1.adf\nADF loaded:ModulesA1200_3.2.1\n\n<strong>CapCLI&gt; <\/strong>adflist\n&#91;  0] \/C\/\n&#91;  1] \/C\/BindDrivers\n&#91;  2] \/C\/Delete\n&#91;  3] \/C\/AddBuffers\n...\n&#91; 65] \/LIBS\/workbench.library\n&#91; 66] \/LIBS\/graphics.library\n&#91; 67] \/LIBS\/dos.library\n&#91; 68] \/Disk.info\n&#91; 69] \/ReadMe.txt\n&#91; 70] \/SYStoInstallDisk\n&#91; 71] \/Utilities\/\n&#91; 72] \/Utilities\/More\n\n<strong>CapCLI&gt;<\/strong> newrom 512k\n<strong>CapCLI&gt;<\/strong> add ADF:\/LIBS\/workbench.library\n FOUND  1617 (185668 bytes) \/LIBS\/workbench.library\nPopulating component 780 relocs first reloc=182376\n\n<strong>CapCLI&gt; <\/strong>rom\nROM  2 ROMBase:00000000 CRC32:0x00000000 (182480 of 524288\/512k)\nUnnamed\n 0 workbench.library                   4:4:182476   780 0x2d6ca8ba Library:workbench.library\n   workbench.library 47.36 (27.10.2021)\n<\/code><\/pre>\n\n\n\n<p>You can save (extract) individual files directly from an ADF, in this case you don&#8217;t need to prefix the path with ADF:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>CapCLI&gt; <\/strong>adfsavefile \/Disk.info\nFOUND 882 (388 bytes) \/Disk.info\nAdding data &#91;512 Blocksize] from block 882 Type=2\n\n<strong>CapCLI&gt;<\/strong> exit\n\/home\/Mikey\/Capitoline$ ls -l Disk.info\n-rwxr-xr-x 1 mikey mikey 388 Feb 17 18:34 Disk.info<\/code><\/pre>\n\n\n\n<p>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&#8217;s incomplete, it doesn&#8217;t preserve dates\/times, any special properties, permissions, and there&#8217;s at least one bug where I&#8217;m not storing the central file header properly, so it&#8217;s not a perfectly compliant zip file &#8211; but it works (sort of) and Windows doesn&#8217;t seem to complain! also, I&#8217;m not doing any compression, so don&#8217;t save a load of ADFs thinking that it&#8217;s a great archive alternative &#8211; it&#8217;s not, it&#8217;s really only useful for being able to extract lots of files easily.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>CapCLI&gt; <\/strong>adfsavezip test.zip\nAdding dir... \/C\/\nCRC32 00000000\nData 00000000 bytes\nName 00000002 bytes\nAdding file... \/C\/BindDrivers\nCRC32 dfd98649\nData 000004e0 bytes\nName 0000000d bytes\nAdding file... \/C\/Delete\n...\nCRC32 6271f7e5\nData 0000008b bytes\nName 00000010 bytes\nAdding dir... \/Utilities\/\nCRC32 00000000\nData 00000000 bytes\nName 0000000a bytes\nAdding file... \/Utilities\/More\nCRC32 cbb36edc\nData 0000280c bytes\nName 0000000e bytes\n\n<strong>CapCLI&gt;<\/strong> exit\n\/home\/Mikey\/Capitoline$ ls -l test.zip\n-rwxr-xr-x 1 mikey mikey 830102 Feb 17 18:34 test.zip\n\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">ADFs in the GUI<\/h2>\n\n\n\n<p>To load an ADF via the GUI, right-click on the ADF and select &#8220;Load ADF&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"http:\/\/192.168.1.222\/Capitoline\/wp-content\/uploads\/2023\/02\/CapGUI.LoadADF.jpg\" alt=\"\" class=\"wp-image-266\"\/><\/figure>\n\n\n\n<p>Once loaded, you&#8217;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&#8217;ll get round to adding this functionality!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"http:\/\/192.168.1.222\/Capitoline\/wp-content\/uploads\/2023\/02\/CapGUI.SaveADFFile.jpg\" alt=\"\" class=\"wp-image-267\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;loadadf&#8221;; Warning&#8230; if &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/capitoline.twocatsblack.com\/index.php\/adf-reader\/\"> <span class=\"screen-reader-text\">ADF Reader<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":30,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"class_list":["post-25","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":0,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/25\/revisions"}],"wp:attachment":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/media?parent=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}