{"id":106,"date":"2012-06-12T19:58:40","date_gmt":"2012-06-12T19:58:40","guid":{"rendered":"http:\/\/retroramblings.net\/?p=106"},"modified":"2012-06-12T19:58:40","modified_gmt":"2012-06-12T19:58:40","slug":"experimenting-with-tg68-5","status":"publish","type":"post","link":"http:\/\/retroramblings.net\/?p=106","title":{"rendered":"Experimenting with TG68"},"content":{"rendered":"<p><strong>Part 5 &#8211; Interrupts and other tweaks<\/strong><\/p>\n<p>Since my last post I&#8217;ve made a few structural changes to the project, most notably to the video controller.\u00a0 Rather than just being a collection of ad-hoc lines in the toplevel file, I&#8217;ve moved it into a self-contained module and also moved the vgacache out of the SDRAM controller and into this new video_controller module.<\/p>\n<p>As yet another learning exercise, I&#8217;ve also added a simple character ROM (character definitions taken from the Minimig boot code), and text buffer, which is merged with the display.\u00a0 This will no doubt provide a useful debugging display as the project progresses!<\/p>\n<p>The new video_controller module will eventually support a certain amount of runtime adjustment to the video, through some registers exposed to the TG68 processor.\u00a0 Currently only 1 32-bit register is implemented, which is the framebuffer address.\u00a0 This means the processor can now scroll the display vertically.<\/p>\n<p><a href=\"http:\/\/retroramblings.net\/wp-content\/uploads\/2012\/06\/framebuffer4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-107\" title=\"framebuffer4\" src=\"http:\/\/retroramblings.net\/wp-content\/uploads\/2012\/06\/framebuffer4.jpg\" alt=\"\" width=\"654\" height=\"500\" srcset=\"http:\/\/retroramblings.net\/wp-content\/uploads\/2012\/06\/framebuffer4.jpg 654w, http:\/\/retroramblings.net\/wp-content\/uploads\/2012\/06\/framebuffer4-300x229.jpg 300w, http:\/\/retroramblings.net\/wp-content\/uploads\/2012\/06\/framebuffer4-392x300.jpg 392w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/a><\/p>\n<p>In order to do this smoothly, the framebuffer pointer must be updated during the vertical blanking interval &#8211; and the best way to do that is to use a VBLANK interrupt.\u00a0 Therefore I&#8217;ve also created a simple interrupt controller.\u00a0 This detects momentary pulses on seven different interrupt lines, and encodes them into the 3-bit IPL signal used by the TG68 processor.\u00a0 I&#8217;ve used interrupt level 1 for the VBLANK interrupt, and left the others unused for now.\u00a0 When I come to add keyboard and mouse support, another interrupt will be used to signal that a byte of PS\/2 data is ready.<\/p>\n<p>Binary (.sof file) and full source for anyone who might be interested, <a href=\"http:\/\/retroramblings.net\/downloads\/DE1_TG68Test_Part5_Interrupts.zip\">can be found here.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part 5 &#8211; Interrupts and other tweaks Since my last post I&#8217;ve made a few structural changes to the project, most notably to the video controller.\u00a0 Rather than just being a collection of ad-hoc lines in the toplevel file, I&#8217;ve &hellip; <a href=\"http:\/\/retroramblings.net\/?p=106\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-106","post","type-post","status-publish","format-standard","hentry","category-fpga"],"_links":{"self":[{"href":"http:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=106"}],"version-history":[{"count":3,"href":"http:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/106\/revisions"}],"predecessor-version":[{"id":110,"href":"http:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/106\/revisions\/110"}],"wp:attachment":[{"href":"http:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}