Classic Computer Magazine Archive ANTIC VOL. 5, NO. 6 / OCTOBER 1986



Rubber visuals in ACTION!

Stretch visual images like silly putty on any 8-bit Atari with at least 48K memory and a disk drive. Video Stretch requires the ACTION! language cartridge from Optimized Systems Software. (Disk subscribers this month will find a runtime version that doesn't require ACTION!) Paddle controllers are recommended.

Video StetchOutstanding new graphics possibilies are still being discovered on the Atari 8-Bit computers. The Video Stretch program will vertically compress or stretch an entire screen and select different parts of it to view-in real time. It's a spectacular, eye-catching effect.

Video Stretch can be used for an impressive slide-show program, or just to see how your favorite screens look when warped all out of shape. In any case, the program demonstrates that the 8-bit Atari is still capable of surprising new feats.

The program will work with its own Graphics 9 sample picture. Or you can use your own pictures made with Micro-Painter, Graphic Master and Computereyes. If you have none of these, use Rapid Graphics Converter (Antic, November 1985) to change your images into a compatible format.


You will need a pair of paddle controllers plugged into port 1. Paddle 0 controls the size of the display and paddle 1 selects the portion of the image to be seen. You can also use this program with a touch tablet, but it doesn't work quite as well as the paddles. And of course you can write your own routines to send values to Stretch().

Antic Disk subscribers: This month as a bonus you'll find a "runtime" version of Video Stretch that operates without the ACTION! cartridge. Follow the disk Help file instructions for loading STRETCH.EXE. This listing was too long to print in the magazine, and it cannot be adapted by the user as the ACTION! source code can be.

Carefully type in Listing 1, STRETCH.ACT, following the instructions in the ACTION! manual and save a copy before you run it. If you just want to see Video Stretch operate on the Graphics 9 demo picture, type D from the main menu.

If you have some 62-sector micro-screens to try it with, choose the L option from the main menu. The program will display any 62-sector file named D:PICTURE. You can change this default name by altering the filename in the Load() procedure.

You may alter the program to accept any 192-line graphics mode. To make the program accept pictures created in Graphics 15, for example, just redefine IR at the beginning of the program as 14, and change the graphics call in Rubber_Band to Graphics(15). If you have a non-XL computer, Graphics(15) is not available. You can replace it with Graphics(8), and the display will fix itself as soon as Stretch() operates.

Similar changes can be made to the program to make it work on any 192-line graphics mode, namely Graphics 8, 9,10, 11, 14, and 15. For the little-used Graphics 14, change a*40 in Sinit() to a*20.


The program is written in ACTION! from Optimized Systems Software, which is ideal for the combination of speed and arithmetic that is required. The Stretch() routine needs two parameters; the first is the size, in scan lines, of the image that will appear on the screen. Normal size is 192 lines. You can choose any size from one to about 500 lines and the image will be proportioned correctly.

Since an image bigger than 192 lines can't be displayed all at once, the second parameter tells what line of the original image will appear at the top of the screen. (It should be between 0 and 191.) This allows you to scan any portion of the expanded image. It also works with images that are smaller than full-size, allowing you the interesting capability of expanding the picture and moving it up and down.


The Stretch() procedure uses several line-drawing algorithms and speedy integer arithmetic to move each scan line to its proper place on your screen.

Before entering Stretch() you must initialize it with a call to Sinit(). A space of 580 bytes is required for the complex display list generated by the program. Each line has an independent LMS instruction.

Because the new display list is so long, your choice of places to put it is limited to the first 443 bytes in any given kilobyte. If you are using high-resolution Player/Missile graphics, those first three unused pages of P/M space are ideal.

Lloyd Burchill is a high school senior from Newcastle, New Brunswick who likes to write programs with an artistic flair. In 1985 he won a national award for a program about the moons of Uranus.

Listing 1: STRETCH.ACT Download / View

On Disk: STRETCH.EXE Download