In r44603, running the test program with VDrive within a *.d64 disk image yields a working result. The S command correctly reports the number of scratched files for the first run (with FILE1, FILE2 missing) and the second run (with FILE1, FILE2 present). The R command is correctly faulted with "63,FILE EXISTS,00,00", there is not anymore the above mentioned overwrite-on-rename behaviour.Mike wrote:
- With True Drive Emulation OFF and Virtual Device Traps ON, in a PC directory, with FILE1 and FILE2 missing, VDrive errorneously reports "62,FILE NOT FOUND,00,00" for both Scratch commands (should be 01,FILES SCRATCHED,00,00) and writes FILE1 and FILE2. Renaming FILE2 into FILE1 results in FILE2 overwriting FILE1. FILE1 now contains the contents of FILE2, FILE2 is evidently missing and the test program bails out at line 71 with "62, FILE NOT FOUND,00,00".
- With True Drive Emulation OFF and Virtual Device Traps ON, in a PC directory, with FILE1 and FILE2 present, VDrive errorneously reports "01,FILES SCRATCHED,00,00" (should be "01,FILES SCRATCHED,01,00"), and later bails out again at line 71 for the same reasons as above.
- With True Drive Emulation OFF and Virtual Device Traps ON, in a *.d64 disk image, with FILE1 and FILE2 missing, VDrive dies either on the first or second Scratch command: reading the status does not terminate, with a ?STRING TOO LONG error in line 87.
- With True Drive Emulation ON (1541) and Virtual Device Traps OFF, in a *.d64 disk image, with FILE1 and FILE2 missing, VICE correctly reports "01,FILES SCRATCHED,00,00" for both Scratch commands and writes FILE1 and FILE2. Renaming FILE2 into FILE1 is correctly faulted with "63,FILE EXISTS,00,00". Both FILE1 and FILE2 are retained and read and display the expected contents.
- With True Drive Emulation ON (1541) and Virtual Device Traps OFF, in a *.d64 disk image, with FILE1 and FILE2 present, VICE correctly reports "01,FILES SCRATCHED,01,00" for both Scratch commands and writes FILE1 and FILE2. The rest of the program positively continues as expected.
However, somewhat unexpectedly, running the test program with VDrive with a mounted PC directory, the Scratch command incorrectly reports the number of scratched files as 0 with "01,FILES SCRATCHED,00,00" even though the files have been deleted (if they were present), and then stops at the R command with "62,FILE NOT FOUND,00,00" even though both FILE1 and FILE2 are there (having been newly written by the program).
I have filed this as bug #1956 in the VICE tracker.