{"id":1220,"date":"2017-04-24T20:39:49","date_gmt":"2017-04-24T19:39:49","guid":{"rendered":"http:\/\/www.randomorbit.co.uk\/?p=1220"},"modified":"2017-04-24T20:39:49","modified_gmt":"2017-04-24T19:39:49","slug":"retrochallenge-20174-interak-cf-card-part-4","status":"publish","type":"post","link":"https:\/\/www.randomorbit.co.uk\/?p=1220","title":{"rendered":"Retrochallenge 2017\/4 \u2013 Interak CF card \u2013 Part 4"},"content":{"rendered":"<p>We are well into the second half of Retrochallenge now and it fair to say that I&#8217;m not where I wanted to be. However I am learning a great deal about Z80s and CF cards are their respective wily ways.<\/p>\n<p>Things continue to be confusing.<\/p>\n<p>A quick re-cap of my previous posts&#8230;<\/p>\n<p>It started off with the status of the CF card never showing that the read transfer was ready. However, using the ROM monitor on the Interak rather than the program showed that it was. There were various trials and hair being pulled out but what it boils down to is this.<\/p>\n<p>If I use&#8230;<\/p>\n<pre>\u00a0\u00a0\u00a0 ld\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0BC, (0x0067)\r\n    in\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0a, (C)<\/pre>\n<p>I get one value but if I use&#8230;<\/p>\n<pre>\u00a0\u00a0\u00a0 ld\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0a, 0x00\r\n\u00a0\u00a0 \u00a0in\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0a, (0x67)<\/pre>\n<p>I get a different answer.<\/p>\n<p>Note 0x67 is the CF card status port.<\/p>\n<p>According to the Z80 manual from Zilog, <em><strong>in a, (C)<\/strong><\/em>, puts B on to the top of the address bus, C on to the bottom and reads from the addressed I\/O port. So that&#8217;s 0x0067.<\/p>\n<p>Now, <strong><em>in a, 0x67<\/em><\/strong>, puts A on to the top of the bus (previously loaded with 0) and 0x67 on to the bottom and reads the addressed I\/O port.<\/p>\n<p>These two are functionally the same but give different results.<\/p>\n<p>One suggestion that has been made though the VCfed forums is that it&#8217;s a timing issue as the <em><strong>in a, (C)<\/strong><\/em> version takes a little longer.<\/p>\n<p>I have a few things to try. I have a couple of other CF cards on order and they should arrive soon. I&#8217;ll try them to see if there is some issue with the timing of this card. I&#8217;ll also look to see if I can get a wait state in to the IN operation.<\/p>\n<p>More news when I have it.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are well into the second half of Retrochallenge now and it fair to say that I&#8217;m not where I wanted to be. However I am learning a great deal about Z80s and CF cards are their respective wily ways. Things continue to be confusing. A quick re-cap of my previous posts&#8230; It started off &hellip; <a href=\"https:\/\/www.randomorbit.co.uk\/?p=1220\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Retrochallenge 2017\/4 \u2013 Interak CF card \u2013 Part 4<\/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,98,125],"tags":[],"class_list":["post-1220","post","type-post","status-publish","format-standard","hentry","category-c93-blog-posts","category-interak","category-c84-retro-tech","category-retrochallenge","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\/1220","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=1220"}],"version-history":[{"count":1,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1220\/revisions"}],"predecessor-version":[{"id":1221,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1220\/revisions\/1221"}],"wp:attachment":[{"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.randomorbit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}