{"id":2832,"date":"2024-06-15T04:21:53","date_gmt":"2024-06-15T04:21:53","guid":{"rendered":"https:\/\/www.kernelcrash.com\/blog\/?p=2832"},"modified":"2024-08-30T21:19:30","modified_gmt":"2024-08-30T21:19:30","slug":"appleii-vga-and-emulating-other-retro-video-subsystems","status":"publish","type":"post","link":"https:\/\/www.kernelcrash.com\/blog\/appleii-vga-and-emulating-other-retro-video-subsystems\/2024\/06\/15\/","title":{"rendered":"AppleII-VGA and emulating other retro video subsystems"},"content":{"rendered":"<p>Recently I came across the <a href=\"https:\/\/github.com\/markadev\/AppleII-VGA\">AppleII-VGA<\/a> project by Mark Aikens. It takes a Raspberry Pi Pico, adds some level converter transceivers, then attaches it to the address, data and control signals of an Apple II, and effectively it sits there doing two things. 1. It listens for &#8216;writes&#8217; coming from the 6502 CPU to the memory where the Apple II thinks its video memory is and 2. It converts those writes into a pixel perfect VGA signal. So it&#8217;s like a video output converter that bypasses all the video logic in an Apple II that normally puts out a composite video signal, and instead it converts directly from writes to video memory and creates a perfect VGA image. There&#8217;s a fork of it too called <a href=\"https:\/\/github.com\/hanshuebner\/AppleII-VGA\">\u22002 Analog VGA<\/a> that adds some additional features.<\/p>\n<p><!--more--><\/p>\n<p>Of course for someone who emulates ROMs and floppy chips, this is quite a cool project so I had to try it. There is a proper PCB for this, but I just hacked it together on a breadboard and added some jumper wires and used one of those <a href=\"https:\/\/github.com\/Wierzbowsky\/MSX_Breadboard\">MSX prototype boards<\/a> I ordered heaps of some time back (though you have to cut some obvious traces to use on anything other than MSX). So the Apple II has 50 pin edge connector slots and conveniently MSX has a 50 pin cartridge slot.<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-50-17.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2834 size-medium\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-50-17-229x300.png\" alt=\"\" width=\"229\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-50-17-229x300.png 229w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-50-17.png 622w\" sizes=\"auto, (max-width: 229px) 100vw, 229px\" \/><\/a><\/p>\n<p>Anyway, when I first hooked it up, it didn&#8217;t work at all. Doh!<\/p>\n<p>My spider sense thought &#8220;maybe the four 74LVC245&#8217;s I had were not 100% genuine&#8221; . Fortunately I had four I had bought at my local Jaycar for another project. So I swapped them in and voila:<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-53-42.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2837\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-53-42-253x300.png\" alt=\"\" width=\"253\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-53-42-253x300.png 253w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-53-42.png 621w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/a><\/p>\n<p>Loderunner never looked so good.<\/p>\n<p>Actually it looks like I am running an emulator.<\/p>\n<p>Is this cheating?<\/p>\n<p>Probably \ud83d\ude09<\/p>\n<p>Anyway, note to self &#8220;Unbelievably cheap 74LVC245s from aliexpress = <em>Yeah right<\/em>&#8221; and &#8220;74LVC245s from my local Jaycar = <em>most likely genuine<\/em>&#8220;. Why on earth anyone would go to the trouble of making 74LVC245&#8217;s that don&#8217;t quite work properly is beyond me. I did actually take a zoomed in look at the top of these fake-ish chips and they have the tell tale rough surface &#8230; that I had never noticed before. I guess my &#8216;guess&#8217; relating to why it wasn&#8217;t working was because I also used some 74LVC245s to <a href=\"https:\/\/www.kernelcrash.com\/blog\/pitubedirect-on-the-bbc-micro-and-electron\/2023\/01\/16\/\">make a pitubedirect<\/a> and they didn&#8217;t quite seem 100% either. And those 74LVC245s were part of the 10 or so I ordered off aliexpress. I&#8217;ve since ordered quite a lot of 74LVC245s from mouser\/rs-online\/element14\/whoever , and at least they should be genuine.<\/p>\n<p>Anyway, the AppleII VGA worked <em>in an Apple II<\/em>, but that got me thinking &#8220;How hard would it be to adapt it to other older computers?&#8221;. So then I sat down and stared at the source code for some time and discovered the world of PIOs. They are clever but weird. The rough way the Apple II VGA works is:<\/p>\n<ul>\n<li>Have a PIO watching the phi0 signal and r\/_w and every time there is a write to RAM, capture the address and databus and control signals and push the result into a FIFO. PIO&#8217;s don&#8217;t really have access to the Pico&#8217;s RAM , so they push to a FIFO<\/li>\n<li>Then you get one of the Pico&#8217;s two ARM cores watching that FIFO and when there is new data,\u00a0 it interprets the address, data and control signals and writes the video data to the Picos&#8217; RAM. It&#8217;s just in a tight loop waiting for new data on the FIFO and writing it to RAM.<\/li>\n<li>Then you have the other\u00a0 ARM core that is effectively taking a scanline of video data (imagine there is a single scanline of video bytes) , does whatever conversion it needs and then pushes some data into a FIFO.<\/li>\n<li>Then at the other end of that FIFO is a another PIO that transforms the data into &#8216;writes&#8217; to the GPIO pins that form the 9 bit RGB colour. ie. 3 GPIO pins per colour, connected to an R2R network and you end up with an 8 level analog pin. One for Red, One for Green and one for Blue. There are other state machines within that PIO that handle all the synchronisation stuff.<\/li>\n<li>This other ARM core just needs to send each scanline of pixels at the right time and you end up with a full screen.<\/li>\n<\/ul>\n<p>That&#8217;s the gist of it. It&#8217;s very clever and it does not use any crazy assembly (unless you count the PIO code).<\/p>\n<p>So in doing my floppy emulation projects I have to stare at source code for emulators a lot. They are really good sources of information about how older chips operate, and often emulator authors have to handle some of the more obscure quirks of some of these older chips.<\/p>\n<p>So I thought &#8220;Let&#8217;s see how hard it is to take the emulator source code of an older video chip and wedge it into the Apple II VGA code&#8221;. I used the video chip code from <a href=\"https:\/\/github.com\/mamedev\/mame\">MAME<\/a> as a starting point.<\/p>\n<p>I thought I would start with something &#8216;easier&#8217; so I picked the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Motorola_6847\">6847<\/a>\/6883 combo from the Tandy Color Computer\/Dragon 32 systems. The 6847 only does a few specific video modes including a text mode. I knew the artifact mode stuff might be hard but I really just wanted to see what was possible. I sort of piggybacked it onto my ROM\/Floppy emulator so I could use both at the same time:<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-59-03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2838\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-59-03-220x300.png\" alt=\"\" width=\"220\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-59-03-220x300.png 220w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-59-03-750x1024.png 750w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-59-03-768x1048.png 768w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-15-59-03.png 867w\" sizes=\"auto, (max-width: 220px) 100vw, 220px\" \/><\/a><\/p>\n<p>So I hacked away at src\/devices\/video\/mc6847.cpp (and also ended up looking at https:\/\/github.com\/eyalabraham\/Dragon32-RPi-Bare-Metal )and first I got text mode going:<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-00-50.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2839\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-00-50-300x268.png\" alt=\"\" width=\"300\" height=\"268\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-00-50-300x268.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-00-50.png 624w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\u00a0 \u00a0 <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-01-36.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2840\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-01-36-291x300.png\" alt=\"\" width=\"291\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-01-36-291x300.png 291w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-01-36.png 610w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/a><\/p>\n<p>And then some graphics modes, with a main aim to get some artifact colours working (but the code is hard coded for one colour set). The way I do artifact stuff is really quite wrong, but it generally looks ok-ish in a decent selection of games.<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-00.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2841\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-00-300x290.png\" alt=\"\" width=\"300\" height=\"290\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-00-300x290.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-00.png 630w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\u00a0 \u00a0 <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-48.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2842\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-48-300x269.png\" alt=\"\" width=\"300\" height=\"269\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-48-300x269.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-04-48.png 627w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>So it looks pretty good, but I knew at the outset that some games would be quite iffy.I make no attempt to synchronise with the drawing of the VGA screen with the actual drawing of the screen. Logically if a game is closely synchronised with the horizontal beam it may not work well.<\/p>\n<p>However, I found a lot of games do work really well .. but a few you can tell are out of sync like DragonFire below.<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-05-45.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2843\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-05-45-300x298.png\" alt=\"\" width=\"300\" height=\"298\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-05-45-300x298.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-05-45-150x150.png 150w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-05-45.png 628w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I got bored with the CoCo and wanted to try something else.<\/p>\n<p>Next on my list was <a href=\"https:\/\/en.wikipedia.org\/wiki\/TMS9918\">9918<\/a> emulation. I hooked up my dodgy AppleII-VGA breadboard to my <a href=\"https:\/\/www.kernelcrash.com\/blog\/building-a-breadboard-msx-computer\/2021\/06\/16\/\">MSX1 breadboard computer<\/a>. And then I used MAME&#8217;s tms9928a.cpp as a base. This also wasn&#8217;t as hard as I thought . Most stuff works pretty well. I do get the occasional graphical error (see the Arctic Adventure shot. I have not resolved that one) , but everything is very playable and very clear (and yes that&#8217;s a Coleco conversion in one of the screenshots).<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-10-18.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2844\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-10-18-223x300.png\" alt=\"\" width=\"223\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-10-18-223x300.png 223w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-10-18-760x1024.png 760w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-10-18-768x1034.png 768w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-10-18.png 848w\" sizes=\"auto, (max-width: 223px) 100vw, 223px\" \/><\/a> <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-12-33.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2845\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-12-33-251x300.png\" alt=\"\" width=\"251\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-12-33-251x300.png 251w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-12-33.png 624w\" sizes=\"auto, (max-width: 251px) 100vw, 251px\" \/><\/a>\u00a0 \u00a0 <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-13-28.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2846\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-13-28-236x300.png\" alt=\"\" width=\"236\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-13-28-236x300.png 236w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-13-28.png 611w\" sizes=\"auto, (max-width: 236px) 100vw, 236px\" \/><\/a><\/p>\n<p>So next on my list was <a href=\"https:\/\/en.wikipedia.org\/wiki\/Yamaha_V9938\">V9938<\/a> emulation for MSX2. I was on a roll and I thought &#8216;this would be so cool&#8217;. Of course I failed to have bothered to look up what additional features a V9938 has over the 9918. Sure it has some better video modes and better sprites but it also has a bunch of blitter like functions &#8230; and technically the approach the AppleII-VGA stuff takes is unlikely to work well if the video chip has the ability to write back to memory &#8230; as you would need to exactly synchonise the emulation inside the pico with the activities within the real V9938.<\/p>\n<p>That didn&#8217;t stop me. I used MAME&#8217;s v9938.cpp code as a base and hacked away at it. I then hooked it all up to my Panasonic FS-A1. A super convenient thing with MSX computers is that they generally have two cartridge slots. So I could plug my ROM\/Floppy emulator in one cart slot and the AppleII-VGA thing in the other.<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-13-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2863\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-13-10-220x300.png\" alt=\"\" width=\"220\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-13-10-220x300.png 220w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-13-10.png 600w\" sizes=\"auto, (max-width: 220px) 100vw, 220px\" \/><\/a> \u00a0 <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-14-04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2864\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-14-04-237x300.png\" alt=\"\" width=\"237\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-14-04-237x300.png 237w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-14-04.png 619w\" sizes=\"auto, (max-width: 237px) 100vw, 237px\" \/><\/a><\/p>\n<p>Anyway, I did not get this to work completely. I&#8217;ll repeat that. It doesn&#8217;t work! (if you&#8217;re curious you&#8217;ll ignore me and try it anyway). But &#8230; the V9938 works just like a 9918 for MSX1 games, and this 9918 emulation in the v9938.cpp code is possibly better than in the 9918 emulation I did previously, but the MSX2 V9938 emulation is a work in progress. There&#8217;s a few difficulties.<\/p>\n<ul>\n<li><del>There&#8217;s sometimes more CPU time needed per scanline to generate the display than there is allowed time. This is really noticeable in games where you are close to the 8 sprites per line max in the V9938. You&#8217;ll see some serious graphical weirdness. I&#8217;d probably need to go back and optimise\/assembly-arise parts of the code to have a fighting chance.<\/del> \u00a0\u00a0 This appears to be fixed now. I thought I was overclocking the pico, but actually wasn&#8217;t. Now that its running at 252MHz , having 8 sprites per horizontal line is not an issue.<\/li>\n<li><del>Not sure why the V9938 sprite modes get the colours wrong.<\/del>\u00a0 This now works fine as well. If you look at the screenshots below for Usas and King Kong, you&#8217;ll see the incorrect colours for some of the sprites. Turns out these extra colours are the <a href=\"https:\/\/www.msx.org\/wiki\/The_OR_Color\">MSX &#8216;OR&#8217; colours<\/a>. So this is fixed as well now.<\/li>\n<li>A lot of the blitter type functions give the impression that they are sort of mostly working, but not quite.<\/li>\n<\/ul>\n<p>Here&#8217;s some screenshots. You can see how in a lot of cases it looks &#8216;almost right, but weird&#8217;, or in some cases (Zanac) it&#8217;s a giberrish mess.<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2865\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20-300x270.png\" alt=\"\" width=\"300\" height=\"270\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20-300x270.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20.png 617w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>\u00a0\u00a0 <\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-16-31.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2866\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-16-31-300x257.png\" alt=\"\" width=\"300\" height=\"257\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-16-31-300x257.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-16-31.png 624w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20.png\"> \u00a0 <\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-17-39.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2867\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-17-39-300x230.png\" alt=\"\" width=\"300\" height=\"230\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-17-39-300x230.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-17-39.png 618w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20.png\"> \u00a0 <\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-18-26.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2868\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-18-26-300x234.png\" alt=\"\" width=\"300\" height=\"234\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-18-26-300x234.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-18-26.png 593w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20.png\"> \u00a0 <\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2869\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-04-300x241.png\" alt=\"\" width=\"300\" height=\"241\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-04-300x241.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-04.png 590w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20.png\"> \u00a0 <\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-50.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2870\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-50-300x240.png\" alt=\"\" width=\"300\" height=\"240\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-50-300x240.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-19-50.png 610w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-15-20.png\"> \u00a0 <\/a><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-20-39.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2871\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-20-39-300x239.png\" alt=\"\" width=\"300\" height=\"239\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-20-39-300x239.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-15-15-20-39.png 618w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I got to a point and thought &#8230; yeah &#8230; no &#8230; maybe and decided to try another computer.<\/p>\n<p>This time the <a href=\"https:\/\/en.wikipedia.org\/wiki\/ZX_Spectrum\">ZX-Spectrum<\/a>. The old Speccy has one of the simplest video subsystems &#8230; so this ended up being quite easy. I tried a few games and they all look fantastic. Benny Hill never looked so good.<\/p>\n<p><a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-19-50.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2848\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-19-50-220x300.png\" alt=\"\" width=\"220\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-19-50-220x300.png 220w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-19-50.png 607w\" sizes=\"auto, (max-width: 220px) 100vw, 220px\" \/><\/a>\u00a0 <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-21-20.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2849\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-21-20-212x300.png\" alt=\"\" width=\"212\" height=\"300\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-21-20-212x300.png 212w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-21-20.png 569w\" sizes=\"auto, (max-width: 212px) 100vw, 212px\" \/><\/a>\u00a0 <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2850\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-10-300x265.png\" alt=\"\" width=\"300\" height=\"265\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-10-300x265.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-10.png 622w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-58.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2851\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-58-300x239.png\" alt=\"\" width=\"300\" height=\"239\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-58-300x239.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-22-58.png 595w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>\u00a0 \u00a0 <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-23-43.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2852\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-23-43-300x274.png\" alt=\"\" width=\"300\" height=\"274\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-23-43-300x274.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-23-43.png 620w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-24-30.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2853\" src=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-24-30-300x258.png\" alt=\"\" width=\"300\" height=\"258\" srcset=\"https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-24-30-300x258.png 300w, https:\/\/www.kernelcrash.com\/blog\/wp-content\/Screenshot-from-2024-06-14-16-24-30.png 633w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>For lack of my own imagination, I just have <a href=\"https:\/\/github.com\/kernelcrash\/AppleII-VGA\">a fork of AppleII-VGA on github<\/a> with different branches for the different emulations described. I&#8217;ve placed a branch specific README in each branch (in the &#8216;pico&#8217; directory) that contains details on wiring (as apart from the address and databus there are subtle differences in how you wire up control signals) and what works and what doesn&#8217;t work.\u00a0 They are all <em>proof of concepts<\/em>. None are &#8216;complete&#8217; . Things like &#8216;border colours&#8217; I have often ignored, and even the accuracy of some colour palettes might be wrong, but that is dead easy to fix.\u00a0 I&#8217;d encourage anyone who&#8217;s interested to just &#8216;have a go&#8217; at them. The ZX-Spectrum and 9918 emulations you could probably use as is. The 6847\/6883 one you might need to experiment with especially if you really like artifact games. The V9938\/MSX2 stuff is a bit of a pipe dream, but interesting nonetheless.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/kernelcrash\/AppleII-VGA\/tree\/mc6847-mc6883\">The coco\/dragon MC6847-MC6883 branch<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/kernelcrash\/AppleII-VGA\/tree\/tms9918a\">The TMS9918A branch<\/a> (ie. MSX1 and others)<\/li>\n<li><a href=\"https:\/\/github.com\/kernelcrash\/AppleII-VGA\/tree\/v9938\">The V9938 branch<\/a> (does not work &#8230; but is still interesting)<\/li>\n<li><a href=\"https:\/\/github.com\/kernelcrash\/AppleII-VGA\/tree\/zx-spectrum\">The ZX-Spectrum<\/a> branch<\/li>\n<\/ul>\n<p>Also, if you are having trouble compiling, grab the 1.5.1 version of the pico sdk. They changed a lot of stuff in 2.0.0.<\/p>\n<p>Having played with these a bit, they are far more useful on systems with kinda\/sorta\/not-so-great composite output as the &#8216;net improvement&#8217; in screen quality is quite large. However, it possibly comes down to personal taste though in terms of whether you want your composite output as sharp as what you see in an emulator. For systems like MSX2 that already have RGB output, you may as well use a Gonbes or similar to get high quality VGA output.<\/p>\n<p>Have fun.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I came across the AppleII-VGA project by Mark Aikens. It takes a Raspberry Pi Pico, adds some level converter transceivers, then attaches it to the address, data and control signals of an Apple II, and effectively it sits there doing two things. 1. It listens for &#8216;writes&#8217; coming from the 6502 CPU to the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-2832","post","type-post","status-publish","format-standard","hentry","category-retrocomputing"],"_links":{"self":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/posts\/2832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/comments?post=2832"}],"version-history":[{"count":20,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/posts\/2832\/revisions"}],"predecessor-version":[{"id":2881,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/posts\/2832\/revisions\/2881"}],"wp:attachment":[{"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/media?parent=2832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/categories?post=2832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kernelcrash.com\/blog\/wp-json\/wp\/v2\/tags?post=2832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}