File Headers and loss of information
Posted: Fri Dec 17, 2010 12:13 am
I am sure the emulator authors will put me right if I get any of this information incorrect.
[Rob is it worth making this a sticky?]
The QL uses the file header to store extra information about files, mainly the dataspace to be set aside when a program is executed (see information on SEXEC command in the user manual).
Normally, if you unzip a QL file direct onto the PC using a PC unzip program (such as WinZip), the file header information is stripped off.
However, the emulators get around this in various ways.
a) QLAY and QL2K all store a secondary file for executable programs, when you use SEXEC within the emulator to save a file to the PC's hard disk. The secondary file contains the information normally found within the header. The tools provided for copying QL floppy disks to the hard disk also do this.
b) QPC2 does nothing with the information so far as I am aware and it is lost if you save a file to DOSx_ drive. However, as QPC2 normally stores all of its files within its own hard disk container (qxl.win), this should not be an issue as the qxl.win format provides for file headers as if you were using a QL.
c) Q-emuLator adds the necessary information to the start of the file before it is stored on the PC hard disk and strips it off when the program or file is loaded into the emulator. This works whether you use SEXEC, or COPY from a QL floppy disk (or image). Q-emuLator can also use qxl.win files (as with QPC2).
So the moral is this, if you are sent a zip file containing QL programs (or download it from one of the websites), then you always MUST unzip it from within an emulator. If you use Winzip (or similar on the PC or MAC), then you will lose any header information and will need to add it back to the executable files with SEXEC.
The requisite unzip files are available from the Sinclair QL Homepage
Hope this is useful.
[Rob is it worth making this a sticky?]
The QL uses the file header to store extra information about files, mainly the dataspace to be set aside when a program is executed (see information on SEXEC command in the user manual).
Normally, if you unzip a QL file direct onto the PC using a PC unzip program (such as WinZip), the file header information is stripped off.
However, the emulators get around this in various ways.
a) QLAY and QL2K all store a secondary file for executable programs, when you use SEXEC within the emulator to save a file to the PC's hard disk. The secondary file contains the information normally found within the header. The tools provided for copying QL floppy disks to the hard disk also do this.
b) QPC2 does nothing with the information so far as I am aware and it is lost if you save a file to DOSx_ drive. However, as QPC2 normally stores all of its files within its own hard disk container (qxl.win), this should not be an issue as the qxl.win format provides for file headers as if you were using a QL.
c) Q-emuLator adds the necessary information to the start of the file before it is stored on the PC hard disk and strips it off when the program or file is loaded into the emulator. This works whether you use SEXEC, or COPY from a QL floppy disk (or image). Q-emuLator can also use qxl.win files (as with QPC2).
So the moral is this, if you are sent a zip file containing QL programs (or download it from one of the websites), then you always MUST unzip it from within an emulator. If you use Winzip (or similar on the PC or MAC), then you will lose any header information and will need to add it back to the executable files with SEXEC.
The requisite unzip files are available from the Sinclair QL Homepage
Hope this is useful.