Anything QL Software or Programming Related.
tcat
Super Gold Card
Posts: 633 Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic
Post
by tcat » Tue Feb 11, 2020 4:08 pm
Hi,
I am toying with an old source to `unzip/infozip' ver. 5.0p1, me modified to display extra fields. I am dumping info on an executable in `foo_zip' created under `QDOS'.
I am getting this
Code: Select all
$ ./zipinfo -v ~/mdv1/foo_zip myexec_exe
.....
32-bit CRC value (hex): d6420d7b
compressed size: 17357 bytes
uncompressed size: 36220 bytes
length of filename: 12 characters
length of extra field: 76 bytes
length of file comment: 0 characters
disk number on which file begins: disk 0
apparent file type: binary
Unix file attributes (100777 octal): -rwxrwxrwx
MS-DOS file attributes (00 hex): none
offset of local header from start of archive: 116 (00000074h) bytes
Code: Select all
There is an unknown extra field size: 76
fb4a <=== a QDOS magic
0048 <=== size that follows 72 dec
QDOS <=== QDOS type as string
65003230 <==== what long field is this????
====> 64 byte QDOS header dump
00 00 8d 7c 00 01 00 00 0c 00 00 00 00 00 00 0c 6d 64 6f 75 62 6c 65 72 5f 65 78 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6d d3 2d 8f 00 02 00 00
There is no file comment.
I wish to know what is that extra long field `65003230' (or `30320065' in big endian)????
Many thanks.
Tomas
M68008
Trump Card
Posts: 224 Joined: Sat Jan 29, 2011 1:55 am
Contact:
Post
by M68008 » Tue Feb 11, 2020 5:49 pm
tcat wrote:
I wish to know what is that extra long field `65003230' (or `30320065' in big endian)????
That's still part of the QDOS identifier, for a total of 8 bytes.
The first 6 bytes are "QDOS02".
Not sure if the 0065 has a meaning or is just padding.
tcat
Super Gold Card
Posts: 633 Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic
Post
by tcat » Tue Feb 11, 2020 6:41 pm
QDOS02
Ah, does 02 stands for QDOS version number?
$0065, could it mean 02A, `A' as revision?
Tom
M68008
Trump Card
Posts: 224 Joined: Sat Jan 29, 2011 1:55 am
Contact:
Post
by M68008 » Tue Feb 11, 2020 6:47 pm
Looking at the sources, they strcpy "QDOS02", so the next 0 is the null terminator and the 65 can be ignored.
I assume 02 is a version.
tcat
Super Gold Card
Posts: 633 Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic
Post
by tcat » Tue Feb 11, 2020 6:53 pm
Ah, thanks, now I see as well.
Code: Select all
zip.h:#define LONGID "QDOS02"
zipup.c: strcpy(local_qe->longid, LONGID);
tcat
Super Gold Card
Posts: 633 Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic
Post
by tcat » Tue Feb 11, 2020 7:55 pm
Not sure if useful, I can now process zips created on `QDOS' showing 64-byte headers when set for file type 1.
Example: `gstqlassembler.zip' package, containing GST Assembler, with two executables ASM, and ED.
Code: Select all
pi@raspberrypi:/usr/src/unz50p1 $ ./zipinfo -H gstqlassembler
asm
00 00 47 9a 00 01 00 00 20 00 00 00 00 00 00 0d 67 73 74 5f 71 6c 61 73 6d 5f 61 73 6d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 2f 83 ca 00 01 a6 33
boot
clone
ed
00 00 53 e4 00 01 00 00 0f a0 00 00 00 00 00 0c 67 73 74 5f 71 6c 61 73 6d 5f 65 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 2f 83 ca 00 01 a6 37
install
library.asm
library.in
qdos1.in
qdos2.in
tcat
Super Gold Card
Posts: 633 Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic
Post
by tcat » Sun Feb 23, 2020 6:47 pm
Option -T added, it just extends file listing (-1 option) with QDOS type and dataspace next to a filename
Code: Select all
pi@raspberrypi:/usr/src/unz50p1 $ ./zipinfo -T gstqlassembler[.zip]
asm type: 1, space: 8192
boot
clone
ed type: 1, space: 4000
install
library.asm
library.in
qdos1.in
qdos2.in
Option -H now puts out only 14-byte header hex digit dump, useful for piping through to `mkhdr' utility, that creates binary header, with .hdr suffix. This header can be used when transporting binaries over serial line to the QL.
Code: Select all
pi@raspberrypi:/usr/src/unz50p1 $ ./zipinfo -H gstqlassembler
asm 00 00 47 9a 00 01 00 00 20 00 00 00 00 00
boot
clone
ed 00 00 53 e4 00 01 00 00 0f a0 00 00 00 00
install
library.asm
library.in
qdos1.in
qdos2.in
Code: Select all
pi@raspberrypi:/usr/src/unz50p1 $ ./zipinfo -H gstqlassembler[.zip] asm | mkhdr
pi@raspberrypi:/usr/src/unz50p1 $ hd asm.hdr
00000000 00 00 47 9a 00 01 00 00 20 00 00 00 00 00 |..G..... .....|
0000000e