I have worked out the storage format for the files so repacking the file should be easy as it's a very simple format. The easiest way to describe how the data is stored is with pseudo-code:
Read a byte. If the high bit is set, it's a repeat-run of characters. Negate the value and add 1, then copy the next byte that many times.
If the high bit is NOT set, it's a sequence of characters to copy, so add 1 and copy the next number of bytes directly.
eg. If the file was the following words: $8100 $0234 $5678
$81 has high bit set, negate it and add 1 = $80 bytes to copy. Next byte is $00 so file wants the value $00 repeated $80 times in a row. The next byte is $02, high bit is not set, add 1 = $03. Copy the next $03 bytes, so $34 then $56 then $78.
You would end up with $80 $00's then $34 $56 $78.
Each file I've tested so far seems to be 336 x 200 x 5 planes with no palette stored.
|