GRAPHICS INTERCHANGE FORMAT DISPLAY SYSTEM Copyright Notices and other such stuff.... 'GIF' and 'Graphics Interchange Format' are trademarks of CompuServe, Inc., an H&R Block Company. (you know... the guys who you give money to for telling you how much money you will give to the Government.) BASIC 8 is a trademark of Walrus Software, Inc. The Graphics Interchange Format Display System, or GIF Display System for short, or better yet - GDS (mainly because it's catchy, but also because I really don't want to type out the whole thing), is NOT Public Domain. This program cannot be sold without the express written consent of the author (me). This program may be distributed freely as long as all original files are included with it. GDS falls under the category of FREEWARE. All I want for this is the fame, glory, recognition, and postcards. Yep, you read right! POSTCARDS. I kinda collect postcards, and I would also like to see how far this program gets distributed. So if you use this program regularly, you are obligated to send me a postcard. I guess you can call this POSTCARDWARE!!!!! Please send everything you want to send me to: Eric C. Rafanan P.O. Box 1428 Dunnellon, FL 32630 This includes postcards, comments, pictures from cute girls, offers for CEO positions (only from prominent companies please), or better yet - GIFs! I only have a small collection and ANYTHING (yes - ANYTHING) would be appreciated. Anyway, on with the docs... GIF Display System After using the GIFFY program for the C64 by John R. Wind, I was impressed. I also thought that anything the C64 can do, the C128 can do better. So I set out to write a C128 GIF Display program that was easier to use, yet produced better displays. So here it is. The program actually consists of several files: 1) GDS - This is the Main Module of the GDS program. It loads in the 2 support modules, handles the choosing of the GIF, the interpretation of the GIF header, and the actual decompression of the compressed raster data. 2) GDS.DEFAULTS - This file contains the names of the default support modules. 3) GDS.D/???? - Files with this prefix are Display Module files. GDS was written to be modular to allow different display formats to be used. 4) GDS.X/???? - Files with this prefix are Extension Handler Modules. GIF files have the option to include 'updates' in the form of Extension Blocks, and the Extension Handler Module takes care of these blocks. ============================================================================== The Main Module The GDS program has been written for ease of use. Almost everything can be done through the use of menus. Use the Cursor Keys to highlight a choice. Use the Return Key to pick it. Use the ESC Key to abort almost anything (the program will tell you when it does something else). Most of the menus are self-explanatory, so I will only cover those areas that may need a little more clarification. The Main Menu has 3 choices: 1) View a GIF - Allows you to view a GIF on Drives 8, 9, 10, or 11. You choose the GIF from a Directory listing. NOTE - GIFs must be Program, Sequential, or User (though non-GEOS) type files. 2) Exit - Pretty self-explanatory. 3) Select Module - Allows you to select another Display Module or Extension Module from Drives 8, 9, 10, or 11. Also makes it the Default Module as an option. NOTE - When you write a new Defaults file, both the Current Display AND Extension Modules are made the Defaults. All the secondary menus are REALLY self-explanatory (YES/NO, Choose a Drive, etc.) so I don't think I need to go into them (after all, if you own a C128, then you've GOT to have above average intelligence!). The Screen Layout The Screen is divided into 3 parts: 1) Credit Blocks - This is the upper half of the screen. The two smaller blocks are credits read from the Modules (so if you're willing to program a Module, you can let people know who did it! It's only fair after all.). 2) GIF Info - The lower left portion of the screen is used to display information about the GIF you had chosen. Most of it needs no explanation, but here's one thing to watch out for - I believe there has been an update to the GIF format. It has been labeled 'GIF89a'. GDS recognizes any GIF with the 'GIF' signature, but it MAY not process '89a' type GIFs correctly. Most GIFs are currently 'GIF87a'. 3) Message Area - The lower right portion of the screen is the Message Area. This is where most (if not all) user interaction will take place. And that's all there is to it! ============================================================================== Getting This Thing Running The basic steps to using this program are: RUN "GDS" ON U(whatever) (it will load, run, then load in the Default Modules from the Current Drive) Choose 'View a GIF' from the Main Menu. Pick the Drive the GIFs are on. (it will then read in all filenames with the '.GIF' suffix) Highlight and Choose the GIF you want to view. Confirm your Selection. (you can abort if all you wanted to do was look at the GIF info) And away it goes!!! ============================================================================== The Display Module The Display Module is the part of the system that (you guessed it!) actually displays the GIF. It also is responsible for doing the color translations. I chose to make it a module so that different formats could be chosen without actually rewriting the entire program. These formats can include 40-column Hi-Res and Multicolor graphics screens, Basic 8 formats, the IPaint format, or even custom made formats. All it takes is the correct Display Module. The Main Module takes care of everything (including decompressing the raster data - that was a toughie!) except actually putting the picture on the screen, so it's not hard to come up with a new Display Module. For any programmers who are interested, I will be uploading Programming Notes 'Real Soon Now'. (Famous Last Words!) There are 3 Display Modules included with the GDS program: 1) GDS.D/NORMAL - This is the Default Module. It is set to provide a pretty good display for the majority of the GIFs. 2) GDS.D/LIGHTER - If the GIFs seem to be coming out too dark (alot of 256 color GIFs tend to), then this module will attempt to make the colors brighter. 3) GDS.D/DARKER - This module is set to darken the colors in a GIF. All 3 require 64K of VDC RAM. These Display Modules were coded for 16-color GIFs, but 4 and 32-color GIFs still show up pretty good. Now 256-color GIFs are another matter... Since the C128 hardware only supports 16 colors, then to get any reasonable display of 256 colors requires some form of SOFTWARE workaround, such as dithering or interlace (like in IPaint - gosh, I wish I had the IPaint format!). Anyway, the Display Modules that come with the GDS program are pretty sad when it comes to 256-color GIFs (and that's coming from the person who programmed them!). The Display Modules will 'stretch' or 'squash' a GIF to fit into the 640x200 Basic 8 format. It can handle Interlaced GIF files up to a height of 200 lines. After viewing the GIF, hitting any key except for the 'S' key will return you to the Main Module. The 'S' key allows you to save the GIF as a 640x200 8x2-color block Basic 8 picture. After hitting the 'S' key, you will hear 2 quick bells to notify you that saving has begun. When it is done, you will be returned to the Main Menu. The picture will be saved on the same disk as the GIF so be sure that there is enough room on the disk for it (typically 50-80 disk blocks). The new file will have the same name as the GIF with the addition of the 'PICT.' prefix and no '.GIF' suffix. **** DO NOT REMOVE ANY DISKS WHILE THE GREEN LIGHT IS ON! **** This means you cannot change disks before saving the picture (actually you can, but you'll get a disk error afterwards). This is a shortcoming of the Display Module which is currently being worked on. ============================================================================== The Extension Handler Module The Extension Handler Module handles GIF Extension Blocks. These Extension Blocks are used to implement special functions, give extra GIF info, etc. that are not provided for in the standard GIF format. The Extension Handler Module provided just ignores these Extension Blocks. Actually, I haven't found any GIFs with Extension Blocks at all! If you do, let me know if the Extension Block Handler works, eh? (Sorry about this folks, but you can't test something if there's nothing to test it with!) ============================================================================== If you find any problems with this program, please let me know. I really have tried to squash all the bugs, but my supply of GIFs to test with is VERY limited. So if you find anything wrong, I won't take it too personally. Unfortunately, my lawyers tell me to inform you that I can't be held responsible for any damage incurred through the use of this program. Not that there's any chance of that mind you - none of my equipment has been damaged and it was used to TEST this program! I DID have a problem while writing the decompression routine though - I think I developed a new art form! I also think I suffered brain damage looking at it! Anyway, about the only way you could do damage to anything is if you get so overwhelmed by the incredible pictures being displayed that you fall over backwards and startle the cat who jumps onto your desk and spills your drink all over your computer! You shouldn't have had that drink there anyway... Well that's about it for the documentation. I hope I didn't leave out too much but the program is pretty easy to run anyway. Enjoy! Eric C. Rafanan Qlink: MeEric Copyright 1990 All Rights Reserved