Subject: Re: amiga RDB tool
To: Ignatios Souvatzis <is@netbsd.org>
From: Florian Stoehr <netbsd@wolfnode.de>
List: port-amiga
Date: 01/04/2005 12:34:08
On Tue, 4 Jan 2005, Ignatios Souvatzis wrote:

> Hi,
>
> On Tue, Jan 04, 2005 at 09:51:52AM +0100, Florian Stoehr wrote:
>
>> Although I don't think NetBSD cares about most of the RDB data, here are
>> some more or less strange things I encountered, perhaps someone can help
>> here. Well, as most of them seem to be important for the AmigaOS only, I
>> think I'll play around, first set most to zero and see what happens.
>>
>> Please correct:
>>
>> ** RDB **
>>
>> - SCSI-ID of drive is always 7, even for SCSI
>
> That's not the SCSI id of the driver, but the SCSI id of the host this
> drive belongs to! So 7 is ok, normally.

Hm OK I missed that.

>
>> - ParkingZone/WritePreComp/ReducedWrite/StepRate are always zero
>> - DataArea - high sector value - might be (!) beyond end of disk ??? -> I
>> guess this disk has an invalid RDB ... :-((( (in logical drive part)
>>
>> ** PART **
>>
>> - SCSI-ID is always 7, even for SCSI
>
> see above.
>
>> - Number of sides (heads?) is always 1 ?
>
>> - NumBuffers = 1163 ? (This should be much lower, about "30")
>
> Not necessarily. Depends on the amount of memory you have in your Amiga.
> Only relevant for AmigaOS.

OK I start with zero for the NetBSD-only setup. Perhaps I can collect 
further information on how to put good AmigaOS-compatible values here when 
advancing this program to a "true" hdtoolbox.

>
>> - BufMemType = 1 ? (Found zero in other documentation)
> Used to enforce certain types of memory (chipmem, fastmem, etc)
> for broken drivers that don't know how to handle certain types of
> transfers. Only for AmigaOS.

OK -> 0

>
>> - MaxTransfer = ??? (about 128K? Might this be zero?)
>
> To work around drivers that don't know how to split large transfers.
> Only for AmigaOS.

OK -> 0

>
>> - Mask = ??? (Found 0xfffffffe in other documentation, but value differs)
>
> To work around drivers that don't know how to work around transfers starting
> at odd byte addresses that the hardware DMA can't handle.
> Only for AmigaOS.

OK -> 0

>
>> NetBSD should not require anything except RDB and PART data in first
>> track. I'll let the data area start with the fist sector on cylinder 1,
>> second head. Hope this is compatible with what AmigsOS expects.
>
> AmigaOS doesn't expect... it obeys the values found in the RDB.
> You should leave a decent amount so that on AmigaOS you could add, e.g.,
> filesystem code. The traditional size was about 2 cylinders, which
> translated to (very roughly) a megabyte, back then.
>
> Oh yes...
>
> The RDSK block must be within the blocks 0..15.
> You must preserve the link structure of any blocks you don't change
> (e.g. the FSHD and LSEG blocks).

Sure I'd put RDB in first sector on fist track on first cylinder.

I saw the AmigaOS puts the other blocks between RDB and PART (although 
this is done via the list start blocks in RDB, so the arrangement shoudn't 
matter (also works fragmented?).

I'll try first with a simple case setup, bootstrapping an entirely new 
disk on NetBSD/sgimips with RDB and two PART blocks (/ and swap) following 
immediately.

I'll leave enough space for Amiga FS tables.

I'll autodetect the geometry parameters with the ioctl of DIOCGDINFO and 
play a bit around with this.

>
> If you don't have the _documentation_ I mentioned, contact me.

Yep, please send give me the docs, mine semms not very detailed.

Thanks
Florian

>
> Regards,
> 	-is
> -- 
> seal your e-mail: http://www.gnupg.org/
>