stardot / b-em

An opensource BBC Micro emulator for Win32 and Linux
http://stardot.org.uk/forums/viewtopic.php?f=4&t=10823
GNU General Public License v2.0
112 stars 56 forks source link

VDFS : Hard Reset #187

Closed mark-usher closed 1 year ago

mark-usher commented 1 year ago

When performing a hard reset , VDFS doesn't close open files, reset back to the root directory, or reset the library.

mark-usher commented 1 year ago

Update. Tested the very latest release. open files are being closed and the hard reset does now go back to the root directory, Library is still an issue. It is being reset, but initialisation is not following the same logic as ADFS. Acorn ADFS UG. p. 25 The ADFS enables you to specify one directory as the library. The default library is set up as follows: – If ADFS is entered with a CTRL A BREAK and there is a directory in $ whose name begins with LIB, that directory is set as the library. – If ADFS is entered as above, but there is not a directory whose name begins $.LIB, $ (ie the root directory) is set as the library.

p.64 When ADFS is entered the library directory is set to $, unless there is a directory with name beginning $ . LIB, in which case this latter directory would be allocated as the library. (If there were two or more such directories, they would be ordered alphabetically, and the first one allocated as the library.) A directory will not be retained as the library following a hard break from ADFS unless its name begins $.LIB. A MOUNT operation defines the library to be 'unset' even if there is a directory on the drive with a name starting with LIB. The library directory can only be deleted by first of all reallocating another directory as the library. For example, typing LIB would set $ as the library directory. The 'old' library directory can then be deleted in the usual way.

SteveFosdick commented 1 year ago

Ok, if I read this correctly the bugs are that VDFS is only looking for Lib and not Lib* and that when nothing is found the default should be '$', not unset. VDFS doesn't have the equivalent of ADFS 'F' mode.

I have pushed a fix to https://github.com/stardot/b-em/tree/issue187

mark-usher commented 1 year ago

Yes, that is my understanding of the ADFS documentation also. If you can let me have a Win x64 binary I can test. I haven't been able to get a build environment for Windows working yet. (download link in Wiki https://github.com/stardot/b-em/wiki/Building-on-Windows-using-MinGW is a 404 for the dropbox hosted file).

mark-usher commented 1 year ago

I've been testing some more. It appears that only the Master OS 3.52 behaves in the way described by Acorn. At least under B-Em. The earlier ADFS 1.30, and Master 3.2 / 3.5, only react to LIB and not LIB* and leave Library unset if not found. It could be Acorn wrote this as the intended behaviour and it was a bug not fixed until very late on.

SteveFosdick commented 1 year ago

In that case it may have JGH's hands on. In B-Em MOS 3.50 is the version released by Acorn, 3.52 is the one with JGH's patches, though I don't remember if ADFS was patched. Presumably it must have been if it behaves differently.

I think PanOS uses Library for the library directory rather than Lib so perhaps this fix is related to that, though I think PanOS may select that library directory itself anyway.

SteveFosdick commented 1 year ago

I have created a release with Windows binaries: https://github.com/stardot/b-em/releases/tag/vdfs%23186

mark-usher commented 1 year ago

The Acorn fileserver source code references LIBRARY as the default there. Whether or not that was Library on a network setup or an ADFS disc from an archimedes is not known. Thank you for your efforts to update this. VDFS now at least selects LIB* at initialization.