Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysterious case error in DirAsDsk (WINDOWS) #1568

Open
uniskie opened this issue Dec 10, 2023 · 4 comments
Open

Mysterious case error in DirAsDsk (WINDOWS) #1568

uniskie opened this issue Dec 10, 2023 · 4 comments

Comments

@uniskie
Copy link

uniskie commented Dec 10, 2023

This is a problem with the Windows version of OpenMSX.

When using DirAsDsk, I save the file in lower case, but if there is a file name with upper case letters, an error continues to occur.
(If you remount it with DirAsDsk, the error will disappear.)

  1. I wonder why it is saved in lower case. Files brought from Real MSX are in uppercase.

  2. Why does OpenMSX keep giving error messages even though there are no problems with the Windows file system?

image

@MBilderbeek
Copy link
Member

Hi,

Thanks for reporting.

We use lower case, because it looks much better on the host system. (Who likes SCREAMING NAMES?)

Can you be a bit more clear on the scenario on how to reproduce this? So which steps (from a blank directory onwards) are you taking to trigger this situation?

@uniskie
Copy link
Author

uniskie commented Dec 11, 2023

Thanks for the reply.
I am always grateful for your help.

Due to a problem with the translation software, the explanation did not seem to come across well.

Operations on empty directories are not a problem.
The problem occurs when overwriting a file copied from an actual MSX disk. (Only when using DirAsDsk)

I will explain it step by step.

Steps:

  1. Copy the files in the 2DD Floppy DIsk for MSX (or contents of dsk file) to the directory on Windows.
  2. Make sure that the file names of the files you copied from the MSX disk are in uppercase.
  3. Mount the copied directory on Windows using DirAsDsk in OpenMSX. (Use Catapult's Disk Drives or console's dska or dskb)
  4. Overwrites a file that already exists on DiskDrive with the same name from OpenMSX emulation.
  5. Every time I perform a disk operation, I get the error "Couldm't add (filename): (filename) already exists".
  6. Also confirm that the overwriting of the file was actually successful.
    (It will be easier to understand if you change the content to be saved.)

Additional notes:

  • Remounting the directory will eliminate the error.
  • No error occurs if the file name on host is lowercase.
  • Files visible from MSX may multiply into two.
    1. the file name on the host is lower case
    2. mounted with DirAsDsk
    3. rewrite the file name to upper case from the host PC during mounting
    4. execute files or dir command on msx.
    5. Sometimes it appears as if there are two files from MSX emulation, even though there is only one file on the host.
  • I think these problems occurs in OpenMSX for Windows (MS-DOS series).

About upper and lowercase letters:

This is just my opinion, but if you implement Directory as a DSK as an extension of MSX emulation, I think it would be more natural to capitalize it to match MSX.
This is because if you copy a file from 2DD for MSX, it will be in uppercase.

I think there is a difference of opinion between working with actual equipment and not working with it.

However, the more important issue is that I keep getting inappropriate error messages.

@MBilderbeek
Copy link
Member

I tried this, please let me know whether it's the correct scenario:

  1. I create a folder test
  2. I copy a file with uppercase letters in it, e.g. KINK.BAS
  3. I start openMSX with this folder and confirm it shows up in MSX-BASIC when I execute the FILES command
  4. I type in MSX-BASIC: save kink.bas (to save an empty program on top of it).
  5. I execute FILES again, but I still only see KINK.BAS, which is now empty. On the host OS, I also see one file, upper case KINK.BAS

Is this the correct scenario, or did I misunderstand? If it's the correct scenario, you see that I cannot reproduce the problem, alas.

I also did an extra test:

  1. on the host, I renamed KINK.BAS to kink.bas
  2. I executed FILES again in MSX-BASIC and it still shows only one time KINK.BAS and on the host it also still shows kink.bas.
    So also this problem I cannot reproduce.

I am not using Windows, but Linux. Maybe it's different. Also, I'm using the latest development build.

@uniskie
Copy link
Author

uniskie commented Dec 12, 2023

Thank you for testing.

The version and operating procedure are correct,
This probably does not occur on Linux.

This phenomenon is considered to be Windows-specific.

(I suppose that if you had multiple files on Linux that differed only in case, MSX would have a problem distinguishing between them, but that would be a different issue. But that's a different issue.)

It does not occur when using DSK images, only when using DirAsDsk.

This is an imaginary scenario, but it could be that the case-sensitivity in the process of comparing the internal file list with the filenames of the host files is causing the error to be displayed.

I am not sure if this is relevant,
There is also a problem with the language locale of the HOST PC not being converted properly when using DirAsDsk. (In Japanese, multi-byte characters are garbled.)

DirAsDsk is a very useful feature that I use all the time. It's a great feature that I can't do without.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants