Page 1 of 1

QEmulator - how to create a directory ?

Posted: Mon Aug 20, 2018 9:47 pm
by Andrew
Using Qemulator - how can i create a directory ?
make_dir command returns "bad name"

Ok, I can create a directory using CueShell, but how can I create a directory from the command line ?

later edit:

What is the maximum number of files in a directory (or on a drive, if no directory is created) ?
What is the maximum number of Level1 directories on a drive ?

Re: QEmulator - how to create a directory ?

Posted: Mon Aug 20, 2018 11:07 pm
by dilwyn
Is it a registered copy of qemulator?

If not - then you can't. Access to directories and level 2 filing system is not available on unregistered copy.

Are you using QXL.WIN filing system? If so, even on registered copies there is no MAKE_DIR command.

Using the native file system, to be able to use the level 2 filing system it has to be activated in the Configuration menu, under Devices tab, by putting a tick inthe box next to "Level 2 file system (subdirectories)"
qlconfiguration.jpg

Re: QEmulator - how to create a directory ?

Posted: Tue Aug 21, 2018 6:59 am
by Andrew
I have a registered copy and the level 2 filing system is activated in the Configuration menu. And still there is no MAKE_DIR command.
The configuration panel is set exactly as in your screenshot.

Re: QEmulator - how to create a directory ?

Posted: Tue Aug 21, 2018 8:02 am
by M68008
Andrew wrote:I have a registered copy and the level 2 filing system is activated in the Configuration menu. And still there is no MAKE_DIR command.
The configuration panel is set exactly as in your screenshot.
Q-emuLator doesn't currently add any keywords of its own, so you only have the keywords defined in the ROMs (main ROM and expansion ROM) you are using and in any toolkit you load.

Searching in the forum, I've found that there is a recent Toolkit II release that includes MAKE_DIR. You can download it from Marcel's web site:
https://www.kilgus.net/2017/03/19/toolk ... he-sequel/

Note the only the native file system driver (a Windows or OS X directory mapped to a MDV slot) supports creating directories.

Re: QEmulator - how to create a directory ?

Posted: Tue Aug 21, 2018 11:21 am
by Andrew
thank you - I will downloas the new TK II and test it

What is the maximum number of directory entries on a .win device ?
What is the maximum number of Level1 directories on a drive ?
is it 112 as it is for Level 2 floppies or 512 as it is for FAT16 ?

The Level 2 Upgrade ROM Manual specifies (for floppies):
- main directory for 112 files (7 sectors)
- depth of directory levels is not restricted
- but complete file and path can not exceed 36 characters

Re: QEmulator - how to create a directory ?

Posted: Wed Aug 22, 2018 4:20 pm
by mk79
Andrew wrote:What is the maximum number of directory entries on a .win device ?
I don‘t think there actually is a limit on „QLWA“-style (=.win) drives.

Marcel

Re: QEmulator - how to create a directory ?

Posted: Wed Aug 22, 2018 4:44 pm
by tofro
mk79 wrote:
Andrew wrote:What is the maximum number of directory entries on a .win device ?
I don‘t think there actually is a limit on „QLWA“-style (=.win) drives.

Marcel
Agreed. I did, however, understand the question to apply to Q-Emulator's "native" file system (that's used when "mounting" a host directory to a microdrive slot) - I would expect the same limits as for the underlying Windows file system exist (which vary between partition types to no limits at all in NTFS and FAT32). Older FAT file systems have a limit on the number of possible root directory entries. Non-root directories have some limits as well, but if I remember right this was somewhere in the 16-bit range. I don't think Q-Emulator imposes any limits on top of this, other than that a QL directory file cannot have more than (2^31-1)/64 entries, which is quite a bit...

Tobias

Re: QEmulator - how to create a directory ?

Posted: Wed Aug 22, 2018 6:42 pm
by Andrew
The question was not regarding QEmulator, but regarding the Sinclair QL + QLSD
QEmulator is limited only by format type of the HDD - actually FAT 32 has a 65,534 files limit (and only if you use 8.3 filenames - the use of long file names can significantly reduce the number of available files and subfolders within a folder) and NTFS has a limit of at least 300k files in a folder without speed penalties, according to MSDN. (The theoretical limit is 4,294,967,295 files, but practically far before reaching the limit the system would be slowed to a halt)

So my question is about Sinclair QL + QLSD.
If the SD is formated FAT 32 then it is possible to have 65,534 files per directory - but this number would be much too large for any file manager to handle on a QL + gold card

(I am asking because I plan to write a simple file manager, as a programming exercise)

QEmulator - how to create a directory ?

Posted: Wed Aug 22, 2018 6:50 pm
by mk79
Andrew wrote:and NTFS has a limit of at least 300k files in a folder without speed penalties
Like FAT QL file systems don’t use any fancy data structures like B-trees, so name search complexity is strictly O(n).
So my question is about Sinclair QL + QLSD.
If the SD is formated FAT 32 then it is possible to have 65,534 files per directory
But QL-SD uses container files in QLWA format that must be located in the first 16 entries of the FAT32 directory.