compression

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
utz
Posts: 27
Joined: Fri Jul 15, 2011 11:06 pm

compression

Post by utz »

Hello again!

Some of you might remember my little music demo made with ZX81 Music Interpreter. Sadly it had only one song, which took up most of the 16k. So for the next one, I'm thinking about stripping away the Music Interpreter's string converter routine and instead load the song data directly as data, which would allow packing. Sadly, I'm unable to find any info about how to do (de)compression on ZX81. Andy Rea mentioned there should be some HRUST depackers - where can I find those? Also, any tips and tricks regarding this subject would be highly appreciated.

Cheers,
-utz
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: compression

Post by Andy Rea »

Hi,

stuff i've found is mostly if not all for zx spectrum / pentagon, however been Z80 can be useful for zx81 also with some tweaking, you'll probably have to disassemble and modify things a little but....

see here http://tcg.speccy.cz/zoom/soft.html for some links to compression routines

Also Bobs maybe of some help, i'm sure he uses a decomprssor for Miner Man and Boulder Logic.

Regards Andy

EDIT this is most interesting if you cross assemble http://tcg.speccy.cz/zoom/files/chrust-1.0.1.tar.gz
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
bobs
Posts: 325
Joined: Thu Aug 27, 2009 10:49 pm
Location: UK
Contact:

Re: compression

Post by bobs »

Yup, guilty as charged - but why not try to get the most out of the humble 16K - whether it be game levels or music? How else do you think I managed to get 48 levels into Miner Man? ;D

In both my Spectrum and ZX81 games I use puCrunch - http://www.cs.tut.fi/~albert/Dev/pucrunch/. It's not the very best compressor out there, but it does a pretty great job and is fast and the decompressor is small (~256 bytes). I think the code is on that site, but if not drop me a PM and I'll sort you out a copy of the decompressor.

It does use the IX & IY registers though which aren't particularly safe to use on the '81, and so I always switch to fast mode during the decompression so those registers can be used, and also obviously to make it as quick as possible.
utz
Posts: 27
Joined: Fri Jul 15, 2011 11:06 pm

Re: compression

Post by utz »

Thanks guys for your replies!
Andy Rea wrote:stuff i've found is mostly if not all for zx spectrum / pentagon, however been Z80 can be useful for zx81 also with some tweaking, you'll probably have to disassemble and modify things a little but....
arrgh, i was already suspecting that would be the answer i'd get. so, no easy way around, i guess. well, i've used some of these compressors for speccy before, so hopefully i can find my way around.

Bobs, thanks for that link, it's a pretty interesting read even though I don't understand even half of it ;) anyway, managed to find the z80 decompressor on archive.org, so i'll see what i can do with it. btw why are you taking such a defensive stance - is compression somehow frowned upon in the zx81 scene? i think it'd be most logical to use it, considering these ram limitations.

Btw don't expect any quick results from me - i have a couple of other projects running, namely trying to get my TI82 working again. surely i'll have more questions later on, though ;)

cheers,
-utz
User avatar
yerzmyey
Posts: 1240
Joined: Thu May 15, 2008 10:11 am
Location: Rubber Planet
Contact:

Re: compression

Post by yerzmyey »

Haha, I can see they make demos for the platform. :)

PS: aaah, but mostly for TI-89 (Motorola) not the one with Z80?
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: compression

Post by Andy Rea »

you might also want to try contacting Matthew Westcott (Gasman) over on the WOS forums http://www.worldofspectrum.org/forums/member.php?u=1160 i'm sure i read somewhere that he's done a fair bit of tinkering with compression / decompression routines all in the name of squeezing much demo-tasic-goodness into minimal memory :D

I believe Yerzmyey is good friends with Matt so could perhaps put a word in about your needs

Also you may find some useful stuff over at TI-calc...

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
User avatar
yerzmyey
Posts: 1240
Joined: Thu May 15, 2008 10:11 am
Location: Rubber Planet
Contact:

Re: compression

Post by yerzmyey »

Yupp, if it's required, I can forward any letters. :)
IN NIHILUM REVERTERIS - a big text-adventure game for ZX81: http://tiny.pl/g2m6m
"MONOCHROME" issue 5 - (Spring 2014) free paper/PDF magazine about ZX81: http://tiny.pl/q2m44
ZX81 COMPETITIONS 2007/2009: http://zx81.republika.pl/
utz
Posts: 27
Joined: Fri Jul 15, 2011 11:06 pm

Re: compression

Post by utz »

Yeah, not terribly much going on in the TI82 scene lately, even though it's a pretty good machine imo. There are a couple of beeper demos for the next model (TI83) on LFT's site (linusakesson.net), if anybody is interested. Luckily TI-calc is still online, many other sites are gone already. Strangely enough there are two native depackers available for the TI82, but none for the Zeddy. :o

Already did some reading on Gasman's site, his Bitbuster version might indeed be useful.
Post Reply