Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Nagging hardware related question? Post here!
User avatar
grafvonb
Bent Pin Expansion Port
Posts: 80
Joined: Sat Jan 05, 2019 7:54 am
Location: Frankfurt/Germany

Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by grafvonb »

I suppose this question has been asked already but I was not able to find it in the web or here.

So I got this very cool "Sinclair QL Tetroid disk interface with Compact flash card" and want to use it to copy downloaded software e.g. zips to the formatted partitions I created on the card using QubATA commands (win_disk, win_drive etc.).

How to achieve this? Do I need additional windows software (Habi, Qemulator?)?

Many thanks in advance for a step by step instruction or link to a similar source.


Loving QL & ZX Spectrum & Amiga...
User avatar
Chr$
QL Wafer Drive
Posts: 1306
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by Chr$ »

It is a question that comes up all the time and one that I also had to grapple with last year. Perhaps I can save the real experts some bother by answering or at least sharing my experiences...

The Tetroid device contains the QL unzip program on it's default win1_ (I discovered that after setting it up via other time consuming means, so save some time there!) which is a good start.

Have you got a floppy drive attached to the QL and an old PC with a working floppy drive? If so, you can use qemulator to put the zip files on to QL formatted floppies.

You mentioned elsewhere that you have a vDrive. You could download data in mdv format, open them as virtual drives and then copy that data to your win1_. Or you could also use qemulator to put data into an mdv file (not sure if that may require the registered version), then put that on your SD card and associate it with an image etc to copy over to win1_.

Or, something else I was able to do... use the Habi Drive Image program to make an image of the CF card, then 'inject' a ton of zip files into it and write it back to the CF card to use with the Tetroid device. Caution: the default 8GB CF card took me about 5 hours to read on my winXP machine and about 6 hours to write! I'd recommend you use a 512mb CF card and set that up with the Tetroid device (there is a setup program on the device which will enable you to setup a fresh card that will contain the same as the default 8GB card but be much quicker to handle).


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
grafvonb
Bent Pin Expansion Port
Posts: 80
Joined: Sat Jan 05, 2019 7:54 am
Location: Frankfurt/Germany

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by grafvonb »

Wow, tons of ideas, many thanks, I will try to find a solution.
And I thought it would be easy :o...


Loving QL & ZX Spectrum & Amiga...
User avatar
Chr$
QL Wafer Drive
Posts: 1306
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by Chr$ »

It is when you get the hang of it, but it remains forever fiddly (mainly with the exe headers)! It is much easier with the SD card from the vDrive, but that's also fiddly because of the size limitations per mdv image.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by polka »

