{"id":1217,"date":"2017-04-16T14:53:16","date_gmt":"2017-04-16T13:53:16","guid":{"rendered":"http:\/\/www.randomorbit.co.uk\/?p=1217"},"modified":"2017-04-16T14:53:16","modified_gmt":"2017-04-16T13:53:16","slug":"retrochallenge-20174-interak-cf-card-part-3","status":"publish","type":"post","link":"https:\/\/www.randomorbit.co.uk\/?p=1217","title":{"rendered":"Retrochallenge 2017\/4 \u2013 Interak CF card \u2013 Part 3"},"content":{"rendered":"<p>Things are a little weird as I suggested in my <a href=\"http:\/\/www.randomorbit.co.uk\/?p=1214\">previous post.<\/a><\/p>\n<p>I have the CF card installed and if I use the ROM monitor in the Interak to access it through a series of <strong>P<\/strong><em>ort<\/em> commands, I can see what appears to be sensible data. If, however I use a piece of Z80 assembly language, I never see the CF card become ready.<\/p>\n<p>I have tried my own code and two other variants found on the web.<\/p>\n<p>Let me show you what I mean. This snippet came from Scott Baker&#8217;s website&#8230;<\/p>\n<pre style=\"color: #000000; background: #ffffff;\"><span style=\"color: #008c00;\">1069<\/span>:         \tWAITDRQ:\r\n<span style=\"color: #008c00;\">1069<\/span>: F5      \t        <span style=\"color: #44aadd;\">PUSH<\/span>    <span style=\"color: #000080;\">AF<\/span>\r\n106A:         \tWAITDRQLP:\r\n106A: DB67    \t        <span style=\"color: #44aadd;\">in<\/span> \t<span style=\"color: #000080;\">A<\/span><span style=\"color: #808030;\">,<\/span><span style=\"color: #808030;\">(<\/span>I7<span style=\"color: #808030;\">)<\/span>\r\n106C: E608    \t        <span style=\"color: #44aadd;\">AND<\/span> \t08H\r\n106E: FE08    \t        <span style=\"color: #44aadd;\">cp<\/span> \t08H\r\n<span style=\"color: #008c00;\">1070<\/span>: 20F8    \t        <span style=\"color: #44aadd;\">JR<\/span>\t<span style=\"color: #e34adc;\">NZ,<\/span> WAITDRQLP\r\n<span style=\"color: #008c00;\">1072<\/span>: F1      \t        <span style=\"color: #44aadd;\">POP<\/span> \t<span style=\"color: #000080;\">AF<\/span>\r\n<span style=\"color: #008c00;\">1073<\/span>: C9      \t        <span style=\"color: #44aadd;\">RET<\/span>\r\n<\/pre>\n<p>To use this, I have set up the sector and all other parameters needed for a disk read. If I run this routine, it never finishes. breaking the code at 0x106C shows that the accumulator is either 0x40 or 0x41. Which means &#8220;Drive ready&#8221; or &#8220;Drive ready + error&#8221;.<\/p>\n<p>However, if I use &#8220;P 67&#8221; at the monitor, I get &#8220;0x58&#8221; which means &#8220;Drive ready + Drive seek complete + Data request ready&#8221;.<\/p>\n<p>I can run from 0x106A to 106C again and again I see 0x40 or 0x41 in the accumulator. If I use &#8220;P67&#8221; again, again I see 0x58.<\/p>\n<p>Can anyone see the deliberate mistake because I can&#8217;t \ud83d\ude41<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Things are a little weird as I suggested in my previous post. I have the CF card installed and if I use the ROM monitor in the Interak to access it through a series of Port commands, I can see what appears to be sensible data. If, however I use a piece of Z80 assembly &hellip; <a href=\"https:\/\/www.randomorbit.co.uk\/?p=1217\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Retrochallenge 2017\/4 \u2013 Interak CF card \u2013 Part 3<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[47,122,33,125],"tags":[],"class_list":["post-1217","post","type-post","status-publish","format-standard","hentry","category-c93-blog-posts","category-interak","category-c84-retro-tech","category-retrochallenge-20174"],"featured_image_src":null,"author_info":{"display_name":"andy","author_link":"https:\/\/www.randomorbit.co.uk\/?author=1"},"_links":{"self":[{"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1217"}],"version-history":[{"count":1,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1217\/revisions"}],"predecessor-version":[{"id":1218,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1217\/revisions\/1218"}],"wp:attachment":[{"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}