Saturday, 20 January 2018
More of Win Drives and QPAC2 FILES thing and .jpgs
The previous post outlined how the Q60 here at QL Heaven could have its hard drive configuration modified at boot time using a caddy system to swap the drives. The next question to consider is how the system and programs running within it can know which combination of drives had been configured at boot. The answer is the Environment Variables extension. This is LRESPRed in the boot file just before the selected drive configuration is mounted by the boot. As the drives are mounted the environment variable HDTYPE is set to a value that can be checked in a program to findout which Win drives were mounted without having to test each drive individually and trap errors. Below is a little SBASIC snippet of code that pops up a files window for each drive mounted of whichever type. Set up a little icon in launchpad, click on that and there are files windows for all drives. Handy if you cannot exactly remember which drive had that subdirectory you were looking for.
1000 EXEP 'Files';'\DWin1_ \C1,2 \O',"Win1_"
1010 EXEP 'Files';'\DWin2_ \C1,2 \O',"Win2_"
1020 EXEP 'Files';'\DWin3_ \C1,2 \O',"Win3_"
1030 EXEP 'Files';'\DWin4_ \C1,2 \O',"Win4_"
1040 IF (GETENV$("HDTYPE")="ALLWINS")
1050 EXEP 'Files';'\DWin5_ \C3,2 \O',"Win5_"
1060 EXEP 'Files';'\DWin6_ \C3,2 \O',"Win6_"
1070 EXEP 'Files';'\DWin7_ \C3,2 \O',"Win7_"
1080 EXEP 'Files';'\DWin8_ \C3,2 \O',"Win8_"
1090 END IF
1100 IF (GETENV$("HDTYPE")="FAT32")
1110 EXEP 'Files';'\DWin5_ \C3,2 \O',"Win5_"
1120 END IF
The program in action below. There are two screen scrapes below. Both .jpg files created on the Q60. The difference between them is the size of the file - approximately 50k for an identical image. The larger file was created using QTImage while the smaller file was created using cjpeg a small very old utility obtained on a floppy disk from PD library some time in the 1990s.
Finally rereading the QPAC2 documentation revealed that the files thing can filter files as well as sorting them. Selecting the F2 source menu, inputting a source drive such as Win2_and adding an extension, Win2__bas will list only all the files with that extension in the given directory. Sometimes useful for searching out that file hidden in plain sight.
Sunday, 14 January 2018
Boot Menu for Q60 with Multiple Hard Drive Formats
With the latest version of smsq/e the Q60 can handle QXL.win files on FAT32 formatted media and QUBide formatted disks and media as well as its native QWA hard disk format. There are also the options of booting the Q60 in to mode 4 smsq/e or the QDOS classic or Linux. In addition there may be specific configurations of the OS for some jobs. A boot options menu is a define necessity. Below are screen scrapes of QL Heaven's current boot menu showing 3 of the options in operation.
The Q60 for those who do not know comes with an ancient ROMMed version of smsq/e. This is 2.97 if my recollection is correct. The GD2 drivers are not present in this version, so mode 4 and possibly mode 8 colours are only possible. It's not a terribly good version of smsq/e now. Its function is to load a boot file that loads a newer version of smsq/e. That is obvious but with the multiple options for launching the Q60 into action and the at least 4 different incompatible hard disk formats that could be attached to the system there is a problem especially if a CD/DVD is also to be attached. The Q60 has 2 ISA slots which can supply IDE connections giving 4 possible maximum IDE devices. The tower the q60 board exists within has 2 internal 3.5 inch drive bays and 3 external 5&1/4 inch bays.
Mounting hard disks internally caused problems for smsq/e if the appropriate drivers are not loaded.
The answer is a boot menu and a caddy system for the hard disks to mount them in the external 5&1/4 inch bays. As a result the Q60 has a default timeout boot with 4 QWA partitions on the primary hard disk. A second QWA disk with additional partitions can be mounted if that boot option is chosen or a QUBIDE formatted disk instead or a FAT 32 disk with 4 QXL.win files acting as 4 additional partitions.
As an alternative the primary hard disk in it's caddy can be swapped out and replaced if the Q60 is to be booted in to LINUX or QDOS classic.
The trick for this system is to communicate from the boot menu to the reloaded boot file once the new version of smq/e has been loaded as neither boot file or smsq/e has any means of remembering which option had been selected so that the correct drivers are loaded for the current hard drive configuration. How that is done is quite simple and inelegant but functional, the boot file writes a note to itself on the primary hard disk. When it is reloaded it looks for the note that tells it which hard disk configuration has been selected, reads it loads the correct driver and deletes the note.
The Q60 for those who do not know comes with an ancient ROMMed version of smsq/e. This is 2.97 if my recollection is correct. The GD2 drivers are not present in this version, so mode 4 and possibly mode 8 colours are only possible. It's not a terribly good version of smsq/e now. Its function is to load a boot file that loads a newer version of smsq/e. That is obvious but with the multiple options for launching the Q60 into action and the at least 4 different incompatible hard disk formats that could be attached to the system there is a problem especially if a CD/DVD is also to be attached. The Q60 has 2 ISA slots which can supply IDE connections giving 4 possible maximum IDE devices. The tower the q60 board exists within has 2 internal 3.5 inch drive bays and 3 external 5&1/4 inch bays.
Mounting hard disks internally caused problems for smsq/e if the appropriate drivers are not loaded.
The answer is a boot menu and a caddy system for the hard disks to mount them in the external 5&1/4 inch bays. As a result the Q60 has a default timeout boot with 4 QWA partitions on the primary hard disk. A second QWA disk with additional partitions can be mounted if that boot option is chosen or a QUBIDE formatted disk instead or a FAT 32 disk with 4 QXL.win files acting as 4 additional partitions.
As an alternative the primary hard disk in it's caddy can be swapped out and replaced if the Q60 is to be booted in to LINUX or QDOS classic.
The trick for this system is to communicate from the boot menu to the reloaded boot file once the new version of smq/e has been loaded as neither boot file or smsq/e has any means of remembering which option had been selected so that the correct drivers are loaded for the current hard drive configuration. How that is done is quite simple and inelegant but functional, the boot file writes a note to itself on the primary hard disk. When it is reloaded it looks for the note that tells it which hard disk configuration has been selected, reads it loads the correct driver and deletes the note.
Subscribe to:
Posts (Atom)