Last year, I put tetroid CF interface cards in both my QLs. And only now, I begin to master their setup and downloading procedures.
I indeed try to use the two 8Gb CFs that came with them, but also a 1Gb and two 512Mb CFs that I had for my first Canon digital camera.
Actually, I did most experiments with the 1Gb CF.
Downloading all my floppies was rather straitforward, with a dual floppy set directly attached to the Tetroid card.
Then I experimented using the Habi software with a CF interface to my PC (actually, it is a "photobank smartdisk" which has a 75Gb hard disc and slots for CF SD MMC MS and SM chips).
"writing" the whole CF to an image file and "reading" it back to the CF is relatively straitforward (although rather slow : ~45' per Gb)
and very useful !!! I had already to restore my 1Gb chip twice (last time, yesterday) and of course my latest "backup" was not completely up to date.
To transfer all types of files from PC to CF is not so simple and while the Habi software is very useful, it is not well documented and I had to experiment a lot. I will "soon" summarize all my findings in a document that I will make available here.
But there are not only issues with "copying" to and from, there are also "out of memory" problems. Thus, I adopted my own severe partitionning strategy (next post ?) taking in account that with the tetroid card you have "only" a little less than 1Mb RAM, and that each time you "mount" a partition the FAT takes some of it ; and each time some software opens a file it will load into a buffer at least 1 block.

POLKa
Last edited by polka on Mon Feb 03, 2020 7:04 am, edited 2 times in total.


May the FORTH be with you !
POLKa
User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by polka »

The aim of my partitionning strategy is to save as much as possible RAM space.
On the CF card you may set up to 32 partitions. Each partition that you "mount" will load its FAT into RAM, and the size of this FAT is related to the number of its logical blocks, thus on its size and the size of the blocks. But each file that some software will open needs also RAM space for buffering I/O. And besides, the files on the CF chip are stored in whole blocks (so if the block size is 32K and the file only 10 bytes, the file will be stored in one block of 32K).

So what I decided :
I will ever only mount two partitions at the same time : WIN1 and WIN2
I will setup 24 partitions of 40M with 2K blocksize and 8 partitions of 840M with 32K blocksize.
I name the first partition GIRL (were the BOOT resides)
then I will have 5 BOYs, 9 CATs, 9 DOGs of 40M with 2K blocksize
and 8 COWs of 840M with 32K blocksize, which I intend to use only exceptionally (or as "foreign" discs)

Code: Select all

    0 GIRL  46Mb   2Kpb/94Kfat     1 BOY1  40Mb   2Kpb/82Kfat
    2 BOY2  40Mb   2Kpb/82Kfat     3 BOY3  40Mb   2Kpb/82Kfat
    4 BOY4  40Mb   2Kpb/82Kfat     5 BOY5  40Mb   2Kpb/82Kfat
    6 CAT1  41Mb   2Kpb/82Kfat     7 CAT2  40Mb   2Kpb/82Kfat
    8 CAT3  40Mb   2Kpb/82Kfat     9 CAT4  40Mb   2Kpb/82Kfat
   10 CAT5  40Mb   2Kpb/82Kfat    11 CAT6  40Mb   2Kpb/82Kfat
   12 CAT7  40Mb   2Kpb/82Kfat    13 CAT8  40Mb   2Kpb/82Kfat
   14 CAT9  40Mb   2Kpb/82Kfat    15 DOG1  40Mb   2Kpb/82Kfat
   16 DOG2  40Mb   2Kpb/82Kfat    17 DOG3  40Mb   2Kpb/82Kfat
   18 DOG4  40Mb   2Kpb/82Kfat    19 DOG5  40Mb   2Kpb/82Kfat
   20 DOG6  40Mb   2Kpb/82Kfat    21 DOG7  40Mb   2Kpb/82Kfat
   22 DOG8  40Mb   2Kpb/82Kfat    23 DOG9  40Mb   2Kpb/82Kfat
   24 COW1 840Mb  32Kpb/128Kfat   25 COW2 840Mb  32Kpb/128Kfat
   26 COW3 840Mb  32Kpb/128Kfat   27 COW4 840Mb  32Kpb/128Kfat
   28 COW5 840Mb  32Kpb/128Kfat   29 COW6 840Mb  32Kpb/128Kfat
   30 COW7 840Mb  32Kpb/128Kfat   31 COW8 840Mb  32Kpb/128Kfat
You may notice that the GIRL partition is 46M instead of 40. This I computed in order to use all the tracks of the CF chip - for other chips with other geometries, it may be otherwise.

To automate the SETUP process (and avoid mistyping individual commands), I wrote these SuperBasic procedures :

Code: Select all

TK2_EXT:MODE 4:CLS

1  DEF PROC MAKE_PART(Npart,Size,SPB,Name$)
2     WIN_FORMAT 11,SPB
3     WIN_DISK "CREATE",1,Npart,Size
4     WIN_DRIVE 1,1,Npart
5     FORMAT "WIN1_"&Name$
6     WIN_FORMAT 0:DIR WIN1_
7     WIN_CTRL 1,6:WIN_DRIVE -1
8  END DEF MAKE_PART

9  DEF PROC MAKE_GIRL
10    MAKE_PART 1,46,4,"GIRL"
11 END DEF MAKE_GIRL

12 DEF PROC MAKE_BOYS
13    FOR I = 1 TO 5
14       MAKE_PART 1+I,40,4,"BOY"&CHR$(48+I)
15    END FOR I
16 END DEF MAKE_BOYS

17 DEF PROC MAKE_CATS
18    FOR I = 1 TO 9
19       MAKE_PART 6+I,40,4,"CAT"&CHR$(48+I)
20    END FOR I
21 END DEF MAKE_CATS

22 DEF PROC MAKE_DOGS
23    FOR I = 1 TO 9
24       MAKE_PART 15+I,40,4,"DOG"&CHR$(48+I)
25    END FOR I
26 END DEF MAKE_DOGS

27 DEF PROC MAKE_COWS
28    FOR I = 1 TO 8
29       MAKE_PART 24+I,840,8,"COW"&CHR$(48+I)
30    END FOR I
31 END DEF MAKE_COWS

32 DEF PROC GAL(N)
33    WIN_DRIVE -1:WIN_DRIVE 1,1,N+1
34 END DEF GAL

35 DEF PROC PET(N)
36    WIN_DRIVE 2:WIN_DRIVE 2,1,N+1
37 END DEF PET

38 DEF PROC UZ(PZ,PD,ZIP$)
39    GAL PZ:PET PD:EW flp2_UNZIP;"-d WIN2_ WIN1_"&ZIP$&"_zip"
40 END DEF UZ

41 DEF PROC SETUP
42    WIN_DRIVE -1:WIN_FORMAT 1
43    WIN_DISK "SHOW"
44    WIN_DISK "INIT",1
45    WIN_DISK "DETAILS",1
46    MAKE_GIRL:MAKE_BOYS:MAKE_CATS:MAKE_DOGS:MAKE_COWS
47    WIN_DISK "SUMMARY",1
48    COPY flp2_starter1_zip to WIN1_QubATA_STARTER1_ZIP
49    UZ 0,5,"QubATA_STARTER1"
50 END DEF SETUP

SETUP
Beside all the procedures needed to SETUP the 8Gb CF chip, there are two simple procedures :

GAL(n) to mount partition n on WIN1 (and by the way unmount WIN2).
PET(n) to mount partition n on WIN2.

To be noted : for these procedures partition GIRL is number 0 ! I prefer...

POLKa


May the FORTH be with you !
POLKa
User avatar
grafvonb
Bent Pin Expansion Port
Posts: 80
Joined: Sat Jan 05, 2019 7:54 am
Location: Frankfurt/Germany

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by grafvonb »

So I have tried the way proposed by @Chr$ using vDrive and QemuLator and it works, however not so straightforward e.g. I was not able to write/use the MDV image directly on the SD card, I had to copy to HDD first and then mount to QemuLator.

@POLKa, the procedures are great and save lot of time and errors! Thx.


Loving QL & ZX Spectrum & Amiga...
User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by polka »

Hi all,
To this post I attach a pdf file describing my findings for using the Habi Image editor for managing CF chips for my Tetroid interface.
POLKa
man_habi.pdf
use of Habi image manager with CF chips
(74.19 KiB) Downloaded 163 times


May the FORTH be with you !
POLKa
User avatar
Andrew
Aurora
Posts: 795
Joined: Tue Jul 17, 2018 9:10 pm

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by Andrew »

I have a QUBIDE with DOM card (no floppy disk) and I use vDriveQL to transfer files from PC to QL or from QL to QL.
On PC I use QEmulator to write the data to the mdv images, then copy those images to vDriveQL

Another solution: Build Jason's Sinclair QL Network File Server: https://github.com/dandelion-labs/QLAN


User avatar
polka
Trump Card
Posts: 196
Joined: Mon Mar 07, 2011 11:43 am

Re: Transfer data between Windows and QL using CF Card with QL Tetroid disk interface

Post by polka »

Andrew wrote:I have a QUBIDE with DOM card (no floppy disk) and I use vDriveQL to transfer files from PC to QL or from QL to QL.
On PC I use QEmulator to write the data to the mdv images, then copy those images to vDriveQL
All right, but how do you do with files larger than 127Kb ? In QL www archives there are a lot of them.

I have also an old PC with Qemulator, but it has fortunately a 720K floppy drive that Qemulator can use with QL formatted floppies.
And before I got the Tetroid CF interface (that has also a 720Kb QL floppy drive plug), I had a Sandy SuperQboard with a floppy and a centronics plug, and I had saved all my mdvs on 720Kb floppies (the mdv drives of both my QLs still work - with refelted cartridges).

Now I have saved all my floppies (including those that I bouhgt afterward - with files larger than 127Kb) on CF chips. And also some zipped files from "The Distribution" DVD.

I cannot imagine how I could have done it with vdriveQL and no floppy drive ?

POLKa


May the FORTH be with you !
POLKa
Post Reply