This repository has been archived by the owner on Jul 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
PROPACK.TXT
478 lines (308 loc) · 16.3 KB
/
PROPACK.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
PRO-PACK(tm) Instruction Manual - February 1992
Copyright (c) 1991,92 Rob Northen Computing, UK
All Rights Reserved
LIST OF CONTENTS
1.0 OVERVIEW
2.0 COMMAND LINE
3.0 COMMANDS
4.0 FILE TYPES
5.0 OPTIONS
6.0 FILE EXTENSION
7.0 FILE SPECIFICATION
8.0 ERROR MESSAGES
9.0 TECHNICAL SUPPORT
1.0 OVERVIEW
PRO-PACK is a sophisticated File Compression Utility written and
designed for programmers. Two methods of compression gives the
programmer the choice of high performance compression or high speed
unpacking.
Besides performance PRO-PACK also features the ability to compress
executable files and uncompress and relocate them automatically in
memory. The design of PRO-PACK caters for the often limited memory
restraints of the program by allowing the packed data to be
restored to its original unpacked state by unpacking in its own
memory space.
The unpack source code provided with PRO-PACK gives the programmer
full control over unpacking. A packed file may be unpacked 'over
itself' or an entirely different part of memory. A separate version
of the unpack code can also be used to validate the integrity of a
packed file before and after it unpacks. By ensuring the unpacker
will not unpack corrupted packed data this will prevent further
memory corruption and a possible system crash.
An important feature of PRO-PACK packed files is their ability to
prevent their unauthorised unpacking. This is achieved by packing
the files with a 16 bit locking key. Unpacking a locked file
without the correct key would be almost impossible.
2.0 COMMAND LINE
PP <command> <file_type> [-|/<option>] [.<ext>] <file(s)>
Parameters may be specified in upper or lower case and must be
separated with at least one space. The parameters must occur in the
command line in the order shown above. Multiple options may occur
in any order. Each option must be preceded with the option
character, either "-" or "/" with an optional space between the
option character and the option. The optional output file extension
must be preceded with the extension character ".". The default
output file extension is "RNC". The file specification may include
the wild card characters "*" and "?".
3.0 COMMANDS
p: PACK
This command is used to create a packed data or executable file
from an unpacked data or executable file.
The original file is not overwritten but a new file is created and
given the file extension "RNC". The original file can be over-
written by using the "-o" option and the file extension of the
output file can be changed with the output file extension parameter
[.<ext>].
A file will not be packed if the packed file would be equal to or
larger than the original unpacked file. You cannot pack a file that
has already been packed.
Example
PP p d *.*
will pack all files in the current directory. The files will be
packed as data.
PP p m -k 0x1234 -o *.*
will pack all files in the current directory. The files expected
are MC68000 executable binary files. A key of 0x1234 (hex) is used
to lock them. All the files will be overwritten by their packed
version.
u: UNPACK
This command is used to restore a packed data or executable file to
its original unpacked state. It is not necessary to specify the
Method of packing used when the file was packed.
A file cannot be unpacked if it was packed and locked using the
lock option "-l".
A file packed and locked with a key using the "-k" option cannot be
unpacked unless the same key is used to unpack it.
NOTE
Unpacking a PC ".EXE" file may not produce an identical copy of
the original file. For example, the MS-DOS file compare utility
"comp" may report some differences when comparing the original
unpacked file with the PRO-PACK unpacked version. These
differences occur only in the files relocation table and do not
make the unpacked version behave or run any differently from
the original version. These differences occur because PRO-PACK
optimises the relocation table when packing a PC .EXE file.
Unpacking an AMIGA file will not restore the symbol or debug
hunks occuring in the original unpacked file. This is because
these hunks do not get written to the packed file.
Example
PP u p *.*
will unpack all files in the current directory. The files expected
are packed PC executable files.
PP u d -k 0x1234 -o *.*
will unpack all files in the current directory. The files expected
are packed data files locked with the key 0x1234. The packed files
will be overwritten with the unpacked version.
v: VERIFY
This command is used to verify the data integrity of a packed data
or executable file. The integrity of the packed and unpacked data
is checked.
Locked files may be verified. Files locked with a key can be
verified providing the same key used to pack them is used to verify
them. Executable files packed with a key do not require a key to
verify them.
Example
PP v s *.*
will verify all files in the current directory. The files expected
are packed Atari ST files.
PP v a -k 0x1234 *.*
will verify all files in the current directory. The files expected
are Amiga files packed with the key 0x1234.
4.0 FILE TYPES
Only one file type may be specified and it must not be omitted. All
files referred to in the file specification must be of the same
file type and the same as the file type parameter.
The file type parameter tells PRO-PACK whether you want to pack a
data or executable file and the format of the file to expect if it
is an executable file. The "-d" file type specifies a data file,
all other file types are executable.
You cannot pack a data file as an executable file.
NOTE
Any type of file (including executable files) may be packed as
data. A packed data file contains only the PRO-PACK header
information plus the actual packed data. Executable files are
packed with a self-extract piece of code added to the file.
This allows them to automatically unpack (and relocate if
necessary) when the file is run.
The current version of PRO-PACK supports the following file types:
d: Data
Specifies the file type to be data, eg. game data, graphic data,
sprite data, music data etc. Any file type can be packed as data.
p: IBM PC
Specifies the file type to be an PC ".EXE" or ".COM" file. You
cannot pack Microsoft Windows or OS/2 executable files.
s: Atari ST
Specifies the file type to be an Atari ST ".TOS" format file.
NOTE
Any debug information occuring at the end of a ".TOS" format
file will be packed with the rest of the file.
a: CBM Amiga
Specifies the file type to be an AmigaDos load file.
NOTE
SYMBOL and DEBUG hunks are not packed and will not appear in
the packed file. Files containing OVERLAY hunks will not be
packed.
m: MC68000
Specifies the file type to be an executable Motorola 68000 binary
file containing 68000 instructions (and probably data). The
execution address of the file is assumed to be the start of the
file. A different execution address may be specified with the "-x"
option.
l: Atari Lynx
Specifies the file type to be an Epyx .BIN type file. The same type
of file produced by the ASM assembler.
5.0 OPTIONS
-k: Lock/Unlock a file using a 16 bit key
This option is used by all the commands to specify a 16 bit key
word. The pack command uses the key to lock the packed file so that
it can only be unpacked using the same key. The unpack and verify
commands must use the key same to unpack or verify the packed file.
At least one space must occur between the "-k" and the key word.
The key may be specified in decimal or hex.
Example
PP p d -k 0x1234 *.*
will pack all files in the current directory using the key
0x1234 (hex). The files expected are data files.
PP u p -k 1234 *.*
will unpack all files in the current directory using the key
1234 (decimal). The files expected are PC files.
PP p s -k -99 *.*
will pack all files in the current directory using the key -99
(decimal). The files expected are Atari ST files.
-l: Lock a packed file
This option is used by the pack command to lock a file after it has
been packed. This prevents the file from being unpacked (but not
verified) by PRO-PACK.
NOTE
Data files packed with this option may be unpacked by the
unpack source code provided in the <source> directory.
Example
PP p d -l *.*
will pack and lock all files in the current directory. The files
will be packed as data.
-m: Method of Packing
This option is used to determine which method of packing is to be
used to pack a file. Method 1 is designed to pack files as small as
possible while method 2 is designed so that unpacking packed files
is as quick as possible. The choice of method is left to the
programmer and will depend largely on the application it is used
in. The default method is 1.
Example
PP p d -m 2 *.*
will pack all files in the current directory using Method 2. The
files will be packed as data.
-o: Overwrite the input file
This option is used by the pack command to overwrite the unpacked
files with the packed version. This option should only be used if
you have a backup of the original unpacked files.
NOTE
If you specify a different output file extension and use the
"-o" option on the same command line then the output file
extension parameter overrides the "-o" option and the unpacked
files will not be overwritten (unless the input file has the
same extension as the output file extension).
-p: specify a different pack block size
This option is used by the pack command to specify the maximum size
block a file will be packed with. This option can be used to 'fine
tune' a packed file to save an extra few bytes in size. The default
pack block size is 0x3000 (hex) bytes.
Example
PP p d -p 0x2800 *.*
will pack all files in the current directory using a pack block
size of 0x2800 (hex) bytes. The files expected are data files.
PP p d -p -1 *.*
will pack all files in the current directory using a pack block
size of -1 (equivalent to 0xFFFFFFFF in hex), ie the file will be
packed using just one block.
NOTE
data files which will be unpacked by the i8088 unpack source
code must not be packed with a pack block size larger than
32752 bytes (0x7FF0 hex).
-v: verify packed data when run
This option is used when packing an executable file. It causes a
version of the unpack code to be written to the packed file which
will test the data integrity of the packed and unpacked data before
the unpacked program is run. If there is a CRC error the program is
aborted.
Example
PP p p -v *.exe
will pack all "EXE" in the current directory. The files expected
are PC files. The integrity of the data will be checked when the
packed version of the file is run.
-x: Execution address
This option is used to specify a different execution address when
packing MC68000 executable binary files using the "-m" file type.
The execution address should be given as a byte offset from the
start of the file. In other words, the absolute execution address
will be the load address of the file plus the offset value
following the "-x". The offset may be given in hex or decimal.
Example
PP p m -x 0x1000 prog.bin
will pack the file MC68000 executable file "prog.bin" and start
execution of the program at the address it is loaded plus 0x1000
(hex).
6.0 FILE EXTENSION
The output file extension is used by the pack and unpack commands
to specify a different file extension from the default extension
"RNC". The file extension must occur on the command line after the
options (if any) and must be preceded with the file extension
character ".".
Example
PP p d .dat *.*
will pack all files in the current directory and give the packed
files the extension ".DAT". The files expected are data files.
7.0 FILE SPECIFICATION
The file specification is used by all commands to indicate which
files to pack, unpack or verify. The file spec. may include one or
more files, including the wild card characters "*" and "?".
Multiple files may be specified separated with a space.
Example
PP p d *.dat
will pack all files in the current directory which have the
extension "DAT". The files will be packed as data.
PACK p d music.dat sprite.dat graphic.dat
will pack the data files "music.dat", "sprite.dat" and
"graphic.dat".
8.0 ERROR MESSAGES
CAN'T PACK FILE
this occurs when you try to pack a file which would result in the
packed file being larger than or equal to the unpacked file.
ALREADY PACKED
this occurs when you try to pack a file that has already been
packed.
PACKED DATA CRC ERROR
this occurs when you verify a packed file and the stored packed
data CRC is different to the calculated CRC, meaning the packed
data has been corrupted.
UNPACKED DATA CRC ERROR
this occurs when you verify a packed file and the unpacked data CRC
is different to the calculated CRC, meaning the packed data when
unpacked would be different to the original unpacked file.
NOT A PACKED FILE
this occurs when you unpack or verify a file that is not a packed
file.
CAN'T PACK OVERLAY HUNK
this occurs when you pack an AMIGA load file which contains an
OVERLAY hunk.
PACKED FILE LOCKED
this occurs when you try to unpack a file that was packed and
locked with the "-l" option.
KEY REQUIRED
this occurs when you try to unpack or verify a packed file which
was locked with a key using the "-k" option and have not supplied a
key to unlock the file.
WRONG KEY
this occurs when you try to unpack or verify a packed file which
was locked with a key using the "-k" option and have not supplied
the right key.
9.0 TECHNICAL SUPPORT
Technical support for PRO-PACK may be obtained from:
Rob Northen
P.O. Box 17
Bordon
Hants
GU35 8DY
England
Tel: +44 0428-713635
Fax: +44 0428-713999