{"id":41,"date":"2022-12-30T12:54:31","date_gmt":"2022-12-30T12:54:31","guid":{"rendered":"http:\/\/192.168.1.222\/Capitoline\/?page_id=41"},"modified":"2022-12-30T12:54:31","modified_gmt":"2022-12-30T12:54:31","slug":"1-3-bootable-512k","status":"publish","type":"page","link":"http:\/\/capitoline.twocatsblack.com\/index.php\/1-3-bootable-512k\/","title":{"rendered":"1.3 Bootable (512k)"},"content":{"rendered":"\n<p>This guide lets to create a bootable SCSI 1.3 ROM just using Capitoline.<\/p>\n\n\n\n<p>Cap does not contain any C=\/Amiga code, so will need need<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A 256k Kickstart 1.3 ROM (the size is important, an &#8220;overburnt&#8221; 512k ROM will not work) <\/li>\n\n\n\n<li>A scsi.library which you an extract from the 3.1 library of your choice, I used the one from the A1200 ROM.&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>Note, if you haven&#8217;t extracted the library from the ROM, but you have the a 3.1 ROM, you can add it directly from the ROM without extracting;<\/p>\n\n\n\n<p>i.e. instead of;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>add Components\/os-source\/v40\/0x75094a7b.scsidisk_40.12_(21.12.93)<\/strong><\/pre>\n\n\n\n<p>You can;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>add \"\/location\/of\/3.1 Kickstart\" scsi.device\ne.g. add \"ROMs\/TOSEC.Firmware\/Kickstart v3.1 r40.068 (1993-12)(Commodore)(A1200)[!].rom\" scsi.device<\/strong><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Part 1 &#8211; Create the &#8220;lower&#8221; 0xF8000 ROM for SCSI<\/h2>\n\n\n\n<p>Create an empty ROM with a 0xF80000 ROMBASE, add the 0xFC0000 ROMHEADER (or it won&#8217;t boot)<\/p>\n\n\n\n<p>Add the scsidisk library (in this case from the A1200 40.68 KS3.1)<\/p>\n\n\n\n<p>Add the extra code which creates a &#8220;boot node&#8221; to allow the disk to boot<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>newrom 256k 255 \nrombase 0xf80000\u00a0\nadd Components\/BinaryChunks\/ROMHeader_FC.bin\u00a0\nadd Components\/os-source\/v40\/0x75094a7b.scsidisk_40.12_(21.12.93)\u00a0\nadd Components\/BinaryChunks\/add_boot_node.bin<\/strong><\/pre>\n\n\n\n<p>Patch the SCSI library so that it calls the new code &#8211; there&#8217;s two locations to patch.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>findopcode $0x75094a7b.scsidisk_40.12_(21.12.93) \"JSR FCD6(A6)\"\nalias OPCODE $add_boot_node.bin.(START)&nbsp;\nalias OPCODE subtract $FIND&nbsp;\nalias OPCODE subtract 2&nbsp;\nalias OPCODE add 0x61000000&nbsp;\npatch $FIND $OPCODE \nfindopcode $0x75094a7b.scsidisk_40.12_(21.12.93) \"JSR FFDC(A6)\"&nbsp;\nalias OPCODE $add_boot_node.bin.(START)&nbsp;\nalias OPCODE subtract $FIND&nbsp;\nalias OPCODE add 26&nbsp;\nalias OPCODE add 0x61000000&nbsp;\npatch $FIND $OPCODE<\/strong><\/pre>\n\n\n\n<p>Next add the code to initialise Gayle (assuming you have a Gayle or emulate Gayle)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>add Components\/BinaryChunks\/init_gayle.bin<\/strong><\/pre>\n\n\n\n<p>Patch the scsi.library INIT (ROMTAG.INIT) call to jump into the new code<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>alias SCSIINIT romdata $0x75094a7b.scsidisk_40.12_(21.12.93).(ROMTAG.INIT) 4\nalias GAYLE $init_gayle.bin.(START)&nbsp;\nalias GAYLE add $ROMBASE&nbsp;\npatch $0x75094a7b.scsidisk_40.12_(21.12.93).(ROMTAG.INIT) $GAYLE<\/strong><\/pre>\n\n\n\n<p>Patch the Gayle init code to jump to the original address of the scsi.library INIT which we saved in SCSIINIT<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>alias GAYLE $init_gayle.bin.(END) \nalias GAYLE subtract 4&nbsp;\npatch $GAYLE $SCSIINIT<\/strong><\/pre>\n\n\n\n<p>Finally, add the standard ROM components, and checksum it &#8211; then we&#8217;re all done for $F80000<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>add checksum\nadd size\nadd vectors\nchecksum<\/strong><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Part 2 &#8211; Patch the original 1.3 ROM the &#8220;upper&#8221; $FC0000 ROM<\/h2>\n\n\n\n<p>Next we need to load the original KS1.3 and patch its library scan table to look at $F80000-$FC0000 as it normally doesn&#8217;t &#8211; luckily, for 1.3 it seems to scan $FC0000-$10000000 twice, so we can overwrite the second one (makes the patch simple), analyserom is used to find exec, in case you don&#8217;t have the full kickstart definition file, don&#8217;t forget to checksum.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>loadrom \"ROMs\/TOSEC.Firmware\/Kickstart v1.3 r34.005 (1987-12)(Commodore)(A500-A1000-A2000-CDTV)[!].rom\nanalyserom\nfind $exec.library 0x00FC00000100000000FC00000100000000F0000000F80000FFFFFFFF\npatch $FIND &nbsp; &nbsp; &nbsp; &nbsp;0x00FC00000100000000F8000000FC000000F0000000F80000FFFFFFFF\nchecksum<\/strong><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Part 3 &#8211; Save your work!<\/h2>\n\n\n\n<p>Join the two ROMs together and save the file, you might want to use &#8220;saveprofile test_ks1.3scsi.rom byteswap&#8221; if you&#8217;re buring a real ROM<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><strong>romprofile 0 1\nsaveprofile test_ks1.3scsi.rom<\/strong><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Acknowledgements<\/h2>\n\n\n\n<p>I didn&#8217;t develop the code that creates the boot node, I found it in the Commodore docs when it talked about manually creating a boot node, this and the code for checking the version of expansion.library was in the GetSCSI11 code developed by Torbj\u00f6rn Andersson which you can find&nbsp;<a href=\"http:\/\/aminet.net\/package\/util\/boot\/GetSCSI11\">Here<\/a>&nbsp;on Aminet.<\/p>\n\n\n\n<p>The code to initialise Gayle was found&nbsp;<a href=\"http:\/\/eab.abime.net\/showthread.php?t=77782&amp;page=3\">Here<\/a>&nbsp;and written by user A10001986 (who I think is still active on Aminet) the thread was started by dJOS (offering a bounty to fix the issue) and kipper2k matched the bounty.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide lets to create a bootable SCSI 1.3 ROM just using Capitoline. Cap does not contain any C=\/Amiga code, so will need need Note, if you haven&#8217;t extracted the library from the ROM, but you have the a 3.1 ROM, you can add it directly from the ROM without extracting; i.e. instead of; add &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/capitoline.twocatsblack.com\/index.php\/1-3-bootable-512k\/\"> <span class=\"screen-reader-text\">1.3 Bootable (512k)<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"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-41","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/41","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=41"}],"version-history":[{"count":0,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/41\/revisions"}],"wp:attachment":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/media?parent=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}