Saturday, 10 October 2009

36 or 40?

What is the maximum length of a file name under QDOS or smsq/e? The official answer is 36 characters. I discovered that QLiberator had this embedded in it this afternoon when I tried to link into a compiled program a file with a filename of more than 36 character. When I reduced the length of the file name to 36 character it compiled file. Wait a minute I had a legal file on disk with a name length of more than 36 characters!!  This file could be viewed, edited, copied and moved etc with the QPAC2 files thing! Earlier I was trying to get the length of a few files using the TK2 FLEN function, and guess what, it balked at file names of more than 36 characters although these were seen as legitimate file names by the file thing of QPAC2. Confusing it is but it seems in some circumstances that 40 characters is OK. This gives a file name of 36 characters plus 4 for the primary device : Win1_ or flp1_. But these device names are 5 characters not 4 due to the underscore. That makes the maximum file name length leaving aside the primary device 35 characters not 36. Tell me if this is so. If it is yet another QDOS secret uncovered.

Sunday, 4 October 2009

Hard Disks, QLToday and Tony Tebbie

Some more on hard disks. I came across an article in an old copy of QL Today that I had forgotten about. Volume 10 Issue 2 August/September/October 2005, page 34. The author, Derek Stewart recommends partitioning QWA partitions to 512MB size. This is in contradiction to the standard advice of using no more than 256MB sized partitions. I think he may eventually have to revise his advice as while SMSQ/E will seem to read larger partition sizes the problem lies in the 16 bit limit of the number of files. I have used 512MB hard disk once. It was fine until the space occupied came to more than 256MB then files did not get written to the disk.
Sadly this article from one of the experts perpetuates the myth that you can only get 3 usable QWA partitions from a disk, in fact 4 is possible, just not with makepart_exe.

The latest QL Today is out - hurrah. Its a bit thinner now having shed its English distribution end as it needs to be postable from Austria without being too expensive. There is an extensive and interesting article from Tony Tebbie about the creation of the QL which make you wonder how it was ever functional and why some of us are still fans. Besides this there were 2 interesting listings. Not yet on the QL Toady web site. I am off to find some OCR software as life is too short to type all these things in.

Finally QL Heaven is still hearing about the financial angst between traders. Have the traders helped keep the interest in the QL alive for the rest of us or have they hindered the development of QL Nirvana. Its an interesting question. Some undoubted have been both a help and a major hinderance. For example in the opinion of some, the builders of the Q40, who launched this successor hardware but made continued development  dependent on open source for smsq/e. Yet the originators of the current crazy licence smsq/e licence did the scene no favours either. Almost despite the licence there has been substantial development of smsq/e and in fact it is possible to download the sources, modify if you wish and compile the latest version of smsq/e for any configuration of the QL except for QPC2 (commercial secrets there) for free! Madness!

Tony Tebbie's article has given me the idea of looking back at a few more what ifs. Another promise, if I get the OCR I will post more listings here to sane typing fingers.

Thursday, 1 October 2009

QWA Hard Disk Secrets

One thing that has irritated me is that the MKpart_exe supplied with the Q60 is unable to make more than 4 partitions on a hard disk. As each partition can be a maximum of 256MB this makes for colossal wastage of available hard disk space. The final irritation is that the 4th partition has to be set to the remainder of the disk regardless of the size of the remaining space. If there is more than 256MB left this makes for a dangerous partition for smsq/e which due to the 16bit addressing scheme and 65535 file number limit seriously runs the risk of bad things happening on this partition.

There has been little or no information regarding the format of the QWA partition structure up to now. And there is absolutely no information in the public domain regarding the partition table structure apart from what I am about to tell. Firstly lately this site

has publish detailed information regarding the QWA disk structure of the file.
According to the information I have from reading raw files it is accurate.
Secondly a little rummaging around on the first sector of my Q60 hard disk has revealed this : the partition table of the Q60 is on the first 512 byte sector of the hard disk. No real suprise there. It contains an identifier in the first 4 bytes which is $6002. The remainder of the sector is 0 except for 4 partition table entries. The entries start at position $01C6. Each entry is only 12 bytes long. The type of partition is identified by the first 4 bytes which are 1QWA. The next 4 bytes are the start sector of the partition and the last 4 bytes are the length of the partition in sectors and thats it.

The postion of the partition table is not movable within the sector. The first entry has to commence at $01C6. Table entries are editable with a program such as WinEd and so the last partition with its daft size set by MKpart_exe  can be edited to a maximum of 256MB.

Thats all for now but there is more to come on hard disk partitions.