You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If your system has sufficient storage devices to have a full device table with 14 active ProDOS devices (two for each slot), and you start, then exit A2Desktop, one of the device entries in the device table will be corrupted/damaged preventing access to that device until a reboot.
To Reproduce
Steps to reproduce the behavior:
Boot a system with enough storage devices to have the maximum 14 active ProDOS devices
Start DeskTop
Exit DeskTop
Use any other ProDOS app or program selector that queries or enumerates the device list
Observe that one of the device entries is corrupted (in my case, I got a phantom "Slot 0, Drive 1" device with a volume name of "/" instead of the previously-present "Slot 7, Drive 2" device which was now gone).
Expected behavior
All 14 original devices should be properly restored upon exit from Desktop.
Screenshots
Sorry, I didn't get any screenshots of the error while it was in effect.
System Details (please complete the following information):
System [Platinum Apple //e, with MicroDrive/Turbo having 11 partitions, and Disk II controller]
Other [Mouse, GW8M, Mockingboard, Uthernet II, Super Serial, Grappler Pro, ROMXe, ]
Additional context
The combination of /RAM, two Disk II drive entries, and the 11 MD/T partitions fills the ProDOS device table with 14 entries at startup.
The text was updated successfully, but these errors were encountered:
I traced this to the code in desktop/init.s, lines 202-211, which makes a backup of the existing device list. The device list entries, including the previous byte which contains the device count, are copied to a spare area of RAM, defined as "devlst_backup". In a system with the maximum 14 devices active, this is a total of 15 bytes.
The space to hold the backup, "devlst_backup" is defined in desktop/res.s, lines 940-941, based on the value of kMaxVolumes: devlst_backup: .res kMaxVolumes+1, 0 ; TODO: Why +1?
kMaxVolumes is defined elsewhere as 13 (the maximum # of Volumes that DeskTop will support), so this allocates 14 bytes, but the space needed for a full 14-device backup is 15 bytes as mentioned. That last/15th byte crosses over into the next structure in memory, "device_to_icon_map", where it gets overwritten as DeskTop runs.
When DeskTop exits, the device list is restored from devlst_backup, but if there are 14 devices, the last entry in the list is no longer correct.
Proposed fix: Change desktop/res.s lines 940-941 to:
devlst_backup: .res 15, 0 ; Because there's ALWAYS 14 devices possible + DEVCNT
Or similar. The size of the devlist backup area should be based on the size of the ProDOS structure being backed up, not the # of DeskTop Volumes supported.
Describe the bug
If your system has sufficient storage devices to have a full device table with 14 active ProDOS devices (two for each slot), and you start, then exit A2Desktop, one of the device entries in the device table will be corrupted/damaged preventing access to that device until a reboot.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All 14 original devices should be properly restored upon exit from Desktop.
Screenshots
Sorry, I didn't get any screenshots of the error while it was in effect.
System Details (please complete the following information):
Additional context
The combination of /RAM, two Disk II drive entries, and the 11 MD/T partitions fills the ProDOS device table with 14 entries at startup.
The text was updated successfully, but these errors were encountered: