Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe

Search found 5 matches

by binarymaster
Wed Apr 05, 2017 9:54 pm
Forum: Compressed files and methods
Topic: Help with SQX files from KGB / Conspiracy
Replies: 7
Views: 3473

Re: Help with SQX files from KGB / Conspiracy

Finally, the universal HSQ / SQX decompressor is done! Big thanks goes to -=CHE@TER=- who helped a lot with disassembling the original unpacker code from KGB game :keke: https://www.extractor.ru/ipb/index.php?showtopic=8767 I converted disassembly to Delphi code, and now it works excellent! Attached...
by binarymaster
Tue Feb 28, 2017 9:36 am
Forum: Compressed files and methods
Topic: Help with SQX files from KGB / Conspiracy
Replies: 7
Views: 3473

Re: Help with SQX files from KGB / Conspiracy

I've implemented a decompression program, however the SQX-1 algorithm is still not finished.
The decompressed data at first looks good, but only for few bytes.

Attached a program source with test files (compressed and decompressed - ripped from game memory, running in DOSBox).
by binarymaster
Thu Oct 20, 2016 1:33 am
Forum: Compressed files and methods
Topic: Help with SQX files from KGB / Conspiracy
Replies: 7
Views: 3473

Re: Help with SQX files from KGB / Conspiracy

Value at offset 5 specifies how many bits are used in counter. Examples: val = 3: 3 bits for count, 13 bits for offset val = 4: 4 bits for count, 12 bits for offset etc. In SQX-0 algorithm the first bit is checked for zero. Other logic is same as HSQ except variable bits for count/offset. SQX-1 has ...
by binarymaster
Wed Oct 19, 2016 10:21 pm
Forum: Compressed files and methods
Topic: Help with SQX files from KGB / Conspiracy
Replies: 7
Views: 3473

Re: Help with SQX files from KGB / Conspiracy

Also one interesting thing, according to the game files, there are different types of SQX depending on byte at offset 3.

Default queue bits are:
HSQ: 0xFF
SQX-0: 0x00
SQX-1: 0x55
SQX-2: 0xFF
by binarymaster
Wed Oct 19, 2016 8:59 pm
Forum: Compressed files and methods
Topic: Help with SQX files from KGB / Conspiracy
Replies: 7
Views: 3473

Re: Help with SQX files from KGB / Conspiracy

* Both formats have a six byte header, however SQX's is different. * HSQ uses a checksum of 0xAB, which is calculated by adding the first six bytes of the header, to perform decompression. From what it looks like, SQX doesn't use a checksum. * Both formats use at least 18-byte chunks, a two-byte he...