os9@cbosgd.att.com (12/15/87)
OS-9 Discussions Monday, December 14th 1987 Volume 3 : Issue 21 Today's Topics: guru help for os9 needed OS-9 TeX C graphics lib in Development System? Information machines supported by os9 GIF Standard termcap & coco LII Disc recovery program - PLEASE !! OS9 DEFS [Moderator's notes: I'm not taking much time to respond individually to the following articles. Some are questions which are better answered by each of you. Some articles are informational, so this digest is worth saving (and cutting up into usable hunks). I hope each of you has a safe and happy holiday season. Of course, I actually hope you have a safe and happy lifetime, but it never hurts to focus on a season which in the U.S. can be more dangerous on the roads than in most of the other seasons. -- JDD] -------------------------------------------------------------------------- From: mcvax!tut.fi!ismo@uunet.UU.NET (#Ismo Salonen) Subject: guru help for os9 needed Date: 20 Oct 87 09:09:11 GMT Reply-To: rutgers!uunet.UU.NET!mcvax!tut.fi!ismo (#Ismo Salonen) Organization: Tampere University of Technology, Finland First some facts : hardware : Dragon 64 with 2 720 kb floppys terminal using 19200 bauds software : OS9 from Eurohard Ltd. Question 1 : Has anybody replaced the KBVDIO module because I'm using serial terminal and dont need console (only thing I use it for is saying BOOT in basic ) This module is setting up some wierd interrupt routines and I do not want to reinvent the wheel as writing again something that somebody has done before. Quetion 2 : Can anybody help me to get the book ( buy/borrow or steal :-) ) : The Complete Rainbow Guide to OS-9 Dale Puckett & Peter Dibble I've seen it once and now I'm going to buy it but I can't find it anywhere. Even the ISBN-number would help a'lot. My return address is : ...mcvax!tut!ismo not tut.UUCP not tut.ARPA !! In real life Ismo Salonen Tampere/Finland Date: 27 Oct 87 19:18:14 GMT ------------------------------ From: dibble@cs.rochester.edu (Peter C. Dibble) Subject: OS-9 TeX Organization: U of Rochester, CS Dept., Rochester, NY I have ported Common TeX to OS-9/68k. I need a few (3 or 4) people to help test it. You'll need a link to a system that already runs TeX to play with this software. I haven't ported any dvi converters yet and I'm not going to put 10M of macros and fonts on each test disk. You'll also need pretty serious hardware. One Meg of free RAM and 15M of free disk should be enough. Peter Dibble rochester!dibble dibble@rochester.EDU Date: Tue, 3 Nov 87 21:48:05 est ------------------------------ From: ihnp4!ihwpt!knudsen Subject: C graphics lib in Development System? Keywords: OS9 Level 2, graphics, C As someone has mentioned, the OS9 Level 2 Development System that Tandy sells for $99 includes a library of .R files that are short little subroutines to interface the window graphics functions, much like GFX2 in Basic9. Presumably these just hit StdOut with ESC and the control code byte, followed by your argument values sent hi-byte first. I used the RDUMP on the original C disk (a really NEAT utility, sorta like IDENT for .r files and libes) and sure enough, the names look very graphic, so to speak. But there is NO DOC on any of this, such as number, type, and ordering of call arguments! Has anyone disassembled this stuff enough to tell us what these are? Meanwhile I'm writing my little routines (lots of write(0, &x, 2) calls) but clearly assembler routines (which I hope this libe is) will be faster. Date: Thu, 5 Nov 87 18:38:53 PST ------------------------------ From: rutgers!jade.berkeley.edu!koonce%bosco.Berkeley.EDU Subject: Information I've been trying to follow the COMP.OS.OS9 forum, and noticed a mention at one point of archived programs/digests available. What is available, and how can I get what I may be interested in? Thanks, Tim Koonce Date: Wed, 11 Nov 87 22:08 O ------------------------------ From: ulysses!rutgers!jade.berkeley.edu!jhruokol@finfun.bitnet Subject: machines supported by os9 Dear Sir, I would like to know which are those computers supported by os9 ? Would you be so kind to send me also more information about features of os9 ? I search operating system which run in AT and has real-time -features. What kind of user interface does os9 support ? Can one use windows, menus etc. regards Jari. Date: 16 Nov 87 22:24:26 GMT ------------------------------ From: pete@wlbr.EATON.COM (Pete Lyall) Subject: GIF Standard Keywords: Graphics OS9 Coco3 Standard Organization: Eaton IMSD, Westlake Village, CA As requested, here is a copy of the GIF (Graphics Interchange Format) text as defined and created by CompuServe. It is relatively LONG. ======================================================================= G I F (tm) Graphics Interchange Format (tm) A standard defining a mechanism for the storage and transmission of raster-based graphics information June 15, 1987 (c) CompuServe Incorporated, 1987 All rights reserved While this document is copyrighted, the information contained within is made available for use in computer software without royalties, or licensing restrictions. GIF and 'Graphics Interchange Format' are trademarks of CompuServe, Incorporated. an H&R Block Company 5000 Arlington Centre Blvd. Columbus, Ohio 43220 (614) 457-8600 Page 2 Graphics Interchange Format (GIF) Specification Table of Contents INTRODUCTION . . . . . . . . . . . . . . . . . page 3 GENERAL FILE FORMAT . . . . . . . . . . . . . page 3 GIF SIGNATURE . . . . . . . . . . . . . . . . page 4 SCREEN DESCRIPTOR . . . . . . . . . . . . . . page 4 GLOBAL COLOR MAP . . . . . . . . . . . . . . . page 5 IMAGE DESCRIPTOR . . . . . . . . . . . . . . . page 6 LOCAL COLOR MAP . . . . . . . . . . . . . . . page 7 RASTER DATA . . . . . . . . . . . . . . . . . page 7 GIF TERMINATOR . . . . . . . . . . . . . . . . page 8 GIF EXTENSION BLOCKS . . . . . . . . . . . . . page 8 APPENDIX A - GLOSSARY . . . . . . . . . . . . page 9 APPENDIX B - INTERACTIVE SEQUENCES . . . . . . page 10 APPENDIX C - IMAGE PACKAGING & COMPRESSION . . page 12 APPENDIX D - MULTIPLE IMAGE PROCESSING . . . . page 15 Graphics Interchange Format (GIF) Page 3 Specification INTRODUCTION 'GIF' (tm) is CompuServe's standard for defining generalized color raster images. This 'Graphics Interchange Format' (tm) allows high-quality, high-resolution graphics to be displayed on a variety of graphics hardware and is intended as an exchange and display mechanism for graphics images. The image format described in this document is designed to support current and future image technology and will in addition serve as a basis for future CompuServe graphics products. The main focus of this document is to provide the technical information necessary for a programmer to implement GIF encoders and decoders. As such, some assumptions are made as to terminology relavent to graphics and programming in general. The first section of this document describes the GIF data format and its components and applies to all GIF decoders, either as standalone programs or as part of a communications package. Appendix B is a section relavent to decoders that are part of a communications software package and describes the protocol requirements for entering and exiting GIF mode, and responding to host interrogations. A glossary in Appendix A defines some of the terminology used in this document. Appendix C gives a detailed explanation of how the graphics image itself is packaged as a series of data bytes. Graphics Interchange Format Data Definition GENERAL FILE FORMAT +-----------------------+ | +-------------------+ | | | GIF Signature | | | +-------------------+ | | | Screen Descriptor | | | +-------------------+ | | | Global Color Map | | | +-------------------+ | . . . . . . | +-------------------+ | ---+ | | Image Descriptor | | | | +-------------------+ | | | +-------------------+ | | | | Local Color Map | | |- Repeated 1 to n times | +-------------------+ | | | | Raster Data | | | | +-------------------+ | ---+ . . . . . . |- GIF Terminator -| +-----------------------+ Graphics Interchange Format (GIF) Page 4 Specification GIF SIGNATURE The following GIF Signature identifies the data following as a valid GIF image stream. It consists of the following six characters: G I F 8 7 a The last three characters '87a' may be viewed as a version number for this particular GIF definition and will be used in general as a reference in documents regarding GIF that address any version dependencies. SCREEN DESCRIPTOR The Screen Descriptor describes the overall parameters for all GIF images following. It defines the overall dimensions of the image space or logical screen required, the existance of color mapping information, background screen color, and color depth information. This information is stored in a series of 8-bit bytes as described below. bits 7 6 5 4 3 2 1 0 Byte # +---------------+ | | 1 +-Screen Width -+ Raster width in pixels (LSB first) | | 2 +---------------+ | | 3 +-Screen Height-+ Raster height in pixels (LSB first) | | 4 +-+-----+-+-----+ M = 1, Global color map follows Descriptor |M| cr |0|pixel| 5 cr+1 = # bits of color resolution +-+-----+-+-----+ pixel+1 = # bits/pixel in image | background | 6 background=Color index of screen background +---------------+ (color is defined from the Global color |0 0 0 0 0 0 0 0| 7 map or default map if none specified) +---------------+ The logical screen width and height can both be larger than the physical display. How images larger than the physical display are handled is implementation dependent and can take advantage of hardware characteristics (e.g. Macintosh scrolling windows). Otherwise images can be clipped to the edges of the display. The value of 'pixel' also defines the maximum number of colors within an image. The range of values for 'pixel' is 0 to 7 which represents 1 to 8 bits. This translates to a range of 2 (B & W) to 256 colors. Bit 3 of word 5 is reserved for future definition and must be zero. Graphics Interchange Format (GIF) Page 5 Specification GLOBAL COLOR MAP The Global Color Map is optional but recommended for images where accurate color rendition is desired. The existence of this color map is indicated in the 'M' field of byte 5 of the Screen Descriptor. A color map can also be associated with each image in a GIF file as described later. However this global map will normally be used because of hardware restrictions in equipment available today. In the individual Image Descriptors the 'M' flag will normally be zero. If the Global Color Map is present, it's definition immediately follows the Screen Descriptor. The number of color map entries following a Screen Descriptor is equal to 2**(# bits per pixel), where each entry consists of three byte values representing the relative intensities of red, green and blue respectively. The structure of the Color Map block is: bits 7 6 5 4 3 2 1 0 Byte # +---------------+ | red intensity | 1 Red value for color index 0 +---------------+ |green intensity| 2 Green value for color index 0 +---------------+ | blue intensity| 3 Blue value for color index 0 +---------------+ | red intensity | 4 Red value for color index 1 +---------------+ |green intensity| 5 Green value for color index 1 +---------------+ | blue intensity| 6 Blue value for color index 1 +---------------+ : : (Continues for remaining colors) Each image pixel value received will be displayed according to its closest match with an available color of the display based on this color map. The color components represent a fractional intensity value from none (0) to full (255). White would be represented as (255,255,255), black as (0,0,0) and medium yellow as (180,180,0). For display, if the device supports fewer than 8 bits per color component, the higher order bits of each component are used. In the creation of a GIF color map entry with hardware supporting fewer than 8 bits per component, the component values for the hardware should be converted to the 8-bit format with the following calculation: <map_value> = <component_value>*255/(2**<nbits> -1) This assures accurate translation of colors for all displays. In the cases of creating GIF images from hardware without color palette capability, a fixed palette should be created based on the available display colors for that hardware. If no Global Color Map is indicated, a default color map is generated internally which maps each possible incoming color index to the same hardware color index modulo <n> where <n> is the number of available hardware colors. Graphics Interchange Format (GIF) Page 6 Specification IMAGE DESCRIPTOR The Image Descriptor defines the actual placement and extents of the following image within the space defined in the Screen Descriptor. Also defined are flags to indicate the presence of a local color lookup map, and to define the pixel display sequence. Each Image Descriptor is introduced by an image separator character. The role of the Image Separator is simply to provide a synchronization character to introduce an Image Descriptor. This is desirable if a GIF file happens to contain more than one image. This character is defined as 0x2C hex or ',' (comma). When this character is encountered between images, the Image Descriptor will follow immediately. Any characters encountered between the end of a previous image and the image separator character are to be ignored. This allows future GIF enhancements to be present in newer image formats and yet ignored safely by older software decoders. bits 7 6 5 4 3 2 1 0 Byte # +---------------+ |0 0 1 0 1 1 0 0| 1 ',' - Image separator character +---------------+ | | 2 Start of image in pixels from the +- Image Left -+ left side of the screen (LSB first) | | 3 +---------------+ | | 4 +- Image Top -+ Start of image in pixels from the | | 5 top of the screen (LSB first) +---------------+ | | 6 +- Image Width -+ Width of the image in pixels (LSB first) | | 7 +---------------+ | | 8 +- Image Height-+ Height of the image in pixels (LSB first) | | 9 +-+-+-+-+-+-----+ M=0 - Use global color map, ignore 'pixel' |M|I|0|0|0|pixel| 10 M=1 - Local color map follows, use 'pixel' +-+-+-+-+-+-----+ I=0 - Image formatted in Sequential order I=1 - Image formatted in Interlaced order pixel+1 - # bits per pixel for this image The specifications for the image position and size must be confined to the dimensions defined by the Screen Descriptor. On the other hand it is not necessary that the image fill the entire screen defined. LOCAL COLOR MAP Graphics Interchange Format (GIF) Page 7 Specification A Local Color Map is optional and defined here for future use. If the 'M' bit of byte 10 of the Image Descriptor is set, then a color map follows the Image Descriptor that applies only to the following image. At the end of the image, the color map will revert to that defined after the Screen Descriptor. Note that the 'pixel' field of byte 10 of the Image Descriptor is used only if a Local Color Map is indicated. This defines the parameters not only for the image pixel size, but determines the number of color map entries that follow. The bits per pixel value will also revert to the value specified in the Screen Descriptor when processing of the image is complete. RASTER DATA The format of the actual image is defined as the series of pixel color index values that make up the image. The pixels are stored left to right sequentially for an image row. By default each image row is written sequentially, top to bottom. In the case that the Interlace or 'I' bit is set in byte 10 of the Image Descriptor then the row order of the image display follows a four-pass process in which the image is filled in by widely spaced rows. The first pass writes every 8th row, starting with the top row of the image window. The second pass writes every 8th row starting at the fifth row from the top. The third pass writes every 4th row starting at the third row from the top. The fourth pass completes the image, writing every other row, starting at the second row from the top. A graphic description of this process follows: Image Row Pass 1 Pass 2 Pass 3 Pass 4 Result --------------------------------------------------- 0 **1a** **1a** 1 **4a** **4a** 2 **3a** **3a** 3 **4b** **4b** 4 **2a** **2a** 5 **4c** **4c** 6 **3b** **3b** 7 **4d** **4d** 8 **1b** **1b** 9 **4e** **4e** 10 **3c** **3c** 11 **4f** **4f** 12 **2b** **2b** . . . The image pixel values are processed as a series of color indices which map into the existing color map. The resulting color value from the map is what is actually displayed. This series of pixel indices, the number of which is equal to image-width*image-height pixels, are passed to the GIF image data stream one value per pixel, compressed and packaged according to a version of the LZW compression algorithm as defined in Appendix C. Graphics Interchange Format (GIF) Page 8 Specification GIF TERMINATOR In order to provide a synchronization for the termination of a GIF image file, a GIF decoder will process the end of GIF mode when the character 0x3B hex or ';' is found after an image has been processed. By convention the decoding software will pause and wait for an action indicating that the user is ready to continue. This may be a carriage return entered at the keyboard or a mouse click. For interactive applications this user action must be passed on to the host as a carriage return character so that the host application can continue. The decoding software will then typically leave graphics mode and resume any previous process. GIF EXTENSION BLOCKS To provide for orderly extension of the GIF definition, a mechanism for defining the packaging of extensions within a GIF data stream is necessary. Specific GIF extensions are to be defined and documented by CompuServe in order to provide a controlled enhancement path. GIF Extension Blocks are packaged in a manner similar to that used by the raster data though not compressed. The basic structure is: 7 6 5 4 3 2 1 0 Byte # +---------------+ |0 0 1 0 0 0 0 1| 1 '!' - GIF Extension Block Introducer +---------------+ | function code | 2 Extension function code (0 to 255) +---------------+ ---+ | byte count | | +---------------+ | : : +-- Repeated as many times as necessary |func data bytes| | : : | +---------------+ ---+ . . . . . . +---------------+ |0 0 0 0 0 0 0 0| zero byte count (terminates block) +---------------+ A GIF Extension Block may immediately preceed any Image Descriptor or occur before the GIF Terminator. All GIF decoders must be able to recognize the existence of GIF Extension Blocks and read past them if unable to process the function code. This ensures that older decoders will be able to process extended GIF image files in the future, though without the additional functionality. Graphics Interchange Format (GIF) Page 9 Appendix A - Glossary GLOSSARY Pixel - The smallest picture element of a graphics image. This usually corresponds to a single dot on a graphics screen. Image resolution is typically given in units of pixels. For example a fairly standard graphics screen format is one 320 pixels across and 200 pixels high. Each pixel can appear as one of several colors depending on the capabilities of the graphics hardware. Raster - A horizontal row of pixels representing one line of an image. A typical method of working with images since most hardware is oriented to work most efficiently in this manner. LSB - Least Significant Byte. Refers to a convention for two byte numeric values in which the less significant byte of the value preceeds the more significant byte. This convention is typical on many microcomputers. Color Map - The list of definitions of each color used in a GIF image. These desired colors are converted to available colors through a table which is derived by assigning an incoming color index (from the image) to an output color index (of the hardware). While the color map definitons are specified in a GIF image, the output pixel colors will vary based on the hardware used and its ability to match the defined color. Interlace - The method of displaying a GIF image in which multiple passes are made, outputting raster lines spaced apart to provide a way of visualizing the general content of an entire image before all of the data has been processed. B Protocol - A CompuServe-developed error-correcting file transfer protocol available in the public domain and implemented in CompuServe VIDTEX products. This error checking mechanism will be used in transfers of GIF images for interactive applications. LZW - A sophisticated data compression algorithm based on work done by Lempel-Ziv & Welch which has the feature of very efficient one-pass encoding and decoding. This allows the image to be decompressed and displayed at the same time. The original article from which this technique was adapted is: Terry A. Welch, "A Technique for High Performance Data Compression", IEEE Computer, vol 17 no 6 (June 1984) This basic algorithm is also used in the public domain ARC file compression utilities. The CompuServe adaptation of LZW for GIF is described in Appendix C. Graphics Interchange Format (GIF) Page 10 Appendix B - Interactive Sequences GIF Sequence Exchanges for an Interactive Environment The following sequences are defined for use in mediating control between a GIF sender and GIF receiver over an interactive communications line. These sequences do not apply to applications that involve downloading of static GIF files and are not considered part of a GIF file. GIF CAPABILITIES ENQUIRY The GCE sequence is issued from a host and requests an interactive GIF decoder to return a response message that defines the graphics parameters for the decoder. This involves returning information about available screen sizes, number of bits/color supported and the amount of color detail supported. The escape sequence for the GCE is defined as: ESC [ > 0 g (g is lower case, spaces inserted for clarity) (0x1B 0x5B 0x3E 0x30 0x67) GIF CAPABILITIES RESPONSE The GIF Capabilities Response message is returned by an interactive GIF decoder and defines the decoder's display capabilities for all graphics modes that are supported by the software. Note that this can also include graphics printers as well as a monitor screen. The general format of this message is: #version;protocol{;dev, width, height, color-bits, color-res}... <CR> '#' - GCR identifier character (Number Sign) version - GIF format version number; initially '87a' protocol='0' - No end-to-end protocol supported by decoder Transfer as direct 8-bit data stream. protocol='1' - Can use an error correction protocol to transfer GIF data interactively from the host directly to the display. dev = '0' - Screen parameter set follows dev = '1' - Printer parameter set follows width - Maximum supported display width in pixels height - Maximum supported display height in pixels color-bits - Number of bits per pixel supported. The number of supported colors is therefore 2**color-bits. color-res - Number of bits per color component supported in the hardware color palette. If color-res is '0' then no hardware palette table is available. Note that all values in the GCR are returned as ASCII decimal numbers and the message is terminated by a Carriage Return character. Graphics Interchange Format (GIF) Page 11 Appendix B - Interactive Sequences The following GCR message describes three standard EGA configurations with no printer; the GIF data stream can be processed within an error correcting protocol: #87a;1 ;0,320,200,4,0 ;0,640,200,2,2 ;0,640,350,4,2<CR> ENTER GIF GRAPHICS MODE Two sequences are currently defined to invoke an interactive GIF decoder into action. The only difference between them is that different output media are selected. These sequences are: ESC [ > 1 g Display GIF image on screen (0x1B 0x5B 0x3E 0x31 0x67) ESC [ > 2 g Display image directly to an attached graphics printer. The image may optionally be displayed on the screen as well. (0x1B 0x5B 0x3E 0x32 0x67) Note that the 'g' character terminating each sequence is in lower case. INTERACTIVE ENVIRONMENT The assumed environment for the transmission of GIF image data from an interactive application is a full 8-bit data stream from host to micro. All 256 character codes must be transferrable. The establishing of an 8-bit data path for communications will normally be taken care of by the host application programs. It is however up to the receiving communications programs supporting GIF to be able to receive and pass on all 256 8-bit codes to the GIF decoder software. Graphics Interchange Format (GIF) Page 12 Appendix C - Image Packaging & Compression The Raster Data stream that represents the actual output image can be represented as: 7 6 5 4 3 2 1 0 +---------------+ | code size | +---------------+ ---+ |blok byte count| | +---------------+ | : : +-- Repeated as many times as necessary | data bytes | | : : | +---------------+ ---+ . . . . . . +---------------+ |0 0 0 0 0 0 0 0| zero byte count (terminates data stream) +---------------+ The conversion of the image from a series of pixel values to a transmitted or stored character stream involves several steps. In brief these steps are: 1. Establish the Code Size - Define the number of bits needed to represent the actual data. 2. Compress the Data - Compress the series of image pixels to a series of compression codes. 3. Build a Series of Bytes - Take the set of compression codes and convert to a string of 8-bit bytes. 4. Package the Bytes - Package sets of bytes into blocks preceeded by character counts and output. ESTABLISH CODE SIZE The first byte of the GIF Raster Data stream is a value indicating the minimum number of bits required to represent the set of actual pixel values. Normally this will be the same as the number of color bits. Because of some algorithmic constraints however, black & white images which have one color bit must be indicated as having a code size of 2. This code size value also implies that the compression codes must start out one bit longer. COMPRESSION The LZW algorithm converts a series of data values into a series of codes which may be raw values or a code designating a series of values. Using text characters as an analogy, the output code consists of a character or a code representing a string of characters. Graphics Interchange Format (GIF) Page 13 Appendix C - Image Packaging & Compression The LZW algorithm used in GIF matches algorithmically with the standard LZW algorithm with the following differences: 1. A special Clear code is defined which resets all compression/decompression parameters and tables to a start-up state. The value of this code is 2**<code size>. For example if the code size indicated was 4 (image was 4 bits/pixel) the Clear code value would be 16 (10000 binary). The Clear code can appear at any point in the image data stream and therefore requires the LZW algorithm to process succeeding codes as if a new data stream was starting. Encoders should output a Clear code as the first code of each image data stream. 2. An End of Information code is defined that explicitly indicates the end of the image data stream. LZW processing terminates when this code is encountered. It must be the last code output by the encoder for an image. The value of this code is <Clear code>+1. 3. The first available compression code value is <Clear code>+2. 4. The output codes are of variable length, starting at <code size>+1 bits per code, up to 12 bits per code. This defines a maximum code value of 4095 (hex FFF). Whenever the LZW code value would exceed the current code length, the code length is increased by one. The packing/unpacking of these codes must then be altered to reflect the new code length. BUILD 8-BIT BYTES Because the LZW compression used for GIF creates a series of variable length codes, of between 3 and 12 bits each, these codes must be reformed into a series of 8-bit bytes that will be the characters actually stored or transmitted. This provides additional compression of the image. The codes are formed into a stream of bits as if they were packed right to left and then picked off 8 bits at a time to be output. Assuming a character array of 8 bits per character and using 5 bit codes to be packed, an example layout would be similar to: byte n byte 5 byte 4 byte 3 byte 2 byte 1 +-.....-----+--------+--------+--------+--------+--------+ | and so on |hhhhhggg|ggfffffe|eeeedddd|dcccccbb|bbbaaaaa| +-.....-----+--------+--------+--------+--------+--------+ Note that the physical packing arrangement will change as the number of bits per compression code change but the concept remains the same. PACKAGE THE BYTES Once the bytes have been created, they are grouped into blocks for output by preceeding each block of 0 to 255 bytes with a character count byte. A block with a zero byte count terminates the Raster Data stream for a given image. These blocks are what are actually output for the Graphics Interchange Format (GIF) Page 14 Appendix C - Image Packaging & Compression GIF image. This block format has the side effect of allowing a decoding program the ability to read past the actual image data if necessary by reading block counts and then skipping over the data. Graphics Interchange Format (GIF) Page 15 Appendix D - Multiple Image Processing Since a GIF data stream can contain multiple images, it is necessary to describe processing and display of such a file. Because the image descriptor allows for placement of the image within the logical screen, it is possible to define a sequence of images that may each be a partial screen, but in total fill the entire screen. The guidelines for handling the multiple image situation are: 1. There is no pause between images. Each is processed immediately as seen by the decoder. 2. Each image explicitly overwrites any image already on the screen inside of its window. The only screen clears are at the beginning and end of the GIF image process. See discussion on the GIF terminator. -- Pete Lyall Usenet: {trwrb, scgvaxd, ihnp4, voder, vortex}!wlbr!pete Compuserve: 76703,4230 (OS9 Sysop) OS9 (home): (805)-985-0632 (24hr./1200 baud) Date: 30 Nov 87 07:53:33 GMT ------------------------------ From: Saul <psuvax1!pitt!srbst@cisunx.psu.edu> Subject: termcap & coco LII Organization: University of Pittsburgh Here are my modifications to the termcap. Let's keep on modifying it until it is perfect! # # Tandy CoCo 3 with OS9 Level II and cc3io patched to # make 2 byte screen control codes work. # # note: cm changed so rogue would work # I killed tabs and let the arrows work in vi # coco3|os9LII:\ :am:bs:cl=^L:li#24:co#80:ho=^A:\ :cd=^K:ce=^D:cm=^B%r%+ %+ :\ :do=^J:up=^I:nd=^F:so=\037 :se=\037!:\ :us=\037":ue=\037#:al=\0370:dl=\0371:\ :ku=^L:kd=^J:kr=^I:kl=^H:ta: # -- Saul Bendersky That's me! That's Stuf! University of Pittsburgh (EE) A COCO-nut! UUCP:...!pitt!cisunx!srbst Date: 1 Dec 87 15:58:27 GMT ------------------------------ From: baby!! <rodger@computing.lancaster.ac.uk> Subject: Disc recovery program - PLEASE !! Reply-To: Rodge-baby!! <rutgers!computing.lancaster.ac.uk!rodger> Organization: Department of Computing at Lancaster University, UK. Hey Ho, Small problem, I'm running OS9 (level 1 v1.2) on a microsys CPU07 board -nope thats not the problem :-), I've got a 20 meg hard disk with a fair amount of 'unbacked-up' work on it (yep I know !!), and the disks gone a little flakey - what I'm looking for is a piece of P.D or cheap software that may allow me to salvage some of the files on there. Failing that, some info on the structure I'm likely to encounter if I try and write something myself. (for anyone with similar h/w - its a HDI 01 disk interface for a Western Digital Floppy-Winchester Controller WD1002-5) I'm calling from the U.K. so bear that in mind before you give me the local phone number of your nearest dealer :-) cheers as they are wont to say !! Rodge. -- janet: rodger@uk.ac.lancs.comp Department of Computing arpa: rodger@comp.lancs.ac.uk University of Lancaster uucp: ...!mcvax!ukc!dcl-cs!rodger Bailrigg, Lancaster, LA1 4YR, UK Date: 8 Dec 87 23:08:51 GMT ------------------------------ From: pete%wlbr@etn-wlv.eaton.com (Pete Lyall) Subject: OS9 DEFS Keywords: COCO3 LEVELII OS9 MICROWARE Organization: Eaton IMSD, Westlake Village, CA Here are the files that were left off of the developer's pak disk. They are provided courtesy of Microware, via their forum on Compuserve (GO MSC). Enjoy! Pete Lyall ==================== Cut Here for new SCFDEFS ================== opt -l ttl Sequential File Manager (SCF) Definitions * * Edition History * Date Changes Made by * -------- ---------------------------------------------------- --- * 84/01/11 Added V.KANJI, V.KBUF, V.MODADR for new kanji input * process. Y.O * 85/04/20 Added V.PDLHd Path Descriptor List Head MGH * 85/04/21 Added PD.PLP and PD.PST for modem handling MGH pag * * Static storage requirements * * SCF Devices must reserve this space for SCF org V.USER V.TYPE rmb 1 Device type or parity V.LINE rmb 1 Lines left until end of page V.PAUS rmb 1 Immediate Pause request V.DEV2 rmb 2 Attached device's static V.INTR rmb 1 Interrupt char V.QUIT rmb 1 Quit char V.PCHR rmb 1 Pause char V.ERR rmb 1 Accumulated errors V.XON rmb 1 X-On char V.XOFF rmb 1 X-Off char V.KANJI rmb 1 Kanji mode flag V.KBUF rmb 2 Kana - Kanji convert routine work address V.MODADR rmb 2 Kana - Kanji convert module address V.PDLHd rmb 2 Open path descriptor list head pointer V.RSV rmb 5 Reserve bytes for future expansion V.SCF equ . Total SCF manager static overhead * * Character definitions * C$NULL set 0 Null char C$RPET set $01 (ctl A - SOH) Repeat last input line C$INTR set $03 (ctl C - ETX) Keyboard interrupt C$RPRT set $04 (ctl D - EOT) Reprint current input line C$QUIT set $05 (ctl E - ENQ) Keyboard Abort C$BELL set $07 (ctl G - BEL) Line overflow warning C$BSP set $08 (ctl H - BS ) Back space C$EL set $05 Erase Line C$LF set $0A Line feed C$HOME set $0B Home position Code C$Clsgr set $15 Graphic screen clear (use FM-11) C$Clsall set $16 Graphic & character clear (use FM-11) C$CR set $0D Carriage return C$FORM set $0C (ctl L - FF ) Form Feed ... screen clear C$SI set $0F Shift IN Code C$SO set $0E Shift OUT Code C$XON set $11 (ctl Q - DC1) Transmit Enable C$XOFF set $13 (ctl S - DC3) Transmit Disable C$PAUS set $17 (ctl W - ETB) Pause character C$DEL set $18 (ctl X - CAN) Delete line C$EOF set $1B (ctl [ - ESC) END of file C$RGT set $1C Cursor right C$LFT set $1D Cursor left C$UP set $1E Cursor up C$DWN set $1F Cursor down C$SPAC set $20 Space C$PERD set '. C$COMA set ', pag * * FILE DESCRIPTOR OFFSETS * org PD.FST PD.DV2 rmb 2 OUTPUT DEV TBL PTR PD.RAW rmb 1 READ/WRITE OR RDLIN/WRLIN MODE PD.MAX rmb 2 READLINE HIGH BYTE COUNT PD.MIN rmb 1 DEVICES ARE "MINE" IF CLEAR PD.STS rmb 2 Status routine module addr PD.STM rmb 2 Reserved for Status routine org PD.OPT rmb 1 DEVICE TYPE PD.UPC rmb 1 CASE (0=BOTH, 1=UPPER ONLY) PD.BSO rmb 1 BACKSP (0=BSE, 1=BSE,SP,BSE) PD.DLO rmb 1 DELETE (0=BSE OVER LINE, 1=CRLF) PD.EKO rmb 1 ECHO (0=NO ECHO) PD.ALF rmb 1 AUTOLF (0=NO AUTO LF) PD.NUL rmb 1 END of LINE NULL COUNT PD.PAU rmb 1 PAUSE (0=NO END of PAGE PAUSE) PD.PAG rmb 1 LINES PER PAGE PD.BSP rmb 1 BACKSPACE charACTER PD.DEL rmb 1 DELETE LINE charACTER PD.EOR rmb 1 END of RECORD char (READ ONLY) PD.EOF rmb 1 END of FILE char PD.RPR rmb 1 REPRINT LINE char PD.DUP rmb 1 DUP LAST LINE char PD.PSC rmb 1 PAUSE char PD.INT rmb 1 KBD INTR char (ctl c) PD.QUT rmb 1 KBD QUIT char (ctl q) PD.BSE rmb 1 BACKSPACE ECHO charACTER PD.OVF rmb 1 LINE OVERFLOW char (BELL) PD.PAR rmb 1 PARITY CODE PD.BAU rmb 1 ACIA BAUD RATE (Color Computer) PD.D2P rmb 2 OFFSET of DEV2 name PD.XON rmb 1 ACIA X-ON char PD.XOFF rmb 1 ACIA X-OFF char OPTCNT equ .-PD.OPT Total user settable options PD.ERR rmb 1 Most recent I/O error status PD.TBL rmb 2 Device Table addr (copy) PD.PLP rmb 2 Path Descriptor List Pointer PD.PST rmb 1 Current Path Status * * PD.PST values Path Descriptor Status byte * PST.DCD equ %00000001 Set if DCD is lost on Serial port * * Color code * org 0 Black. rmb 1 Blue. rmb 1 Red. rmb 1 Magenta. rmb 1 Green. rmb 1 Cyan. rmb 1 Yellow. rmb 1 White. rmb 1 opt l ======================== Cut Here for RBF DEFS ======================== opt -l ttl Random Block File Manager Definitions * Modification History * * 82/07/13 PD.Exten added to path descriptor rfd * 82/07/13 PE entries defined rfd * 82/07/15 V.FileHd inserted in drive static rfd * 82/09/10 Level One/ Level two cond added WGP * 82/09/17 Record Lock cond added WGP * 82/09/17 PD.SLE renamed to PD.Creat rfd * 82/09/17 V.DiskID, V.BMapSz, V.MapSct added for smart * multi-sector bitmap searching by rfd * 82/09/20 reserved areas added in static storage. * 83/06/07 Added InDriver flag in PD.SMF. rfd * 83/06/13 Added PE.Req tmp save for PE.Lock rfd * 83/08/08 reserved PD.SToff for Japanese rfd * 83/11/19 Added V.ResBit in drive tables. rfd * 83/12/12 Added PE.Prior to save process priority. rfd * 83/12/13 Added BufBusy bit in state flag (PD.SMF) rfd * 84/07/06 Added Bit Definitions for DD.FMT MGH pag * * Random Block Path Descriptor Format org PD.FST PD.SMF rmb 1 State flags PD.CP rmb 4 Current logical byte position PD.SIZ rmb 4 File size PD.SBL rmb 3 Segment beginning lsn PD.SBP rmb 3 Segment beginning psn PD.SSZ rmb 3 Segment size PD.DSK rmb 2 Disk id PD.DTB rmb 2 Drive table ptr org PD.OPT rmb 1 Device type PD.DRV rmb 1 Drive number PD.STP rmb 1 Step rate PD.TYP rmb 1 Disk device type (5" 8" other) PD.DNS rmb 1 Density capability PD.CYL rmb 2 Number of cylinders PD.SID rmb 1 Number of surfaces PD.VFY rmb 1 0=verify disk writes PD.SCT rmb 2 Default sectors/track PD.T0S rmb 2 Default sectors/track tr00,s0 PD.ILV rmb 1 Sector interleave offset PD.SAS rmb 1 Segment allocation size PD.TFM rmb 1 DMA Transfer Mode PD.Exten rmb 2 Path Extension (PE) for record locking PD.SToff rmb 1 Sector/Track offsets (for "foreign" disk formats) PD.ATT rmb 1 File attributes PD.FD rmb 3 File descriptor psn PD.DFD rmb 3 Directory file descriptor psn PD.DCP rmb 4 File directory entry ptr PD.DVT rmb 2 User readable dev tbl ptr * State Flags BUFMOD equ $01 Buffer modified SINBUF equ $02 Sector in buffer FDBUF equ $04 File descriptor in buffer *EOFSEC equ $08 End of file sector *EOF equ $10 End of file InDriver equ $20 Currently in Disk Driver, or queued BufBusy equ $40 Buffer is currently busy ifne LEVEL-1 * * Random Block Path Extension Format org 0 PE.PE rmb 1 PE path number PE.PDptr rmb 2 back ptr to this PE's Path Descriptor PE.NxFil rmb 2 Drive Open-File list ptr PE.Confl rmb 2 circular File Conflict list PE.Lock rmb 1 Path lockout status PE.LoLck rmb 4 Low Locked Logical addr PE.HiLck rmb 4 High Locked Logical addr PE.Wait rmb 2 PE ptr to (next) locked-out PE PE.TmOut rmb 2 Max ticks to wait for locked segment PE.Owner rmb 1 Process ID of owner of locked segment PE.Req rmb 1 temp for PE.Lock in GAIN when LockSeg fails PE.Prior rmb 1 tmp for process priority while in driver rmb 32-. reserved PE.FilNm rmb 32 temp for filename during directory search * PE.Lock status codes Unlocked equ 0 no portion of file is locked RcdLock equ 1 record from LoLck to HiLck locked FileLock equ 2 entire file locked EofLock equ 4 End of file is locked endc * Device Descriptor Format org 0 DD.TOT rmb 3 Total number of sectors DD.TKS rmb 1 Track size in sectors DD.MAP rmb 2 Number of bytes in allocation bit map DD.BIT rmb 2 Number of sectors/bit DD.DIR rmb 3 Address of root directory fd DD.OWN rmb 2 Owner DD.ATT rmb 1 Attributes DD.DSK rmb 2 Disk id DD.FMT rmb 1 Disk format; density/sides DD.SPT rmb 2 Sectors/track DD.RES rmb 2 Reserved for future use DD.SIZ equ . Device descriptor minimum size DD.BT rmb 3 System bootstrap sector DD.BSZ rmb 2 Size of system bootstrap DD.DAT rmb 5 Creation date DD.NAM rmb 32 Volume name DD.OPT rmb 32 option area * DD.FMT Bit Definitions FMT.SIDE equ %00000001 Single Side=0, Double Side=1 FMT.DNS equ %00000010 Single DNS=0, Double DNS=1 FMT.TDNS equ %00000100 48tpi=0, 96tpi=1 FMT.T0DN equ %00001000 Track 0 DNS, see FMT.DNS * File Descriptor Format org 0 FD.ATT rmb 1 Attributes FD.OWN rmb 2 Owner FD.DAT rmb 5 Date last modified FD.LNK rmb 1 Link count FD.SIZ rmb 4 File size FD.Creat rmb 3 Segment list extension FD.SEG equ . Beginning of segment list * Segment List Entry Format org 0 FDSL.A rmb 3 Segment beginning physical sector number FDSL.B rmb 2 Segment size FDSL.S equ . Segment list entry size FD.LS1 equ FD.SEG+((256-FD.SEG)/FDSL.S-1)*FDSL.S FD.LS2 equ (256/FDSL.S-1)*FDSL.S MINSEC set 16 * Directory Entry Format * org 0 DIR.NM rmb 29 File name DIR.FD rmb 3 File descriptor physical sector number DIR.SZ equ . Diectory record size * * Static Storage * * Overall Disk Static Storage * * Note: This does Not reserve Any memory for Drive Tables * Each Driver is responsible for reserving sufficient * memory for the appropriate number of tables. * org V.USER Reserve required V.NDRV rmb 1 Number of drives rmb 8 reserved DRVBEG equ . Beginning of drive tables * * Global Storage For Disk Drive Tables * Each Table Contains The First 'DD.Siz' Bytes * From Sector 0, And The Current Track, Stepping Rate, * Bit-Map Use Flag, And Disk Type * org 0 rmb DD.SIZ Device descriptor, sector 0 V.TRAK rmb 2 Current track V.BMB rmb 1 Bit-map use flag V.FileHd rmb 2 open file list for this drive V.DiskID rmb 2 Disk ID V.BMapSz rmb 1 Bitmap Size V.MapSct rmb 1 lowest reasonable bitmap sector V.ResBit rmb 1 reserved bitmap sector (for compaction) V.ScTkOf rmb 1 Sector/Track byte (Combined from discriptor) V.ScOfst rmb 1 Sector offset split from byte above V.TkOfst rmb 1 Track offset split from byte above rmb 4 reserved DRVMEM equ . opt l ========================= EOF EOF EOF EOF EOF EOF =================== -- Pete Lyall (OS9 Users Group V.P.) Eaton Corporation (818)-706-5693 Compuserve: 76703,4230 (OS9 Sysop) OS9 (home): (805)-985-0632 (24hr./1200 baud) Usenet: {trwrb,scgvaxd,ihnp4,voder,vortex}!wlbr!pete or pete@wlbr.eaton.com ------------------------------------- The views expressed in OS-9 Discussions are those of the individual authors only. Copies of digests are available by mail request. ------ Moderator: John Daleske cbosgd!cbdkc1!daleske daleske@cbdkc1.ATT.COM Submissions should go to: cbosgd!os9 os9@cbosgd.ATT.COM Comments to the moderator cbosgd!os9-request os9-request@cbosgd.ATT.COM ********************* End of OS-9 Discussions *********************