Login
Back to forumSee the full topicGo to last reply

Posted By

Mad
on 2021-01-24
09:16:34
 Re: Decrunching from ROM help...

Biggest problem is most probably that almost all the decrunchers use selfmodifying code.. Perhaps someone knows one which doesn't..

Even if it is not a big help. You could write an own cruncher.. Mainly it's just replicating the last built memory or adding some literals.. I know it's not a big help, but here is the internal layout of a "stb" called compressor.. Seems like it has almost same performance like .tar packers.

The compressed stream is a sequence of the following tokens:

TYPE BYTE SEQUENCE
[dict] 00000100 yyyyyyyy yyyyyyyy yyyyyyyy xxxxxxxx xxxxxxxx
[END] 00000101 11111010
[dict] 00000110 yyyyyyyy yyyyyyyy yyyyyyyy xxxxxxxx
[literals] 00000111 zzzzzzzz zzzzzzzz
[literals] 00001zzz zzzzzzzz
[dict] 00010yyy yyyyyyyy yyyyyyyy xxxxxxxx xxxxxxxx
[dict] 00011yyy yyyyyyyy yyyyyyyy xxxxxxxx
[literals] 001zzzzz
[dict] 01yyyyyy yyyyyyyy xxxxxxxx
[dict] 1xxxxxxx yyyyyyyy

xxxxxxxx: match length - 1
yyyyyyyy: backwards distance - 1
zzzzzzzz: num literals - 1, followed by the literal bytes

Actually it seems the only thing you need to build a cruncher decruncher (lz77 like) is

a backwards distance and a match length.. And some tokens for literals..

Sorry for this senseless post crock, but personally I would try to just build a simple cruncher from zero in this case I think.. If there is some ROM cruncher already out there then this post here is nonsense of course..

edit: stb scheme is mostly for larger amounts of data. For 64k at least a better/simpler scheme would be needed.



Back to top


Copyright © Plus/4 World Team, 2001-2024