{"id":37,"date":"2022-12-30T12:52:30","date_gmt":"2022-12-30T12:52:30","guid":{"rendered":"http:\/\/192.168.1.222\/Capitoline\/?page_id=37"},"modified":"2022-12-30T12:52:30","modified_gmt":"2022-12-30T12:52:30","slug":"1mb-3-1-classic-rom","status":"publish","type":"page","link":"http:\/\/capitoline.twocatsblack.com\/index.php\/1mb-3-1-classic-rom\/","title":{"rendered":"1Mb 3.1 Classic ROM"},"content":{"rendered":"\n<p>The process to create a 1Mb 3.1 (pre 3.1.4) ROM is exactly the same as a 3.1.4 ROM except the patch is more complex as pre 3.1.4 exec used a scan table that that is referenced by a relative address (i.e. not an absolute address, &#8220;LEA nnnn(PC).A0&#8221;), luckily by using the disassembler functions Cap can search for effective address opcodes to save you disassembling it yourself.&nbsp;<\/p>\n\n\n\n<p>So here&#8217;s the run-through to get a ROM capable of 1Mb using the CLI, note, this only creates an empty ROM with the exec.library prepared to act as a 1Mb ROM.<\/p>\n\n\n\n<p>Create an empty ROM;<\/p>\n\n\n\n<pre class=\"wp-block-code has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><code><strong>newrom 512k\nrombase 0xF80000\nadd \"ROMs\\TOSEC.Firmware\\Kickstart v3.0 r39.106 (1992-09)(Commodore)(A1200)&#91;!].rom\" exec.library\nadd components\\BinaryChunks\\1Mb_Scantable.bin<\/strong><\/code><\/pre>\n\n\n\n<p>Locate the old scan table (this is pretty much the same for all 3.1 ROMs except CD32 which is already 1Mb capable)<\/p>\n\n\n\n<pre class=\"wp-block-code has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><code><strong>find $exec.library 0x00F800000100000000F0000000F80000FFFFFFFF\nalias FIND add $ROMBASE\nalias FIND mid 4\nalias OPCODE \"LEA $FIND(PC),A0\"<\/strong><\/code><\/pre>\n\n\n\n<p>Locate the opcode (which will include the relative displacement reference)<\/p>\n\n\n\n<pre class=\"wp-block-code has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><code><strong>findopcode $exec.library \"$OPCODE\"\nalias FIND add 2\nalias REL $1Mb_Scantable.bin.(START)\nalias REL subtract $FIND\nalias REL mid 6<\/strong><\/code><\/pre>\n\n\n\n<p>Patch the opcode to have the new relative displacement;<\/p>\n\n\n\n<pre class=\"wp-block-code has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><code><strong>patch $FIND 0x$REL<\/strong><\/code><\/pre>\n\n\n\n<p>Repeat for the second reference;<\/p>\n\n\n\n<pre class=\"wp-block-code has-secondary-color has-tertiary-background-color has-text-color has-background has-small-font-size\"><code><strong>findopcode $exec.library \"$OPCODE\"\nalias FIND add 2\nalias REL $1Mb_Scantable.bin.(START)\nalias REL subtract $FIND\nalias REL mid 6\npatch $FIND 0x$REL<\/strong><\/code><\/pre>\n\n\n\n<p>And you&#8217;re done, you can now add the rest of the components, for the 0xF8 ROM, create the second 0xE0 ROM, add the components and save.<\/p>\n\n\n\n<p>The other big difference between 3.1 exec and 3.1.4 exec is that because an absolute displacement is used in 3.1.4, you can place the new scan table anywhere is ROM (as opposed to relative displacements using &#8220;words&#8221; can only be +\/- 32k jumps), this means that the new scan table in 3.1 must be directly after exec.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The process to create a 1Mb 3.1 (pre 3.1.4) ROM is exactly the same as a 3.1.4 ROM except the patch is more complex as pre 3.1.4 exec used a scan table that that is referenced by a relative address (i.e. not an absolute address, &#8220;LEA nnnn(PC).A0&#8221;), luckily by using the disassembler functions Cap can &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/capitoline.twocatsblack.com\/index.php\/1mb-3-1-classic-rom\/\"> <span class=\"screen-reader-text\">1Mb 3.1 Classic ROM<\/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-37","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/37","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=37"}],"version-history":[{"count":0,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/37\/revisions"}],"wp:attachment":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/media?parent=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}