Here is the awaited general purpose greyscal animator. It should work on both sx and gx. GRYANIM0 - the grey scale animator for 4 shades grey grobs (125x56) GREYSCAL - grey scale viewer, for any # of shades (131x64) ENCODEGG - grey scale encoder, 7 frame --> 3 frame, 3 frame --> 2 frame MAKEGA0 - user rpl program assists in making .GA0 animation grobs MAKEGG - user rpl program assists in making .GG grobs MG .BAT - PC batch for making grey grob frames with TIF2GROB.EXE TIF2GROB.EXE - used by MG.BAT [on Goodies Disk #3. -jkh-] SPOCK .GG - my favorite grey grob, use GREYSCAL, can also be encoded ========================================================================== GRYANIM0: --------- See the discussion at the end for a definition of the data grob format. This program takes 2 args from stack, a data grob and a string. The string is displayed in the softkey area and scrolls to the left. If you don't want any message, just supply a null string. (+) and (-) adjusts the animation speed, message scrolling speed is not affected. Any other key exits. Speed ranges from 0 to 7, 0 is fastest. Initial setting is 3. GREYSCAL: --------- See the discussion at the end for a definition of the data grob format. This is the greyscal viewer posted before, no changes here. It takes either a .GG grey grob or RFU packed grob. RFU is built in and does not have to be present in the machine. SPOCK.GG can be viewed with the greyscal viewer. First try spock as is, then encode it with ENCODEGG and try it again! The greyscal viewer recognizes 2 and 3 frame grobs as encoded. This is a reasonable assumption since fiew grey grobs with 2 or 3 frames exist. This means that a 4 shades of grey (3 frame) must first be encoded with ENCODEGG before it can be viewed with greyscal. ENCODEGG: --------- This program will take a 7 frame (131x64) .GG format grey grob and encode it with 4-2-1 encoding. This is a compression of 57% It also takes a 3 frame and encodes it with 2-1 encoding, for a 33% compression. [ also does 11 frame with 4-4-2-1 encoding, however greyscal cannot display this... I don't think I'll figure out how to display it. ] The greyscal viewer recognizes 2 and 3 frame grobs as encoded. This is a reasonable assumption since fiew grey grobs with 2 or 3 frames exist. This means that a 4 shades of grey (3 frame) must first be encoded with ENCODEGG before it can be viewed with greyscal. MAKEGA0: -------- Requires ENCODEGG in current path. This is a user rpl program that takes regular 131x64 .GG format [4 shades of grey (3 frame)] grey grobs from the stack and combines them into a .GA0 format movie. Put the .GG grobs on the stack in reverse order and then enter the number of grobs (meta). The most straight forward approach would be to use the .GG format to create each slide of the movie. That way you can use GREYSCAL to view each slide as you make it to set the color thresholds. Keeping in mind that only the upper-left 125x56 corner of each slide will be taken into the movie. MAKEGA0 first uses ENCODEGG to encode the 3 frame grob to 2 frames then takes the upper-left 125x56 corner and shifts it right 3 pixels, thereby centering it in the movie. The .GA0 format grob is left on the stack when completed. MAKEGG: ------- This is a user rpl program that combines individual frames into a .GG format grey grob. Each frame must be 131x64. Place the frames on the stack and then enter the number of frames (meta). ======================================================================= Most are allready familiar with the grey grob formats being used. Here is a brief summary. .GG format defined: ------------------- Filename convention for grey grobs end with extension .GG These are multi frame grobs, each frame is 131x64. The first frame begins at y=0, the second at y=64, the third at y=128, etc. So the overall size of the grob is 131x64n where n is # of frames. 7 frames will give you 8 shades if you include the all white case. When the same pixel is on in all the frames, you get the darkest presentation. When making greygrobs, sometimes the order of the frames can help reduce flicker. The greyscal viewer likes to see the frames arranged from lightest to darkest (or darkest to lightest) and then it will interlace the frames when the number is odd. Make every attempt to use odd # frame grey grobs (7,9,11... etc). .GA0 format defined: ------------------- Filename convention for grey animations end with extension .GA0 GA stands for greyscal animation and the 0 is for this version. Future versions will be for different size/#shade animations and will use the numbers 1,2,3... This format could also be known as the memory saving format. These things take a lot of memory so I have developed this scheme to squeeze 16 slides in under 30K of memory. Make more frames if you want, even grey movies are possible if you have enough ram cards! The actual screen size of one slide is 125x56 with 3 blank colums on either side. The grob needs to be 128 wide, however. The three leftmost columns should be left blank because the hp48 hardware will reflect these 3 columns over into the rightmost 3 columns due to the grob being narrower than the screen. This seems awkward but it really does work quite well, and saves a bunch of memory. This is a 4 shades (only) animator. Each grey grob slide needs to be encoded from 3 frames down to 2 frames with the first frame having double 'show' time over the second frame (2-1 encoding). The GA0 grob is 128 pixels wide. slide 1 frame 1 begins at y=0 slide 1 frame 2 begins at y=56 slide 2 frame 1 begins at y=112 slide 2 frame 2 begins at y=168 slide 3 frame 1 begins at y=224 ... etc. So the overall height of the GA0 grob is 112n where n is # of slides. Each slide has 2 frames (128x56 each) which yields 4 enco-shades of grey. Remember, 3 leftmost columns should be blank for an effective width=125. The GA0 animator looks at the overall height to calculate the number of slides in the animation. ========================================================================= Ok, there it is. Hope it is useful. Email: randyd@alpha2.csd.uwm.edu Phone: (414) 762-3383 [home], 764-4342 [messages] Randy.