[hatari-devel] GEMDOS HD emulation broken?

Eero Tamminen eerot at users.berlios.de
Sat Jan 9 01:50:21 CET 2010


Hi,

On Thursday 31 December 2009, Eero Tamminen wrote:
> I think I'm just going to truncate it to first 8 chars of the basename +
> extension.  If you really want to use Hatari on file system that contains
> long file names, you should use MiNT.
>
> Attached is a patch that does this, but the problem is that if anything
> else is done to the name except straight truncation (like I now do),
> Hatari doesn't find the file when the TOS asks for it.  It would need
> changes also to the filename matching code (of which is a separate
> version for Windows which somebody else needs to code, I can look only to
> the Unix version).

Attached is a first patch supporting both more sophisticated truncation and
then matching the GEMDOS names back to longer names.   Completely new
feature is that the code converts invalid GEMDOS file name characters
to "_".  If there's no exact (case insensitive) match, it will try to do
pattern matching.  First match will be used.

Could you give the patch a quick try to see what other things it breaks
/ need fixing?


I got rid of glob()ing completely and used opendir() / readdir() + GEMDOS
style pattern matching.  Btw. If Windows supports opendir/readdir (better
than it supports glob()), then Hatari GEMDOS emulation will work better
otherwise with that change too.

I think the code is now also slightly more readable.


	- Eero

Note: Matching the truncated names isn't and won't be optimized.  It's there
mainly just to make things still work although Hatari gemdos dir would have
some couple of extra files/dirs with too long names.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gemdos-long-filenames.diff
Type: text/x-diff
Size: 17284 bytes
Desc: not available
URL: <https://lists.berlios.de/pipermail/hatari-devel/attachments/20100109/67546628/attachment.diff>


More information about the hatari-devel mailing list