Omnimaga

Calculator Community => TI Calculators => General Calculator Help => Topic started by: nemo on July 05, 2010, 09:51:32 pm

Title: Pucrunch compression
Post by: nemo on July 05, 2010, 09:51:32 pm
Can someone link me to a website that explains it, or take the liberty to type out how it works? i've heard of some people talking about it and using it in games and i'm curious as to how pucrunch works. I heard it's a mix of RLE and another compression.
Title: Re: Pucrunch compression
Post by: BuckeyeDude on July 05, 2010, 09:56:04 pm
http://www.cs.tut.fi/~albert/Dev/pucrunch/ (http://www.cs.tut.fi/~albert/Dev/pucrunch/)
and for the gameboy z80 decompression routine:
http://www.cs.tut.fi/~albert/Dev/pucrunch/uncrunch-z80.asm (http://www.cs.tut.fi/~albert/Dev/pucrunch/uncrunch-z80.asm)

Its a pretty good compression method for the calc or anything with limited resources.

Title: Re: Pucrunch compression
Post by: nemo on July 05, 2010, 09:59:30 pm
buckeye, can it be done in BASIC or Axe? or is it suited more to z80 asm?
Title: Re: Pucrunch compression
Post by: thepenguin77 on July 05, 2010, 10:38:08 pm
I would assume that basic is out of the question. But axe is definitely do-able.

You should also check out, LZ77 (http://en.wikipedia.org/wiki/LZ77_and_LZ78), I didn't read the whole pucrunch article, but LZ77 seems a lot easier to do. I used it in Z-Rox and it cut the program from 15k to 7k. It cut the pictures from 13k to 5k. It also does RLE natively.
Title: Re: Pucrunch compression
Post by: Builderboy on July 06, 2010, 01:11:45 am
That LZ77 looks interesting, ill have to see if i can get the hang of it, it looks like it might be very useful.
Title: Re: Pucrunch compression
Post by: Lionel Debroux on July 06, 2010, 01:28:10 am
pucrunch forms the basis of the de-facto standard for compression on TI-68k calculators, ttpack (PPG). And it's LGPL'ed.
For best performance, write the decompression routine in ASM. Samuel Stearley did two versions of the decompression routine in 68000 assembly: the fast one is around 80 KB/sec and between 500 and 600 bytes, and the small one is <~30 KB/sec and between 200 and 300 bytes.
Title: Re: Pucrunch compression
Post by: ztrumpet on July 06, 2010, 12:07:17 pm
LZ77 looks pretty cool.  I'll have to remember to try it sometime. ;D