QEmulator - how to create a directory ?

Helpful tips and guides, also new users can ask for help here.
Post Reply
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

QEmulator - how to create a directory ?

Post 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 ?


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: QEmulator - how to create a directory ?

Post 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


User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: QEmulator - how to create a directory ?

Post 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.


User avatar
M68008
Trump Card
Posts: 223
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: QEmulator - how to create a directory ?

Post 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.


User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: QEmulator - how to create a directory ?

Post 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


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QEmulator - how to create a directory ?

Post 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


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: QEmulator - how to create a directory ?

Post 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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: QEmulator - how to create a directory ?

Post 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)


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

QEmulator - how to create a directory ?

Post 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.


Post Reply