The attached test program tries to open a file (itself) using each secondary address in the range 2-14. A green letter is printed if it works and the first byte returned is correct. A red letter is printed if READST returns Device Not Present (immediately after OPEN and CHKIN). (A yellow letter is printed if READST succeeds but the wrong byte is returned, but this doesn't happen).
On a real 1541-II, all letters are green. In vice, with true drive emulation, four of them are red (for both 1541, 1541-II and 1571). Without true drive emulation, all letters are green.
Yes, this was difficult to track down, and for the longest time I thought the trouble was due to some bug in my own application. =)
Forgot to specify: I've only tested this using the Linux version of vice.
works as expected IF virtual device traps are disabled
I concur. Feel free to close the issue.
i have put the test program here: https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/vdrive/sa-check/
and i'm leaving the bug open... its clearly a bug with the virtual drive stuff .)
I have tested it with the following command lines:
x64sc -warp -drive8type 1541 -8 secondary_test.d64 -drive8truedrive
x64sc -warp -drive8type 1541 -8 secondary_test.d64 +drive8truedrive -virtualdev8
x64sc -warp -drive8type 1541 -8 secondary_test.d64 +drive8truedrive -iecdevice8
and it works on all 3.
Keep in mind, v3.5 had a major rewrite of vdrive so I think that resolved it.