<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 03 Nov 1994 09:06:08 +0000 (GMT)
From   : Peter Coghlan <PETER@...>
Subject: Re: Reading BBC disks

On Wed, 02 Nov 1994 08:34:08 +0000 (GMT) Chris said:
 
>> 2. Intercept osword 7F for sector read/write
>
>This is my personal favourite; it allows you to use BBC disks safely and
>also could be adapted to support a "virtual" hard drive.
>
 
(Sorry for the late contribution ...) Intercepting Osword 7F is fine to
support programs which use Osword 7F, but the DFS does not use it to perform
normal disk access for Osfile, Osfind etc. The approach I have taken so far
is to intercept all the filing system vectors and issue calls which the host
operating system understands. Unfortunately, this cannot read real BBC disks,
but I think it allows more flexibility as it can allow you to load PC (or
whatever system) files into the emulator without having to convert them to the
format of BBC disks, provided the problem of BBC file attributes is solved.
 
I might add a filing system which can access real BBC disks in the future.
 
How about one of these solutions to hold the attributes:
 
1. Create a single file per disk (or per directory) which holds the BBC
   attributes of all files on the disk (or in the directory) which are to be
   used with the emulator. The attributes would be held in text form, one line
   per file. This would allow them to be added or modified with any editor if
   required.
 
   When a new file is created by the emulator, attributes are automatically
   added to the attribute file. Similarly, when files are renamed, deleted
   etc the attribute file is updated to reflect the changes.
 
   If a file which does not have an entry in the attribute file is opened
   in the emulator, a default entry is created. Files with default entries
   give an error (Bad Address?) if you try to *RUN them or load them using
   Osfile without specifying a load address.
 
2. A marker plus the attributes are added in text form at the top of any file
   to be used in the emulator system. As above, files which do not have
   attributes (ie the marker is not present) cannot be *RUN and cannot be
   loaded with Osfile unless a load address is specified. Attributes are not
   added to any file which does not have them as this would mess up other
   applications using the files.
 
3. A marker plus the attributes are added in text form to the end of any file
   to be used in the emulator system. Similar problems to scheme 2 except that
   it is easier to add attributes to existing files and less likely to end
   up thrashing the file by accident.
 
All schemes would allow BBC files and non BBC files to be accessed. I prefer
the first scheme as it allows files to be created / updated by the emulator
and then used without any problems outside the emulator. You could even
create files in the format of your favourite word processor or any application
from within the emulator.
 
Any thoughts ?
 
                                Peter.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>