Home
Name Modified Size InfoDownloads / Week
older versions 2016-08-14
wcrush0.9.zip 2016-08-16 32.1 kB
README.TXT 2016-08-16 4.5 kB
Totals: 3 Items   36.6 kB 0
WHAT THIS IS ALL ABOUT:

Crush for Windows was developed as a replacement for Taboo's crush.exe levelpacker, which unfortunately doesn't work on 64 bit Windows without ugly tricks like using DosBox etc.
The binaries included work on Windows 98SE and Windows 8.1 64 bit, so they should (maybe) work on all Windows versions that came in between (hopefully).


WHY EVEN USE THIS:

No idea, really, as ALZ and Exomizer pack much better, and even Pucrunch beats it. But crush is quite fast and the depacker is easy to understand and thus easy to customize, and can be made pretty tiny, too. Apart from that you might want to use it just for nostalgic reasons if you are one of those guys.


WARNING:

Though I've been using it for about a year now without damaging my PC there may still be some hidden bugs, so use wcrush at your own risk!

This is also the first PC program I wrote after a 20 year hiatus, and the first somewhat complex C(++) program I ever wrote, too, googling every second instruction in the process, so the source code will likely make seasoned C-programmers cringe - read it at your own risk, too!


KNOWN DIFFERENCES TO THE ORIGINAL:

Wcrush is much slower than Crush. Then again, todays PCs are much faster than the ones that were around when the original came out, so the speed difference might not be that notable. Apart from that it should work the same as the original except for a few border cases:

When fed with a 0 byte input file the original will produce a 2 byte output file whereas wcrush will put out a 0 byte file.

When the input file exceeds the allowed maximum size the original will create an empty output file whereas wcrush will not create an output file at all.

When the output file exceeds that size the original will create a 2 byte output file whereas wcrush will not create an output file at all.

I'm inclined to keep wcrush working like this as the output resulting from those cases is unusable anyway, but if those differences break your automated build chain and there's absolutely no way to adapt it to the new behaviour let me know and I'll see what can be done about it.


USAGE:

wcrush [+]<speed> <input file> [output file]

where <speed> must range from 0 (the worst compression) to 6 (the best), and <input file> must be a binary that must not be longer than 65537 bytes. To be depackable the binary must also start with a 2 byte load address (little endian) and contain at least 1 byte of data.

If no output filename is specified the output file will be named "crushed".

A new option the original doesn't have: if the output file gets considerably larger than the input file wcrush can try to repack it with minimum overhead. To enable repacking prefix <speed> with a plus sign (without any spaces in between). In most cases it would be even smarter to not pack the file at all, though, as the depacker will basically act as a terribly oversized memcopy routine on such repacked files.


INCLUDED IN THIS RELEASE:

[CODE/WCRUSH]:
The source code of the packer.

[CODE/DECRUSH]
DECRUSH.TAS is a slightly modified and heavily commented version of the original C64-end depacker by Taboo, that is a bit slower, but fits in the stack up to ca. $1d8 for depacking of extra large files. Does not handle $01, $d030 etc. after depacking, do that in the payload or use the original Taboo depacker instead. Assemble with 64Tass/6502Tass 1.31 or later.

DECRUSH.A is pretty much the same, just with some syntax changes to allow assembling with ACME, another very popular cross-assembler.

For additional information on customizing, assembling and limitations of the depacker see HOWTO.TXT in the same folder.

[CODE/WCA]
The source code of the crushfile analyzer, a tool that prints out how the depacker on the C64 would handle a crushed binary. Numbers in brackets (eg. "(0080:2f)") are the last address(es) and value(s) of the control bytes read between perfoming the previous and the current action. The sole purpose of this hackjob was to compare the outputs of original crush and wcrush to aid my debugging efforts, it is just included for fun.

[win32binaries]
precompiled binaries of WCRUSH and WCA


ADDITIONAL CREDITS AND THANKS:

Taboo for the original crush & decrush.tas
Groepaz/Hitmen for the makefile
Mac Bacon for setting up the SVN repository
stackoverflow.com and cplusplus.com for without those sites I would have been completely lost.


That's all, thanks for reading and have a nice day,

CS.
Source: README.TXT, updated 2016-08-16