Format Of QXL.WIN File

QXL.WIN  

(Adapted from information on Austrian QL group's website)

 
Format of QXL.WIN file
 
QLWA Disk Drive Structure Keys (Tony Tebby source code)
Main header of device 
+00  long  "QLWA" 
+04  word  lenth device name 
+06  20 bytes ASCII  device name 
+1A  word  0000 ? 
+1C  word  random number 
+1E  word  access counter 
+20  word  0000 ? 
+22  word  number of sectors (512 bytes) in cluster (4 => 2048 bytes) 
+24  3 x word  0000 0000 0000 ? 
+2A  word  total sectors (1) 
+2C  word  free sectors (1) 
+2E  word  formatted sectors (1) 
+30  word  0001 ? 
+32  word  pointer to first free cluster (2) 
+34  word  pointer to main directory (2) 
+36  long  lenth of main directory +header 
+3A  3 x word  0000 0000 0000 ? 
+40  words  linked cluster pointer map (3) 
 
 

(1) virtual values if device > 33 MB 

(2) if cluster = 2048 bytes (h800) then pointer x h800 => adress 

(3) Linked cluster pointer map: 

+0040 word pointer to next cluster or 0000 if end 

+0042 word pointer to next cluster or 0000 if end 

... 

+xxxx word same until all clusters are pointed 

 

Example reading main directory (win about 20M): 

+0022: 0004 ----> cluster = h800 

+0034: 001A ----> x800 = adress hD000 = DIR 

now look at (001A x 2 + h40 = 0074) if 0000 then main directory has no more cluster else for example: 

+0074: 1939 ----> x800 = adress hC9C800 more entries 

now look at (1939 x 2 + h40 = 32B2) 

+32B2: 2605 ----> x800 = adress h01302800 still entries 

now look at (2605 x 2 + h40 = 4C4A) 

+4C4A: 0000 no more cluster: end of main directory 

 

Structure of directories: 
DIR+00  64 bytes (h40)  space for header (not used) 
DIR+40+00  long  lenth of file (+header) 
DIR+40+04  word  filetype (0=data, 1=exe-file, h00FF=subdirectory) 
DIR+40+06  word  generally 0000 sometimes 0318 
DIR+40+08  word  dataspace if exe-file else 0000 
DIR+40+0A  word  generally 0000 sometimes 0318 if exe-file ? 
DIR+40+0C  word  0000 ? 
DIR+40+0E  word  file name lenth 
DIR+40+10  36 bytes ASCII  file name 
DIR+40+34  long  date or 0000 0000 if subdir 
DIR+40+38  word  overwrite counter ? 
DIR+40+3A  word  pointer to first file cluster (4) 
DIR+40+3C  2 x word  0000 0000 ? 
 
 

(4) Structure of file: 

FILE+00 64 (h40) bytes of space for not used header (onely in the first cluster of file) 

FILE+40 h7C0 bytes of data 

then search next adress through clusterpointer: see example 

adress+00 h800 bytes of data 

until pointer = 0000 

 

 

  Tony Tebby source code:

;In der Regel gilt hier QXL.WIN = SCSI

; QLWA  Disk Drive Structure Keys
qwa_id      equ    $0000    ; long  ID
qwa.id      equ    'QLWA'
qwa_name    equ    $0004    ; string up to 20 characters space padded name
qwa_spr0    equ    $001a    ; 2 bytes spare - set to zero
qwa_uchk    equ    $001c    ; long  update check (removable media only)
qwa_intl    equ    $0020    ; word  interleave factor (0 SCSI)
qwa_sctg    equ    $0022    ; word  sectors per group
qwa_sctt    equ    $0024    ; word  sectors per track (0 SCSI)
qwa_trkc    equ    $0026    ; word  tracks per cylinder (number of heads) (0 SCSI)
qwa_cyld    equ    $0028    ; word  cylinders per drive
qwa_ngrp    equ    $002a    ; word  number of groups
qwa_fgrp    equ    $002c    ; word  number of free groups
qwa_sctm    equ    $002e    ; word  sectors per map
qwa_nmap    equ    $0030    ; word  number of maps
qwa_free    equ    $0032    ; word  first free group
qwa_root    equ    $0034    ; word  root directory number
qwa_rlen    equ    $0036    ; long  root directory length
qwa_fcyl    equ    $003a    ; word  first cylinder number (ST506)
qwa_fsct    equ    $003a    ; long  first sector for this partition (SCSI)
qwa_park    equ    $003e    ; word  park cylinder
qwa_gmap    equ    $0040    ; group map: each entry is number of next group or zero

; So, ich dachte das könnte noch interessant sein... vor allem vielleicht auch die "offiziellen" Namen der Speicherstellen zu wissen.

; File-header structure
hdr_flen    equ    $00    ; long    File LENgth
hdr_accs    equ    $04    ; byte    access control byte
hdr_type    equ    $05    ; byte    file TYPE
hdrt.exe    equ      1    ; executable
hdrt.rel    equ      2    ; relocatable
hdrt.ldr    equ      3    ; loader re-locatable file
hdrt.dir    equ    $ff    ; directory
hdr_info    equ    $06    ; 8*bytes additional information
hdr_data    equ    $06    ; long    program DATA space
hdr_xtra    equ    $0a    ; long    extra info
hdr_name    equ    $0e    ; string  file name (up to 36 characters long)
hdr.nmln    equ     36
hdr_date    equ    $34    ; long    update date
hdr_vers    equ    $38    ; word    version number
hdr_flid    equ    $3a    ; word    File ID
hdr_bkup    equ    $3c    ; long    backup date
hdr_end     equ    $40    ; end of header

; nun, das war's

Return to File Formats page | Return to Documents Index | Return to the home page. | Go to Downloads Index