{"id":19,"date":"2022-12-30T12:35:11","date_gmt":"2022-12-30T12:35:11","guid":{"rendered":"http:\/\/192.168.1.222\/Capitoline\/?page_id=19"},"modified":"2023-03-10T11:20:54","modified_gmt":"2023-03-10T11:20:54","slug":"capcli","status":"publish","type":"page","link":"http:\/\/capitoline.twocatsblack.com\/index.php\/capcli\/","title":{"rendered":"CapCLI"},"content":{"rendered":"\n<p>First things first, after you download the code, you can extract it anywhere you like, but you must run CapCLI from the Capitoline directory, and you <strong>must <\/strong>copy your ROMs, ADFs and Components into the local directories <strong>before <\/strong>you run the code <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>cd Capitoline\n.\/capcli.Linux <\/strong>or <strong>.\/capcli.MacOS <\/strong>or <strong>capcli.exe<\/strong> (run the code applicable to Windows\/Linux\/Macos)<strong>\nCapCLI><\/strong><\/code><\/pre>\n\n\n\n<p>The command line gives you everything that the GUI can do (plus some other commands), but it&#8217;s a bit more laborious, you can use the Windows CMD window (capcli.exe), the MacOS terminal (capcli.MacOs) and the Linux shell (capcli.Linux), they all work the same I&#8217;ve tried to list the command in the order you might use them.<\/p>\n\n\n\n<p><strong>CapCLI&gt;<\/strong><\/p>\n\n\n\n<p>commands:<\/p>\n\n\n\n<p><strong>help<\/strong><br>Not always that much help as I haven&#8217;t kept it up to date &#8211; I&#8217;ll come back to this<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ROM Commands<\/h2>\n\n\n\n<p><strong>loadrom \/path\/to ROM<\/strong><br>Loads a file as if it was a Kickstart file, if you have a hash file for the kickstart then it will also understand all the individual components<\/p>\n\n\n\n<p><strong>saverom [filename]<\/strong><br>Saves the current ROM, note this is just the current ROM, no byteswap or split, if you want to do more complex things like multiple ROM banks for dual eprom machines with byte swap etc. then you need to create a rom profile and save that instead, this just saves the raw data of one ROM bank.<\/p>\n\n\n\n<p><strong>newrom [size]&nbsp;[fill character]<\/strong><br>Create a new (empty) ROM, valid sizes are nnnn (a number of bytes), nk (n kb, e.g. 512k &#8211; the most useful), nm (n mb, e.g. 1m), the fill character will be used to blank the space, this is often 0\/0x00, or 255\/0xFF<\/p>\n\n\n\n<p><strong>rombase 0xnnnnnnnn<\/strong><br>This sets the default ROMBASE for the ROM, this is critical when you add components, this is used to write the relocs correctly, you can change the ROMBASE after adding components, but only loaded libraries are repatched, kickity-split, extended ROMHEADERs and SKSize is not repatched &#8211; I haven&#8217;t finished it!<br>Oh, and repatching to a different ROMBASE only works on ROMs that are completely understood (e.g. you have a hash file, or built it from scratch).<\/p>\n\n\n\n<p><strong>roms<\/strong><br>List the roms that you have loaded (or created).<\/p>\n\n\n\n<p><strong>rom [n]<\/strong><br>Display the current ROM (if you don&#8217;t give a number) or switch to &#8220;ROM n&#8221; if you do, the ROM numbers are given by the &#8220;roms&#8221; command<\/p>\n\n\n\n<p><strong>romprofile, saveprofile<\/strong><br>If you want to save a ROM for burning to EPROMs then it&#8217;s probably best (and easiest) to create and save a profile, this defines the motherboard socket layout and the files you need to create.<br>Have a look at <strong>Features -&gt; Saving ROMs<\/strong> for more info<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>Features -&gt; Saving ROMs<\/strong>\n\nromprofile, saveprofile<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Component Commands<\/h2>\n\n\n\n<p><strong>add <\/strong><br>Add a component into the current working ROM<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong># Add a loadable library or raw binary chunk to a ROM<\/strong>\n<strong>add \/path\/to\/component<\/strong>\nadd Components\/2.x\/0x1d6028d1.kickmenu_36.134_(20.3.90)\n\n<strong># Add a component from another ROM file<\/strong>\n<strong>add \/path\/to\/ROM component<\/strong>\nadd \"ROMs\/TOSEC.Firmware\/Kickstart v2.05 r37.350 (1992-04)(Commodore)(A600HD)&#91;!].rom\" scsi.device \n\n<strong># Add a file from a loaded ADF<\/strong>\n<strong>add ADF:\/path\/in\/loaded\/ADF<\/strong>\nadd ADF:\/l\/intuition.library\n\n<strong># Add n bytes of unallocated space<\/strong>\n<strong>add n<\/strong>\nadd 76<\/code><\/pre>\n\n\n\n<p><strong>delete [n]<\/strong><br>Deletes component n from your ROM, the space previously occupied is wiped (so it&#8217;s not just a logical delete).<\/p>\n\n\n\n<p><strong>savecomponent [n]<\/strong><br>Extracts a component (n) to your current savepath, if you don&#8217;t specify a number, then it will save them all, this is similar to the &#8220;romsplit&#8221; tool<\/p>\n\n\n\n<p><strong>add [kickity-split|size|checksum|vectors]<\/strong><br>Add a standard component, note these aren&#8217;t library components so don&#8217;t have relocs, it&#8217;s best to add these&nbsp;before&nbsp;you add any libraries<\/p>\n\n\n\n<p><strong>editcomponent<\/strong><br>Manipulate a components start, end or its relocs<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong># Change where a component starts<\/strong>\neditcomponent n start=n\n\n<strong># Change where a component ends<\/strong>\neditcomponent n end=n\n\n<strong># Add a reloc to a component\n<\/strong>editcomponent n addreloc n\n\n<strong># Delete a reloc from a component\n<\/strong>editcomponent n deletereloc n\n\n<strong># Add anything that vaguely looks like a reloc to a component<\/strong>\neditcomponent n addrelocs\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Hash Commands<\/h2>\n\n\n\n<p><strong>savecomponenthash [n]<\/strong><br>Saves the component hash(es) to your current savepath, if you don&#8217;t specify a number, then it will save them all.<\/p>\n\n\n\n<p><strong>saveromhash<\/strong><br>Saves the ROM definition hash file, this will list all the known components.<\/p>\n\n\n\n<p><strong>canonisecomponent<\/strong><br>This changes the component hash name, to give it a standard name based on the internal name of the component and a hash (the hash is dependent on the code and any identified relocs, so you need to run this after changing the size or relocs of a component), this name is used when you save the component or component hash.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Analysis Commands<\/h2>\n\n\n\n<p>analyserom<br>analysecomponent<br>editcomponent<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ADF Commands<\/h2>\n\n\n\n<p>Have a look at <strong>Features -&gt; ADF reader<\/strong> features for more info<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>Features -&gt; ADF reader<\/strong>\n\nloadadf, adflist, adfsavefile, adfsavezip<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Patching Commands<\/h2>\n\n\n\n<p>Have a look at<strong> Features -&gt; Patcher<\/strong> for more info<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <strong>Features -&gt; Patcher<\/strong>\n\npatch, find, findopcode, alias<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Had enough?<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code><strong># Quit from CapCLI\n<\/strong>\nCapCLI&gt; exit<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>First things first, after you download the code, you can extract it anywhere you like, but you must run CapCLI from the Capitoline directory, and you must copy your ROMs, ADFs and Components into the local directories before you run the code The command line gives you everything that the GUI can do (plus some &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/capitoline.twocatsblack.com\/index.php\/capcli\/\"> <span class=\"screen-reader-text\">CapCLI<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":20,"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-19","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/19","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=19"}],"version-history":[{"count":1,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/19\/revisions"}],"predecessor-version":[{"id":623,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/19\/revisions\/623"}],"wp:attachment":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}