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