{"id":814,"date":"2024-02-05T12:03:12","date_gmt":"2024-02-05T12:03:12","guid":{"rendered":"http:\/\/capitoline.twocatsblack.com\/?page_id=814"},"modified":"2024-02-05T16:20:09","modified_gmt":"2024-02-05T16:20:09","slug":"force-pal-in-kickstart","status":"publish","type":"page","link":"http:\/\/capitoline.twocatsblack.com\/index.php\/force-pal-in-kickstart\/","title":{"rendered":"Use Kickstart to force PAL mode"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>v3.0+<\/strong><\/p>\n\n\n\n<p>For all kickstarts >= v3.0 the graphics library initialises depending on the Agnus\/Alice identifier;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MOVE.W DFF004,D0   # Read the Agnus\/Alice identifier\nASR.L #8,D0        # Shift the high byte low\nMOVEQ #7F,D1       # Use this to mask the bits we want\nAND.L D1,D0        # Mask the bits we want<\/code><\/pre>\n\n\n\n<p>Bit 12 of $DFF004 is the PAL\/NTSC identifier (bit 4 of the high byte, regular\/fat\/Alice 0x1000=NTSC), this is shifted down a whole byte in the code so we can patch this to ignore the (now) 0x10 bit.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MOVE.W DFF004,D0   # Read the Agnus\/Alice identifier\nASR.L #8,D0        # Shift the high byte low\n<strong>MOVEQ #6F,D1<\/strong>       # Use this to mask the bits we want, ignore bit 4\nAND.L D1,D0        # Mask the bits we want<\/code><\/pre>\n\n\n\n<p>This is a simple patch in Cap, just find the old opcode, patch it and checksum, this should work for any kickstart v3.0 and above<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>loadrom \/path\/to\/original\/ks2+.rom\nfindopcode $graphics.library \"MOVEQ #7F,D1\"\npatch $FIND 0x726F\nchecksum\nsaverom \/path\/to\/new\/rom<\/code><\/pre>\n\n\n\n<p>This patch wasn&#8217;t based on anything original from me, user A10001986 on a1k.org identified what needed to be patched, for more info see the thread at <a href=\"https:\/\/www.a1k.org\/forum\/index.php?threads\/78218\/post-1579610\">https:\/\/www.a1k.org\/forum\/index.php?threads\/78218\/post-1579610<\/a><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>v1.4 \/ v2.0<\/strong><\/p>\n\n\n\n<p>Late v1.4 through to early v2.0 used a slightly different register set up (D5 instead of D1), the versioning of v2.02-v2.04 got a bit fuzzy, use the code that finds the opcode, only one works!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>loadrom \/path\/to\/original\/ks.rom\nfindopcode $graphics.library \"MOVEQ #7F,D5\"\npatch $FIND 0x7A6F\nchecksum\nsaverom \/path\/to\/new\/rom<\/code><\/pre>\n\n\n\n<p>Later v2.04\/v2.05 did a direct AND using D5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>loadrom \/path\/to\/original\/ks.rom\nfindopcode $graphics.library \"ANDI.B #$$7F,D5\"\npatch $FIND 0x0205006F\nchecksum\nsaverom \/path\/to\/new\/rom<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>v1.2 \/ v1.3<\/strong><\/p>\n\n\n\n<p>v1.2\/1.3 has a bit more logic and settings (and I don&#8217;t really understand what it&#8217;s doing, rather than the later Agnus detection), so I&#8217;m just replicating the patch as on the a1k forum, I think all this does is the same as the TINYpalntsc on <a href=\"https:\/\/aminet.net\/package\/util\/boot\/TINYpalntsc\">https:\/\/aminet.net\/package\/util\/boot\/TINYpalntsc<\/a> this is a much dirtier patch than the later ones, as the later ones just make it so Agnus\/Alice chip is detected as a PAL one (note, I haven&#8217;t tested this on all v1.2\/v1.3 kickstarts, it might not work).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>loadrom \/path\/to\/original\/ks.rom\nfindopcode $graphics.library \"MOVEM.L (SP)+,D2\/D3\/A2\"\nalias FIND add 6\npatch $FIND 0x700433FC002000DFF1DC4E75\nchecksum\nsaverom \/path\/to\/new\/rom<\/code><\/pre>\n\n\n\n<p>The new code does this&#8230; <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MOVEQ #4,D0\r\nMOVE.W #$20,DFF1DC\r\nRTS\r<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>v3.0+ For all kickstarts >= v3.0 the graphics library initialises depending on the Agnus\/Alice identifier; Bit 12 of $DFF004 is the PAL\/NTSC identifier (bit 4 of the high byte, regular\/fat\/Alice 0x1000=NTSC), this is shifted down a whole byte in the code so we can patch this to ignore the (now) 0x10 bit. This is a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/capitoline.twocatsblack.com\/index.php\/force-pal-in-kickstart\/\"> <span class=\"screen-reader-text\">Use Kickstart to force PAL mode<\/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-814","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/814","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=814"}],"version-history":[{"count":9,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/814\/revisions"}],"predecessor-version":[{"id":828,"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/pages\/814\/revisions\/828"}],"wp:attachment":[{"href":"http:\/\/capitoline.twocatsblack.com\/index.php\/wp-json\/wp\/v2\/media?parent=814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}