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

Host: Weird things can happen if VMU added or removed after host reads and caches mass storage FAT #19

Open
Tails86 opened this issue Nov 27, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Tails86
Copy link
Collaborator

Tails86 commented Nov 27, 2022

When the file system adds or removes a file, it sends UNIT ATTENTION to the host so it knows something changed. Windows, however, does not reread the FAT, even when F5 is pressed. I've found some help in resending UNIT ATTENTION until read of FAT is detected, but it only works once. I haven't confirmed if the host is actually receiving UNIT ATTENTION.

Figure out what needs to be done in order to force Windows to recheck the FAT.

@Tails86 Tails86 added the bug Something isn't working label Nov 27, 2022
@Tails86 Tails86 self-assigned this Nov 27, 2022
@Tails86
Copy link
Collaborator Author

Tails86 commented Dec 25, 2022

There seems to be no reliable way to accomplish this. I don't want to force a disconnect, so it may be best just to always show 8 devices when the drive attaches. Trying to read vmu that is not attached should then cause an error.

@Tails86
Copy link
Collaborator Author

Tails86 commented Dec 26, 2022

It seems like the consensus on stack overflow and other sites that it is bad practice for a mass storage device to modify itself while attached to the host. Seems right to me 😆 I'm changing the purpose of this issue.

@Tails86 Tails86 changed the title Windows does not try to re-pull FAT table after UNIT ATTENTION sent Mass storage device: Present all 8 possible VMUs on connect; make FAT more flexible Dec 26, 2022
@Tails86
Copy link
Collaborator Author

Tails86 commented Dec 26, 2022

Purpose:

  • All 8 possible VMUs to be presented to the host when any memory unit is detected
    • Cause error if attempt is made to read from/write to a VMU which is not connected
  • Allow host to modify the FAT in any way it would like as long as it's only trying to create or modify entries which have the same file name as something already on the file system
    • Internally use the FAT as "truth" in order to determine where to write to
    • Cause error if FAT is modified for a VMU which is not connected
    • Cause error if memory attempts to be written outside of VMU memory range

@Tails86 Tails86 changed the title Mass storage device: Present all 8 possible VMUs on connect; make FAT more flexible Weird things can happen if VMU added or removed after host reads and caches mass storage FAT Dec 26, 2022
@Tails86 Tails86 changed the title Weird things can happen if VMU added or removed after host reads and caches mass storage FAT Host: Weird things can happen if VMU added or removed after host reads and caches mass storage FAT Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant