Technical information
© Jean Louis-Guérin – V1.2a – September 2014 Page 15 / 69
files that belong somewhere else. Or you get “0 files in 0 items” box, making you think everything has
just been erased.
If this happens, reboot immediately; if you write anything to that hard disk, you're going to
damage the directory structure. Your data is probably still out there and still okay. Upon restarting,
go immediately to the offending directory, and try again; if it works this time you were lucky.
Atari has released an "official" 40-folder bug fixer program, called FOLDRXXX. What you do is put this
program in your AUTO folder with the XXX replaced by how many folder slots you'd like to reserve.
For instance, for 100 folders, name the program "FOLDR100.PRG" in the AUTO folder. At boot-up,
FOLDRXXX adds more memory to the folder memory space.
Starting with TOS 1.04 or above Atari has rewritten the GEMDOS and this problem is partially solved:
Memory is used only by open folders and not anymore by touched folders (prior to 1.04 the memory
was not recycled). This means that you are
running out of folder memory less rapidly. But
you can still run out of folders (see the
Discussion of OS Pool for more details).
It seems that TOS 2.X and above definitely fix
the problem (but I have not tested it).
The TOS system does not handle gracefully
running out of folders. The picture shows the
messages displayed by the system when a
program tries to access too many folders.
Several programs/utilities fix the “40-folder bug”. We have already
mentioned the FOLDRXXX.PRG released by Atari but many other
utilities also fix this problem. In particular many Hard Disk driver
provide an option to increase the number of buffers allocated for
folder. The picture on the right shows the option (in general options)
to allocate additional folders with the HDDRIVER hard disk driver.
3.4 TOS Maximum number of files
Depending on the TOS version the maximum number of files and folders for FAT16 (AHDI) partitions
is limited to a maximum of about 32000.
3.5 TOS Maximum number of partitions
It is difficult to find information about this limit in the literature. However it seems that the maximum
number of Hard Disk partitions that can be “installed” (or I should say “mounted”) on a system is 14.
The standard Atari File Selector only goes from letter A to P (2 letters for the floppy disks, and 14
letters for the hard disks). This limitation is clearly indicated in the Atari AHDI 3.00 Release notes (in
the PUN section page 15) where the MAXUNITS parameter is defined as 16 (including floppy drive A:
and B:). It does not seem that new releases of TOS have changed this limit.
Note that this maximum limit is to share for all the connected drive. This also implies also that the
maximum number of partitions for one drive is 14.
With BigDOS the limit is uplifted to 29 (C – Z except U) + 1-6.
With Mint the limit is 23 partitions (C – Z except U).
3.6 Discussion of OS Pool (from Rainbow TOS release notes)
There are internal limits in GEMDOS which programmers and users must understand. In a broad
sense, you should know that these limits have to do with the maximum depth of your hierarchical file
structure (subdirectories), and the number of open files you can have at once. In most cases, users
will never come up against any of these limits.
The limits come into play when you have lots of files open at the same time, and they are deep in
different subdirectory trees. Also, programs which call the operating system function Malloc (memory
allocator) influence these limits: lots of Malloc calls means less space is available for keeping track of
open files and the subdirectories leading up to them.