{"id":962,"date":"2014-04-10T11:45:24","date_gmt":"2014-04-10T11:45:24","guid":{"rendered":"http:\/\/mertboru.com\/?p=962"},"modified":"2018-07-25T08:44:40","modified_gmt":"2018-07-25T08:44:40","slug":"nostalgic-8-bit-turbo-loader-for-amstrad","status":"publish","type":"post","link":"http:\/\/mertboru.com\/?p=962","title":{"rendered":"Nostalgic 8-bit Turbo Loader for Amstrad"},"content":{"rendered":"<p>I have always loved <a href=\"http:\/\/en.wikipedia.org\/wiki\/ZX_Spectrum\" target=\"_blank\">Sinclair ZX Spectrum<\/a>&#8216;s characteristic tape loading method using yellow\/blue stripes in the border. Contrary to <a href=\"http:\/\/en.wikipedia.org\/wiki\/Amstrad_CPC\" target=\"_blank\">Amstrad CPC<\/a>&#8216;s humble block-by-block loader with no visual feedback on screen, Spectrum offered a feast for the eye! So sexy, so catchy&#8230;<\/p>\n<p><!--more--><\/p>\n<p><strong>A bit of History<\/strong><\/p>\n<p>Major game developers\/publishers of the 80s (Ocean, US Gold, Gremlin Graphics, Firebird, etc.) used turbo loaders on Amstrad by imitating the landmark tape loading system that Spectrum had introduced, not only for visual attraction but also for software protection. For the average user, it was very hard to duplicate Amstrad games released with custom turbo loaders. Some of these loaders were even capable of displaying a countdown timer and\/or playing music while loading the game data. Thanks to the same CPU (Z80) used on both Amstrad and Sinclair, some of these loaders were cross-platform solutions. Speedlock, Alcatraz, Gremlin Loader and Bleepload were amongst these custom loaders.<\/p>\n<p><strong>Nostalgic coding<\/strong><\/p>\n<p>A few years ago, I&#8217;ve written a tutorial (in Turkish) on coding a turbo loader in Z80 assembly language for Amstrad CPC home computers, demystifying the secrets behind the custom loaders of 8-bit era. Last year, it was released as an article on <a href=\"http:\/\/retrojen.org\/\" target=\"_blank\">Retrojen<\/a>, a retro-fanzine published in Turkey.<\/p>\n<p>Although I&#8217;ve written the original turbo loader routine way back on December 24, 2010, <strong>I&#8217;m releasing the source codes<\/strong>, today!<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/mertboru.com\/wp-content\/uploads\/2014\/04\/TurboLoader_for_Amstrad_CPC_by_matahari.rar\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1012\" src=\"http:\/\/mertboru.com\/wp-content\/uploads\/2014\/04\/download_button_icon.png\" alt=\"\" width=\"196\" height=\"50\" \/><\/a><\/p>\n<p>For clarification purposes, I have tried to keep the code as simple as possible, and written descriptive inline comments where necessary. &#8211;\u00a0<em>(So, the code is <span style=\"text-decoration: underline;\">not<\/span> optimized for size\/speed.)<\/em><\/p>\n<p>These source code files are exactly the same files published in my article on Retrojen. With respect to editor-in-chief&#8217;s kind request, I am not putting a scan\/screenshot of this article on my blog. It is only available as a printed material&#8230; No worries, you can always <a href=\"http:\/\/retrojen.org\/\" target=\"_blank\">subscribe<\/a> to this lovely fanzine. It is FREE!<\/p>\n<p><strong>Time to rewind the cassette tape!<\/strong><\/p>\n<p>My turbo loader tutorial\/source files covers the following features:<\/p>\n<ul>\n<ul>\n<ul>\n<li>Using 2-colour stripes in the border (like an old Speccy),<\/li>\n<li>Displaying a bitmap based countdown timer (so that you can use your own fonts),<\/li>\n<li>Incremental raster scanning\u00a0(no skipping lines, just displaying\u00a0one after another).<\/li>\n<\/ul>\n<\/ul>\n<\/ul>\n<p>There are 3 different source code files for this project:<\/p>\n<p style=\"padding-left: 60px;\"><strong>&#8211; jScreenDump_16k_Mode1_Flat.pde:<\/strong>\u00a0This is a very simple routine that I&#8217;ve written in <a href=\"http:\/\/processing.org\/\" target=\"_blank\">Processing<\/a>. (<em>Yes, I love Processing! It is a great tool for writing quick and dirty routines without hassling details<\/em>). This routine imports the .BMP file that you want to use as a title screen, and exports the image in .SCR format.<\/p>\n<p style=\"padding-left: 60px;\"><strong>&#8211; jCDT_Generate.pde:<\/strong>\u00a0This routine, again written in Processing, simply imports the .SCR file that you&#8217;ve created above, and generates a tape image in .CDT format.<\/p>\n<p style=\"padding-left: 60px;\"><strong>&#8211; TurboLoader.asm:<\/strong>\u00a0This is the turbo loader routine written in Z80 assembly language. You will assemble the code and execute it on your Amstrad (or <a href=\"http:\/\/www.winape.net\/\" target=\"_blank\">WinAPE<\/a> emulator).<\/p>\n<p>If it sounds complicated, please have a look at this data flow diagram. It&#8217;s very simple, actually&#8230;<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-994\" src=\"http:\/\/mertboru.com\/wp-content\/uploads\/2014\/04\/workflow.png\" alt=\"\" width=\"403\" height=\"529\" srcset=\"http:\/\/mertboru.com\/wp-content\/uploads\/2014\/04\/workflow.png 403w, http:\/\/mertboru.com\/wp-content\/uploads\/2014\/04\/workflow-228x300.png 228w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/p>\n<p><strong>Let&#8217;s see the demo!<\/strong><\/p>\n<p>In case you want to skip all details above, and see a quick working demo on <a href=\"http:\/\/www.winape.net\/\" target=\"_blank\">WinAPE<\/a>\u00a0emulator;<\/p>\n<ul>\n<ul>\n<li>Start WinAPE<\/li>\n<li>Press F3 &#8211; (view the Assembler window)<\/li>\n<li>Open <em><strong>TurboLoader.asm<\/strong><\/em> file<\/li>\n<li>Press F9 &#8211; (assemble &amp; run the code), and press OK.<\/li>\n<li>Select File &gt; Tape &gt; Show Tape Control from the menu<\/li>\n<li>Click Open button, and select <em><strong>TurboTitleScreen.cdt<\/strong><\/em> file<\/li>\n<li>Press Play on the Tape Control window &#8211;\u00a0<em>Voil\u00e0<\/em>!<\/li>\n<\/ul>\n<\/ul>\n<p>Don&#8217;t forget to turn up the volume for nostalgic buzz \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have always loved Sinclair ZX Spectrum&#8216;s characteristic tape loading method using yellow\/blue stripes in the border. Contrary to Amstrad CPC&#8216;s humble block-by-block loader with no visual feedback on screen, Spectrum offered a feast for the eye! So sexy, so catchy&#8230;<\/p>\n","protected":false},"author":1,"featured_media":963,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,17],"tags":[20,19,63,42],"class_list":["post-962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-retrodemo","tag-amstrad","tag-matahari","tag-turbo-tape-loader","tag-z80-assembly"],"_links":{"self":[{"href":"http:\/\/mertboru.com\/index.php?rest_route=\/wp\/v2\/posts\/962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mertboru.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mertboru.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mertboru.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mertboru.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=962"}],"version-history":[{"count":1,"href":"http:\/\/mertboru.com\/index.php?rest_route=\/wp\/v2\/posts\/962\/revisions"}],"predecessor-version":[{"id":3009,"href":"http:\/\/mertboru.com\/index.php?rest_route=\/wp\/v2\/posts\/962\/revisions\/3009"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/mertboru.com\/index.php?rest_route=\/wp\/v2\/media\/963"}],"wp:attachment":[{"href":"http:\/\/mertboru.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mertboru.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=962"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mertboru.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}