[comp.sys.apple] ProDOS Device Driver for DOS 3.3

reeder@reed.UUCP (Doug Reeder) (09/12/89)

Over the summer, I considered writing a ProDOS Device Driver to read & write
DOS 3.3 disks.  The basic method would be to construct a virtual ProDOS
volume.  The volume directory blocks would be constructed and stored in
memory.  The killer is that index blocks for all the files would have to be
constructed for all the files on the disk (.5K of memory/file,usually) 
because device drivers are told to fetch a certain block.  One problem is
that a given virtual block of data may consist of two unrelated track/sector
combinations, and 65,568 virtual block numbers are not enough.  This can be
solved with a lookup table for odd blocks.

Question: Since ProDOS requires 1K data buffers for .5K blocks, does it
always keep the current index block on hand?

If so, it might prove practical to construct index blocks on the fly.  And
using auxilary memory, hmmmm...

-- 
Doug Reeder                         USENET: ...!tektronix!reed!reeder
Institute of Knowledge, Jinx        BITNET: reeder@reed.BITNET
"A blaster can point two ways."  from ARPA: tektronix!reed!reeder@berkeley.EDU
       -Salvor Hardin               Box 722 Reed College,Portland,OR 97202

dlyons@Apple.COM (David Lyons) (09/13/89)

In article <13293@reed.UUCP> reeder@reed.BITNET (Doug Reeder) writes:
>Over the summer, I considered writing a ProDOS Device Driver to read & write
>DOS 3.3 disks.  The basic method would be to construct a virtual ProDOS
>volume. [...]

Interesting idea...as you noted, there are interesting problems to go along
with it.  (To pick one you didn't mention:  What do you do if there are more
than 51 files on the DOS 3.3 disk?)

>Question: Since ProDOS requires 1K data buffers for .5K blocks, does it
>always keep the current index block on hand?

Yes, I believe the current version of ProDOS 8 does keep an index block
around in memory for each open file.  (It's not *guaranteed* that to, and
you can't fiddle with anything in that 1K buffer without incurring the
wrath of Fred, the God of Present and Future Disk Integrity.)
-- 

 --Dave Lyons, Apple Computer, Inc.          |   DAL Systems
   AppleLink--Apple Edition: DAVE.LYONS      |   P.O. Box 875
   AppleLink--Personal Edition: Dave Lyons   |   Cupertino, CA 95015-0875
   GEnie: D.LYONS2 or DAVE.LYONS         CompuServe: 72177,3233
   Internet/BITNET:  dlyons@apple.com    UUCP:  ...!ames!apple!dlyons

   My opinions are my own, not Apple's.