{"id":37,"date":"2024-11-22T11:05:19","date_gmt":"2024-11-22T11:05:19","guid":{"rendered":"https:\/\/www.soapyfrog.com\/?p=37"},"modified":"2024-11-22T11:05:19","modified_gmt":"2024-11-22T11:05:19","slug":"soapybasic-and-long-term-passion-projects","status":"publish","type":"post","link":"https:\/\/www.soapyfrog.com\/index.php\/2024\/11\/22\/soapybasic-and-long-term-passion-projects\/","title":{"rendered":"SoapyBASIC and long-term passion projects"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Back in 2019, I got thinking about what a perfect or fantasy home computer would look like in 1981.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In 1981, I got my first home computer, a Sinclair ZX81, I quickly realised it couldn&#8217;t play Space Invaders to my satisfaction, or Galaxian or my new favourites, Defender and Scramble.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Why was this?<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No colour (yes, I&#8217;m British)<\/li>\n\n\n\n<li>Only character graphics (yes, I learned later that wasn&#8217;t true)<\/li>\n\n\n\n<li>No sound (ok, you could fake it with the cassette port)<\/li>\n\n\n\n<li>BASIC was <em>so slow<\/em>.<\/li>\n\n\n\n<li>Machine langage was hard, especially so on a 16K ZX81 with no assembler.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Time went by and I got a Dragon 32 in 1982, which solved some of the problems (bit mapped graphics, sound, 3x faster BASIC and much more approachable 6809 Assembler) &#8211; and a real keyboard &#8211; but not all of them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Dragon 32 couldn&#8217;t have a fully black display, for example.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then came an Amstrad CPC-464 in probably 1983 which saw me back with Z80, a great BASIC and graphics and sound that were almost there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My early computer days continued with Amstrad CPC-6128 which gave me a disc (yes, I&#8217;m British) drive, CP\/M, logo, C and so on, then an Atari 800 and a Commodore Amiga, but back in 1981 I had the dream of something better.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So my fantasy computer from the early 80s would have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Colourful bitmapped graphics<\/li>\n\n\n\n<li>Multi-channel sound, with wave control (I hadn&#8217;t really discovered sampled sound back then)<\/li>\n\n\n\n<li>Sprites. Lots of sprites.<\/li>\n\n\n\n<li>Hardware pixel-level scrolling of backgrounds<\/li>\n\n\n\n<li>BASIC fast enough to write games of the era.<\/li>\n\n\n\n<li>Plug into the a TV and just type stuff in from BASIC<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">I didn&#8217;t want a C64 or Spectrum emulator &#8211; there are lots of those. I didn&#8217;t want a re-imagined modern version of the same. I wanted what I wanted back then.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>So I started with the BASIC. And I started writing it in <strong>Swift<\/strong>.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve long had the domain name soapyfrog.com so it made sense to me to call it <strong>SoapyBASIC<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Starting in 2019, it was about 4 years before I finally finished the BASIC to my satisfaction, after many iterations &#8211; along with interpreter, code editor, semantic analyser, a fairly strong type system, reformatter and a VT100-based terminal emulator.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the next post, I&#8217;ll go over my BASIC language design decisions and the fate of GOTO.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An old techie&#8217;s desire to build the fantasy home computer from the 1980s<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,13,16,15],"tags":[17,19,18,12,20],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-lang-design","category-soapybasic","category-swift-lang","category-virtual-machines","tag-basic","tag-language-design","tag-retrocomputer","tag-soapybasic","tag-swift-lang"],"_links":{"self":[{"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":1,"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/posts\/37\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.soapyfrog.com\/index.php\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}