Windows long file names and MSX-DOS2 _FFIRST and _FFNEXT

Page 1/2
| 2

By msd

Paragon (1456)

msd's picture

18-04-2021, 14:19

I noticed a while ago that if I try to do xdir on my SD card (fat16) it always end with some error. like Invalid path name , or invalid attributes. I developed my own tool back in the day which more or less gives the same errors as xdir. No matter what I try in the code it doesn't seem to skip all the crap entries (suspected caused by long file names). the dos dir and cd commands seems unaffected by this issue. It seems it only effects directories. All tools that try to search through the directory trees give errors.

Anybody experience the same issues?

Login or register to post comments

By Jipe

Paragon (1461)

Jipe's picture

18-04-2021, 16:00

do you know Long File Name Killer ?

https://www.vector.co.jp/soft/other/msx/se184251.html

By msd

Paragon (1456)

msd's picture

18-04-2021, 16:11

Jipe wrote:

do you know Long File Name Killer ?

https://www.vector.co.jp/soft/other/msx/se184251.html

Kind seem to find a working download there. But I'm also not sure if I should use this with fat16

By msd

Paragon (1456)

msd's picture

18-04-2021, 20:19

Found the link. this is inside the code
if (isfat16){
fputs("Error:FAT16 is not supported.",stderr);

By gdx

Enlighted (4284)

gdx's picture

19-04-2021, 02:44

Try MSX ROM Librarian. It's very useful for the ROM files.

https://www.msx.org/news/en/msx-rom-librarian-released

By msd

Paragon (1456)

msd's picture

19-04-2021, 11:58

Quote:

Try MSX ROM Librarian. It's very useful for the ROM files.

https://www.msx.org/news/en/msx-rom-librarian-released

How is this related?

By sdsnatcher73

Paragon (1746)

sdsnatcher73's picture

19-04-2021, 12:07

ROM Librarian can rename identified rom files to either long name or short name. Big smile Big smile

By Grauw

Ascended (9767)

Grauw's picture

19-04-2021, 12:50

msd wrote:

Found the link. this is inside the code

if (isfat16){
		fputs("Error:FAT16 is not supported.",stderr);

So I don’t think it is related to _FFIRST and _FFNEXT then? If the tool must do a FAT16 check I assume it bypasses the OS and accesses the sectors directly, interpreting the FAT12 data by itself. I don’t know why it would do a FAT16 check otherwise.

msd wrote:

No matter what I try in the code it doesn't seem to skip all the crap entries (suspected caused by long file names).

Long file name entries have the volume, system, hidden and read-only bits set (a normally not occurring combination), so they are only returned if these are explicitly requested.

By sdsnatcher73

Paragon (1746)

sdsnatcher73's picture

19-04-2021, 12:45

It is indirectly related in the way that it is a helpful tool for making sure you don’t have LFNs.

By Grauw

Ascended (9767)

Grauw's picture

19-04-2021, 12:52

I wasn’t replying to gdx or your comments. Added quotes now. Smile

By msd

Paragon (1456)

msd's picture

19-04-2021, 12:55

@grauw: After some more testing I'm starting to believe it has more to do with the fat16 implementation. I tried to copy some files from fat16 to ramdisk. It just stopped after 4 files. There where >100 files in the source directory.

Quote:

Long file name entries have the volume, system, hidden and read-only bits set (a normally not occurring combination), so they are only returned if these are explicitly requested.

In my own code I only ask for files and directories. _FNEXT returns FIBS with valid attributes but with an invalid file name.

Page 1/2
| 2