tag:blogger.com,1999:blog-87377554734180048802024-03-06T00:45:54.306-05:00EightbitswideExploration of retro computers and electronics by EightbitswideEightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-8737755473418004880.post-39270256531444480722023-02-12T12:56:00.011-05:002023-02-12T17:34:10.619-05:00Exploring the Z80-MBC2 Soup to Nuts Chapter 7: FabGL AnsiTerminal & Microsoft BASIC <p>It's high time to explore the capabilities of the Z80-MBC2. By pairing it with the LILYGO TTGO VGA32 module, we have created a formidable 128K computer that can run CP/M with a variety of programming languages, including BASIC, PASCAL, C, and Assembly. This setup offers multiple video resolutions and up to 64 colors, as well as sprite support.<br /><br />To get started, Microsoft BASIC (MBASIC-80), is readily available on the A> disk of the CP/M3 disk set. Interestingly, there are actually two variations of the BASIC interpreter to choose from. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXj1rDbhZZNS7BI3LQI8iCfaD_YPy2Js-pHxEB7w1_EoppSQpcx_0CSTAmXQcUj5pWgxEzXQGGZSSehjkCx3ZD8hpBOwdZt_WQTak3nnmaKNLwBjc5b-70CB_tnPmqhgzqeptloPsTgZzfAlMNo9-TsZJhgkUpZFv-tEBE0TKJ0kCyrDv0rbUDfQQzSA/s576/basic.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="230" data-original-width="576" height="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXj1rDbhZZNS7BI3LQI8iCfaD_YPy2Js-pHxEB7w1_EoppSQpcx_0CSTAmXQcUj5pWgxEzXQGGZSSehjkCx3ZD8hpBOwdZt_WQTak3nnmaKNLwBjc5b-70CB_tnPmqhgzqeptloPsTgZzfAlMNo9-TsZJhgkUpZFv-tEBE0TKJ0kCyrDv0rbUDfQQzSA/s320/basic.png" width="320" /></a></div><p><b>MBASIC-80 V5.21</b> released in 1980. <b>MBASIC-85 V5.29</b> released in 1985.</p><p>I tend to use slightly newer 85 version.</p><p>These were released when Bill Gates was still a programmer at Microsoft.</p><p> </p><p>Also included in the same disk image is a copy the classic <i>Star Trek</i> game.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD1If96_tyK9eX5fbL4WFBAtefc9rr5EFn_yw2Ke5eivY_haeSr59R7zbHd-IAgVjURq08GGjy5qzCfv3KVhufQTb1Hb9eMdBJ5A3cHrShqUWB6tB0KrRDcnOIEVtYjrE_F1d1VvdvGLFIcLFAlsPYd5wOwbCTDqq7uktZOlCIzcPq_DI-9OoRLHX2Jg/s946/startrek.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="437" data-original-width="946" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD1If96_tyK9eX5fbL4WFBAtefc9rr5EFn_yw2Ke5eivY_haeSr59R7zbHd-IAgVjURq08GGjy5qzCfv3KVhufQTb1Hb9eMdBJ5A3cHrShqUWB6tB0KrRDcnOIEVtYjrE_F1d1VvdvGLFIcLFAlsPYd5wOwbCTDqq7uktZOlCIzcPq_DI-9OoRLHX2Jg/w400-h185/startrek.png" width="400" /></a></div><p></p>Star Trek is a classic example of what you can achieve with MBASIC and holds historical significance as a widely-circulated game during the early days of personal computing. To try it out for yourself, simply type "<b>MBASIC TREKINST.BAS</b>" at the A> prompt.<br /><br />The TREKINST.BAS program provides instructions on how to play the game, where you assume the role of the captain of the USS ENTERPRISE and defend the Federation against the Klingons.<br /><br />While the game was designed for early, single-color VT-100 terminals, our Z80-MBC2 computer with the VGA32 Module has much greater video capabilities. To make the most of this, I've enhanced the FabGL Ansi Terminal software to allow for control over screen resolution and font selection directly from the Z80-MBC2. Additionally, a 320x200 64-color video mode option is available.<p>You can download this tweaked version of <i>Ansi Terminal</i> from my GITHUB.</p><p><span> </span><a href="https://github.com/eightbitswide/FabGL-AnsiTerminal-Mods-" target="_blank">https://github.com/eightbitswide/FabGL-AnsiTerminal-Mods- </a><br /></p>This GITHUB package is a complete fork of Fabrizio Di Vittorio's FabGL project, with the majority of the modifications being made to the Ansi Terminal software. I have also incorporated the classic Commodore PETSCII font style into the VGA8X8 font.<br /><br />It is assumed going forward that you have this version of the Ansi Terminal software installed on your VGA32 Module. Simply connect a PS2 keyboard, press F12, and you will have the ability to choose your options via a PS2 mouse or by using the TAB key to navigate between selections.<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge6T-YR5ED-ElWhAjnKnH3CDdEezcpIwqIezRshN218oE3CeQDzZSExKoYMFsEbM0kh4iWUdvg2wx1bwdW5S2BdDAxVUl775nxbgpKRoaoEYW4m2jsy32GJgvoo6gKZQB-6xydydZf9H53f5Gon7Oa0P4wUX7LpM1m3JlvDWCmgW16cmYrtbZRU_gmQQ/s502/AnsiTerminalControls.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="378" data-original-width="502" height="482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge6T-YR5ED-ElWhAjnKnH3CDdEezcpIwqIezRshN218oE3CeQDzZSExKoYMFsEbM0kh4iWUdvg2wx1bwdW5S2BdDAxVUl775nxbgpKRoaoEYW4m2jsy32GJgvoo6gKZQB-6xydydZf9H53f5Gon7Oa0P4wUX7LpM1m3JlvDWCmgW16cmYrtbZRU_gmQQ/w640-h482/AnsiTerminalControls.png" width="640" /></a></div> <p></p><p>Choose your desired Resolution and Font setting and press <b>F10</b> to apply it. Personally, I prefer the 512x354, 64-color option for most of my programming on the Z80-MBC2, which provides an ANSI/VT100 terminal with a screen size of 64x45 characters. Be sure to also check out the "Terminal Type" options, as Ansi Terminal can emulate various types of terminals, including Osborne, Kaypro, Hazeline, and ADM. If you need to make any changes to your terminal settings later on, simply press <b>F12</b> and make your selections. Additionally, you can reset the screen without affecting the Z80-MBC2 by pressing <b>CTRL+ESC</b> from the same menu.</p><p>With this in place, let's take advantage of a few of those new graphics commands:</p><p>In the first example, you might have noticed that when Star Trek ran, the game cleared the screen, homed the cursor then welcomed us to the same with a moving ASCII art version of the USS Enterprise. This was accomplished using VT-100 commands.</p><p>For example, if I want to clear the screen I would send [ESC]+[2J to the terminal. In BASIC this would look like:</p><p><b>10 PRINT CHR$(27)+"[2J";</b></p><p>Next if I want to home the cursor in the top left of the screen, I would send [ESC]+[H to the terminal. Our BASIC program would get an additional line 20.</p><p><b>20 PRINT CHR$(27)+"[H";</b></p><p>Running the BASIC program with these two VT-100 commands will both clear the screen and home the cursor. A complete list of VT-100 commands can be found on <a href="https://espterm.github.io/docs/VT100%20escape%20codes.html" target="_blank">this website</a>. Ansi Terminal supports most of these commands. This gives it the ability to be compatible with programs like Word Star.</p><p>Our terminal also supports some "non-standard" ESC commands as well. Consider this: ESC "_GRECT" X1 ";" Y1 ";" X2 ";" Y2 "$" This special graphics command will tell Ansi Terminal to draw a rectangle on the screen. At the following line to your BASIC program:</p><p><b>30 PRINT CHR$(27)+"_GRECT10;10;150;150$";</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuTseTTK5BruN-k-Crbe8HhRzbNaR97hQtXDp3JCbIqzgsQWyUuXzdQijRDXA_diJYzz8K3m23YhgQIUTqZc7VtS-f_M7k46cCoX3DTy6F7iywVNHmK12gRAIduqhXIBqXtC54YimWFQNZKlQVssowouXXD25kj7UqAA5-3BU8BPSp10yfcLUoxZ_zTQ/s262/rectangle.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="232" data-original-width="262" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuTseTTK5BruN-k-Crbe8HhRzbNaR97hQtXDp3JCbIqzgsQWyUuXzdQijRDXA_diJYzz8K3m23YhgQIUTqZc7VtS-f_M7k46cCoX3DTy6F7iywVNHmK12gRAIduqhXIBqXtC54YimWFQNZKlQVssowouXXD25kj7UqAA5-3BU8BPSp10yfcLUoxZ_zTQ/s1600/rectangle.png" width="262" /></a></div><p></p><p>With a single line of code we told the terminal to draw a box with the top left corner located at 10,10 and the bottom right corner located at 150,150.</p><p>In addition to the <b>_GRECT </b>command there are also <b>_GPEN</b>, <b>_GLINE</b>, <b>_GPIXEL</b>, <b>_GELLIPSE</b> as well as a variety of other non-standard ESC commands we can send our terminal.</p><p>A complete list of these commands can be found at the <a href="http://www.fabglib.org/special_term_escapes.html" target="_blank">FabGL Specific Terminal Sequences</a> page.</p><p><br /></p><div class="flex flex-grow flex-col gap-3"><div class="min-h-[20px] flex flex-col items-start gap-4 whitespace-pre-wrap"><div class="markdown prose w-full break-words dark:prose-invert dark"><p>By utilizing these commands and some mathematical calculations, we can unlock a variety of intriguing graphics capabilities right away.</p><p>In the March 1981 issue of Compute Magazine, there was an advertisement for a memory add-on for the Commodore PET computer. A demonstration program was included at the bottom of the advertisement.</p></div></div></div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5g66U21j0XTmCozF8syET-hrVNjwccl79x24RSbWbjqN9dKSwd2kK1h_e2dT8V6HRpzF4aZh8ecF-m519xSkFb_ZRYooKAy_c0MUAJYcXNrxuQ0tFI9AnZfJ4VtfihYgYq1pynLJpmOL3jijhAXIrKiyp8qLDAmOoqmk_Nn9dSYGA6fY83R7p_uZ_BQ/s2202/Hat.bas%20from%20Compute%20010%20Mar%201981.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="2202" data-original-width="1645" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5g66U21j0XTmCozF8syET-hrVNjwccl79x24RSbWbjqN9dKSwd2kK1h_e2dT8V6HRpzF4aZh8ecF-m519xSkFb_ZRYooKAy_c0MUAJYcXNrxuQ0tFI9AnZfJ4VtfihYgYq1pynLJpmOL3jijhAXIrKiyp8qLDAmOoqmk_Nn9dSYGA6fY83R7p_uZ_BQ/s320/Hat.bas%20from%20Compute%20010%20Mar%201981.jpg" width="239" /></a></div><p>Thanks to Tom Lake and John Galt (<i>Altair-Duino: Google Groups</i>) a version of this BASIC program has been adapted for use with those FabGL non-standard terminal sequences.</p><p>This <a href="http://gunstar.one/Z80-MBC2/TLHAT1.BAS">TLHAT1.BAS</a> program takes advantage of the <b>_GPEN </b>and <b>_GPIXEL</b> commands to draw what looks like a Fedora hat pixel, by pixel. </p><p>Let's review:</p><p>Ansi Terminal is capable of:</p><ul style="text-align: left;"><li><a href="https://www.csie.ntu.edu.tw/~r92094/c++/VT100.html" target="_blank">VT-100 Terminal ESC codes</a></li><li><a href="https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797" target="_blank">ANSI Terminal ESC code</a>s</li><li><a href="http://www.fabglib.org/special_term_escapes.html" target="_blank">FabGL non-standard ESC codes</a><br /></li></ul><p> </p><p>Let's see what those additional tweaks do:<br /></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtVykA6rSK4IZKcO2tOjz-oEOTBlX01jz5TreB8pGdQR69HWM7ZszjfTmUORK86ZE37Cb-BFzUlfW0m-HNgS5K90aLYNY-_queA_VxC4ifGDuvnQNprVZPIaRps7SNyxIpaLJ9QmuEaKWviTVjNS5Y2vEPD2h458hib7_cVM2-MkQRpxZ3paViZXvdaA/s429/greenhat.png" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="279" data-original-width="429" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtVykA6rSK4IZKcO2tOjz-oEOTBlX01jz5TreB8pGdQR69HWM7ZszjfTmUORK86ZE37Cb-BFzUlfW0m-HNgS5K90aLYNY-_queA_VxC4ifGDuvnQNprVZPIaRps7SNyxIpaLJ9QmuEaKWviTVjNS5Y2vEPD2h458hib7_cVM2-MkQRpxZ3paViZXvdaA/w200-h130/greenhat.png" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Fedora Hat demo</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><p></p><p></p><p>Consider the following BASIC program:<br /></p><ul style="text-align: left;"><li><b>10 PRINT CHR$(27)+"_#320x200x64$"<br /></b></li><li><b>20 PRINT CHR$(27)+"_#LCD 8x14$"<br /></b></li><li><b>30 PRINT CHR$(27)+"_#APPLYSETTINGS$"<br /></b></li><li><b>40 FOR X = 1 TO 3000 : NEXT X<br /></b></li><li><b>50 PRINT "HELLO WORLD";</b></li></ul><p>This simple BASIC program adjusts the resolution and font, applies the changes to the terminal, waits for the screen to update, and finally displays the message "HELLO WORLD" using an LCD font.</p><p>All of the available resolution and font options are listed on the GITHUB readme for <a href="https://github.com/eightbitswide/FabGL-AnsiTerminal-Mods-/blob/master/README.md" target="_blank">FabGL-Ansiterminal-Mods</a>.</p><p>Remember if you need to switch your terminal back to your preferred settings, press F12, make your changes, then F10 to save and reset.</p><p>A disk image containing a number of BASIC demos can be <a href="http://gunstar.one/Z80-MBC2/DS2N15.DSK.zip" target="_blank">downloaded</a> and extracted to your Z80-MBC2 SD card. It replaces the normally empty P:> disk <i>(file:D2N15.DSK)</i> in CP/M3. Launch P:><b>MBASIC85 {filename.bas}</b>. These demos are best viewed at 640x480x16.</p><p>These BASIC demos are intended to get you started in experimenting with the extended graphics commands. If you come up with some additional ideas, please post them in the comments section. <br /></p><p> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoJFgmBXHOELipTiPCsDCBu7Vr2s_K6KjUUmD3xmtoD6O1Nm1c7dUIwUrZYlaOqOCUxz0JQRfMHFaRAZsGSQlx8VWfcCDXe2eo9Jo8Sf6h1PuuSYfn7TwVoSLpulQhLxZd0hLPxyyX_gqdR53CdkASndyVqNUC3RAJYVCwoUphiRz0t2k05YEsMZuugA/s415/sphere.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="342" data-original-width="415" height="330" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoJFgmBXHOELipTiPCsDCBu7Vr2s_K6KjUUmD3xmtoD6O1Nm1c7dUIwUrZYlaOqOCUxz0JQRfMHFaRAZsGSQlx8VWfcCDXe2eo9Jo8Sf6h1PuuSYfn7TwVoSLpulQhLxZd0hLPxyyX_gqdR53CdkASndyVqNUC3RAJYVCwoUphiRz0t2k05YEsMZuugA/w400-h330/sphere.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Basic Sphere Demo</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><br /><br /><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlu8xXUZhjF-t_N54bmO8AzHIzzjL7XAn4tH6fvCtAa1idzLgcpfPOBhEjaYadx2-hH3_5gWBKWcDIeNzK_sH3-HhRGtKr7L6UJBmK8fFjHuFEHUFKCt4dWzS-N99f1PKfVgg-qtEe4pezVYIzVKpplqzXdl04KRLHrwQuK1w_qtJvCiWWV1UDkKxtJA/s192/mandelbrot.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="185" data-original-width="192" height="385" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlu8xXUZhjF-t_N54bmO8AzHIzzjL7XAn4tH6fvCtAa1idzLgcpfPOBhEjaYadx2-hH3_5gWBKWcDIeNzK_sH3-HhRGtKr7L6UJBmK8fFjHuFEHUFKCt4dWzS-N99f1PKfVgg-qtEe4pezVYIzVKpplqzXdl04KRLHrwQuK1w_qtJvCiWWV1UDkKxtJA/w400-h385/mandelbrot.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">16 color Mandelbrot Demo</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQCGN6B2htGJI3crduHI_BaSM1yT2-j15xggOpSGxjgj_TQ3xJPaHJs8rOroUn0WCpehE-aHeDEmhjEFy9OtYUceXxVwl9KZJD6RIBC_lqpS_LlA4t40dkP3y2GQPoXkdF2OpO1Y7M4V6_x-eMSZ2hmm50uePi0-HVe_Mko_uaVCOz63qUat-9nQDPKA/s904/Multicolor_FabHat.png" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="580" data-original-width="904" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQCGN6B2htGJI3crduHI_BaSM1yT2-j15xggOpSGxjgj_TQ3xJPaHJs8rOroUn0WCpehE-aHeDEmhjEFy9OtYUceXxVwl9KZJD6RIBC_lqpS_LlA4t40dkP3y2GQPoXkdF2OpO1Y7M4V6_x-eMSZ2hmm50uePi0-HVe_Mko_uaVCOz63qUat-9nQDPKA/w400-h256/Multicolor_FabHat.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Fedora Hat Demo drawn in random pixel colors</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><br /><p><br /></p><p><br /></p><p> <br /></p><p><br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-38641564821212672652023-02-09T14:29:00.005-05:002023-02-10T13:51:46.417-05:00Exploring the Z80-MBC2 Soup to Nuts Chapter 6: Let's talk terminals <p>The Z80-MBC2 experience is the similar to using a MITS Altair, or SWTPC from the 1970's in that it uses a serial connection to interact with the outside world. In the early days of computing, a separate "<a href="https://en.wikipedia.org/wiki/Computer_terminal" target="_blank">computer terminal</a>" would be used to connect a keyboard and screen to your computer. </p><p>If you have a vintage terminal in your collection, you can connect it to your z80-MBC2 using an inexpensive <a href="https://www.aliexpress.us/item/3256801435588492.html?spm=a2g0o.cart.0.0.802d38daZKDK65&mp=1&gatewayAdapt=glo2usa&_randl_shipto=US" target="_blank">RS232 to TTL Serial Module</a>. This will provide your SBC with an old fashion serial port to which a standard terminal can connect. <br /></p><p>In chapter 4, I demonstrated using the Putty software to use your existing desktop PC as the terminal. Putty provides a simple VT100/ANSI terminal connection over the USB-to-serial device allowing you to use your PC's screen and keyboard as the terminal interface for your new SBC.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx0EhSwUOkXrdmHYkIPf8jLaGQD5XSi4tOSMJKpeAdBTX3OMrYgucibmkbO-DZXRvFDzM0rVykDO5uuREckJpn2TFCxMkhcR-TR0sRtUbJ9KxSjsppqK87ey5Tl2bc7qYFV9bZ9ZjhtQiRVPStRW_xqTJ1A0uwh15YgtJJA-eIWU0Z-yGoJzr1uPpoPw/s736/gorrilla.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="393" data-original-width="736" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx0EhSwUOkXrdmHYkIPf8jLaGQD5XSi4tOSMJKpeAdBTX3OMrYgucibmkbO-DZXRvFDzM0rVykDO5uuREckJpn2TFCxMkhcR-TR0sRtUbJ9KxSjsppqK87ey5Tl2bc7qYFV9bZ9ZjhtQiRVPStRW_xqTJ1A0uwh15YgtJJA-eIWU0Z-yGoJzr1uPpoPw/w400-h214/gorrilla.png" width="400" /></a></div><p></p><p>Putty's default screen size is 80x24, faithfully replicating the screen size of many vintage terminals. Because it supports both VT100 and ANSI sequences, both classic screen controls and color are supported. Naturally, you can use your mouse to stretch the Putty terminal window to additional rows and columns.</p><p>Personally, I'm a fan of having a dedicated terminal, but without the bulky computer terminals of yesteryear. This new terminal comes in two parts, ESP32 hardware and open source software.</p><p>The hardware part certainly won't break the bank. I'm using a <a href="https://www.aliexpress.us/item/2251832855287283.html?spm=a2g0o.order_list.order_list_main.25.21ef1802oGnMde&gatewayAdapt=glo2usa&_randl_shipto=US" target="_blank">LILYGO® TTGO VGA VGA32 Module v1.4</a> from Aliexpress. I noticed that there are several listed on Amazon, but they seem to be an earlier version of the board. This $14 device acts as a dedicated computer terminal with TTL level serial, PS2 Keyboard/Mouse connectors, and VGA output. There are a couple other features like Wifi and onboard SD connection, but I haven't taken advantage of them. <i> (yet)</i></p><p>The open source software comes in the form of an example program called <a href="http://www.fabglib.org/_v_g_a_2_ansi_terminal_2_ansi_terminal_8ino-example.html" target="_blank">Ansi Terminal</a> which is part of the <a href="http://www.fabglib.org/" target="_blank">FabGL</a> project. This terminal supports multiple screen resolutions and even color graphics <i>(more on this later)</i>. You can use the same Arduino IDE you used to program the ATMEL32 to install the Ansi Terminal on your VGA32 module. (Just make sure to change your board to ESP Dev Module.) <br /></p><p><span style="color: red;"><b>Special Note: </b></span> <u>The ESP32 is a 3v device. </u> <u>The Z80-MBC2 is a 5v device. </u> There is much debate online about the ESP32 possibly taking damage from being connected to a 5v device such as the Z80-MBC2. Teo Swee Ann, who is CEO of Espressif Systems <a href="https://www.facebook.com/groups/1499045113679103/permalink/1731855033731442/?hc_location=ufi" target="_blank">officially makes the statement on Facebook </a>that the ESP32 is 5v tolerant on the GPIO pins, but cautions against powering it with 5v. I've connected my own ESP32 devices to 5v interfaces for months at a time, but if you are concerned about potential damage, there are level shifters you can introduce to the circuit. At the very least a small resistor can also be used on the input GPIO of the VGA32 module. Myself, I'm not really worried about burning out a $14 part over a what appears to be years. <i>Your millage may vary....... yada, yada....</i></p><p>The VGA32 suffers from one minor "cheap China" issue, the silkscreen on the top of the unit is incorrect. In fact, it's backwards. Here the correct hookup for connecting the VGA32 to your Z80-MBC2.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJLJYHoxbfHXfoeFX6yp8hzQDYH6EFAvSDfiVb8ZKmBRRgPAyr2meB0MsdQylLmOy4f6d_8lrftEoOtbSbIo_CbwegJO4hRBdmUN4_V2QA-sdbVvRrnQNx-y7g52gwBRFnNVZ0G64jWNt3rDm5ZIq8wpoL7Kvp5Ic-eVmF-7ctx_XcLEOTyXPjjg6PnQ/s372/vga32.bmp" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="372" data-original-width="287" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJLJYHoxbfHXfoeFX6yp8hzQDYH6EFAvSDfiVb8ZKmBRRgPAyr2meB0MsdQylLmOy4f6d_8lrftEoOtbSbIo_CbwegJO4hRBdmUN4_V2QA-sdbVvRrnQNx-y7g52gwBRFnNVZ0G64jWNt3rDm5ZIq8wpoL7Kvp5Ic-eVmF-7ctx_XcLEOTyXPjjg6PnQ/s320/vga32.bmp" width="247" /></a></div><p><br /></p><p>If like myself, you are already powering the Z80-MBC2 using the USB-to-serial adapter, you are already using the VCC/GND connections on your SBC. I've tied the GND line from the VGA32 to the now unused ground pin of the ICSP programming connection. In a pinch there are also ground connections on both the IOEXP and GPIO sections as well.</p><p>Upload the Ansi Terminal for the VGA32 and set the baud rate for 115200 using F12 on your keyboard to access it's menu and you are good to go.</p><p><br /></p><p><br /></p><p>At some point, I'll be installing both the Z80-MBC2 and the VGA32 into a project box so that it becomes a mini computer, but for the moment I'm powering both devices from a dual jack USB wall wart. Neither of these devices use much current and a battery system in in the plan as well for portability.</p><p>At this stage, we have a Z80 computer running CP/M with potential for 64 color graphics and sprites. I'll get into the details in the next chapter.</p><p> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic29cO3pWRquHzZ_2U52o0r-0xv6y28WjGn-q-pgRYzqBp8GzJcrsZgiiTfMuDyXcMjXi1po9h8vTO3Bkbd6nohSEiD7Tv4ZVFwyonbhYh_2iM2k6X1X5yOcqBym6HMxad9toOhm_9YGQpSz7SCXzDx1x480UFLOcCLD_W2REycaahByJej7-w--pcPQ/s3528/IMG_20230210_134402744~2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="2939" data-original-width="3528" height="334" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic29cO3pWRquHzZ_2U52o0r-0xv6y28WjGn-q-pgRYzqBp8GzJcrsZgiiTfMuDyXcMjXi1po9h8vTO3Bkbd6nohSEiD7Tv4ZVFwyonbhYh_2iM2k6X1X5yOcqBym6HMxad9toOhm_9YGQpSz7SCXzDx1x480UFLOcCLD_W2REycaahByJej7-w--pcPQ/w400-h334/IMG_20230210_134402744~2.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">My Z80-MBC2 and VGA32 Module Setup.</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><br /><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-6005657059652680642023-02-05T14:12:00.001-05:002023-02-05T14:12:37.595-05:00Exploring the Z80-MBC2 Soup to Nuts Chapter 5: Time to build your library. <p>Remember back in chapter 2 when I said that retro computers came with fairly comprehensive books and schematics allowing you to to master the entire system? It's time to build your library. </p><p>I'm linking to various PDF documents. You can still obtain some of these in actual book form from Thriftbooks and Amazon. <i> (Remember when Amazon was just an online bookstore?)</i> </p><p> </p><p><b>CP/M 2.2 and CP/M 3.0 Operating System Manuals: </b><br /></p><ul style="text-align: left;"><li><a href="https://commodore.bombjack.org/books/generic/CPM_Operating_System_Manual.zip">CP/M (CP/M Version 2) Operating Manual [ZIP] </a><br /></li><li><a href="http://www.s100computers.com/Software%20Folder/CPM3%20BIOS%20Installation/CPM3%20User's%20Guide.pdf" target="_blank">CP/M Plus (CP/M Version 3) User's Guide [PDF]</a></li><li><a href="http://www.s100computers.com/Software%20Folder/CPM3%20BIOS%20Installation/CPM3%20System%20Guide.pdf" target="_blank">CP/M Plus (CP/M Version 3) System Guide [PDF]</a></li><li><a href="http://www.s100computers.com/Software%20Folder/CPM3%20BIOS%20Installation/CPM3%20Programmer's%20Guide.pdf" target="_blank">CP/M Plus (CP/M Version 3) Programmer's Guide [PDF]</a></li></ul><p> </p><p><b>Languages: Microsoft BASIC, Turbo Pascal, and HI-TECH C:</b><br /></p><ul style="text-align: left;"><li><a href="https://ia800708.us.archive.org/8/items/BASIC-80_MBASIC_Reference_Manual/BASIC-80_MBASIC_Reference_Manual_text.pdf" target="_blank">Microsoft BASIC-80 Reference Manual [PDF]</a></li><li><a href="https://deramp.com/downloads/microsoft/Manuals/BASIC%20Compiler.pdf" target="_blank">Microsoft BASIC Compiler Manual [PDF] </a><br /></li><li><a href="http://bitsavers.trailing-edge.com/pdf/borland/turbo_pascal/Turbo_Pascal_Version_3.0_Reference_Manual_1986.pdf" target="_blank">Turbo Pascal V3.0 Reference Manual [PDF]</a></li><li><a href="http://www.z80.eu/downloads/z80doc.zip" target="_blank">HI-TECH C Compiler V3.09 Manual [ZIP]</a></li></ul><p><br /></p><p><b>Word Star v3.3 and v4.0 Reference Manuals:</b><br /></p><ul style="text-align: left;"><li><a href="http://www.bitsavers.org/pdf/microPro/Wordstar_3.3/Wordstar_3.3_Reference_Manual_1983.pdf" target="_blank">Word Star 3.3 Reference Manual [PDF]</a></li><li><a href="https://oldcomputers.dyndns.org/public/pub/manuals/ws4.pdf" target="_blank">Word Star 4.0 Reference Manual [PDF]</a></li></ul><p><br /></p><p><b>Schematics:</b></p><ul style="text-align: left;"><li><a href="https://j4f.info/_media/z80-mbc2/a040618_sch.pdf" target="_blank">Z80-MBC2 Schematic [PDF]</a><br /></li></ul>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-17636672057650229852023-02-04T21:16:00.002-05:002023-02-05T13:07:18.047-05:00Exploring the Z80-MBC2 Soup to Nuts Chapter 4: Programming & First Boot on the Z80-MBC2<p><i>(Note: this page is currently under development and may be incomplete.) </i><br /></p><p>This blog entry will lean heavy on various links which together have well documented these initial steps in the process. There is no reason to recreate the wheel for this part so I'll be linking to all of the best materials already online. I would encourage you to go old school and create a 3-ring binder for this project. <br /></p><p>Remember that "<i>10 Pin Convert to Standard 6 Pin Adapter Board+USBASP USBISP AVR Programmer USB</i>." I mentioned that you would want to obtain in chapter 3? It's time to use it to program the ATMEL32 microcontroller.</p><p> <br /></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://cdn.hackaday.io/images/5336181532765025788.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="628" data-original-width="800" height="157" src="https://cdn.hackaday.io/images/5336181532765025788.jpg" width="200" /></a></div><br /><p></p><p>The ATMEL32 microcontroller acts as both EEPROM and I/O emulator. It will need to be programmed with a bootloader before the Sketch can be applied.</p><p>https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer/log/150087-how-use-the-icsp-port-with-the-usbasp-programmer-under-linux-to-burn-the-bootloader <br /></p><p>Preparing the ATMEL32 is a two step process. First you'll install the bootloader <i>(using the ICSP connection)</i>, then install the sketch <i>(using the serial to TTL connection)</i> that makes everything work. Using the information in the <a href="https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer/log/150087-how-use-the-icsp-port-with-the-usbasp-programmer-under-linux-to-burn-the-bootloader " target="_blank">link.</a> I jumpered wires from the USB programmer to the ICSP pins on the Z80-MCB2. The instructions are written for Linux users, but are 99% applicable to Windows users as well. <b>Make sure that the SD and RTC adapter are unplugged while using the ICSP pins.</b><br /></p><p>You will need the <a href="https://www.arduino.cc/en/software" target="_blank">Arduino IDE</a> (I used the legacy version 1.18.9) and <span>The <a href="https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer#menu-files" target="_blank">sketch for the IOS</a> (with the needed libraries). Unzip into a
folder and open the .ino file (with Arduino IDE). IOS must be uploaded
into the Atmega32A flash. </span></p><p><span>I would also encourage you to add the <a href="https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer/details" target="_blank">following information</a> to your binder. </span></p><p><span>Once you've install the bootloader and sketch to the Z80-MBC, you can power up the Z80-MBC2 without the SD and RTC adapter using the serial to TTL adapter. </span></p><p><span>The following connections between the adapter and the Z80-MBC2 are:</span></p><ul style="text-align: left;"><li><span>Adapter <b>5v</b> to Z80-MBC2 <b>VCC</b></span></li><li><span>Adapter <b>GND</b> to Z80-MBC2 <b>GND</b></span></li><li><span>Adapter <b>RX</b> to Z80-MBC2 <b>RX</b></span></li><li><span>Adapter <b>TX</b> to Z80-MBC2 <b>TX</b></span></li></ul><p><span>Download <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html" target="_blank">Putty</a> (Linux & Windows versions available.) Putty will act as your terminal to the Z80-MBC2 until we replace it with a dedicated terminal. Set the serial line to match the serial port your serial to TTL device is installed to (<i>Example: Windows COM1, COM2, COM3, etc - Linux /dev/ttyACM1, /dev/ttyUSB0</i>) and the baud rate to 115200. Hit the Open button in Putty, then press the RESET switch on the MBC2. You should see a screen that looks something like this:</span></p><p><span></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSxIkGSoADryAfvxZIiGu8wpjalsXROKp2l8EQIhu_1Q2xMxdcTT5ile62-gTbZzHinWoPlzEkejQ9ABgir__U7bYTNR7d6-yN-Orfu76JwQx8cy-QS6pFHimNsArzjEPJ29b52b1fJ-jLka5TsGNhrW1u-n5fCDCnDX35VXRYHfAl_sxvx7Y03tLsyQ/s736/initial_boot.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="393" data-original-width="736" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSxIkGSoADryAfvxZIiGu8wpjalsXROKp2l8EQIhu_1Q2xMxdcTT5ile62-gTbZzHinWoPlzEkejQ9ABgir__U7bYTNR7d6-yN-Orfu76JwQx8cy-QS6pFHimNsArzjEPJ29b52b1fJ-jLka5TsGNhrW1u-n5fCDCnDX35VXRYHfAl_sxvx7Y03tLsyQ/w640-h342/initial_boot.png" width="640" /></a></div><br />At this point we aren't worried about the specifics, just the fact that we have understandable text demonstrates that things are starting to work and communication is happening.<p></p><p><span>If you get nothing at all, double check the connections between the serial to TTL adapter and the MBC2, your COM port and baud rate settings. You can troubleshoot the connectivity on the Putty side by unplugging the RX and TX pins from the Z80-MBC2 and jumper them together with a piece of wire. This will create a "Loopback Test" in which anything you type into Putty will be echoed back to the terminal. Once you see that is working, reconnect RX and TX to the Z80-MBC2 and double check all of your solder connections, making sure each chip is seated properly without bent pins.</span></p><p><span>Before plugging in the SD card and RTC adapter. It's important to make a modification to the RTC adapter before using it. </span></p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQUCHmBXh6fxHLExLGxG_JUjU_mPJKDK-VThkPo9XaZnpdoT14NS3I1u8WistDbkpEn-trfoVdJe9q-R06xg5o7f4j2cz-cdX6lNRf8FImfdyZc27I4MN0lMdFzEfF5woeCqNXY80p5uueRYhGnNe5XOma13IEOQDJN6ijTTb2jCR4eRcx6kxgSEk0HQ/s1041/rtc.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="828" data-original-width="1041" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQUCHmBXh6fxHLExLGxG_JUjU_mPJKDK-VThkPo9XaZnpdoT14NS3I1u8WistDbkpEn-trfoVdJe9q-R06xg5o7f4j2cz-cdX6lNRf8FImfdyZc27I4MN0lMdFzEfF5woeCqNXY80p5uueRYhGnNe5XOma13IEOQDJN6ijTTb2jCR4eRcx6kxgSEk0HQ/w400-h319/rtc.jpg" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">The SD module (left) and RTC module (right)<br /></td></tr></tbody></table><p></p><p>Next to the topside SCL connection, there is a surface mounted resistor that needs to be removed. This resistor can cause a battery meltdown and perhaps even damage. I used the "brute force" method and removed it with my clippers. </p><p> </p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk_jpQ1Nv1ljNX875qWgR1RuE12-hvX6vtRvXz08rCuWm0di9P6HXGl7oJHwBgO_9IMKyizYRU_ZCh0TvjgdR7Koezz6AhOmBzbeAuA6-BmWBgAtOgx_YbFf6O5eyt3dg9tCEnY2gKsDpz_uRHng2ikxi8KCHDffDdgKVujgjfYbgAWQQ9zqIz_6mDDw/s1047/inserted%20modules.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="1023" data-original-width="1047" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk_jpQ1Nv1ljNX875qWgR1RuE12-hvX6vtRvXz08rCuWm0di9P6HXGl7oJHwBgO_9IMKyizYRU_ZCh0TvjgdR7Koezz6AhOmBzbeAuA6-BmWBgAtOgx_YbFf6O5eyt3dg9tCEnY2gKsDpz_uRHng2ikxi8KCHDffDdgKVujgjfYbgAWQQ9zqIz_6mDDw/s320/inserted%20modules.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">SD and RTC modules inserted correctly.</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><p><span>It is possible to plug these cards in the wrong direction. Make sure the battery side of the RTC module faces toward the GPIO pins, and the SD card faces toward it's activity LED. Both cards will insert in the PCB on the right side of their pins.</span></p><p><span>If you haven't downloaded the disk files for your SD card, now is a good time to do so. Download and extra the file <a href="http://SD-S220718-R240620-v1.zip">SD-S220718-R240620-v1.zip</a> It contains the content of the microSD needed to run CP/M 2.2, CP/M 3.0, QP/M 2.71, UCSD Pascal and Collapse OS.</span></p><p><span>You'll also want to download <a href="http://star.gmobb.jp/koji/cgi/wiki.cgi?page=CpmtoolsGUI" target="_blank">CpmtoolsGUI</a> and this <a href="http://www.gunstar.one/Z80-MBC2/diskdefs" target="_blank">diskdefs</a> file. I've found it easiest to simply copy both files to the SD card with the disk files.</span></p><p><span>Again, there is some <a href="http://land-boards.com/blwiki/index.php?title=Z80-MBC2_Build_Notes#ADD_FILES_USING_CPMTOOLSGUI" target="_blank">excellent documentation</a> (<i>courtesy: land-boards.com)</i> on CpmtoolsGUI already posted. Their are also <a href="http://land-boards.com/blwiki/index.php?title=Z80-MBC2_Build_Notes#Software" target="_blank">listings for the software</a> on the disk images. I'd recommend adding the entire page to your binder.<br /></span></p><p><span>At this point you should be able to replicate the following video:</span><br /><span><br /></span></p><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="316" src="https://www.youtube.com/embed/EHl2-ZyUp0o" width="480" youtube-src-id="EHl2-ZyUp0o"></iframe></div><p></p><p><span> </span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhr8FmdqZ3mXIyK-x-L8sdJ8kMse9ln-Tg7FBYZQyxQPIYzhxthqWOvsNq8uDlqAjS65fMG6vU5_lCurw7aRuL_yodTpg8xd8tUUFvc1N761MjBKaaVgC7q0N9nueJqFWFsfvWv3iSlMWKTOM8J5tpTI1Qh5vOzML911ghEHsg3JIwXZShKvgRpl6Vg/s736/boot_z80-mbc2.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="393" data-original-width="736" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivhr8FmdqZ3mXIyK-x-L8sdJ8kMse9ln-Tg7FBYZQyxQPIYzhxthqWOvsNq8uDlqAjS65fMG6vU5_lCurw7aRuL_yodTpg8xd8tUUFvc1N761MjBKaaVgC7q0N9nueJqFWFsfvWv3iSlMWKTOM8J5tpTI1Qh5vOzML911ghEHsg3JIwXZShKvgRpl6Vg/w640-h342/boot_z80-mbc2.png" width="640" /></a></div><br /><span>Once you install the SD and RTC modules, holding the USER button while pressing reset will present you with the following options:</span><p></p><p><span>0: No Change</span><br /><span>1: Basic</span><br /><span>2: Forth</span><br /><span>3: Load OS from Disk Set <i>(Current Setting)</i></span><br /><span>4: Autoboot</span><br /><span>5: iLoad</span><br /><span>6: Change Z80 Clock speed <i>(-->Option to switch to)</i></span><br /><span>7: Toggle CP/M Autoexec <i>(-->Option to switch to)</i></span><br /><span>8: Change the Disk Set</span><br /><span>9: Change the RTC time/data</span></p><p><span>If you look above in the top section of my screenshot, You see that I have my Z80 clocked at 8Mhz, My CP/M Autoexec is ON, I have the GPIO chip installed, my RTC modules was detected and my room is a rather warm 73f.</span></p><p><span>There are several disk sets you can choose from option 8. Mine is currently set on CP/M 3.3. I'd start with option 9, and set your time/date. After which a quick jump into option 1, BASIC will allow you to program an obligatory <b>HELLO WORLD </b>program to officially declare your Z80-MBC2 working.</span></p><p><span>Use option 8, to change your Disk Set. I'd recommend CP/M 3.3.</span></p><p><span> </span></p><p><span>These are four highly recommended websites at this stage:</span></p><p><span> </span></p><p><span><b>Z80-MBC2 Hackaday Project Homepage: </b><br /></span></p><p><a href="https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer"><span>https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer</span></a></p><p><span> </span></p><p><b><span>Just for Fun: Z80-MBC2 Homepage:</span></b></p><p><span><a href="https://j4f.info/z80-mbc2 " target="_blank">https://j4f.info/z80-mbc2 </a><br /></span></p><p><b><span> </span></b></p><p><b><span>Land Boards: Z80-MBC2 Build Notes</span></b></p><p><a href="http://land-boards.com/blwiki/index.php?title=Z80-MBC2_Build_Notes"><span>http://land-boards.com/blwiki/index.php?title=Z80-MBC2_Build_Notes</span></a></p><p><span><br /></span></p><p><b><span>Z80-MBC2 Usergroup Facebook Page</span></b></p><p><a href="https://www.facebook.com/groups/Z80MBC2"><span>https://www.facebook.com/groups/Z80MBC2</span></a></p><p><span><br /></span></p><p><span> </span></p><p><span><br /></span></p><p><span> </span><br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-46289547013109023582023-02-03T23:41:00.026-05:002023-02-04T13:55:25.463-05:00Exploring the Z80-MBC2 Soup to Nuts Chapter 3: Building the Z80-MBC2 <p>Before we begin, I'll assume that you have gathered the parts required using the Z80-MBC2 "Build of Materials" worksheet. All of the requirements and files can be <a href="https://hackaday.io/project/159973-z80-mbc2-a-4-ics-homebrew-z80-computer" target="_blank">found here</a>.<br /></p><p>The chips required for this build are:</p><ul style="text-align: left;"><li>Z84C0008 (CMOS) Z80 CPU.</li><li>ATMEGA32A-PU</li><li>TC551001-70</li><li>74HC00</li><li>MCP23017 </li></ul><p>The Z80, ATMEGA32A, and TC551001 can be sourced from distributors like Digikey, or your favorite supplier. I sourced the MCP23017, 74HC00 and all of the other sockets, resistors, leds, etc. from Tayda Electronics. The "<i>Micro SD TF Card Storage Adapter Board</i>", "<i>DS3231 IIC Module Precision Real Time Clock</i>" and "<i>USB to TTL Serial Port Module CH340N</i>" are easy to find on Ebay. The board gerbers are provided for those who are comfortable with having a batch made from PCBway or JLCPBC, but you will also find sellers on Ebay who are selling the bare PCB for less than $10. Tindi has complete or partial kits from various sellers on and off.</p><p>While you are browsing Ebay for the serial-to-TTL, SD, and RTC modules, I'd also order a "<i>10 Pin Convert to Standard 6 Pin Adapter Board+USBASP USBISP AVR Programmer USB</i>." This two piece kit will be used for loading the required sketch to the Atmega32 chip.<br /></p><p>You can skip the MCP23017 chip, socket, and pin headers if you are not interested in GPIO, but I'd recommend building it. This tutorial will demonstrate projects which uses the GPIO pins.</p><p>I've substituted the Z80 chip for the 10Mhz variety I had already in the shop, and they work fine. It still runs at 4mhz or 8mhz, as dictated by the Atmega32 microcontroller.</p><p>I'd recommend printing off a copy of the <a href="http://www.gunstar.one/Z80-MBC2/A040618 BOM v2.ods" target="_blank">Build of Materials</a> and the <a href="http://www.gunstar.one/Z80-MBC2/A040618%20-%20PCB%20Front%20Ref.pdf" target="_blank">PCB Front Reference</a> for use as you assemble this project. These will be your reference documents for where parts go and what they are. This guide will assume that you have basic understanding of soldering and that perhaps you may have built one or two other projects. </p><p><b>A special note concerning the build order</b>:</p><p>The presented build order is my personal preference, but feel free to modify it. Installing components from smallest to largest can simplify the process. For instance, starting with resistors and diodes (Steps 5 and 6) before moving on to larger components can reduce difficulty during assembly. My approach is to begin with sockets and headers as I find it easier to secure them to the PCB with tape while soldering.<br /></p><p>Got your parts? Warm up the soldering iron and let's get busy.</p><p><b>1. Start with the sockets first.</b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ku4t1sJNGhJ93DynFQXLIPUoYGsL_S_8e9DDb1rfj9tW3AYvJC5PHIaVujLqtGfDm1iFmzJxtoBBJsU82WGjHirvnyiLMynvcmgEqnWYJPUqO75dh5RKDAVFwucCjIx3fVb_hj9L5LMLOsXgxoMflo9aJonKCSpY0UQm1t9-J2dXLTz3fFqYXXK0Xw/s542/Sockets_Installed.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ku4t1sJNGhJ93DynFQXLIPUoYGsL_S_8e9DDb1rfj9tW3AYvJC5PHIaVujLqtGfDm1iFmzJxtoBBJsU82WGjHirvnyiLMynvcmgEqnWYJPUqO75dh5RKDAVFwucCjIx3fVb_hj9L5LMLOsXgxoMflo9aJonKCSpY0UQm1t9-J2dXLTz3fFqYXXK0Xw/s320/Sockets_Installed.bmp" width="320" /></a></div><p></p><p>Insert the five sockets, making note that the notches in the socket itself are facing the same direction as the silkscreen notches. If you get them backwards, they will still work, but may be confusing when you install chips later. I tend to tape them down with a will electrical tape, then solder only 1 pin on each side to make sure they are completely seated before soldering the rest of the pins. If a socket is sticking up, it's easy to heat up one pin while pushing back against the PCB.<br /> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRrvqaNEByoX3cYhsPfwdK2LJOPPHgLGOuMIzNOEye6b6mRWv4qSqCjskzCsAvVEE9f3GCAuC1QOJ-2YW1wM_x_fo44xXwr3jwkdiVQyoxGPBBIUdpnU6zDsfEcH1C619xnXXvizV1Nq6W5dxp8WlzOO0lmSBRPRTgikqhwVq9FJEvKGt5WTY38iLcA/s1733/Sockets1st.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1733" data-original-width="1562" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFRrvqaNEByoX3cYhsPfwdK2LJOPPHgLGOuMIzNOEye6b6mRWv4qSqCjskzCsAvVEE9f3GCAuC1QOJ-2YW1wM_x_fo44xXwr3jwkdiVQyoxGPBBIUdpnU6zDsfEcH1C619xnXXvizV1Nq6W5dxp8WlzOO0lmSBRPRTgikqhwVq9FJEvKGt5WTY38iLcA/s320/Sockets1st.jpg" width="288" /></a></div><br /><br /><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3Wr1jloUYQzh3uoz2etwYKXv1Q_dfSAHjxpDLPlDbnLK_5TiCLfjRePtBEHJwZv9PpOZ06nuU9hw69A_nuFg12xIXrEYfOFQeraBjIIPsEVPBZ68XbqPQNV6lDnGALKp-9uOy14jLMmakRDfceU5d8y35rFHi0O0oQzBVSvNjqUSyGfQJYMj9p2MdNA/s1072/sockets2.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="384" data-original-width="1072" height="115" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3Wr1jloUYQzh3uoz2etwYKXv1Q_dfSAHjxpDLPlDbnLK_5TiCLfjRePtBEHJwZv9PpOZ06nuU9hw69A_nuFg12xIXrEYfOFQeraBjIIPsEVPBZ68XbqPQNV6lDnGALKp-9uOy14jLMmakRDfceU5d8y35rFHi0O0oQzBVSvNjqUSyGfQJYMj9p2MdNA/s320/sockets2.jpg" width="320" /></a></div><p></p><p><br /></p><p><b>2. Solder in all of the pins and headers:</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOFgFNVscBdBU_QCEACZ_z6P4cpBrEVWi0CZWNW1emV77ICSp7MKPW_MRC9IDVB-YoBDwjFCdknO6qu1-4dTF739Oskv0XcqftxEWDfzaHEYH21LlCRNNsppwEVWVxwdhFJhjcDYq7NJvZ9h20sltu0U5M8QBS8p4uAHUJZ3INMgfgIo5F9fGToIDkOg/s2608/pins_and_headers.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2608" data-original-width="2480" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOFgFNVscBdBU_QCEACZ_z6P4cpBrEVWi0CZWNW1emV77ICSp7MKPW_MRC9IDVB-YoBDwjFCdknO6qu1-4dTF739Oskv0XcqftxEWDfzaHEYH21LlCRNNsppwEVWVxwdhFJhjcDYq7NJvZ9h20sltu0U5M8QBS8p4uAHUJZ3INMgfgIo5F9fGToIDkOg/s320/pins_and_headers.jpg" width="304" /></a></div><br /><p>Instead of installing the recommended JST_XH 02 (AUX Power) and IDC_PCB (ICSP) connectors, I opted to use straight pins. The listed connectors in the BOM are ideal due to their keyed plastic, which prevents incorrect insertion, but if you're paying attention, straight pins will suffice. For the GPIO, I used two single-row connectors that sit next to each other. If desired, female headers in the GPIO can also be used for a more Arduino-like setup.</p><p>When installing headers, a useful technique is to solder one pin and then check the alignment of the headers and pins to ensure they are straight. This makes it easier to heat them with the soldering iron and realign them if necessary. It is crucial that the GPIO and ICSP pins are properly aligned and straight.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIJaJcdFuPKCcR9D8BQzRcR379-mYkTlcG7orAWVA3BMkPDLvP8vHSW1elb1ASU1oVEBoHMiycuxJaxdvdYS4ogDL59981qNMj8ybx2-b_d77gejjeAh5JSe5cYhV4in4FpxbOiwWQfpPjZ4Djkdv_QD7hO7sZTQtiiAK73nhKQUcuIPokHqQ8CFWOEA/s542/board_pins_and_headers.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIJaJcdFuPKCcR9D8BQzRcR379-mYkTlcG7orAWVA3BMkPDLvP8vHSW1elb1ASU1oVEBoHMiycuxJaxdvdYS4ogDL59981qNMj8ybx2-b_d77gejjeAh5JSe5cYhV4in4FpxbOiwWQfpPjZ4Djkdv_QD7hO7sZTQtiiAK73nhKQUcuIPokHqQ8CFWOEA/s320/board_pins_and_headers.bmp" width="320" /></a></div><br /><p><b>3. Install the SIP resistors between the sockets.</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0TNLzwJ3Vf42IxECwM1jY0Wjm-lF8M79zbl0-ibSnO2ldjE86Cxqmwb732uw8B9aPVW74i4lgdIuZsFrLe9EWS-U4lLlfX12fvc3JdhJAPRm8EbPzy9AaCu8KtGOqdFyQ-JXmBY9TrRO5xa7TU7n8ptXJywjLrUf77-SMJsk8Au7Ove1bGVhJKMIKAQ/s1591/10ksips_closeup.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1079" data-original-width="1591" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0TNLzwJ3Vf42IxECwM1jY0Wjm-lF8M79zbl0-ibSnO2ldjE86Cxqmwb732uw8B9aPVW74i4lgdIuZsFrLe9EWS-U4lLlfX12fvc3JdhJAPRm8EbPzy9AaCu8KtGOqdFyQ-JXmBY9TrRO5xa7TU7n8ptXJywjLrUf77-SMJsk8Au7Ove1bGVhJKMIKAQ/s320/10ksips_closeup.jpg" width="320" /></a></div><p></p><p>Pay special attention here. These resistors are designed to work in one direction. On the SIP resistor there is a dot which indicates the orientation. This dot needs to match up with the square hole on the board. <i>Note: These resistors face different directions on this project.</i></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFKm1cyOk8MYos-rUfJcCMtUi8ZHNbrtQD_YddGitcS5azsCQzBVXcMsnEqoHbN_vSNVD-IUoGngFe1TIoPdLmmXqPH9wSepmCGHldVt4BRFY5-_jozUa58pdqGTxo-kEiZCW0ogEGbF-hxXzmyspMJPX4_tXBVPwnJMYUVQrAzNbB1_qmwdnhJVAdHg/s542/sip_resistors.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFKm1cyOk8MYos-rUfJcCMtUi8ZHNbrtQD_YddGitcS5azsCQzBVXcMsnEqoHbN_vSNVD-IUoGngFe1TIoPdLmmXqPH9wSepmCGHldVt4BRFY5-_jozUa58pdqGTxo-kEiZCW0ogEGbF-hxXzmyspMJPX4_tXBVPwnJMYUVQrAzNbB1_qmwdnhJVAdHg/s320/sip_resistors.bmp" width="320" /></a></div><br /><p><b>4. install the two 2N2907 transistors:</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCH4wr6xkUfqS-I598O3bjx6a5TVzM5bLRo8n9DqPkaOto8OJuLwixOU7V6BqLrC5VTmtEKGXdU0Nh3chGzvhEmMM-rJrG09-bkwoYaDo0g0LCiUS9o2FxVEFH_idXkxJN9fjxVYT-G_JPCyVyr8Xtw4W3RWi4XMsLNyea7ymNuoX033LokXckoTrfsg/s1296/transistors.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="952" data-original-width="1296" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCH4wr6xkUfqS-I598O3bjx6a5TVzM5bLRo8n9DqPkaOto8OJuLwixOU7V6BqLrC5VTmtEKGXdU0Nh3chGzvhEmMM-rJrG09-bkwoYaDo0g0LCiUS9o2FxVEFH_idXkxJN9fjxVYT-G_JPCyVyr8Xtw4W3RWi4XMsLNyea7ymNuoX033LokXckoTrfsg/s320/transistors.jpg" width="320" /></a></div><p></p><p>Make sure to orient the components correctly. Follow the silkscreen markings on the board and position the flat side facing forward. Be careful when soldering these as the connections on the back are close together and can easily be connected by excess solder. If this occurs, don't worry, simply use a small amount of solder wick to remove the excess. <i>Avoid overheating the wick, as this can harm the transistors. If using solder wick, use it sparingly and with a brief touches of the iron to prevent damage to the part.</i><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5szH7PWgpt9Vij06EDOTm52IwrO-8GJ_IpH6ru-Qd55512YI_zcYwBn98mSohYMyBiMNmRpHZpOnA37jB-F_mbYrJT-64OBQEa3T3zdeNqaTbKwxSruF2C4W1VldQU5-ME0aEw4w6e61vx5F42E4pjRWZpJMH2-tUyaWJQzfkWqvKBRqJpO2-eOlipg/s542/transistors_installed.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5szH7PWgpt9Vij06EDOTm52IwrO-8GJ_IpH6ru-Qd55512YI_zcYwBn98mSohYMyBiMNmRpHZpOnA37jB-F_mbYrJT-64OBQEa3T3zdeNqaTbKwxSruF2C4W1VldQU5-ME0aEw4w6e61vx5F42E4pjRWZpJMH2-tUyaWJQzfkWqvKBRqJpO2-eOlipg/s320/transistors_installed.bmp" width="320" /></a></div><br /><p><b>5. Install the Diodes:</b></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2LFXuHorgo1zWxd-BOg6hHdCzuhFB26LUlU8bobGG7CRtgJlnzj8CTOcm-cqSTueDNDbh0mIcSWAHsdHOtdsqLgCm6BPJpehO8D2S3WUxpm9ohDOHSqP6q5wZnIvVAwcFklxGLFVQQsbKIiqcpvEo-5Y5-jNp2vliOLUe2DwpbseH0p32b_xDlN0KaA/s2443/diodes.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1507" data-original-width="2443" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2LFXuHorgo1zWxd-BOg6hHdCzuhFB26LUlU8bobGG7CRtgJlnzj8CTOcm-cqSTueDNDbh0mIcSWAHsdHOtdsqLgCm6BPJpehO8D2S3WUxpm9ohDOHSqP6q5wZnIvVAwcFklxGLFVQQsbKIiqcpvEo-5Y5-jNp2vliOLUe2DwpbseH0p32b_xDlN0KaA/s320/diodes.jpg" width="320" /></a></div><br /><p>There are two types of diodes used in this build, both of which have a line or stripe on one side. Ensure that this stripe aligns with the corresponding stripe on the silkscreen, as it indicates the diode's polarity. Diodes are like one-way streets, allowing current to flow in only one direction. If they are installed incorrectly, they may block signals from reaching their intended connections.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaqVw0ZxFN5rZRd-AYOJ1XexrlRV8sbDeKIZh0BoWMPBTd9ZRnSGlbXavUwK4zQIg2fl57vUcCnxKU2U7p6zkXVFK6XRC_ewevCgwwsv_NWdTtCsI4RUYWlWpqQq4wVDzt4X3F53M_VT_IzEDTEfE3Kyt1cXSvGaVqoEmtOxt-cYaN_j0nY7yX2b5_iA/s542/diodes_inserted.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaqVw0ZxFN5rZRd-AYOJ1XexrlRV8sbDeKIZh0BoWMPBTd9ZRnSGlbXavUwK4zQIg2fl57vUcCnxKU2U7p6zkXVFK6XRC_ewevCgwwsv_NWdTtCsI4RUYWlWpqQq4wVDzt4X3F53M_VT_IzEDTEfE3Kyt1cXSvGaVqoEmtOxt-cYaN_j0nY7yX2b5_iA/s320/diodes_inserted.bmp" width="320" /></a></div><br /><p><b>6 Install the resistors:</b></p><p>Resistors have no polarity, so they can be installed in any direction. They are marked with colored stripes that indicate their values. The first two stripes indicate numeric values, the third stripe is a multiplier, and the fourth stripe represents tolerance. Make sure to take your time and refer to the BOM sheet for each type of resistor. A neat and organized installation, with the tolerance stripes aligned in the same direction, is a bonus.</p><p>If you need to double check the value of your resistors, Digikey has an excellent <a href="https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-resistor-color-code" target="_blank">resistor color code calculator</a>.<br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF1r1338AMb4nrnQ97KVHVyJKUcESF2zr8_cJ8bu1Zy-a1s52LQF_JHI1NoFEEv05c-uZjATA_0zgaYx92Y4_bt4IzLn3QIE5wLH58W7ZZT8GRMpS3_hfXDprHCzAYowRNaoRUWouuTz5BMtr3zuo8VBCUZo5JQpUShr30ZnRRIc2McFj1pv82TAaoKg/s542/resistors_installed.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF1r1338AMb4nrnQ97KVHVyJKUcESF2zr8_cJ8bu1Zy-a1s52LQF_JHI1NoFEEv05c-uZjATA_0zgaYx92Y4_bt4IzLn3QIE5wLH58W7ZZT8GRMpS3_hfXDprHCzAYowRNaoRUWouuTz5BMtr3zuo8VBCUZo5JQpUShr30ZnRRIc2McFj1pv82TAaoKg/s320/resistors_installed.bmp" width="320" /></a></div><br /><p><b>7. Install the 22pf & 0.1uf capacitors, and the crystal:</b></p><p>There are three types of capacitors in this build. The two 22pf caps are nearest to the crystal. This is a good time to install the crystal as well. The 0.1uf caps are scattered around the board. These caps can be installed in any direction. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNmqCoDFcIfvCTfn7U8BDZAaFD_TgdncNMT4HkomKcx8HGnbonvkh9D88Ce3CdKQeF2Iwm9rUtiGIKPfFMbJ0o_SPLhI_vR7z-xmqO7kbKgafqkG0c5YRZV4j83K57tqSsld8omCN1LV1ViApBT9rgtLDxNGMDO3aeeS9SPAPSXK53B2XlwxGR2XVdxA/s542/caps_installed.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNmqCoDFcIfvCTfn7U8BDZAaFD_TgdncNMT4HkomKcx8HGnbonvkh9D88Ce3CdKQeF2Iwm9rUtiGIKPfFMbJ0o_SPLhI_vR7z-xmqO7kbKgafqkG0c5YRZV4j83K57tqSsld8omCN1LV1ViApBT9rgtLDxNGMDO3aeeS9SPAPSXK53B2XlwxGR2XVdxA/s320/caps_installed.bmp" width="320" /></a></div><p></p><p><b>8. Install the LEDs:</b></p><p>Just like the other diodes, the LEDs do have polarity and must be installed in the correct direction. The shorter leg of the LED is the negative side. Install it in the LED position with the shorter leg going into the square on the PCB. In my own build I substituted the white LEDs for orange with good result. The blue LED cannot be substituted. There is a chance that the USER button will not function correctly without a blue LED in this position.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghkRsHgeNNWbKEosYLrRM__iAVQESSveMh-JgPp5xat_PHlZN6q5863bG3AqfVcDmzxccDuaaY8RHY11Yh_6XQv4RAiaAQSKR7BWlR3ZtRrYVkcdIHFtrQKFNEdf5J9HKjrwGI2ptygSWPdbjsmZntONZrlX60c-Tc_LDHQpwt7QxIz9qdK6HKpQsMiw/s542/leds_installed.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghkRsHgeNNWbKEosYLrRM__iAVQESSveMh-JgPp5xat_PHlZN6q5863bG3AqfVcDmzxccDuaaY8RHY11Yh_6XQv4RAiaAQSKR7BWlR3ZtRrYVkcdIHFtrQKFNEdf5J9HKjrwGI2ptygSWPdbjsmZntONZrlX60c-Tc_LDHQpwt7QxIz9qdK6HKpQsMiw/s320/leds_installed.bmp" width="320" /></a></div><p></p><p> </p><p><b>9 Install the two 100uf electrolytic capacitors:</b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwxgQ1eg18gTCZA7Gl0MpNwudsIwDX8eKBylGgMUhH5gmNf3OrOV5SFdl4sNfJiNiaFHHd8jh2DOI7hY4e0M3NFj_ll8zHhc7YQpMcce6lvPL7L9le4Kgd3oGP7m9Ek3p6V99FlYZ5RUVDzK-3oP0k_D1ELmQhf9hG7Ak57uTOscwcrDXQcqGEOCk0TQ/s636/caps.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="510" data-original-width="636" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwxgQ1eg18gTCZA7Gl0MpNwudsIwDX8eKBylGgMUhH5gmNf3OrOV5SFdl4sNfJiNiaFHHd8jh2DOI7hY4e0M3NFj_ll8zHhc7YQpMcce6lvPL7L9le4Kgd3oGP7m9Ek3p6V99FlYZ5RUVDzK-3oP0k_D1ELmQhf9hG7Ak57uTOscwcrDXQcqGEOCk0TQ/s320/caps.jpg" width="320" /></a></div><br /> Just like the diodes, these two capacitors have a negative and positive side. The negative side of the capacitor is well marked on the package and the positive side of each position also has a + sign on the PCB. This is also a good time to install the two tact switches at the front of the board.<br /><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhESbgXpjF2u4Y3_JvqwxSqGJGiBhaFjSt-YbrcnLBl9KuFuJCRCMFFAoz8WfeAXm820vKjJwJS9f57T31EEQR0zBy9HkpanoGrsHH4VEPC_5O5etAD-0f0v1C5SyDx3hxp0in_Yzt4XSNcujblE2KYO7TEOGazRmAk0ncWzPAoLiTWxAFOJs1dcPzOXA/s542/switches_caps.bmp" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="541" data-original-width="542" height="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhESbgXpjF2u4Y3_JvqwxSqGJGiBhaFjSt-YbrcnLBl9KuFuJCRCMFFAoz8WfeAXm820vKjJwJS9f57T31EEQR0zBy9HkpanoGrsHH4VEPC_5O5etAD-0f0v1C5SyDx3hxp0in_Yzt4XSNcujblE2KYO7TEOGazRmAk0ncWzPAoLiTWxAFOJs1dcPzOXA/s320/switches_caps.bmp" width="320" /></a></div><br /><b> 10. Install the chips!!!!</b><p></p><p><span style="color: #38761d;">It's so exciting, you are almost done</span>, but <span style="color: red;"><b>SLOW DOWN</b></span> at this step. New chips tend to have their pins splayed apart a bit more than the socket, so I gently hold the chip at an angle against my desk and give them a very gentle push to move the each side of the pins inward just a little bit. Chips which are recycled can have very weak pins subject to bending as you insert them into the socket. Line up the chips with those notches we talked about earlier and <b>GENTLY</b> insert them evenly into the sockets. If you see a pin starting to bend, carefully remove the chip, straighten the pin and try again.</p><p><br /></p><p><b>11. Clean up the solder flux from the bottom of the board.</b></p><p>You probably have a mess of soldering flux on the bottom of your board. This needs to be removed as it will cause damage over a long time. Use isopropyl alcohol (70% or greater) and a clean toothbrush or two to get the board clean. Also use a lint-free rag to wipe the flux clean. Electronics cleaners can also be used, with the end result of getting things clean. At the same time review your soldering connections under a magnifier to locate any missed connections or cold (dull grey) solder connections.</p><p> <br /></p><p>Next, we'll discuss programming the Atmega32 and booting it up...<br /></p><p> <br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-76233476211629033662023-02-02T01:19:00.008-05:002023-02-04T00:25:30.336-05:00Exploring the Z80-MBC2 Soup to Nuts Chapter 2: Introduction & Motivation<p>Before we start to dig into the assembly, software, and various projects involved with the <b>Z80-MBC2</b> single board computer, I thought I'd give you a little background on the author and the motivation behind the creation of project documentation for this kit.</p><p>I'm a part of what is commonly called, Generation-X. Born in the early 70's, before smartphones, Internet, and cable TV. My earliest memories of experimenting with electronics as a child were lighting up 12v lamps salvaged from junkyards with the power supply from an old television. When the home computer revolution started happening in the late 70's and early 80's, a Commodore 64 became my magic carpet to adventures in programming, telecommunication with BBS systems, and of course gaming.</p><p>Compared to today's technology, computers from the 1970s and 1980s had limited computing capabilities. Nevertheless, one could achieve mastery in operating these machines by putting in dedication and effort. The computers often came with comprehensive books that included details on the instruction set and design schematics.</p><p>Activating the power switch, a flashing cursor would appear in just a matter of seconds, beckoning you to unleash your imagination and unlock the virtual world within. Venture through the ruins of the Great Underground Empire, or mount a daring rescue mission in a military complex. When tired of playing games, one could switch to programming mode, with no distractions from social media or video-sharing platforms, and create their own adventures. It was a time of pure creativity and focus, limited only by one's imagination.</p><p>For those interested in electronics, the 1970s and 1980s computers often featured user-ports, slots, or sockets that allowed you to connect and interface your own creations with the computer.</p><p>The contrast with today's computers is stark. Although they boast millions of times more computing power, the technology behind them has become ubiquitous and almost mystical. Instead of comprehensive design schematics, the documentation for these machines often amounts to a few simple instructions on how to set it up. The wide range of software available to users is overwhelming, but this convenience has also led to a tendency to waste time on non-productive activities like browsing videos and social media.</p><p>Over the past four decades, computers have transformed from educational tools that inspired imagination to sources of mindless entertainment, similar to television. Our attention spans have decreased from an hour to just a few minutes, and while the modern computer has opened up a world of information and communication, many people have lost sight of its potential as a tool for learning and creativity.</p><p>For those of us who are "old-timers," retro computing has become a popular way of turning back the clock. If you've made it this far, you may be either intrigued by the idea of exploring vintage computers as a hobby, or you may have personal memories of growing up with the computer technology of the 1970s and 1980s.</p><p>Time to pull this toward the topic. As a collector of classic computer hardware, I can tell you that these old machines can be both fascinating and challenging to work with. Due to their age, these computers are prone to chip failures and other issues commonly associated with antique electronics. Moreover, repairing them can be expensive, as replacement chips are often just as fragile as the failed ones and may be in short supply. I spend a significant portion of my time simply trying to keep my old computers running. Additionally, I would be cautious about connecting any homemade electronics to the user ports of these vintage machines.</p><p>Imagine being able to relive the experience of retro computing without having to deal with the expensive and fragile hardware. This opens up opportunities for you to master the computer, discover the roots of modern computing, and even delve into programming, electronics, and unleash your imagination. This is what excites me about documenting various projects and software for the <b>Z80-MBC2</b>.<br /></p><p>We'll start digging into the assembly in the next entry.</p><p> <br /></p><p><br /></p><p><br /></p><p><br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-6216402085197203022023-01-30T12:39:00.003-05:002023-02-04T00:25:41.534-05:00Exploring the Z80-MBC2 Soup to Nuts: Introduction<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnunM0ajiy8NbRp-gza9tr56fH_DEeqGQCl0tjee_aoOM7tOjxsFHOMlBx-Zg6B7e3RnH4c4vFkwlyO1UtQNdp6I2Cp_C6YHeGV-tulDwcT3fq7wHGiBfpX8_-cfiKSFmtbGJo8ZM7tNw9z388CHuG0FrQBIs4s2u2bHyYRWylAjrs-DdGI1FGKYUTDA/s2294/z80-mbc2.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1936" data-original-width="2294" height="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnunM0ajiy8NbRp-gza9tr56fH_DEeqGQCl0tjee_aoOM7tOjxsFHOMlBx-Zg6B7e3RnH4c4vFkwlyO1UtQNdp6I2Cp_C6YHeGV-tulDwcT3fq7wHGiBfpX8_-cfiKSFmtbGJo8ZM7tNw9z388CHuG0FrQBIs4s2u2bHyYRWylAjrs-DdGI1FGKYUTDA/s320/z80-mbc2.jpg" width="320" /></a></div><p></p><p>The <b>Z80-MBC2</b> is an easy to build single board computer which as the name implies, contains a Z80 CPU at it's heart. It uses an SD card as a "disk emulator", and contains a 128KB banked RAM capable of running CP/M 3, CP/M2.2, QP/M 2.71, UCSD Pascal, and Collapse OS.</p><p>In addition, quoting the author, <i>"It has an optional on board 16x GPIO expander, and uses common cheap
add-on modules for the SD and the RTC options. It has an "Arduino heart"
using an Atmega32A as EEPROM and "universal" I/O emulator (so a
"legacy" EPROM programmer is not needed)."</i></p><p>In every sense, this is a real working computer, not an emulation or a microcontroller pretending to be a CPU. The Zilog Z80 processor at the heart of this SBC has a lineage that goes all the way back to 1976, and is still manufactured today. In my opinion, the Z80-MBC2 is the perfect platform for those who are interested in learning computer science, exploring vintage computer systems, learning to program, or creating your own games, art, and hardware interface projects.</p><p>Unlike just purchasing a Raspberry Pi, you'll be involved in the assembling the computer from the individual parts. Don't worry! This is a very simple 5 chip design which uses easy to solder through-hole parts, and sockets for the ICs. It's very hard to make mistakes, and chances are like mine, yours will boot the first time you plug it in.<br /></p><p>In 2023, we'll explore various aspects of the Z80-MBC2 single board computer:</p><ul style="text-align: left;"><li>Sourcing and building your own kit.</li><li>Installing the software CP/M 2.2 & CP/M 3.</li><li>Exploring the historic Z80 software.</li><li>Adding a "modern" terminal. <br /></li><li>Programming in Microsoft BASIC.</li><li>Programming in Turbo Pascal.</li><li>Programming in C.</li><li>Connecting to the real world via GPIO.</li><li>Graphics, Sprites, and Sound.</li><li>Expanding the Z80-MBC2 <br /></li></ul><p>Stay tuned!</p><p><br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-62302171728882339772022-12-05T12:57:00.011-05:002022-12-06T13:56:01.636-05:00More Retro Computing fun with ESP32 : Meatloaf<p>I recently stumbled upon a new project which provides an Internet connected file and BBS interface for the Commodore userport. <br /></p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://github.com/idolpx/meatloaf-specialty/raw/main/images/meatloaf.logo.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="320" data-original-width="800" height="80" src="https://github.com/idolpx/meatloaf-specialty/raw/main/images/meatloaf.logo.png" width="200" /></a></div><b>The project I'm talking about is <a href="https://www.meatloaf.cc/" target="_blank">MEATLOAF</a>.</b><p></p><p>A Commodore IEC serial floppy drive, and Wifi modem multi-device emulator by Jaime Idolpx<br /></p><p></p><p>If you have experience with pi1514 or other modern wifi adapters, you might write this project off as "Yet another modern
drive or modem" replacement for the C64, but it has a feature which is definitely
worth a look. It might even be completely game changing by the time
the project is complete.</p><p>The idea here is a simple file loading system which uses the Internet itself as the 1541 floppy disk. Meatloaf allows you to skip the downloading of files to your PC, transfer to a USB device and sneaker-net them to Ultimate/pi1541 device on the C64. Instead, you can simply LOAD the programs directly from their existing download locations. </p><p>The parts for this project are extremely inexpensive, the basic build uses a $6 ESP32 device from <a href="https://www.amazon.com/dp/B09XDMVS9N?psc=1&ref=ppx_yo2ov_dt_b_product_details" target="_blank">Amazon</a>, and a serial IEC cable to the C64. (I used a DIN45322(6) connector, only to keep from cutting an IEC cable) If all you have is a Commodore computer C64,C128,VIC20,C16,PLUS/4, and no other hardware, this simple device will get you loading software.</p><p>Don't chuck your pi1541 into the bin yet, this project is in Alpha state. You will experience bugs and minor flaws. The project is also not intended to be 1541 exact, so while .prg programs will work (and there are thousands of them out there to keep you occupied) you will probably not be loading any copy protected nibble images any time soon. <i>(Note: This project is developing quickly. It's possible that some of this information will be inaccurate by the time you read it.)</i> If you are like myself and have a little hardware in your parts box and enjoy a challenge to play with up and coming technology for your old computers, then meatloaf.cc wants you to participate.</p><p>This blog post is intended to document my own experience with getting a very simple Meatloaf up and running with minimal parts. I'd also recommend watching a couple videos on getting started with both Visual Studio Code and Platform.IO. Don't worry, I'm a complete rookie on both, and was able to figure it out enough to be compile and upload Meadloaf. If you have experience with the Arduino, it's an easy enough jump.<br /></p><p>You'll need the following:</p><ul style="text-align: left;"><li><a href="https://code.visualstudio.com/download" target="_blank">Visual Studio Code</a> (free) installed on your PC.</li><li><a href="https://platform.io/" target="_blank">Platform IO</a> installed into Visual Studio Code.</li><li>An <a href="https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313&_nkw=Commodore+IEC+serial+cable&_sacat=0&LH_TitleDesc=0&_odkw=Commodore+IEC+connector&_osacat=0&LH_PrefLoc=2" target="_blank">IEC serial cable</a> you don't mind cutting, or an DIN45322 connector, even a <a href="https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2380057.m570.l1313&_nkw=Commodore+IEC+connector&_sacat=0" target="_blank">male connector</a> from somewhere like Ebay.</li><li>A volt/ohm meter with continuity setting. (something that beeps when probes touch.)</li><li>An <a href="https://www.amazon.com/dp/B09XDMVS9N?psc=1&ref=ppx_yo2ov_dt_b_product_details">ESP-WROOM-32</a> device.</li></ul><p>This parts list is just enough to get you loading programs from the Internet. We are skipping the userport connector for now which enables the ability both parallel loading (faster) and TelBBS modem.</p><p>The first step is solder up and map our your selected DIN cable or connector. Here's an image from out on the interwebs that will help you out.</p><p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOC1IyL4JU8HAwucp6vuuHLczVwHk6gLq33wNW1ZPLguhVMx9Jrv78BCab1-Bx7bx6TUhRLbBxR5I9lkRF54ZnGsp9Qi0CqAi2Q1gw30gvvl9oYDZxxlTsIjC0V7fPoKRSK71VCHdmQcYT21DFGNCss9SgsRTPeEOekwH2sf1AcSK7dsi5KsHsWNNSWQ/s508/connectors.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="175" data-original-width="508" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOC1IyL4JU8HAwucp6vuuHLczVwHk6gLq33wNW1ZPLguhVMx9Jrv78BCab1-Bx7bx6TUhRLbBxR5I9lkRF54ZnGsp9Qi0CqAi2Q1gw30gvvl9oYDZxxlTsIjC0V7fPoKRSK71VCHdmQcYT21DFGNCss9SgsRTPeEOekwH2sf1AcSK7dsi5KsHsWNNSWQ/s320/connectors.png" width="320" /></a></div><p></p><p><br /></p><p>There are also a couple helpful images on the <a href="https://en.wikipedia.org/wiki/Commodore_bus" target="_blank">Commodore Bus Wiki page</a>.</p><p><br /></p><p><br /></p><p>At the moment you'll need to identify four connections: GND, Clock, Data, & ATN. These are connections 2,4,5, and 3. While the image doesn't properly show a cable/pin graphic for male, you'll need to use the reversed pin image on the left if you using a cable.</p><p>Next install Visual Studio Code and Platform.IO and watch a couple Youtube videos on them. Dave's Garage has a <a href="https://www.youtube.com/watch?v=XLQa1sX9KIk" target="_blank">video</a> that will teach you enough to be dangerous if you have never worked with them before.</p><p>Now that you are an "expert" on those, it's time to download the WS-WROOM-32 version of the Meatloaf software from it's github. Use the basic instructions on the page itself to get started.</p><p><a href="https://github.com/idolpx/meatloaf-specialty">https://github.com/idolpx/meatloaf-specialty</a></p><p><i>(Note: the /meatloaf-specialty project is the version designed for ESP32.) </i><br /></p><p>Make special note to edit and rename the ssid.h and the platformio.ini files as indicated in the instructions. I won't show you my own ssid.h which contains my Wifi settings, but you are welcome to use my platformio.ini as a reference. </p><p> </p><p><span style="color: #0b5394;">;FujiNet PlatformIO Project Configuration File<br />;<br />; Build options: build flags, source filter<br />; Upload options: custom upload port, speed and extra flags<br />; Library options: dependencies, extra library storages<br />; Advanced options: extra scripting<br />;<br />; Please visit documentation for the other options and examples<br />; https://docs.platformio.org/page/projectconf.html<br /><br /><b>[fujinet]</b><br />; Espressif32 PlatformIO Version to use for building<br /><b>esp32_platform_version = 5.1.0<br /><br />build_platform = BUILD_CBM<br />build_bus = IEC<br /></b><br />; Change this to target hardware you use from the list of [env:xxx] sections below<br />; Commodore IEC using Atari FujiNet<br /><br /><b>build_board = meatloaf-fujinet-v1.nopsram ; Board has no SPI PSRAM</b><br /><br /><br /><b>flash_filesystem = FLASH_SPIFFS </b><br />;flash_filesystem = FLASH_LITTLEFS<br /><b>flash_size = 4mb </b> ; 4mb, 8mb, 16mb<br /><br /><b>[platformio]<br />description = Meatloaf / FujiNet retro computer to ESP32 WiFi Multifunction Firmware<br />default_envs = ${fujinet.build_board}<br />data_dir = $PROJECT_DIR/data/${fujinet.build_platform}</b><br /><br /><b>[env]</b><br />; Common settings for all enivornments<br /><b>framework = espidf<br />extra_scripts = pre:build_version.py<br />lib_ldf_mode = deep+<br />upload_speed = 460800 ;921600</b><br /><b>upload_port = /dev/ttyUSB0 ; Linux</b><br />;upload_port = COM1 ;Windows<br /><b>monitor_speed = 460800 ;921600 </b><br /><b>monitor_port = /dev/ttyUSB0 ; Linux</b><br />;upload_port = COM1 ;Windows<br /><b>monitor_filters = esp32_exception_decoder</b><br /><br /><b>build_type = debug<br />build_flags =<br /> -D ${fujinet.build_platform}<br /> -D ${fujinet.flash_filesystem}</b><br /> ;-D CMAKE_EXPORT_COMPILE_COMMANDS=ON<br /><b> -D DEBUG_SPEED=460800 ;921600 </b><br /> -D NO_PSRAM ; if your hardware has no psram<br /> -D NO_BUTTONS ; if your hardware has no physical buttons<br /> ;-D LED_STRIP ; if your hardware has an led strip<br /> ;-D PIEZO_BUZZER ; if your hardware has a piezo buzzer<br /> ;-D PARALLEL_BUS ; if your hardware has parallel interface<br /> ;-D JTAG ; enable use with JTAG debugger<br /> ;-D BLUETOOTH_SUPPORT ; enable BlueTooth support<br /> ;-D VERBOSE_TNFS ;<br /> ;-D VERBOSE_DISK ;<br /> ;-D VERBOSE_HTTP ;<br /> ;-D DEBUG_TIMING<br /><b> -D DATA_STREAM</b><br /> ;-D NO_VIRTUAL_KEYBOARD<br /> ;-D DBUG2 ; enable monitor messages for a release build<br /><br />;debug_tool = esp-prog<br />;debug_init_break = tbreak setup<br /><br /><br /><b>[env:meatloaf-fujinet-v1.nopsram]<br />platform = espressif32@${fujinet.esp32_platform_version}<br />board = fujinet-v1-${fujinet.flash_size}<br />build_type = debug<br />build_flags = ${env.build_flags}</b></span><br /><br /></p><p>The changes I made "No Buttons", "No PSRAM", and "Data Stream". I also deleted a few of the remarked/unused items to streamline the file. If you have "<i>build_board = meatloaf-fujinet-v1.nopsram ; Board has no SPI PSRAM</i>" and "<i>flash_size = 4mb ; 4mb, 8mb, 16mb</i>" then you'll probably be in good shape.</p><p>(Note: I've used Linux to compile mine, and the example reflects this. You should be able to change your upload_port and monitor_port settings for both Windows and MAC compatibility as well. See the <b>platformio.ini.sample</b> included in the package.) <br /></p><p>Next, you'll want to open the <b>pinmap.h </b>located in the projects \include folder. Make sure the bold line is the selected board. <br /></p><p><span style="color: #0b5394;">/* FujiNet Hardware Pin Mapping */<br />#ifndef PINMAP_H<br />#define PINMAP_H<br /><br />//#include "pinmap/fujinet-v1.6.h"<br />//#include "pinmap/lolin-d32-pro.h"<br />//#include "pinmap/lolin-s2-mini.h"<br /><b>#include "pinmap/esp-wroom-32.h"</b><br />//#include "pinmap/esp32-a1s-audio-kit-v2.2.h"<br />//#include "pinmap/esp32s3.h"<br />//#include "pinmap/fujiapple-rev0.h"<br />//#include "pinmap/fujiloaf-rev0.h"<br /><br />#endif</span></p><p>Now open up the <b>esp-wroom-32.h</b> file located in \include\pinmap folder.</p><p>You want to remark the line with a couple slashes. It should read:</p><p><span style="color: #0b5394;">// Reset line is available<br />//#define IEC_HAS_RESET</span><br /></p><p>Toward the bottom of the file you'll find the pin-map connections for your ESP32.</p><p><span style="color: #0b5394;">// LOLIN D32 PRO <br />#define PIN_IEC_RESET <span> </span>GPIO_NUM_34<br /><b>#define PIN_IEC_ATN <span> </span> GPIO_NUM_32<br />#define PIN_IEC_CLK_IN GPIO_NUM_23</b><br />#define PIN_IEC_CLK_OUT GPIO_NUM_23<br /><b>#define PIN_IEC_DATA_IN GPIO_NUM_25</b><br />#define PIN_IEC_DATA_OUT GPIO_NUM_25<br />#define PIN_IEC_SRQ GPIO_NUM_26</span></p><p>Remember that we are only interested in ATN, CLK, DATA, and GND. You can ignore the others for now. Make the connections you mapped out to GPIO32, GPIO23, GPIO25, and GND TO GND.</p><p>The only speed-bump I ran into with this project was the need to disable "Support for External, SPI connected RAM". You can do this by using the "<b>Run Menuconfig</b>" option in your programs' Project Task's menu. The option is located in "Component Config" --> "ESP-32 specific". Just toggle it off and "<b>S</b>"ave the configuration.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_dugbaxNIQBLQnr1wjdkai-I74nHmQD_KuR_MLC9mBPZnTgzwlVHP_ZpDeH94xPKfU111sBC3YhaBClRLYwnlRE8YroMJ9giOB4kYRtqR7KAI99FkKddSU3oP9FHkQyJrTxjKn1CnCVAOaobELpvBg5zVxublPHlPCTbG3qAQT10UkuV1FPWTNk46nw/s1360/disable_SPI-connected_RAM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="741" data-original-width="1360" height="347" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_dugbaxNIQBLQnr1wjdkai-I74nHmQD_KuR_MLC9mBPZnTgzwlVHP_ZpDeH94xPKfU111sBC3YhaBClRLYwnlRE8YroMJ9giOB4kYRtqR7KAI99FkKddSU3oP9FHkQyJrTxjKn1CnCVAOaobELpvBg5zVxublPHlPCTbG3qAQT10UkuV1FPWTNk46nw/w640-h347/disable_SPI-connected_RAM.png" width="640" /></a></div><p></p><p> </p><p>Also don't forget to "<b>Upload FileSystem Image</b>" so that the LOAD "$",8 has something to find on your Meatloaf.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMRb-tykhxNpvXsiWHoy1hS3IKzjydSwA_-eTqgHGLCmcOfW2aUGan4CwaAmHNVJkbDPyFpMaCm2v5ZCgBDtVEY5Wupm4plQPd-YW9IyoXX00sayBqbV-tJv2CgaoVIG18gmPcTRskCa-ux9UV7FHfZcuA5ZgG5X6q-THo955voAEWzsrOxD5tvwfrLw/s1360/upload_filesystem_image.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="741" data-original-width="1360" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMRb-tykhxNpvXsiWHoy1hS3IKzjydSwA_-eTqgHGLCmcOfW2aUGan4CwaAmHNVJkbDPyFpMaCm2v5ZCgBDtVEY5Wupm4plQPd-YW9IyoXX00sayBqbV-tJv2CgaoVIG18gmPcTRskCa-ux9UV7FHfZcuA5ZgG5X6q-THo955voAEWzsrOxD5tvwfrLw/w640-h348/upload_filesystem_image.png" width="640" /></a></div><p></p><p>Hit the -> button at the bottom of your screen. If all goes well you will be using the Internet as your 1541. Connect your Meatloaf device to your Commodore computer and try <b>LOAD "$",8</b>. Once that works, try <b>LOAD</b> "<b>HTTP://C64.MEATLOAF.CC/GOTD/</b>",8. This will load Meatloaf.cc's Game of the Day.</p><p>Ready to load C64 files from other websites? Time for the "<b>Send to Meatloaf</b>" plug-in for <a href="https://addons.mozilla.org/en-US/firefox/addon/send-to-meatloaf/" target="_blank">Firefox</a>, <a href="https://addons.opera.com/en/extensions/details/send-to-meatloaf/" target="_blank">Opera</a>, or <a href="https://chrome-stats.com/d/dofemlliemmbfmdbbjfpdaooaklfmdki" target="_blank">Chrome</a>. </p><p>One you have the plug-in installed, go to a website like <a href="https://csdb.dk/" target="_blank">CSDb</a> and find the link to a .prg file in the Latest Releases section. Right-click on the link, and select "Send to Meatloaf". A screen will open with a Command to use on your Commodore computer to load the file directly. </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4IIVHdfSuEue2-_S5hD2qVtKoNoxvnC0FZJXc9a1551sLTvs-FG1P6R8npu8iqrQqAT3__qcId1dnp6egpWzXP_2POIAGTm594hzZAT7e7u65cIER_1_kk7qh364TNfL5I0Cbg-yxZvHmEfEHdZbdpbbZKdRVx7uBMNU8v_NomsMuh2EGAfEH2plJcQ/s612/savetomeatloaf.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="612" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4IIVHdfSuEue2-_S5hD2qVtKoNoxvnC0FZJXc9a1551sLTvs-FG1P6R8npu8iqrQqAT3__qcId1dnp6egpWzXP_2POIAGTm594hzZAT7e7u65cIER_1_kk7qh364TNfL5I0Cbg-yxZvHmEfEHdZbdpbbZKdRVx7uBMNU8v_NomsMuh2EGAfEH2plJcQ/w400-h263/savetomeatloaf.png" width="400" /></a></div><p></p><p>On your Commodore computer, type <b>LOAD "ML:*",8,1</b></p><p>If you have made it this far, seriously consider joining the <a href="https://discord.com/invite/FwJUe8kQpS" target="_blank">Discord channel</a> for the Meatloaf project. The channel would love to see your build of the device. I had some initial difficulty getting things up and running. Jaime as well as other members were quick to assist. The more feedback and input on this project will improve the final versions hardware and features.</p><p> </p><p></p><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5MsVZ-0bweexvoX8QDrtf4AvCCRoompYyMitcA3qFLixxWKwxp3FTVrZTRZik6n9aUQLICe-CmJe1bn69fkjHeUevOkNbiW88IerpYc0DIjS_GnsZe9oi5e8m-nIeZ_GYlnYvVqTL0n5J4JCkFwnMrTPYxrPagBc1RziyzCzvScGhastgQXV7V4R59Q/s595/meatloaf_simple.jpg" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="595" data-original-width="508" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5MsVZ-0bweexvoX8QDrtf4AvCCRoompYyMitcA3qFLixxWKwxp3FTVrZTRZik6n9aUQLICe-CmJe1bn69fkjHeUevOkNbiW88IerpYc0DIjS_GnsZe9oi5e8m-nIeZ_GYlnYvVqTL0n5J4JCkFwnMrTPYxrPagBc1RziyzCzvScGhastgQXV7V4R59Q/w546-h640/meatloaf_simple.jpg" width="546" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Author's very simple 4 wire Meatloaf on a breadboard.<br /></td></tr></tbody></table><br /> <p></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><span style="color: #073763;"><br /></span></p><p><br /></p><p><br /> <br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com2tag:blogger.com,1999:blog-8737755473418004880.post-63630541875751255492022-11-02T11:31:00.002-04:002022-11-02T11:49:43.321-04:00Quest for the perfect VT-100 terminal continues...<p><b>The quest for the perfect VT-100 terminal, part 2:</b> (<a href="https://learn1thing.blogspot.com/2022/10/" target="_blank">part 1</a>) <br /></p><p>Plotting Maurer Roses in single color using Microsoft BASIC from the late 1970's is interesting to me, but as someone who grew up with 16 color computing in the mid 80's, having access to only a single color crayon (green) just isn't enough.</p><p><b>Enter the ESP32 and FabGL library. </b></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNjllw5izsFho0hChypDekiHgBkt80zTMyskmbhz7APDIHQsMIUbiqtXi_0H1W2kc-n-fzy_K7gn7ie1Jfvot5le7aEciUQxtGac2wj0TSCuxZN2qu_YmBI27DkhSdb0RPKUXQ8SSdTYVJJ8M4jjkJE5IsydhdwQlsn5A4-PQ9kl9TSkKTfsSp-QeH2Q/s615/esp32.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="615" data-original-width="335" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNjllw5izsFho0hChypDekiHgBkt80zTMyskmbhz7APDIHQsMIUbiqtXi_0H1W2kc-n-fzy_K7gn7ie1Jfvot5le7aEciUQxtGac2wj0TSCuxZN2qu_YmBI27DkhSdb0RPKUXQ8SSdTYVJJ8M4jjkJE5IsydhdwQlsn5A4-PQ9kl9TSkKTfsSp-QeH2Q/w109-h200/esp32.jpg" width="109" /></a></div>The ESP32 isn't just a chip. It's a tiny development board. Think Raspberry PI Pico, only with a bit more horsepower and wifi/bluetooth capability. At time of this writing, you can have ESP32 boards delivered from Amazon for about $6.00 a piece, cheaper if you are willing to wait for them from sources like Aliexpress.<br /><p></p><p>The two simple circuits for PS/2 keyboard input and VGA output can be created from resistors you probably already have in your workshop.</p><p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUzNtS6yQbJeUqN9WODuhDrLZBwCFdpwplQPPwueWBFQxziNqgnSkEfWwxR0df_cge0J_NTSqCUGtqyJkv4ciYcir0p_ckUUKajR5H4cDt2lB7GHmEhBTiRvrOjOf2YR1_3eP7HCTNZYE4Qu673EDfGNefSG53z-kZMR84LukRWCGlai6fSXnsbKtBvg/s947/schema_PS2.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="947" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUzNtS6yQbJeUqN9WODuhDrLZBwCFdpwplQPPwueWBFQxziNqgnSkEfWwxR0df_cge0J_NTSqCUGtqyJkv4ciYcir0p_ckUUKajR5H4cDt2lB7GHmEhBTiRvrOjOf2YR1_3eP7HCTNZYE4Qu673EDfGNefSG53z-kZMR84LukRWCGlai6fSXnsbKtBvg/s320/schema_PS2.png" width="320" /></a></div><p></p><p><br /></p><p>You will need a PS/2 keyboard, or at least an older USB keyboard which has circuitry which switches to PS/2 given the proper adapter is used.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha6hlHglIFQ5ifY_DttPo_DnfQY1qBbg9y7VCLcyVeiE_xwoTQCeRrLTeYp6s7Bdtvt_M4dPWgScz-FMfzYXJMUb1E4sWdbnLmx8RglTgBUXAyW09I1y41x0HnYo9mHPjWhpu4S5pMAOeFwqINN-b7GMPWF8rrJzb1WT-wPefk9N357B0CesOkh2PTiA/s975/schema_VGA64.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="364" data-original-width="975" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha6hlHglIFQ5ifY_DttPo_DnfQY1qBbg9y7VCLcyVeiE_xwoTQCeRrLTeYp6s7Bdtvt_M4dPWgScz-FMfzYXJMUb1E4sWdbnLmx8RglTgBUXAyW09I1y41x0HnYo9mHPjWhpu4S5pMAOeFwqINN-b7GMPWF8rrJzb1WT-wPefk9N357B0CesOkh2PTiA/w320-h118/schema_VGA64.png" width="320" /></a></div>Not having exactly 400ohm or 800ohm resistors in my shop, (or even anything close) I was able to replicate each the required levels by combining resistors of lower values until I got within 5% or so of target.<br /><p></p><p><br /></p><p>Not bad for about an hour of time invested, and less than $8 in parts.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY8nP8kC19-KHOnu0eRDpcV9nKwUiP_1x75AtrdosIHJI4w6stxLF9RN0nq5j-krKSwuUYSQRlLNNKBD3FntfTTlwi5fwSljBQNg9et-eAD76qxxBIsabQTpClt-WEMhJattFEGH7DsTW0ljY4z8o1cegceUAodjeaVjEKI1TCgQa0x3x50Jg6aRyKnQ/s426/LILYGO-FabGL-VGA32-VGA-ESP32.jpg" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="269" data-original-width="426" height="126" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY8nP8kC19-KHOnu0eRDpcV9nKwUiP_1x75AtrdosIHJI4w6stxLF9RN0nq5j-krKSwuUYSQRlLNNKBD3FntfTTlwi5fwSljBQNg9et-eAD76qxxBIsabQTpClt-WEMhJattFEGH7DsTW0ljY4z8o1cegceUAodjeaVjEKI1TCgQa0x3x50Jg6aRyKnQ/w200-h126/LILYGO-FabGL-VGA32-VGA-ESP32.jpg" width="200" /></a></div>You can bypass the entire process of soldering up your own kit with a ready to use <a href="https://www.aliexpress.us/item/2251832855287283.html?spm=a2g0o.order_list.0.0.1abe18021ijOpe&gatewayAdapt=glo2usa&_randl_shipto=US" target="_blank">ESP32 board from LILYGO</a> China via Aliexpress. For around $15 it comes complete with onboard ESP32, PS/2 keyboard, mouse, VGA, audio, and SD card connections. These work extremely well. One word of caution. The top silkscreen is backward on the 1.4 version of the board. Use the silkscreen on the bottom to reference your connections.<br /><p></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbr0Q86M_VoJ76b9CunSCWC5wPM8PaLWcfgIPm7Dbbcfv9MhU4TX7TDVVWcbvyCw3-LBUSw3OF2YYOKSAgpp1eOQGfAvsISyCoWbVjafwnBbHvtWbY5y-mtz17vMXzWiprSfXzC-cCaB92cq4Blq4fVzQ7X8LSNHDrwmH_UrgUOJcynBVM4Hbe_Kh1g/s800/800-7.webp" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="450" data-original-width="800" height="113" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWbr0Q86M_VoJ76b9CunSCWC5wPM8PaLWcfgIPm7Dbbcfv9MhU4TX7TDVVWcbvyCw3-LBUSw3OF2YYOKSAgpp1eOQGfAvsISyCoWbVjafwnBbHvtWbY5y-mtz17vMXzWiprSfXzC-cCaB92cq4Blq4fVzQ7X8LSNHDrwmH_UrgUOJcynBVM4Hbe_Kh1g/w200-h113/800-7.webp" width="200" /></a></div>The <a href="http://www.fabglib.org/" target="_blank">FabGL</a> library (created by Fabrizio Di Vittorio) provides the ESP32 with a powerful library capable of emulating entire computers like the VIC-20, ALTAIR, and even a PC running Microsoft Windows. For our purposes this library will barely break a sweat by providing us an VT100/ANSI compatible terminal complete with 64 colors. Connecting your favorite Z80 rig to this solution is a like delivering a postcard with a dump truck, but at the price, why not?<p></p><p>With either of these solutions, you'll need to be comfortable with the Arduino IDE. Once you have the FabGL library added to your Arduino environment, drill into the program examples, VGA, and load the Ansi Terminal.</p><p>As stated earlier, Ansi Terminal is a full fledged VT100/ANSI terminal with a boat load of other features. It has the ability to also emulate terminal types ADM31, Hazeltine 1500, Osborne, Kaypro, and VT51. It has over 30 built-in fonts, as well as 9 different video mode resolutions. Baud rates range from 110 to 2000000.</p><p>Once you send this code to your ESP32, and connect the RX/TX lines either directly to your rig or via <a href="https://www.amazon.com/MAX3232-Connector-Converter-Equipment-Upgrades/dp/B07PFB4MHR/ref=sr_1_18?crid=2E3WCXPAZLE4V&keywords=TTL+Serial+interface+9pin&qid=1667401385&sprefix=ttl+serial+interface+9pin%2Caps%2C197&sr=8-18" target="_blank">TTL/Serial interface</a> you are in business.</p><p>The FabGL Ansi Terminal scores high on the <a href="http://www.fabglib.org/vttest.html" target="_blank">VTTEST VT100/VT102 Compatibility Test</a>. Programs like Wordstar run perfectly in 640x350, 80 column mode.</p><p>The magic happens in <a href="http://www.fabglib.org/special_term_escapes.html" target="_blank">FabGL Specific Terminal Sequences</a> which appear to apply to every video mode. A few of the highlights are:</p><ul style="text-align: left;"><li><pre class="fragment">ESC "_B" <span> </span><span> </span><span> <span> </span><span> </span></span>Set Background Color</pre></li><li><pre class="fragment">ESC "_F" column ";" row <span> </span><span> </span>Set Cursor position </pre></li><li><pre class="fragment">ESC "_S" <span> </span><span> </span><span> </span><span> </span><span> </span>Play Sound</pre></li><li><pre class="fragment">ESC "_GBRUSH"<span> </span><span> </span><span> </span><span> </span>Set graphics brish color</pre></li><li><pre class="fragment">ESC "_GPEN"<span> </span><span> </span><span> </span><span> </span><span> Set pen color</span></pre></li><li><pre class="fragment">ESC "_GPIXEL" X ";" Y<span> </span> Pixel plot</pre></li><li><pre class="fragment">ESC "_GLINE"<span> </span><span> </span><span> </span><span> </span> Draw a line</pre></li><li><pre class="fragment">ESC "_GRECT"<span> </span><span> </span><span> </span><span> </span> Draw a rectangle</pre></li><li><pre class="fragment">ESC "_GSPRITESET" Set sprite position<span> </span> </pre></li></ul><p></p><p> The are commands for reading and setting digital states of the open pins on the ESP32, as well as an ADC. Using the LILYGO board won't leave you many open pins for electronics experimenting, so if this is your goal, you'll want to roll your own board using the two schematics for VGA output and PS/2 keyboard only.</p><p></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4uOk7JwrxVmdcQn5voEfREnsxme8ifkGJj-wDCc2yNtuea1kCLqCl4NkkeC6J3xYBpr3SjGf5_i6lmebRc-6IJk7cpYtSpbRAOKUJOoEMQ9_itPUhlPo81JJ8ykgqe_089qbWkKZsuV1D5fuMbcJ0OgAcpKlRVXfd2pngGnJ0JyL1a1RLSyvbMn-8Lg/s2724/Mandelbrot%20Set%2064%20Colors.jpg" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="2552" data-original-width="2724" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4uOk7JwrxVmdcQn5voEfREnsxme8ifkGJj-wDCc2yNtuea1kCLqCl4NkkeC6J3xYBpr3SjGf5_i6lmebRc-6IJk7cpYtSpbRAOKUJOoEMQ9_itPUhlPo81JJ8ykgqe_089qbWkKZsuV1D5fuMbcJ0OgAcpKlRVXfd2pngGnJ0JyL1a1RLSyvbMn-8Lg/w200-h188/Mandelbrot%20Set%2064%20Colors.jpg" width="200" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Mandelbrot in 16 colors<br /></td></tr></tbody></table>These new graphics commands are accessible via Microsoft BASIC-80, BBC BASIC,PASCAL and even C. Just use the print command. <p></p><ul style="text-align: left;"><li>10 PRINT CHR$(27)+"[H"+CHR$(26)+"[J"; <br /></li><li>20 PRINT CHR$(27)+"_GPEN100;128;100$";<br /> </li><li>30 PRINT CHR$(27)+"_GPIXEL100;100$";</li></ul><p> With a little more effort, I've plotted 64 color pictures in 512x384.</p><p><br /></p><p><br /></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-30073571857727562022022-10-02T00:44:00.028-04:002022-10-02T13:07:06.550-04:00The quest for the perfect VT100 terminal for Retrocomputing CP/M Style<p></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0-oytHz89XVkQHLEZs5hLQl-L9K_CMJMAOw0jP58J6UJZ-6FZkcvjixeeyV-gXqfjO-3ovAfQVh71ljWeuynlST1brSVJ0VQdxWlIx1BUcQv1U7bhDvwkCJ6lX06tDlKd-bIureiX0lI2ArFh2rKacTNSUQn9oIXocE7_bMHL_Fo0WGj_YV-SP9_eIw/s4160/IMG_20220904_175645394.jpg" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3120" data-original-width="4160" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0-oytHz89XVkQHLEZs5hLQl-L9K_CMJMAOw0jP58J6UJZ-6FZkcvjixeeyV-gXqfjO-3ovAfQVh71ljWeuynlST1brSVJ0VQdxWlIx1BUcQv1U7bhDvwkCJ6lX06tDlKd-bIureiX0lI2ArFh2rKacTNSUQn9oIXocE7_bMHL_Fo0WGj_YV-SP9_eIw/w291-h219/IMG_20220904_175645394.jpg" width="291" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Altair Simulator running CP/M<br /></td></tr></tbody></table>About two months ago, I assembled my own scratch-build version of the <a href="https://create.arduino.cc/projecthub/david-hansel/arduino-altair-8800-simulator-3594a6" target="_blank">Arduino-Altair Simulator</a> project. This project replicates the <a href="https://en.wikipedia.org/wiki/Altair_8800" target="_blank">Altair computer</a>, complete with <a href="https://en.wikipedia.org/wiki/CP/M" target="_blank">CP/M</a>.<br /><p></p><p>My fabrication skills are somewhat primitive, with the bulk of the build being LEDs and switches attached to a piece of sheet metal, then covered with a laminated printout of the original Altair front panel. </p><p><i>(Thank you Staples print department!) </i></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_4g5HLvAMS9et9XIAT24NGCQUWfkY5mdOT_yR_vt2MYyV-S4vEcFcloN9nDGmgVFR-3dENitXbvCBVrqds2dIEsZXPqmJMak4uAW9jzEc6VCazA1RVHa3_1YvjAUrvoLe_2xhWghPXKOjrG7T4Tbt3CzRLnZbqIUUW5dgZy5oaNDDdTzX0K3npWNsxg/s4160/IMG_20220904_175251682.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="3120" data-original-width="4160" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_4g5HLvAMS9et9XIAT24NGCQUWfkY5mdOT_yR_vt2MYyV-S4vEcFcloN9nDGmgVFR-3dENitXbvCBVrqds2dIEsZXPqmJMak4uAW9jzEc6VCazA1RVHa3_1YvjAUrvoLe_2xhWghPXKOjrG7T4Tbt3CzRLnZbqIUUW5dgZy5oaNDDdTzX0K3npWNsxg/w288-h216/IMG_20220904_175251682.jpg" width="288" /></a></div>For <a href="https://adwaterandstir.com/product/altair-8800-emulator-kit/" target="_blank">$270+shipping</a>, you can purchase a very authentic looking version of the same system complete with laser-cut plexiglass case.<p></p><p>The stability of my $125 sheet metal, home-brew version, complete with over 150 plug-in jumper wire connections is a testament to the great design of the project by David Hansel. I've left the unit running CP/M and basic for days on end without a single hiccup.</p><p></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3PlbnSyc3vEc2hqm0_cuU5cX8F3fQzz12X_U64HRXwzaOF_vJOgRoBvILvShMcq3fZ33fQDqgAP8GEP86br5SnlbOMR-qv8LnPzFCjZoMhVBCHsGuNtWExWTpUbjMBAET9jdCCM0mAtUnK3Eu5PmkBUXcT8P3GNM1TJM63v6majFSCYJZpyeLLcwLIg/s3025/IMG_20220828_202821785~2.jpg" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="2494" data-original-width="3025" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3PlbnSyc3vEc2hqm0_cuU5cX8F3fQzz12X_U64HRXwzaOF_vJOgRoBvILvShMcq3fZ33fQDqgAP8GEP86br5SnlbOMR-qv8LnPzFCjZoMhVBCHsGuNtWExWTpUbjMBAET9jdCCM0mAtUnK3Eu5PmkBUXcT8P3GNM1TJM63v6majFSCYJZpyeLLcwLIg/s320/IMG_20220828_202821785~2.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">36 2N222s handing the LEDs<br /></td></tr></tbody></table><p> </p><p>In keeping with the spirit of the original Altair computer, instead of using LED driver chips, I created an LED driver board using 36 transistor circuits, as the Arduino Due board is unable to provide the current required by all of the LEDs on the front panel.</p><p></p><p>The end result of my month long assembly adventure is an Altair that behaves like the original in many ways running in either 8008 or Z80 modes. It's biggest improvement over the real thing is the ability to store an entire CP/M disk library in a SD card with plenty of room to spare.</p><p>CP/M 2.2 with Word Star, Super Calc, and most importantly Microsoft BASIC ready to do my bidding, it was time to read that leaflet in the mailbox on ZORK then jump into some old-school <a href="https://en.wikipedia.org/wiki/Star_Trek_(1971_video_game)" target="_blank">Startrek</a>.</p><p style="text-align: center;"><b>The quest for the perfect VT100 terminal begins:</b></p><p>With the home-brew Altair chugging away happily, it was time to turn my attention to creating a stand alone terminal for it so I could quit using putty from my PC.</p><p></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-zg8FXhbI4Qlwj6IdwizZaGN_FUU5RvAEQJuEYOAFTKfBzVWGgesZsPapeBuZcpVUqrTyu8GoXYZQTSijONAdaSlWiwVvgd1Ha9Vqdny2sli0-Ul9f9beujPXpudXDaK82yMxFHIxmFjn_ejBPH9q1qkcYT7CtmM7CHC2TW2ksrEiA-p97vHWkvR9gg/s425/ASCII_Term.jpg" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="292" data-original-width="425" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-zg8FXhbI4Qlwj6IdwizZaGN_FUU5RvAEQJuEYOAFTKfBzVWGgesZsPapeBuZcpVUqrTyu8GoXYZQTSijONAdaSlWiwVvgd1Ha9Vqdny2sli0-Ul9f9beujPXpudXDaK82yMxFHIxmFjn_ejBPH9q1qkcYT7CtmM7CHC2TW2ksrEiA-p97vHWkvR9gg/s320/ASCII_Term.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Geoff Graham's ASCII Terminal<br /></td></tr></tbody></table><br />That lovely kit from <a href="http://adwaterandstir.com">adwaterandstir.com</a> comes with a version of <span><a href="https://geoffg.net/terminal.html" target="_blank">Geoff Graham's ASCII terminal</a> built in. This is a PIC32 solution which provides a reasonable VT100 emulation, outputting TV or VGA in red, blue, or green (color selected by jumper). <br /></span><p></p><p><span><b>PROs: </b>This solution provides some very nice extended VT100 graphics abilities. <i>(more on this later)</i></span></p><p><span><b>CONs:</b> You have to pick a single color to work with and the font isn't exactly easy on the eyes. That being said, the project is easy to replicate with schematics, and source code freely available. </span></p><p></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc4eXEvZLH2WqFxHZZQXjsJZz1liEiXK-3lkONJ5er2_Wx8o_mvHglu8xNjV1njzKQ5oSw2dEbzYVOdJmNiA00N2esvnC5fiQCV6S5UwgimiuPiUkoc4pFbBD0CZP8RPWtkfLihfUu35a0nn-EMG-B5Cy6fhPmEioOEhXBI6WkP7J7f8By9PkneVJtRA/s640/rc2014_term.jpg" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="308" data-original-width="640" height="154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc4eXEvZLH2WqFxHZZQXjsJZz1liEiXK-3lkONJ5er2_Wx8o_mvHglu8xNjV1njzKQ5oSw2dEbzYVOdJmNiA00N2esvnC5fiQCV6S5UwgimiuPiUkoc4pFbBD0CZP8RPWtkfLihfUu35a0nn-EMG-B5Cy6fhPmEioOEhXBI6WkP7J7f8By9PkneVJtRA/s320/rc2014_term.jpg" width="320" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Marco Maccaferri's VT100 Terminal</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><span>Alternatively, </span><span class="flex-self-center min-width-0 css-truncate css-truncate-overflow width-fit flex-auto" data-view-component="true"><a class="Link--primary no-underline flex-self-center" href="https://github.com/maccasoft/propeller-vt100-terminal"><span class="color-fg-muted">Marco Maccaferri</span></a> has created a Parallax Propeller VT100 terminal for the <a href="https://rc2014.co.uk/" target="_blank">RC2014 project</a> which provides easy to read VGA output in 16 colors. At first glance this terminal looks complicated with all of the pins connecting to the RC2014 board. In truth it's a simple circuit requiring only four resistors for the USB circuit, and seven resistors for the VGA circuit. If you wanted to roll you own easily, you could purchase a <a href="https://www.parallax.com/product/propeller-project-board-usb/">Protoboard</a> from Parallax, a <a href="https://www.digikey.com/en/products/detail/edac-inc/634-015-274-992/2059408" target="_blank">VGA connector</a> and dig out a USB connector for the keyboard from your junkbox and you are in business. Once again the schematics, and source code are freely available. </span><p></p><p><span class="flex-self-center min-width-0 css-truncate css-truncate-overflow width-fit flex-auto" data-view-component="true"><b>PROs:</b> This solution are a VT100 terminal which is easy to read, and looks great when surfing ANSI BBS systems from your CP/M box. The </span></p><p><span class="flex-self-center min-width-0 css-truncate css-truncate-overflow width-fit flex-auto" data-view-component="true"><b>CONs:</b> It's very much limited to the VT100 standard. Outside of the ANSI color characters, graphics are off the table.</span></p><p style="text-align: center;"><b><span class="flex-self-center min-width-0 css-truncate css-truncate-overflow width-fit flex-auto" data-view-component="true">Why not have your cake and eat it too?</span></b></p><p><span class="flex-self-center min-width-0 css-truncate css-truncate-overflow width-fit flex-auto" data-view-component="true"></span></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ5-4g-vZaYkamY5DJ4PhOthYnVSk5SuK1RHDVQ5_WxnoNoEITIHfskqbaIu8fEUxcC6w__z-R2Q1bcjjx81eeYWqF_-m2ZhK270IrNRdgnTMUlU-FqjR9qTtO9Fff6uOXMZHHYPZ6-H52-eGpKnf_bXmfxeDUiXKb2Mop9Z6l2FSelXyvh2nCvRHe4A/s4160/IMG_20221001_225114600.jpg" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="4160" data-original-width="3120" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ5-4g-vZaYkamY5DJ4PhOthYnVSk5SuK1RHDVQ5_WxnoNoEITIHfskqbaIu8fEUxcC6w__z-R2Q1bcjjx81eeYWqF_-m2ZhK270IrNRdgnTMUlU-FqjR9qTtO9Fff6uOXMZHHYPZ6-H52-eGpKnf_bXmfxeDUiXKb2Mop9Z6l2FSelXyvh2nCvRHe4A/w233-h280/IMG_20221001_225114600.jpg" width="233" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">16 ANSI compatible colors!</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table>Adventuring where no one has gone before and trying to remember how to get the Bablefish into my ear, the <a href="https://github.com/maccasoft/propeller-vt100-terminal" target="_blank">Maccaferri's Propeller based VT100 terminal </a>really shines. I cut my teeth decades ago in MS-DOS and even booting into CP/M, this terminal will makes me feel right at home.<p></p><p><span class="flex-self-center min-width-0 css-truncate css-truncate-overflow width-fit flex-auto" data-view-component="true">I know. In the 70's and early 80's, CP/M terminals were usually only <span style="color: #38761d;"><b>GREEN</b></span> or <span style="color: #bf9000;"><b>AMBER</b></span>.<br /></span></p><p>The VT100 emulation is spot-on even with the more picky applications like Word Star displaying perfectly.</p><p>With a little <a href="https://drive.google.com/file/d/1fxk1iNI75DXOXrv4yG_AT8hDg44WEZxw/view" target="_blank">ROGUE-VT</a> under my belt, it was time to turn my attention to some old-school Microsoft BASIC programming.</p><p><span> </span></p><p><span><a href="https://geoffg.net/terminal.html" target="_blank">Geoff Graham's ASCII terminal</a> while being single color like those early terminals of the 70's provides an interesting twist:</span></p><p></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv844nLlIR86U1dlDB7Mb6bBvjT41xP2h1gFhGfY1fVv04kBedjZbkqR9ikNHQL9I63NV6ndFQB790HJxFL4Y1zUZnDJ275VKQajaTRMNOFbpMrRU7etqbfr3DoP0G7y5JZXVnosntdh9-4m97gWMWpyDusmNrBBQMC4jAst27pEwE2lS9hJbpt_XXpg/s3816/hat.jpg" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="3816" data-original-width="3120" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv844nLlIR86U1dlDB7Mb6bBvjT41xP2h1gFhGfY1fVv04kBedjZbkqR9ikNHQL9I63NV6ndFQB790HJxFL4Y1zUZnDJ275VKQajaTRMNOFbpMrRU7etqbfr3DoP0G7y5JZXVnosntdh9-4m97gWMWpyDusmNrBBQMC4jAst27pEwE2lS9hJbpt_XXpg/w120-h147/hat.jpg" width="120" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Archimedes spiral?</td><td class="tr-caption" style="text-align: center;"><br /></td></tr></tbody></table><span>It has a handful of special <ESC>Z commands added to the VT100 emulation which permit LINES, CIRCLES, and BOXES to by plotted on the screen. In addition, if you upgrade the board with a <a href="https://github.com/dhansel/TerminalUSB" target="_blank">firmware from David Hansel</a>, the USB port on the original design is capable of handling a USB keyboard. Push the firmware even further with another <a href="http://gunstar.one/TerminalUSB_X_production.hex" target="_blank">firmware update</a> from John Galt, you add even more functionality to it's <ESC>Z commands with a PLOT command as well as several erase commands.</span><p></p><p><span>At the end of the day, for me me the answer was, </span></p><p style="text-align: center;"><span>"<b>Why not have both?</b>"</span></p><p><span></span></p><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtf58xCs2QrjPPN4U_SOGy4scO20b9kjjL0EMb4_MCKi0hNOCxUp2t5utHgFsu1bhk5v2m0b1ljOA4rx2uxTHW9qqTEkslGMWJXWD09fW0QYPvf9jd09mxf2YZ_boIJjG6f4qZR8kHfYsq2AIfV8HcU_eD2uUyGxGCK6lFGyWF2EDa1KcS6Tk0Czpk5A/s3019/rose3.jpg" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="2463" data-original-width="3019" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtf58xCs2QrjPPN4U_SOGy4scO20b9kjjL0EMb4_MCKi0hNOCxUp2t5utHgFsu1bhk5v2m0b1ljOA4rx2uxTHW9qqTEkslGMWJXWD09fW0QYPvf9jd09mxf2YZ_boIJjG6f4qZR8kHfYsq2AIfV8HcU_eD2uUyGxGCK6lFGyWF2EDa1KcS6Tk0Czpk5A/w216-h176/rose3.jpg" width="216" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">A Maurer rose</td></tr></tbody></table>My home-brew Altair has TTL RX/TX lines running to my Propeller terminal with a 14" Dell VGA monitor rendering those lines of Vogon Poetry from Hitchhiker's Guide. I've split off an additional TX line into the Geoff Graham solution connected to a small 7" VGA monitor I bought off <a href="https://www.aliexpress.us/item/3256802914317479.html?spm=a2g0o.productlist.0.0.3e57446aMnJbNm&algo_pvid=176852f1-3c52-473f-870f-ce42ac310ae8&algo_exp_id=176852f1-3c52-473f-870f-ce42ac310ae8-2&pdp_ext_f=%7B%22sku_id%22%3A%2212000024089379611%22%7D&pdp_npi=2%40dis%21USD%2135.7%2135.7%21%21%21%21%21%402101e9d316646847491572622eae08%2112000024089379611%21sea&curPageLogUid=rrq8NjDF8u77" target="_blank">Aliexpress</a> a while back. This monitor sits happily above the project itself and provides a second-screen solution happy rendering old fashion line graphics from Microsoft BASIC programs<p></p><p><span> </span></p><p><span>At the end of the day, my multi-monitor Altair Simulator has all the switches, blinky lights, and feel of the original Altair, but all the comforts of home.</span><br /> </p><p><br /></p><p><br /></p><p></p>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-63017230287564925442020-02-24T16:31:00.001-05:002020-02-24T16:31:37.091-05:00Creating Custom Characters / Fonts in Commodore BASICSince the arrival of my <a href="https://ultimate64.com/Ultimate-64-Elite" target="_blank">Ultimate64 Elite</a> board, I've been enjoying a lot more actual programming and playing games with my retro hobby, less time repairing and trying to upgrade 40 year old hardware.<br />
<br />
This post will dig into the tools and techniques for both creating custom fonts/characters on the Commodore 64, then using them in your BASIC programs.<br />
<br />
The Commodore character editor I currently use is called <a href="http://www.orrtech.us/c64/chareditor2.d64">Character Editor 2</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvi3JMxaXTtc-Sqwamuc4koVUB1pbZbT0nJ0_WAE3N3cH8F-pwRdKFYCizsDVTJfXYsaqsAPumLNkv-Ur4igmf6Cwg09EGRFphLCRb6coD0zYwKxIaRet96kpQe7DZs3_DP1iROjYNhsn2/s1600/chareditor2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="639" data-original-width="730" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvi3JMxaXTtc-Sqwamuc4koVUB1pbZbT0nJ0_WAE3N3cH8F-pwRdKFYCizsDVTJfXYsaqsAPumLNkv-Ur4igmf6Cwg09EGRFphLCRb6coD0zYwKxIaRet96kpQe7DZs3_DP1iROjYNhsn2/s320/chareditor2.png" width="320" /></a></div>
<br />
A quick look at the .d64 disk image will reveal a number of <b>f.filename</b> entries which are character sets already created. <br />
<br />
I've included a small program on the disk image called: <b>BASICLOADER</b> which will allow you to load these character sets into BASIC without it interfering with BASIC itself. This program can be easily adapted to load the font on program startup. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha4g89rQGu6B6yDQFDk6BeTAO8pHNwn1KaF3KmOHMKljg8CGGQ8XO3ED75xnmg-kU8NQNBrXDOuOOb3LssqvTxoWW96eTdwIwgdLNXscAmPrmZlIfcq8AC0Xrms7203enuOjTcOMzWgQhS/s1600/basicloader.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="636" data-original-width="729" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha4g89rQGu6B6yDQFDk6BeTAO8pHNwn1KaF3KmOHMKljg8CGGQ8XO3ED75xnmg-kU8NQNBrXDOuOOb3LssqvTxoWW96eTdwIwgdLNXscAmPrmZlIfcq8AC0Xrms7203enuOjTcOMzWgQhS/s320/basicloader.png" width="320" /></a></div>
<br />
Exchange line 10 with <b>A$="f.filename"</b> and include the character set file on your disk to allow your program to load the new characters at program startup.<br />
<br />
<br />Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com1tag:blogger.com,1999:blog-8737755473418004880.post-24189362822457279472019-04-25T21:48:00.002-04:002019-04-25T22:23:45.934-04:00Creating a custom C64 cartridgeOne of the original goals of this project was to create my own custom C64 cartridge. After some trial and error with the first Ebay vendor with poor communication, I tossed the board aside and started shopping for alternatives.<br />
<i><br /></i>
<i>I've noticed that there are a lot of sellers who simply reproduce available PCB designs without offering support or knowledge about the product. Worse yet, some who seem to be knowledgeable but don't want to directly interact with the Ebay buyers. Read the descriptions carefully, "SOLD AS-IS, NO REFUND" is a sign of possible bad support. Don't be afraid to ask pre-sale questions. </i><br />
<br />
After some searching I finally hit on a winner.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNqQgUwJ6MgJ8rUj6UMHL3qVqRJV7Q2mY-t0CKVuOmWxpd42VafxB7SbP50eRmiq2u4JDLeLqydFmcOuAcFRvJ77ubU4WhofukCkwS98rH8RBWudWOQabk4qK4aX8RtA9ZOmWG55tDssVo/s1600/20190425_212541.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNqQgUwJ6MgJ8rUj6UMHL3qVqRJV7Q2mY-t0CKVuOmWxpd42VafxB7SbP50eRmiq2u4JDLeLqydFmcOuAcFRvJ77ubU4WhofukCkwS98rH8RBWudWOQabk4qK4aX8RtA9ZOmWG55tDssVo/s320/20190425_212541.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
Ebay seller, <a href="https://www.ebay.com/usr/david-s-72?_trksid=p2047675.l2559">DAVID-S-72</a> sells the 16K X2 Cartridge, a cart which supports a single 16K program using the 27C128, or two 16K programs using the 27C256 eproms. His instructions are simple enough and has good communication.<br />
<br />
He includes the following instructions for 16K images as part of his listing:<br />
<br />
<ol>
<li>Download VICE emulator and copy cartconv.exe to a new folder.</li>
<li>Copy your .CRT files to that folder.</li>
<li>Rename the .CRT files using only 8 characters and no spaces.</li>
<li>Hold shift and right-click and select 'open command window here'</li>
<li>Type <b>cartconv -i name.crt -o name.bin</b></li>
<li>This will create a .BIN file for burning to an eprom</li>
</ol>
<br />
I added a step 5-1/2 to this.<br />
<br />
<ul>
<li>To create a 32K .BIN file using two converted 16K .BIN files, do the following:</li>
<li><b>copy /B game1.bin+game2.bin output.bin</b></li>
</ul>
Burn output.bin to an eprom and use the switch to switch between games while the Commodore 64 is turned off. My own cart has Gateway to Apshai and Moon Patrol. Both are 16k games.<br />
<br />
Note: Each converted file must be 16,384 bytes after conversion. The combined file: 32,768.<br />
<br />
David's product ships from Australia, so expect about two weeks if you are importing them to the United States. Personally looking forward to trying some of his other projects.<br />
<br />Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-46445922435563135322019-01-19T14:55:00.000-05:002019-01-19T14:57:30.665-05:00Conversion of the NTSC Commodore C16 to PALSo the catalyst to this whole "learn EPROM programming" project has been to convert my recently repaired American Commodore C16 to PAL video standard. Back in the day, before HDMI, video standards were very different for American and European machines. Trying to run software designed for one region of the world would usually not work, or at least not work well.<br />
<br />
The Commodore C16 really didn't sell very well in the United States because of the Commodore 64's pre-established success at when the C16 was released. It wasn't compatible with the C64's hardware or it's software. It lacked the SID (3 voice sound chip of the C64) and it's cost-reduced design intended for business use also lacked sprite capability. It does however have 121 colors. (The Commodore 64 has 16) and did in fact have a very good software library developed for it, in Europe. (PAL standard)<br />
<br />
So time to upgrade the Commodore C16 to PAL using skills learned hours ago....<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Jz784gHqaIgQe6vYdqdeWnKNshJApsbXwV8xwp1B16atH_SrAkO6K60EIr2VCZCA4vxwfmhnHI2cjcOVencMgJpk-5Xj9CA_AHjh2sL0GF2Hdt8lysKxW2_Ban7CfhkI3ig5p5QdwKTR/s1600/20190119_134029.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="900" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Jz784gHqaIgQe6vYdqdeWnKNshJApsbXwV8xwp1B16atH_SrAkO6K60EIr2VCZCA4vxwfmhnHI2cjcOVencMgJpk-5Xj9CA_AHjh2sL0GF2Hdt8lysKxW2_Ban7CfhkI3ig5p5QdwKTR/s320/20190119_134029.jpg" width="180" /></a></div>
<br />
<br />
First up is the replace the NTSC video crystal, a 14.31818 with a 17.734475 (digikey part# 300-6038-ND)<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdFBg3W6KliZkgnIH-DylT7-8J-tXySyfLWMYRJMckyloqGHw3W2all__HGh2-43Oe1hrfE956TiyPzK5e0xM-ywaxF19RtRaOIxxvAdsGvEXCASis2Pdp2Dmz5N3utDfRMUEBg8D06jvR/s1600/20190119_134620.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1389" data-original-width="1445" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdFBg3W6KliZkgnIH-DylT7-8J-tXySyfLWMYRJMckyloqGHw3W2all__HGh2-43Oe1hrfE956TiyPzK5e0xM-ywaxF19RtRaOIxxvAdsGvEXCASis2Pdp2Dmz5N3utDfRMUEBg8D06jvR/s200/20190119_134620.jpg" width="200" /></a></div>
<br />
<br />
The original crystal carefully removed.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicjJHLMJ6QTsK_3aRMPwurCFeO_cZhL2r4qerwlknLl8ImDz33caAUE_-HnyVqU2HrtKSYI4il2m5uBA7UALz8HB62JJprBvozfWGI2NmaSDJiKMBPCXWTZlgmErWrPOVn50iDPwZITylo/s1600/20190119_135024.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1289" data-original-width="1325" height="194" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicjJHLMJ6QTsK_3aRMPwurCFeO_cZhL2r4qerwlknLl8ImDz33caAUE_-HnyVqU2HrtKSYI4il2m5uBA7UALz8HB62JJprBvozfWGI2NmaSDJiKMBPCXWTZlgmErWrPOVn50iDPwZITylo/s200/20190119_135024.jpg" width="200" /></a></div>
<br />
<br />
Replaced with the new 17.734475<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Naturally I also had to re-program the 27128 EPROM with the PAL version of the kernel.<br />
(Bo Zimmerman's FTP site to the rescue here) Read older entries for how/why.<br />
<br />
.... and ...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKk2GGoN4zQAhRtEFaZ04M9WhCnL3LA32CZLprf4r-ci0pcUoBe_ZPnZbf0yjXhMPhOgEkUWXUz9btRPYLXHTm90fqms7pfkkD62cWkbQUuHZv6-BndsAjZE7NFsRcPbgTACAA91-DOWWr/s1600/20190119_141040.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="900" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKk2GGoN4zQAhRtEFaZ04M9WhCnL3LA32CZLprf4r-ci0pcUoBe_ZPnZbf0yjXhMPhOgEkUWXUz9btRPYLXHTm90fqms7pfkkD62cWkbQUuHZv6-BndsAjZE7NFsRcPbgTACAA91-DOWWr/s320/20190119_141040.jpg" width="180" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
A working PAL Commodore C16!</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Keep in mind that if you do this mod, you need to have a screen capable of handling the PAL signal from the Commodore C16. I'm using a Extron DVS 204 Digital Video Scaler which accepts both NTSC and PAL S-video signals and converts them to VGA. I'm using a MAG VGA CRT monitor which makes the signal look great.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Time to put this machine back together and grab some 16k PAL games to play while it continues to snow.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com3tag:blogger.com,1999:blog-8737755473418004880.post-60532669966579031512019-01-19T12:35:00.000-05:002019-04-26T10:04:28.392-04:00Programming a replacement NTSC kernel rom.So the first project is to program a replacement NTSC kernel rom for my recently repaired Commodore C16. This step will simply replace the original NTSC kernel from Commodore with a programmed EPROM. The idea of this step is to insure that I'm programming the chips correctly. (and not breaking a working computer.)<br />
<br />
I downloaded the NTSC kernel from Bo Zimmerman's <a href="http://www.zimmers.net/anonftp/pub/cbm/firmware/computers/plus4/index.html">FTP page</a> (Thank Bo!) and noted that it was a 16K file meaning that I'll need to use a 27128 (128 / 8 = 16k) chip.<br />
<br />
In less time that it takes to update this blog. It worked!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg46ufhmJCtzrGWn0jAI0nYDxFaHhefDLAIk3atw_8zvxBNGGNzDJ9zBLpAXQb8e7nXpiuFYmNcsbZllnuQ0k7GUsQpXQXW4OqIQ91eXzKrnM3zmJhE0jn4_I9V8iHoaL5FU3ERlc4jFoK/s1600/20190119_121408.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="900" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg46ufhmJCtzrGWn0jAI0nYDxFaHhefDLAIk3atw_8zvxBNGGNzDJ9zBLpAXQb8e7nXpiuFYmNcsbZllnuQ0k7GUsQpXQXW4OqIQ91eXzKrnM3zmJhE0jn4_I9V8iHoaL5FU3ERlc4jFoK/s400/20190119_121408.jpg" width="225" /></a></div>
Replaced 318005 located at U4 with the programmed EPROM.<br />
<br />
Information for this was located in the Commodore C16 Service Manual, <a href="http://plus4world.powweb.com/publications.php?pid=400186&piid=165&page=4">page 4</a> and <a href="http://plus4world.powweb.com/publications.php?pid=400186&piid=165&page=5">page 5</a>. (Thanks to Plus4World)<br />
<br />
I'm reasonable sure that at this point I could replace the BASIC rom as well, and even add JiffyDOS by simply locating the correct .BIN files and making new EPROMS.<br />
<br />
I'm not really seeing the need for JiffyDOS as the programs this machine can currently load at 16k max and they load reasonably fast already.<br />
<br />
Looking at the .bin, it looks like I could easily change various text items to customize the look of the boot message, errors, etc.<br />
<br />
Lesson's learned so far:<br />
<br />
Clear buffer before programming.<br />
Program & Verify chip.<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw4rP0pJqlcvaIpGQQaI3PxJzxwmgQ0Yo_spmb5SLl8nkhln7KK7oH_yWsR5yGlODLvGGQi8qKpPg38S-n2au4CeWoCxfES_XoUZXueXme8panF24sMIS5HAmcNDl9mN_WWci-iWNDco2T/s1600/20190119_121412.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="900" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw4rP0pJqlcvaIpGQQaI3PxJzxwmgQ0Yo_spmb5SLl8nkhln7KK7oH_yWsR5yGlODLvGGQi8qKpPg38S-n2au4CeWoCxfES_XoUZXueXme8panF24sMIS5HAmcNDl9mN_WWci-iWNDco2T/s320/20190119_121412.jpg" width="180" /></a></div>
<br />
Next up.<br />
<br />
Re-program the kernel rom again, this time with a PAL kernel and replace the crystal with one sourced from digikey to support the correct video output.<br />
<br />
<br />Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-85896742308987975832019-01-19T11:57:00.000-05:002019-01-19T11:57:01.822-05:00Day one<br />
Day one: Weather forecast: Weekend Winter Snowstorm<br />
<br />
Packages containing the Willem Eprom Programmer and various EPROMS arrived yesterday. I purchased the programmer with cable from Ebay seller <a href="https://www.ebay.com/usr/mcutools?ul_noapp=true">mcutools</a>. They have already proven to be good communicators with good answers and advice for several pre-sale questions. The package arrived reasonably packed with programmer, cable, and CDROM containing the software and manual. He has also provided a support email address in case I get stuck.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHmtEkhjdHPQ4aAOGrg6U-wobX4wx-qGEOrTG83HWtEfQigBqP53gH2vaHUbEkYsmG_v9bDtrmwfdyAwDKPRizjfooNr4ZG9f-7WPcXHBI_wQBvNOP7tqr61zrfR-CyYlSqQ0WNCLQhPgM/s1600/20190119_112747.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="900" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHmtEkhjdHPQ4aAOGrg6U-wobX4wx-qGEOrTG83HWtEfQigBqP53gH2vaHUbEkYsmG_v9bDtrmwfdyAwDKPRizjfooNr4ZG9f-7WPcXHBI_wQBvNOP7tqr61zrfR-CyYlSqQ0WNCLQhPgM/s320/20190119_112747.jpg" width="180" /></a></div>
<br />
The web-based manual appears to provide "just enough" information to get started and the root folder of the CDROM contains several quick reference pictures that clearly answer what are probably common questions. <i>The only simple thing that was not obvious to me was the correct seating of the chip in the ZIF socket itself. I own another programmer which has you seat the chip toward the top of the programmer with extra space in the socket at the bottom. This programmer seats the chip at the bottom of the socket with an extra space at the top. </i><br />
<br />
So far this morning, I've managed to properly set the switches and confirm that my EPROM eraser is doing the job with 20 minute erase times.<br />
<br />
<br />
<br />
<br />
<br />
I've installed the software on a pre-prepared Windows XP box at the advice of the seller. Since this programmer requires an old fashion LPT (printer) port this is something that you need to plan for. As I'm a computer technician by day, I've got tons of spare parts, systems, etc. So not really a big deal for me.<br />
<br />
At this point I've learned the following commands in the software:<br />
<br />
<br />
<ul>
<li>Setting the switches/jumpers using the picture provided when you choose the right chip.</li>
<li>Check hardware (under Help) shows you the programmer is being seen by the PC.</li>
<li>Clear buffer (sets the buffer in the software to zeros)</li>
<li>Read Chip (reads what is on the chip. An erased chip shows all FF (or 1's)</li>
<li>Blank Check (confirms that the chip is blank.)</li>
</ul>
<div>
Next up, I'll attempt programming a 27128 (16k) chip with the NTSC kernel for the Commodore C16 and see if I can replace the original kernel chip with an EPROM.</div>
<div>
<br /></div>
<div>
<br /></div>
Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com1tag:blogger.com,1999:blog-8737755473418004880.post-7639732565451911912019-01-17T09:51:00.003-05:002019-01-17T10:17:20.183-05:00UV Eraser Arrives FirstThe EPROM UV Eraser arrived first. Bought from a semi-local seller on Ebay, who then shipped it from his Amazon prime account. <i>(Didn't think to check Amazon for this) </i>-- He made a couple dollars by drop-shipping the item.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijZKJ0GIy8XuPQ7dLFX4hrhwKoLsNml6aYoRbqSGxII6MP-v_bhZTmK0VNDRtK-oub7Q_VCuYsiv97fbGxkIS60AGceWgFB3Fb0TnAjtBF3jrUcdVfIqFb2u0PYuIkw7ykEueD_5TzN3af/s1600/eraser1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1577" data-original-width="1600" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijZKJ0GIy8XuPQ7dLFX4hrhwKoLsNml6aYoRbqSGxII6MP-v_bhZTmK0VNDRtK-oub7Q_VCuYsiv97fbGxkIS60AGceWgFB3Fb0TnAjtBF3jrUcdVfIqFb2u0PYuIkw7ykEueD_5TzN3af/s200/eraser1.png" width="200" /></a></div>
I've located a few more EPROMs that have been kicking around the shop so I've added a few more 8k, 16k and 64k chips to be erased.<br />
<br />
I've also learned that to determine the size of the EPROM, divide the last digits of the printed on the EPROM by 8.<br />
<br />
2764 = 64 / 8 = 8k<br />
27C128 = 128 / 8 = 16k<br />
27512 = 512 / 8 = 64k<br />
<br />
Dropping a few into the eraser today at 6. We'll see when the programmer arrives if they still function.<br />
<br />Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-9982263831107117852019-01-15T17:30:00.004-05:002019-01-17T11:46:39.729-05:00Bunch of hardware ordered.Initial research done and orders placed.<br />
<br />
Here's what is on it's way this direction:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTjvbHnLrlBxOxpKwk1dUMjkjEU8_ppt2bT8L6XQREhDZWCcIcpHvi-Rb7bY_clJ78ZoZ4SPykBs7TMA0JOjwYNb-sAiXSqZyqrMP5JL-ET4zd1EhUwpkdEBi9eAc57qbgkBvG5qq_6sqz/s1600/KEE+EPROM+EEPROM+programmer.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="402" data-original-width="800" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTjvbHnLrlBxOxpKwk1dUMjkjEU8_ppt2bT8L6XQREhDZWCcIcpHvi-Rb7bY_clJ78ZoZ4SPykBs7TMA0JOjwYNb-sAiXSqZyqrMP5JL-ET4zd1EhUwpkdEBi9eAc57qbgkBvG5qq_6sqz/s320/KEE+EPROM+EEPROM+programmer.jpg" width="320" /></a></div>
<b>KEE Willem EPROM programmer/w LPT Cable.</b><br />
<br />
<br />
This the 5.0 version which should be right for the EPROMs I'm looking to program. These have a reputation of not being perfect, but are cheap and generally get the job done.<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiheBacCjaEhvCszRBKcquHuakH95JQr8roqIzRmKwvQ1ECRyjX2x0ja4yZ6m9d5Tty-NDrbkkZy-Cy0MxoGBVAv0N6Je4sW034uBe9flQtrPTNKVxqI9RuKf2D3Ba-3uhW-z8jhDUItaW7/s1600/eprom_eraser.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1600" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiheBacCjaEhvCszRBKcquHuakH95JQr8roqIzRmKwvQ1ECRyjX2x0ja4yZ6m9d5Tty-NDrbkkZy-Cy0MxoGBVAv0N6Je4sW034uBe9flQtrPTNKVxqI9RuKf2D3Ba-3uhW-z8jhDUItaW7/s320/eprom_eraser.jpg" width="320" /></a></div>
<br />
<br />
<br />
<br />
<b>EPROM Eraser Drawer:</b><br />
<br />
The EPROM eraser is a must, that is unless I want to leave them outside in direct sunlight for 3-4 weeks. The sunlight levels in Ohio during the winter would probably mean 2-3 months. This should get the job done within an hour or two.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
The following EPROMs have also been ordered:<br />
<br />
<br />
* several 27256 and 2764A<br />
<br />
<br />
Now it's time to wait for parts to arrive.Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0tag:blogger.com,1999:blog-8737755473418004880.post-53306127409898666852019-01-15T10:30:00.002-05:002019-01-15T10:34:58.834-05:00Learning EPROM programming.It's been a long time since I've posted to this blog.
<i>It's overdue.<b></b></i>
Thanks to some birthday money contributed by several members of my family this year, I've invested in a few interesting pieces of <i>*sort of*</i> retro technology to learn something new:<br />
<br />
<b>EPROM programming.</b>
EPROMS are UV erasable chips which were common in computers more than two decades ago.
The goal of this learning project is as follows:<br />
<br />
<b>* Program a replacement EPROM to replace the NTSC kernel with a PAL EEPROM in my Commodore C16 computer.</b><br />
Along with a crystal replacement, this will allow the machine to play PAL (Europe) games.<br />
<br />
<b>* Program a PIC chip for my WII to ATARI adapters. </b><br />
Not an EPROM, but this programmer will also program the PIC chips required for that project that was set aside when my existing programmer was incapable of doing the job.<br />
<br />
<b>* Program a C64 JiffyDOS kernel for one of my Commodore C64s.</b><br />
Technically, I have an EASYFLASH 3, with a virtual version, but it would be nice to say I've done this successfully.<br />
<br />
<b>* Program a C64 cartridge game of some type.</b><br />
<br />
<b>* Program replacment HI/LO EPROMs for my Commodore Plus4 with some useful software. </b>
<br />
<b><br /></b>
<b><i>I've had to piece together a lot of information from various sources, so hopefully this blog will help someone else who decides to explore this somewhat lost art. I suspect I will make mistakes along the way, so read everything to make sure I've not followed up with corrections in a later post. More to follow.</i></b><br />
<b><br /></b>Eightbitswidehttp://www.blogger.com/profile/02617484500221521291noreply@blogger.com0