{"id":194,"date":"2023-01-17T16:05:35","date_gmt":"2023-01-17T16:05:35","guid":{"rendered":"http:\/\/192.168.1.222\/Capitoline\/?page_id=116"},"modified":"2023-01-17T16:05:35","modified_gmt":"2023-01-17T16:05:35","slug":"hash-files","status":"publish","type":"page","link":"http:\/\/capitoline.twocatsblack.com\/index.php\/hash-files\/","title":{"rendered":"Hash Files &#8220;Capitoline Hashes&#8221;"},"content":{"rendered":"\n<p>I extensively rely on CRC32 hashes to identify files and their contents, it&#8217;s only a four byte number, so there&#8217;s four billion combinations, which means I may get a clash at some point, however, there&#8217;s only around 10,000 different files, ROMs, components etc. so I took a punt and basically with the likelihood of a clash at 400,000:1 I decided not to use a longer hash (like MD5 or SHA), this may come back to bite me, but it does make managing files less unwieldy.<br><br>The hash file begins 0xnnnnnnnn, where nnnnnnnn is the CRC32 of the thing it describes, I include a CRC32 command in case your system doesn&#8217;t have one, there are three types of hash files; Containers, ROMs and Components, these are all human-readable text files based on INI file format so you can create new ones, edit and update, read, convert etc. if you update Cap, I suggest you do not keep any old hashes as they could be updated.<br><br>Only hash files under &#8220;Capitoline Hashes&#8221; will be recognised by Cap.<br>If you add hashes after you start CapCLI then you must run <strong>loadhashes<\/strong> to refresh them<br>If you are using CapGUI you have to <strong>exit and restart<\/strong> the CapGui if you update them.<br>You can place hash files anywhere under &#8220;Capitoline Hashes&#8221; (or create new folders for your own), the folder names are just for convenience.<br><br>Feel free to read, copy, edit etc. as long as you don&#8217;t claim my standard ones as your own.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Container Hashes<\/h2>\n\n\n\n<p>A container is a ROM or ROMs in a different format, encrypted or bundled up or for use with special loading tools, Cap allows you to load these, but it needs a hash file describing the format so it knows how to load them, Cap uses the CRC32 hash of the contain to identify which container hash it should use.<br>Note, the container hash files are &#8220;guidelines&#8221;, some of the info is purely documentary and if something in the hash file contradicts reality then Cap may ignore information, load the wrong thing or even get confused and crash, it tries to auto correct, but that&#8217;s not always possible. <br><br>Here&#8217;s examples of each type of container, for more info about the formats themselves, have a look at &#8220;Kickstart -&gt; Digital Formats&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>1Mb CD32<\/strong>\n\n&#91;Description]\nTitle=CD32 Standard rom\nText=Interleaved\nFormat=CD32Encoded\nFileType=Extended\/Kickstart\n\n&#91;Display]\nColour=0x555555\nIcon=13\n\n&#91;Components]\nKickstart=0,524288,EmbeddedKickstart:0x1e62d4a5.Kickstart v3.1 r40.60 (1993)(Commodore)(CD32)\nExtended=524288,524288,EmbeddedKickstart:0x87746be2.CD32 Extended-ROM r40.60 (1993)(Commodore)(CD32)\n\n\n<strong>Kickstart (Floppy, ADF)<\/strong>\n\n&#91;Description]\nTitle=Kickstart-Disk v1.3 r34.5 (1987)(Commodore)(A1000)\nText=None\nRomBase=0x00fc0000\nFileType=Kickstart-Disk\n\n&#91;Components]\nKickstart=512,262144,EmbeddedKickstart:0xc4f0f55f.Kickstart v1.3 r34.5 (1987)(Commodore)(A1000)\n\n\n<strong>Amiga Forever (Cloanto)<\/strong>\n\n&#91;Description]\nTitle=Kickstart v3.1 r40.68 (1993)(Commodore)(A4000)&#91;encrypted, needs rom.key]\nText=Supplied by cloanto\nFormat=Cloanto.0x869ae1b1\nFileType=Kickstart\n\n&#91;Display]\nColour=0x555555\nIcon=13\n\n&#91;Components]\nHeader=0,11,CloantoHeader:0x414D49524F4D5459504531\nKickstart=11,524288,EmbeddedKickstart:0x43b6dd22.Kickstart v3.1 r40.68 (1993)(Commodore)(A4000)\n\n\n<strong>ReKick\/ReCode\n<\/strong>\n&#91;Description]\nTitle=Kickstart 3.1 (40.60) A600 ReKick\/ReCode\nText=Early version of Kickstart 3.1, has A600 in the name the in the leaked 3.1 os-source, but that might just mean 68000 only code, this ROM file contains a small header then the 0xDEADFEED encrypted ROM, which has been designed to be softloaded into $200000\nRomBase=0x200000\nFileType=Kickstart\nFormat=os-source.ReCode\n\n&#91;Display]\nColour=0x555555\nIcon=13\n\n&#91;Components]\nKickstart=108,524288,EmbeddedKickstart:0x3928913e.kick.a600_20.40.60\n\n\n<strong>KickIt<\/strong>\n\n&#91;Description]\nTitle=Kickstart v2.0 beta 5 r36.067 (1990-05)(Commodore)(beta)&#91;KickIt]\nText=Developer ROM designed to be softloaded \nRomBase=0x200000\nFileType=KickItKickstart\n\n&#91;Components]\nHeader=0,8,KickItHeader:0x0000000000080000\nKickstart=8,524288,EmbeddedKickstart:0xe0aa5472.Kickstart v2.0 beta 5 r36.067 (1990-05)(Commodore)(beta)\n\n\n<strong>Superkick (Hard Drive Files)<\/strong>\n\n&#91;Description]\nTitle=Kickstart v3.1 r40.038 (1993-04)(Commodore)(A3000)(beta)&#91;with bonus]\nText=Superkickstart file for A3000 with Kickstart 1.4 ROMs\nFileType=Kickstart\/Bonus\n\n&#91;Display]\nColour=0x555555\nIcon=13\n\n&#91;Components]\nKickstart=0,524288,EmbeddedKickstart:0xe24d337f.Kickstart v3.1 r40.038 (1993-04)(Commodore)(A3000)(beta)&#91;with bonus]\nBonus=524288,2284,EmbeddedKickstart:bc753ed9.Amiga 3000 Bonus (v. 2.x).rom\n\n\n<strong>Superkick (Floppy, ADF)<\/strong>\n\n&#91;Description]\nTitle=Superkickstart Disk (v1.3 r34.005\/v2.04 r37.175)\nText=None\nRomBase=0xfc0000\nFileType=SuperKickstart\n\n&#91;Components]\nKickstart1=1024,262144,EmbeddedKickstart:0xe0f37258.Kickstart v1.3 r34.005 (1987-12)(Commodore)(A3000)&#91;!]\nBonus1=791552,20992,EmbeddedKickstart:0x64b9a9fc.Bonus1.3\nKickstart2=263168,524288,EmbeddedKickstart:0x234a7233.Kickstart v2.04 r37.175 (1991-05)(Commodore)(A3000)\nBonus2=787456,2560,EmbeddedKickstart:0x5d20fbf0.Bonus2.x\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">ROM Hashes<\/h2>\n\n\n\n<p>ROM file hash file names start with the CRC32 hash of the ROM (so they can be matched up) and describe the components that make up a ROM.<br><br>The Components are listed in the order they appear in the ROM, with a starting position and size, followed by the hash of the component &#8211; this is critical as the component hash describes what relocs are contained in the component.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Description]\nTitle=Kickstart v3.1 r40.68 (1993)(Commodore)(A1200)&#91;!].rom\nText=This was the general release of Kickstart 3.1 for the A1200, seen in the last Commodore released A1200 and all the Escom A1200s\nRomBase=0xF80000\nFileType=Kickstart\n\n&#91;Components]\nexec.library=0,14264,Library:0x3afb2905.exec_40.10_(15.7.93)\nexpansion.library=14264,2776,Library:0x7f3943c2.expansion_40.2_(9.3.93)\nromboot=17040,3864,Library:0x584ddd57.romboot\ngraphics.library=20904,103556,Library:0x53c282ce.graphics_40.24_(18.5.93)\ndos.library=124460,39948,Library:0x2f69d3eb.dos_40.3_(1.4.93)\nfilesystem=164408,24480,Library:0x1f0afe04.fs_40.1_(15.2.93)\nconsole.device=188888,15492,Library:0xa2a0d825.console_40.2_(5.3.93)\nlayers.library=204380,12724,Library:0xd9aacb47.layers_40.1_(15.2.93)\nscsi.device=217104,10652,Library:0x75094a7b.scsidisk_40.12_(21.12.93)\ncon-handler=227756,10180,Library:0x14413061.con-handler_40.2_(12.5.93)\ngameport.device=237936,5684,Library:0x58f0555d.gameport_40.1_(8.3.93)\naudio.device=243620,4256,Library:0x66da7c86.audio_37.10_(26.4.91)\ncard.resource=247876,3044,Library:0x5cf13e5b.cardres_40.4_(4.5.93)\nutility.library=250920,2492,Library:0x9eb9840a.utility_40.1_(10.2.93)\nbattclock.resource=253412,2412,Library:0xd1c49d01.battclock_39.3_(20.4.92)\ncarddisk.device=255824,2352,Library:0xf1492cfe.carddisk_40.1_(12.2.93)\nramlib=258176,1060,Library:0x8b7c4683.ramlib_40.2_(5.3.93)\nramdrive.device=259236,1524,Library:0xc39bf1cb.ramdrive_39.35_(21.5.92)\ncia.resource=260760,1008,Library:0x595381d5.cia_39.1_(10.3.92)\nmisc.resource=261768,176,Library:0x5e1deb17.misc_37.1_(8.1.91)\nworkbench.task=261944,196,Library:0xbb2fc663.wbtag_39.1_(20.4.92)\nKickity-Split=262144,8,Kickity-Split:0x11114ef900f80002\npotgo.resource=262152,312,Library:0x183c43e4.potgo_37.4_(28.1.91)\nFileSystem.resource=262464,416,Library:0x3c37f268.filesysres_40.1_(15.2.93)\ndisk.resource=262880,840,Library:0x89a9a08c.disk_37.2_(21.4.91)\nmathffp.library=263720,1180,Library:0xee6af990.mathffp_40.1_(16.3.93)\ntimer.device=264900,3564,Library:0x886913b1.timer_39.4_(29.7.92)\nmathieeesingbas.library=268464,3748,Library:0x25559846.mathieeesingbas_40.4_(16.3.93)\nkeymap.library=272212,3200,Library:0xecd74357.keymap_40.4_(12.3.93)\nbootmenu=275412,5648,Library:0x22cca123.bootmenu_40.5_(17.3.93)\ntrackdisk.device=281060,7432,Library:0xba2ad971.trackdisk_40.1_(12.3.93)\nicon.library=288492,9264,Library:0x64d0b492.icon_40.1_(15.2.93)\nram-handler=297756,9260,Library:0xfde5d96f.ram_39.4_(9.8.92)\nshell=307092,17632,Library:0x371281f0.shell_40.2_(4.3.93)\nintuition.library=324724,104864,Library:0xed1af101.intuition_40.85_(5.5.93)\ngadtools.library=429588,23444,Library:0x22a7f238.gadtools_40.4_(24.5.93)\nworkbench.library=453032,70664,Library:0x0af008ea.wb_40.5_(24.5.93)\nbattmem.resource=523696,484,Library:0x9b18e90c.battmem_39.2_(6.3.92)\nChecksum=524264,4,Checksum:0x87ba7a3e\nSize=524268,4,Size:0x00080000\nVectors=524272,16,Vectors:0x00180019001a001b001c001d001e001f<\/code><\/pre>\n\n\n\n<p class=\"has-text-align-center\">&#8211;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Component Hashes<\/h2>\n\n\n\n<p>For hash files with &#8220;FileType=Loadable Library&#8221; this describes a (relocatable) loadable component, the hash value is the CRC32 of the entire loadable library if it was extracted from the ROM.<br><br>The key elements here are the ROMTAG=n which describes how many bytes before the ROMTAG belong to the component, the Size=n which is the total number of bytes consumed by the component in the ROM and RELOCS=n (along with the [RELOC32] section) this indicates where in the component a ROM address will need to be relocated if the component is moved.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cat 0x4f8511ed.fs_36.289_(20_Sep_1990)\n\n&#91;Description]\nTitle=fs 36.289 (20 Sep 1990)\nText=filesystem\nSize=21368\nROMTAG=28\nRELOCS=5\nFileType=Loadable Library\n\n&#91;Display]\nColour=0x555555\nIcon=153\n\n&#91;RELOC32]\nRELOC=30\nRELOC=34\nRELOC=42\nRELOC=46\nRELOC=50<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I extensively rely on CRC32 hashes to identify files and their contents, it&#8217;s only a four byte number, so there&#8217;s four billion combinations, which means I may get a clash at some point, however, there&#8217;s only around 10,000 different files, ROMs, components etc. so I took a punt and basically with the likelihood of a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/capitoline.twocatsblack.com\/index.php\/hash-files\/\"> <span class=\"screen-reader-text\">Hash Files &#8220;Capitoline Hashes&#8221;<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":65,"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-194","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/194","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=194"}],"version-history":[{"count":0,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/194\/revisions"}],"wp:attachment":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/media?parent=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}