🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #25620

Re: ST/020 DMA, and Disk driver bug. (ATARI - please read!)

#25620
From: dyer
Date: Thu, 12 Mar 1987 19:33
100 lines
4359 bytes
> While I'm talking about Hard disks, has anyone else noticed that the disk
> Rwabs operation (read/write sectors), takes a sector number which
> is a 16-bit number!!!! This is the most UTTERLY STUPID thing I have seen
> on the Atari yet, and may render it impossible to use for a system I
> have in development! This places a hard limit on 32Mbytes/partition,
> and 128Mbytes/disk, now I was planning on using one of the new MAXTOR
> 760MByte drives, or possibly the Northern Telecom 820MByte drive
> (No flames please, I NEED this sort of storage!!).
> 
> And please don't say `But you can't use this, since GEMDOS can't work
> with a partition bigger than 16Mbytes', This is irrelevant, I am using
> my own filing system. But I did expect to be able to use the ATARI hard
> disk driver!


Deja vu, eh?  Let's try this again, a little more constructively:



-------------------
PHYSICAL UNIT TABLE
-------------------

When the Atari Hard Disk driver is loaded, the system  vari-
able  `pun_ptr'  [$516 long] points to a Physical Unit (PUN)
table that describes the controllers and partitions  managed
by the driver.  The PUN table has the following structure:


    struct PUN
    {
        WORD nunits;        /* # physical drives */
        char physunit[16];  /* logical mapping table */
        LONG partstart[16]; /* partition starting sector */
        BPB partbpb[16];    /* BPB for logical drive */
    };


`nunits' contains the number of hard disk drives (ACSI  con-
trollers) that are handled by the driver.

Each byte in the array `physunit' maps a logical drive to  a
physical drive; the index into the table is the drive number
supplied to Rwabs(), the byte in the table contains the con-
troller  and  drive  number  to  use.  Bit 7 will be `1' for
unused entries, and `0' if the entry  is  valid.   Bits  0-3
contain the controller number and bits 4-6 contain the drive
number on the controller.


       7    6    5    4    3    2    1    0
    +----+----+----+----+----+----+----+----+
    |    |              |                   |
    | V  | drive number |  ACSI unit number |
    |    |              |                   |
    +----+----+----+----+----+----+----+----+
      |
       \--> 0=valid, 1=invalid (unmapped)


NOTE
The drive number in bits 4-6 must  currently  be  zero;  the
AHDI  driver  does  not yet support more than one drive on a
controller.

Each longword in the array `partstart' contains  the  32-bit
starting physical sector number of the partition.

The BPBs for each logical drive are computed when  the  hard
disk   driver  is  loaded.   They  are  kept  in  the  array
`partbpb'.  Unused BPBs will contain garbage.


----------------------------------------------------------------


So here is an awful kludge if you need to get to more than
16-bits worth of sectors on a hard disk.  The following is g'teed
to work ONLY IF YOU MANAGE THE STORAGE YOURSELF --- GEMDOS is
currently not capable of accessing more than 16 bits worth of
sectors.

Pick an unused logical device.  Fill in the `physunit' entry with
its ACSI unit and drive number.  The BPB doesn't matter, since
GEMDOS can't use the device anyway.

Now, before every call to Rwabs() on your device, fill in the
appropriate `partstart' entry with the 32-bit physical sector
number you really want.  Supply a logical sector number of 0 to
Rwabs().


[The next version of the hard disk driver will contain a 32-bit
sector number interface that will not break current applications,
and it will include several other enhancements.]
-- 
-Landon Dyer, Atari Corp.	    {sun,lll-lcc,imagen}!atari!dyer

The views expressed here do not not		
necessarily reflect those of Atari Corp.	Segments are for worms.
Technical Details
Message-ID: <645@atari.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!genrad!decvax!decwrl!sun!imagen!atari!dyer
References: <542288243.24960@minster.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!genrad!decvax!decwrl!sun!imagen!atari!dyer
From: dyer@atari.UUCP
Newsgroups: comp.sys.atari.st
Subject: Re: ST/020 DMA, and Disk driver bug. (ATARI - please read!)
Message-ID: <645@atari.UUCP>
Date: Thu, 12-Mar-87 14:33:58 EST
Article-I.D.: atari.645
Posted: Thu Mar 12 14:33:58 1987
Date-Received: Fri, 13-Mar-87 23:41:54 EST
References: <542288243.24960@minster.UUCP>
Organization: Atari Corp., Sunnyvale CA
Lines: 100