Classic Computer Magazine Archive ANTIC VOL. 2, NO. 10 / JANUARY 1984

SCREEN DUMP

SDUMP your graphics screen to a printer

by JERRY WHITE and FERNADO HERRERA



REQUIRES 32K RAM AND DISK, PRINTER

Many ANTIC readers have asked for a utility program that would dump a Micro-Painter screen to an Epson-Graftrax Plus printer. The following SDUMP program will do just that. All you need is a Micro Painter-generated disk file and an Epson MX or FX printer equipped with Graftrax Plus.

One problem that generally causes printed pictures to lack graphic appeal is a lack of color. Most Micro-Painter screens contain four colors, and most printers can only put black print a white background. The SDUMP program provides a compromise by adding the capability to print two different shades of grey.

Look at lines 320 through 390. I have them set up to leave a background in white, print color register 2 in dark grey, color register 1 in a lighter grey, and color register 0 in black. Depending on the requirements of your picture, you may want to change these "color" assignments. Swap line numbers 330 and 390, and the background would print in black and color register 0 would be white. Likewise, swapping line numbers 350 and 370 would reverse the density of the grey shades in color registers 1 and 2.

SDUMP could also be used to dump a Graphics 24 screen with minor adjustments. Line 660 sets up the Antic Mode 14 display list. By removing "ASM = USR(ADR(DL$))" from that line, you could dump a Graphics 24 screen.

The routine at line 670 opens the disk file and reads it into screen memory. The parameters being passed through the USR call are the address of the machine-language subroutine, IOCB number, the command (7 = read), the address at which to begin storing data, and the number of bytes to move.

If you are going to try to read a picture file that is not generated in Datasoft's format, you may have to change or delete lines 690 through 720. Micro-Painter files contain color bytes at the end of the disk file. Other graphics packages may store these bytes at the beginning of the file, or not at all. To use SDUMP with files other than Micro-Painter files, you'll have to adjust accordingly.

SDUMP contains no error trapping, so you'll have to be careful. Be sure to SAVE the program before using it for the first time, because one incorrect byte of data could cause your computer to lock-up. If this happens, reboot, then reload the program and double-check your DATA statements.

Make sure that your printer is ready, and that you know the filename of your disk file before you begin. When you enter your disk filename, make sure that you include the correct device and filename, as well as the extension, if any.

Any other requests! It's difficult to know what kind of programs you would like to see in ANTIC unless you tell us. If you have any questions on Atari BASIC or suggestions for other utility programs, please send them to Jerry White in care of ANTIC Magazine.

Download SDUMP.BAS Download