One of the new features brought to the CoCo1/2 and other 6847 based machines by the CoCoVGA is a new mode that Brendan implemented. Called VG6, this mode offers a 128×96 16-color screen using the same amount of memory as a standard 256×192 2-color screen (RG6, aka PMODE 4).
With the ability to change the individual palette colors to any of the available CoCoVGA machine palette colors (512 in v1 boards, 32,768 in v2 boards) makes this an interesting mode to play with.
Though I had manually put together a number of images to demo this mode earlier, I decided it would be a good idea to write a proper converter so that images could easily be generated on a modern machine for viewing on the CoCo.
So I wrote one using my MacBook Pro, using X-windows (XQuartz) as the windowing system and packaged as a terminal app. On launching the program, you are presented with a menu window offering three choices;
– ‘Import .png file (must be 128×96)’
– ‘Open existing VG6 file’
– ‘Exit the program’
the main menu
The program only converts from .png files of the mentioned resolution. I recommend you first prepare your images by scaling, cropping, etc, in some other image editor and save as a 128×96 24-bit .png file.
After selecting the first option, you’ll get a system dialog box to browse to the image you want to convert. On opening it, you’ll be presented with four conversions that the program has made of the image. My reasoning here is to present a simple conversion without a lot of confusing options. Because different images give better results with different processing, at least a few variations are required to be sure there is something acceptable to choose from.
image selection window
The four choices are all processed to fit the same optimized 16-color palette generated by an octree routine in the program. The conversions are a a floyd-steinberg dither, a diffusion dither, octree quantization without dither, and a closest color quantization.
Simply click on the image that you think looks the best, and you’ll then be taken to the editor window to make minor changes before saving the VG6 file.
the editor window
In the editor window, you can see the 16 palette colors off to the right (0-15), along with two tools (an eyedropper and pencil), and two buttons to either save the VG6 file or exit the editor.
The dropper tool allows you to click anywhere on the image to select the color for that pixel as the active color, or you can directly click on a palette color box to the right to do the same thing.
The currently selected palette color will be outlined by a black rectangle. This is the color that will be used by the pencil as you edit the picture. Click on the tool you’d like to use to select it (current tool is shown with an outline).
When drawing with the pencil, you can either click individual pixels one at a time, or click and drag to change multiple pixels.
When you’re ready, save your VG6 file. This file can be copied onto an SD card, put into your CoCo SDC, and viewed with my VG6 viewer on the CoCo.
Existing VG6 files can be opened for editing / saving with the second main menu choice.
Here are a couple of pictures of the original image, an indexed 16 color reduction using GIMP, and the choices presented by the converter for comparison.
Here is a video with me explaining a little bit about the program …
As most people use Windows for their modern OS, I ported this to x86 and x64 Windows versions as well. The various versions of the VG6 converter as well as a .DSK image of the viewer for the CoCo can be found here if you’d like to give them a try. All the usual disclaimers apply of course, but it works well on my machines. Enjoy! 🙂