Newsgroups: comp.sys.apple2 Path: blue.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!math.ohio-state.edu!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!news.duke.edu!concert!hearst.acc.Virginia.EDU!murdoch!Hopper.itc.Virginia.EDU!rbraun From: rbraun@Hopper.ITC.Virginia.EDU (Rolf Braun) Subject: Re: PaintWorks Animation Format - 12 byte chunk only Message-ID: Sender: usenet@murdoch.acc.Virginia.EDU Organization: University of Virginia X-Newsreader: TIN [version 1.2 PL2] References: <94228.001134KCR103@psuvm.psu.edu> Date: Sat, 20 Aug 1994 15:31:27 GMT Lines: 39 Ken Richardson (KCR103@psuvm.psu.edu) wrote: : Sometime between yesterday and today a little gremlin stole my : May/June copy of GS+ with the FLI convert info. I need to : know the 12 byte chunk of the PaintWorks Animation file that : contains the length, speed etc. Thanks. Ken It seems I kinda know the format on this one...although it was never officially defined... At the start of the file is 32,768 bytes of screen data, including palettes and SCBs. At offset $8000 (32,768), there is a longword giving the length of the file minus $8008 (32,776). Then, there is a word containing the delay between frames in ticks. The next word was not officially defined, and you should ignore it when reading a file, and store a $000C in it when writing a file. The next longword was also undefined, and you should ignore it when reading, and store a duplicate of the length-minus-32,776 longword when writing. After that, there is the animation data block, which consists of pairs of words. The first word in a pair is an offset into screen memory, and the second word is a word value to store there. A zero in the offset word marks the end of a frame. This is stupid, because the first byte of screen memory can't be modified! To play back an animation, load the screen data into screen memory, copy the length and speed data into local storage, and then process the animation data block. When you come to a zero offset word, do an appropriate delay, and go to the next frame. There is no end-of-file value, so keep track of the length longword, subtract 4 from it, and you have the length of the animation data block. If there are inaccuracies in this posting, I apologize. Also, the format was not officially defined, so be careful, and never look at the undefined fields. I'd like to thank Greg Templeman for the format info. - Rolf Braun - Apple IIgs Programmer - Sassy Software - Internet e-mail: rbraun@hopper.itc.virginia.edu