CGAArt is a program with two main functions: 1. Show mode - acts as an emulator for an enhanced version of an IBM CGA card. Given some data to put in VRAM of this card, shows what the ouput would look like on an RGBI or composite monitor, in one of many possible modes. In the composite case, both old and new CGA revisions can be emulated. 2. Match mode - given a 24-bit colour image, attempt to find the VRAM data that, when used as input to show mode, best reproduces this image. To start the program, run CGAArt with the name of an input file on the command line. Various different types of input files can be used: * A .png file to use for match mode. For full-screen CGA, the input image should be 640x400. Larger or smaller files can be used. A screenshot file generated by DOSBox with machine=cga will work fine. If the image contains only RGBI colours, CGAArt will default to emulating an RGBI monitor, otherwise it will default to emulating a composite monitor. * A data file that is a dump of CGA VRAM. In this case, only show mode will be available. * A .cgad (CGA data) file which contains VRAM data and register settings. As with raw VRAM data, only show mode is available when the input file is a .cgad file. * A .config file which specifies the default values of all the settings that can be changed to affect the operation of the program, as well as various aspects of its internal logic. CGAArt always loads a config file. If one is not explicitly specified, the config file default.config is used. Config files are human-readable and use a C-like syntax. Comments in default.config show all the options and their meanings. These options can be assigned simple values of various types and more complex expressions using various operators. CGAArt can be run in interactive mode (set by default in default.config) or a batch mode (if interactive is set to false in the config file), in which case the program will not display any UI and will immediately exit after completing the match (if applicable) and show process. This is useful for converting a large number of images with the same settings, for example when generating data for animation purposes. For detailed information about each of the controls, see the corresponding comments in default.config. CGAArt's internal CGA lacks some of the limitations of a standard CGA: * The screen resolution can be extremely high (CRTC registers extended to 16 bits). * The amount of VRAM can be extremely high (limited only by the amount of RAM that CGAArt can allocate). * Scanlines can be repeated any number of times. CGAArt emulates the CGA's overscan areas accurately, including the sync pulses. On the RGBI output, these are shown as dark red (vertical) and dark green (horizontal) regions. On the composite output, normally only the colour burst pulse can be seen, but if the brightness is turned up then the composite sync and blanking regions can also be seen. On exit, the program generates a number of output files alongside the input file: * _out.png - the output from show mode. * _out.dat - the CGA video RAM data (non-interlaced) required to make the CGA display the output image. * _out.rgbi - the image as it would be shown on an RGBI monitor (one byte per pixel, range 0..15). * _out.ntsc - the raw composite data that would be seen on the CGA card's composite output (sampled at hdot rate). * _out.cgad - the CGA VRAM data and register values (including how they change over time, if applicable). The current source code for cgaart can be found at https://github.com/reenigne/reenigne/tree/master/8088/cga/cgaart .