home *** CD-ROM | disk | FTP | other *** search
- Hello ppl,
-
- Here is a small ass-routine to decode packed STAD-pictures to 32k-
- (screenformat) pictures and to encode 32k-pictures to STAD-pics.
- Some remarks on STAD:
- STAD till version 1.2+ doesn't pack the pictures in the best way. Such
- stored pictures will shrink (10-1000 Bytes) by encoding and later decoding
- with my routine. The new files are absolutly compatible to the old ones
- (the old Stad-Versions <=1.2+ could read them too!).
- STAD 1.3+ doesn't make this "error" anymore, but sometimes there is an
- error in the 2nd Byte of the compressed pictures (to see in the 2nd line
- of the pictures to the left)
- Since i don't use STAD, I will be glad to get some more hints/infos.
- (adress is at the end of this doc)
-
-
- Decode STAD-pictures:
- =====================
- The routine assumes, that the packed STAD-pic is already in memory. You
- have to specify a destination-adress to write the uncompressed picture to
- (32000 Bytes length) - e.g. the screen-adress. Both adresses are passed
- via the stack to the routine. A return code is in the register D0. A zero
- means "everything ok", a 1 means "this is not a packed STAD-picture".
- The error 1 can in some very special (in fact only constructed) cases
- occure on STAD-pictures: The compression-algorithm used by STAD "compresses"
- the picture in the worst case to a 32507 Bytes length picture. STAD
- recognizes this of course and stores the 32k picture "as is" (not packed).
- In such a case it is clearly that you can't unpack the picture.....
- The decode-algorith takes about 0.2 - 0.3 sec. to decode a STAD-picture.
-
- ...it should also be possible to call the routine by other languages. The
- routine returns by an RTS and leaves both 32-Bit-Values at the stack (a la
- TRAP..). The routine needs following params:
-
- (sp) returnadress for RTS
- 4(sp) adress of the packed STAD-Bildes
- 8(sp) adress of the destination-buffer (Length 32000 Bytes)
- (Odd adresses are allowed.)
-
-
-
- Packing 32k-Pictures:
- =====================
- The routine assumes, that the original 32k-pic is already in memory (e.g.
- in the screen-memory). The routine needs a buffer of 32507 Bytes (see the
- section "decode" for details). If the packed picture is greater than 32000
- Bytes then the original picture is copied to the buffer. The return value
- in register D0 is the length of the compressed picture - if the length is
- 32000 then the picture is not compressed, but copied.
- The pack-routine takes about 0.9 - 1.3 sec.
-
- Calls (see also explanation in the "decode"-section): Stack:
- (sp) returen adress for RTS
- 4(sp) adress of the unpacked 32k-pic
- 8(sp) buffer (destination) of the packed STAD-Pic.
- (Length min.32507 bytes)
-
-
-
- Demo-programs:
- ==============
- Some people still have problems to use assembler-routines from another
- programming-language. This archive should contain a demo-program for
-
- GfA-Basic V3.5 (folder GFABASIC)
- Turbo C V2.0 (or Pure C) (folder TURBO_C)
- MAXON Pascal V1.5 (folder MAXONPAS)
-
- The programs are all the same. Please read the extra READMEs inside the
- folders for special notes about the assembler-source. Every folder contains
- his on *.S assembler-source files.
-
-
-
-
-
- By the way...
-
- This package is public-domain. Everyone may (and should) it copy, use
- and give it to friends. The distribution is only allowed as COMPLETE(!)
- package (include ALL files - also the READMEs).
- If someone corrects or changes anything on this programm I would be
- glad if he/she drops me a note (and perhaps sends me the new version).
-
-
- Wolfgang Ley e-mail to:
- Teichstraße 9 or Ley@rz.tu-clausthal.de
- W-3392 Clausthal-Zellerfeld bwwl@ibm.rz.tu-clausthal.de
- (Germany) bwwl@sun.rz.tu-clausthal.de
- Phone: Germany - 05323/82132
-
-
- ...some changes in the module 'tostad' were made by
-
- Jens Dittmer
- Rosenstraße 10
- 3000 Braunschweig (thanks a lot)
-
- please refer to the history at the beginning of the assembler-source for
- details about changes...
-
-