Petrov DOS FS v. 1.14 (C) Petrov Software Several years ago I wrote a program allowing you to read and write 360K PC disks on a BBC B+. Several times I corrected some bugs, made improvements until I got access to an Archimedes. Now I have stopped future development of the code because I failed to get any money for it. You can freely distribute the DOS FS as *SHAREWARE*. If you like it and pay me a small registration fee I will return to development of the program and you'll get free upgrades. If not, you may use the DOS FS only two weeks. Below is short description of the DOS filing system: Before you begin to work with the DOS FS you'll need to do the following: 1) Check that the disk was formatted under DOS: it MUST have EXACTLY two sectors per cluster, 512 bytes per sector and 12 bits per FAT entry (for example standard 360K/720K format). Disks formatted under some later version of DOS have one sector per cluster. You can still use these disks: manually edit the boot sector of the disk (for example with NU's PCTOOLS). The byte at offset 13 (&0D) in the boot sector (track 0, side 0, sector 1) contains the number of sectors per cluster. You'll need to change it to 2 and write the boot sector back to the disk (NOTE, that the information on the disk will be lost). Then you must CHKDSK /f this disk and delete garbage files if any. 2) You will need a BBC B (with 1770 or 1772 double density upgrade installed and sideways RAM), BBC B+ or Master 128/Compact. To install, perform the following command: Master 128/Compact BBC B/B+ ----------------------------------------------------------- *SrLoad DOSFSM 8000 *SrLoad DOSFSB 8000 where is the number of free RAM bank. (the two ROM images differ mainly because of different floppy disk controller addresses and some OS differences) NOTE: You must have 40/80 or 40-track disk drive for 360K DOS disks. 3) Press to initialise DOS filing system. Now you can work with DOS FS. Below is a brief description of the DOS FS commands. *DOS selects the DOS FS as the current filing system. *Mount this command forgets all information about the last DOS disk that DOS FS used. You must use this command after changing the DOS disk. Disk must be inserted BEFORE *Mount is used. may be 0 or A for drive 0, or 1 or B for drive 1. If you use 720K disks or drive 1 more frequently, after *Mount you can use *SrSave DOSFS 8000+ to store the default values for the disk format and drive number. You can then just use *Srload DOSFS and access the disk without using the *Mount command; the default values will be those from the previous disk. Be careful because you can damage disks with a different format if you access them without *Mount. *DisMount when some errors occurs the DOS FS doesn't flush its cache buffers to the disk. This command must be used before removing the disk from the drive to ensure DOS FS writes its buffers. I've rewritten some parts of DOS FS and now you can be sure that *DisMount is needed ONLY if some errors occured (Disk full/write protected, etc.), but I still recommend that you use this command. *Access just swaps locked/unlocked state of the file. *Cdir isn't implemented. *Dir works as usual. *Lib works as usual. *Format not implemented. *Verify not implemented. How are filenames translated? DOS name \WAFFLE\DOCS\INSTALL.DOC corresponds to BBC name .waffle.docs.install/doc (root is not a "$" but just ".") IMPORTANT: DOS FS isn't case sensative, so if you SAVE "SomeProg" you will be able to load it with LOAD "SOMEPROG" or LOAD "SoMePrOg", but remember that PC DOS requires that all names must be in stored in capitals! *CAT works not only with directories but also with files, for example: *Cat .waffle.docs will display all files in directory \WAFFLE\DOCS *Cat .waffle.docs.*/doc will display all files with the DOC-extension in the same directory. *Ex and *Info work in the same manner but give more information on items. *Delete/*Remove supports * and # but removes only the first occurence of the matched object. DOS FS supports also both Load and Exec addresses so you can, for example, *Run machine code programs or *Load File to its default Load address. Unfortunately it doesn't supports file datestamps in this version. Version 1.14 has the addresses where DOS FS on RISC OS expects them. *Rename - unfortunately isn't implemented. *Save/*Load/OPENIN/OPENOUT/OPENUP/CLOSE - implemented. OSGBPB - implemented except for reading filenames, etc. ----------------------------------------------------------------- Notes on version 1.14 After repeatedly trying to contact Dimitry Petrov I decided to take DOSFS over and fix some major problems with it. These are: OSFILE 5 (read file info) now returns A=0 if the file does not exist instead of generating an error. OSFILE 4 (set attributes) returns instead of generating an error. OSGBPB 5+ returns no data instead of generating an error. Non-printable characters in filenames are printed as spaces instead of control codes, so preventing Win95 filenames messing up the display. The load address is stored and accessed in the catalog in the locations used by DOS FS on RISC OS for filetypes. The DOS disk catalog entries hold the file entry information in the following layout: 00-07 filename 08-0A extension 0B attribute 0C-0F load address, b8-b31 in 0C-0E, b0-b7 in 0F 10-13 exec address, b0-b31 14-15 spare 16-17 mtime 18-19 mdate 1A-1B start cluster 1C-1F length JGH, 12-Feb-1992. ----------------------------------------------------------------- DOS FS contains several errors (known to me) but I am still sure you'll be able to use it without problems. Any questions/suggestions, etc. to e-mail: or snail mail: Russia 115541, Moscow Kavkazsky Boulevard, 29 Bld. 1, Flat 107. Dmitry Petrov --- DPetrov@misis.msk.su (Dimitry Petrov) Russian ARM Support Group