Classic Computer Magazine Archive ST-Log ISSUE 22 / AUGUST 1988 / PAGE 26

UTILITY

ALTERED STeights

by Matthew J.W. Ratcliff

Altered STeights is a graphics display utility for ST owners like me, who still have a particular affection for the old reliable 8-bit machines. Altered STeights will load and display Koala pictures, 8-bit graphics mode 9 and mode 8 screens as well. If you have Computer Eyes for your 800XL, why buy a new version for the ST? Just port your pictures over to big brother and load them up with Altered Sleights (more on "porting" later). You can load pictures in quarter- (four Koala pictures on the ST display at once), half- or full-screen formats. It is more than a picture viewer utility however, since it allows you to save your composite creations in DEGAS uncompressed format. Note that due to the large size of the source code, this program (and all associated files) is found only on this month's disk version or on the Delphi ST SIG.

When you double click on ALTSTE.PRG, the program will run and a brief demonstration will be presented. You must be in low or high resolution to run this program. The demo gives you a quick preview of just what this utility is designed to do. Three demo files are searched for, DEMO with an extender for each 8-bit screen type, .PI9, .PI8 and .PIC respectively. If found each is loaded and displayed. In monochrome, the picture is mapped to the display in all seven possible display combinations. In color mode, Altered STeights uses VDI plot calls instead of direct screen-memory writing, so it is much slower. The low-resolution demo loads the .PI9 file and displays it in "split" screen format, on the left of the display. The .PI8 and .PIC demonstrations are shown on the right half of the display in "quad" format, top and bottom. The mode 9 pictures, digitized photos and such, look best in low resolution, while the mode 8 and Koala pictures look better in high. If you will be using this utility to create "clip art" files for Publishing Partner, for example, then it is best to work in high resolution if possible.

After the demo, the first dialog (or more accurately, form alert) is presented, giving you the option to continue or exit. You are next prompted to clear the work-screen before continuing. The first time through you'll want to answer YES, unless you would like to continue looking at the last demo screen while loading other pictures.

The next dialog prompts you for the picture type you're going to want to load: mode 9, mode 8 or Koala. The extenders for these pictures are expected to be .PI9, .PI8 and .PIC, respectively. Once you select the picture type, if you load a different type of picture, the display is likely to look a bit odd. If a Koala load is requested, the file will be uncompressed from the Micro Illustrator format if necessary. If it's a simple screen dump, or a "header error" occurs, it's mapped to the screen verbatim. (If it goofs up the display, you can always load another picture over it.)

Once you select the picture type, a file selector is brought up with a directory of the current drive, path and the proper extender expected. Double click on the file (or once and OK) you wish to load, or cancel if you want to do something else.

If you are in the full-screen format, the picture is mapped to the display immediately. If you had selected half screen, you will be prompted to point and click on the side of the screen to map the picture on. Similarly, if you're in the "quad" format, the display will be divided into quarters, so you can point and click on the proper quadrant.

After the picture is on the display, click the left mouse button to continue or the right button to "invert" the picture. Most mode 8 pictures, for example, will look fine in a black-on-white display format. This includes screen dumps from Solid States or Super 3D Plotter II. If the picture loaded was a mode 8 Computer Eyes picture it will look like a "negative." Clicking the right mouse button will correct for this.

Continuing after the load will bring up another alert box with the following prompts:

AGAIN—Load another picture of any of the three types supported in the same screen layout format.

figure 1

SAVE—Bring up a file selector, with the extension of .PI3 or .PI1, to save the current display screen as a DEGAS uncompressed picture file.

RESTART—Restart the program, then exit or continue. Continuing allows you to clear the screen and select a new screen format.

You can create some interesting composite pictures this way. For example, you can load two pictures in quad-screen format on the left side of the display. Then restart and select half screen to load a picture on the right side of the display, without clearing the screen first. You can freely load and display mode 8, 9 and Koala pictures on the same display.

If the Koala pictures are in the Micro-Illustrator compressed format, Altered STeights looks at the color data in the file. It then generates a look-up table based on the luminance values for each of the foreground colors. The end result is proper shading in your Koala pictures. If the luminance values are the same, then a default look-up table (LUT) is generated. Sometimes your Koala pictures will need to be inverted because of this. You can always go to DEGAS and adjust colors of any picture you've saved in color mode.

The 8-bit GRAPHICS 9 pictures are made up of 80×192 pixel, 16-gray- level data. Altered STeights emulates this with an 8×2 pixel grid of varying dot densities. In the quarter-screen format you lose 50% of the original picture's horizontal and vertical resolution. To compensate, I tried averaging four pixels of the original data for every 8×2 block on the ST's display, but the end result was a little washed out and fuzzy. Altered STeights just tosses out what won't fit, and most pictures look pretty good anyway.

In the split-screen format, 50% of the horizontal resolution must be sacrificed. Several different shading patterns are used for the Koala pictures to retain 100% of its resolution in all screen formats. For the mode 8 pictures, no shading is required, and there's no loss of resolution—even in the quad-screen format. In low resolution you'll lose some image data in quad-screen formats for mode 8 and Koala pictures.

If you still have a complete 8-bit system, you may want to transport your graphic files from it to the ST. The easiest way to do this is with a "null modem" cable and terminal software at both ends. I use Flash on the ST and Keith Ledbetter's Express 3.0 at 2400 baud, both in ASCII mode, half duplex, 8 bits per character and one stop bit. Once cabled up, I set up the 8-bit to send Xmodem. Next the ST is set to Receive Xmodem and I start the transfer. The rest is automatic. If you have the 8-bit ARC utility, it'll save a lot of time if you compress all of your pictures into one big file and get the job done in one transfer. Then just de-ARC them on the ST.

Figure 1 is a schematic for the 8-bit to ST null modem cable. A 9-pin D type male connector is needed for your P:R: Connection or 850 interface. A 25-pin D type female (RS232) connector is needed for the ST. It isn't absolutely necessary to carry DTR through to CRX (this is just used by the computers to make sure the other is ON). You can simply short pin 1 to 2 on the 9-pin 8-bit connector and pin 20 to 8 on the 25-pin ST connector.

Of course, you can always download Koala pictures from Delphi or most any public Atari BBS. In the Atari SIG on Delphi we have a Koala database. You can also find many Koala and digitized pictures in the Micro Artists SIG.

The program was developed with Megamax C and the ever-patient assistance of Charles F. Johnson, Dan Moore, Tim and Jeff Randall of Randall's Home Computers and Clay Walnum's C-manship series. My thanks to them all!