Re: [hatari-devel] Max amount of GEMDOS HD file handles? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
I pushed increase to 64 GEMDOS HD handles.
On 28.7.2023 20.45, Thomas Huth wrote:
> Am Thu, 27 Jul 2023 21:06:09 +0300
> schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
>> I'm asking because I came across program needing more than 32 GEMDOS HD
>> handles.
>
> Wow, which program was this?
It was with ScummVM "Illusions" game engine, that currently supports
only single game:
https://wiki.scummvm.org/index.php?title=Illusions
I.e. something ported from elsewhere, instead of originating on Atari.
> And do you know how many handles it needs?
32 was too little, 64 was enough (to start it).
Note: Miro's ScummVM Atari version includes over fifty game engines [1],
and only one of them had this issue.
[1] Upstream supports more engines:
https://wiki.scummvm.org/index.php?title=Engines
On 27.7.2023 22.22, Roger Burrows wrote:
This raises an interesting issue. TOS and EmuTOS allow up to 75 non-standard
handles (6-80 inclusive). Hatari uses 64-95 for its GEMDOS handles. So it's
possible to have different files open on different drives (one GEMDOS and one
non-GEMDOS), with the same handle.
It is of course extrememly unlikely that this will happen, but it could (I have
a test program if anyone needs one to verify). If it *does* happen, I assume
that I/O to the non-GEMDOS file will quietly be routed by Hatari to the GEMDOS
file.
Yes, that's likely.
To be safe, the GEMDOS handles *should* start at 81 or higher.
I do not think I've run into another program using more than *32*
handles (+ few standard ones) within last ~20 years, except with some
(buggy) GEMDOS test program.
I..e bumping into some real program using more than 64 handles, seems
fairly theoretical under plain TOS.
Most likely setup triggering that issue would be:
* MiNT kernel build with Helmut's OLDTOSFS (which allows use of GEMDOS
HD emulation under MiNT), and * user running multiple programs having
lot of files open on non-GEMDOS HD drives.
Base is not going to be changed though, because it could regress things
for Atari original programs (I vaguely remember some actually having
problems with larger file handles).
As there are already several other niche gotchas for GEMDOS HD usage:
https://hatari.tuxfamily.org/doc/manual.html#GEMDOS_based_hard_drive_emulation
I've just added this to the list:
https://git.tuxfamily.org/hatari/hatari.git/commit/
- Eero