Re: IDE technical questions

2001-09-01 Thread Jon De Schrijder


Adriano Camargo Rodrigues da Cunha wrote:
> 
> Hi, Jon.
> 
> Can you answer some questions about Sunrise IDE, please?

no problem; just returned from holiday

> 1. Checking my HD sector 0 I think that the partitions start
> and length numbers are stored in (32 bit values) offsets Ah (length)
> and 6h (start), starting at 1FAh (partition 0). In other words, the
> sector 0 of an IDE device has:
> partition 0: start sector (32 bits) stored in 1FAh
>  length stored in 1F6h

caution!

start sector: #1f6
length: #1fa


> partition 1: start sector (32 bits) stored in 1EAh
>  length stored in 1E6h
> partition 2: start sector (32 bits) stored in 1DAh
>  length stored in 1D6h
> partition 3: start sector (32 bits) stored in 1CAh
>  length stored in 1C6h
> ...
> partition 30:start sector (32 bits) stored in 1Ah
>  length stored in 16h
> 
> Is this right? Can I rely on this?

The are indeed 31 available entries to define a partition.
An entry contains various information: 
*about start/size of the partition (both CHS and LBA format)
 This is 'standard' in the computer world
*the partitiontype code (1=FAT12, 4=6=FAT16, FAT32, linux, ...)
 This is 'standard' in the computer world
*some extra infobits: (offset #1EE,#1DE,#1CE,...)
-bit7: 1=partition is the boot partition (standard, not used on Sunrise
IDE)
-bit1: 1=disabled partition (no standard, only used on Sunrise IDE)
-bit0: 1=read-only partition (no standard, only used on Sunrise IDE)

Normally you don't need this info, since all partitionstuff is handled
by the IDE bios. A maximum of 6 partitions (divided over all devices
connected to 1 IDE cartridge) is selected and the necessary info to
access these 6 partitions is stored in the 6 drivefields. (see
IDESYS.TXT)
Note that the partitionstuff is far more complex than a fixed harddisk.
A 100MB ZIP disk with 3 partitions can be inserted, and hot-swapped with
a non-partionized ZIP medium, ... LS120 drive with a 1.44HD floppy
replaced by a 120MB UHD partitioned medium, ... The IDE bios will detect
the swap and take the necessary actions and update the drivefields.

The IDE bios does not support the thing called 'extended partition'
(partitiontype code 5) used by Microsoft FDISK to create more than one
partition on a harddisk. Because of that only 1 partition of a Windows
hd with 3 FAT16 partitions will be visible and not the other two
extended partitions.

> 3. If I have a CDROM connected to my IDE (sorry, I don't
> have one at this moment), will it appear on IDE workspace?

yes

> Where? In the drive fields (IDE workspace)? In the device info field
> (IDE workspace)?

in both:
devicetype codebyte of the Master or Slave will be set to: xxx01110
=CDROM,LBAsupport,ATAPIdevice

The device codebyte in the drivefield will also contain an appropriate
value (bit 2 and 1 set to '1', see IDESYS.TXT); using this value when
calling #7F89 will have the expected result of reading CD sectors.
(These are 2048 bytes in size)


Greetings,
Jon
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html



Re: IDE technical questions

2001-08-30 Thread Adriano Camargo Rodrigues da Cunha


Hi,

> 2. IDESYS.TXT says that, when I call 7F89h (absolute sector
> read) I must put the device codebyte in register A. Checking the
> Drivefield of all my IDE drives I discovered that C1h is the
> device codebyte for all them. I used C1h as device codebyte when
> calling 7F89h and received a 08h error ("cluster not found"). I
> used 01h (since bits 5,6 and 7 of device codebyte aren't used)
> as device codebyte and received the same error. I used 00h as
> device codebyte and the sector was read! Shouldn't this behaviour
> be wrong?

My mistake. The value C1h is wrong. I confused "device codebyte"
with "devicetype codebyte". It should be 08h. Sorry for this.


Adriano Camargo Rodrigues da Cunha  ([EMAIL PROTECTED])
http://www.adrpage.cjb.net  MSX: more fun per less MHz

Aibohphobia n.  -  The fear of palindromes

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html



Re: IDE technical questions

2001-08-25 Thread Adriano Camargo Rodrigues da Cunha


Nestor,

> >   1. Checking my HD sector 0 I think that the partitions start
> > and length numbers are stored in (32 bit values) offsets Ah (length)
> > and 6h (start), starting at 1FAh (partition 0). In other words, the
> > sector 0 of an IDE device has:
> >   partition 0: start sector (32 bits) stored in 1FAh
> >length stored in 1F6h
> >   partition 1: start sector (32 bits) stored in 1EAh
> >length stored in 1E6h
> >   partition 2: start sector (32 bits) stored in 1DAh
> >length stored in 1D6h
> >   partition 3: start sector (32 bits) stored in 1CAh
> >length stored in 1C6h
> >   ...
> >   partition 30:start sector (32 bits) stored in 1Ah
> >length stored in 16h
> It is not so easy. On sector 0 you will find a table with two entries:
> one for the partition 0, and another one which is actually a pointer to
> another table. This other table has also two entries: one for partition
> 1 and another pointer, and so on. This is true for any device, not only
> IDE. Sorry, I don't have the detailed information here.

Are you sure you're not confusing MegaSCSI with PC IDE and
Sunrise IDE? On PC HDs I know it's true. On MegaSCSI I know it's also
true.
I concluded this organization looking at the sector 0 of my IDE HD
and due to the fact that IDEFDISK only supports 30 partitions. And 30
partitions is the maximum number of partitions (organized as I
descibred)
that sector 0 can fit. Also, I compared the numbers in sector 0 with
those
displayed by IDEFISK and they match (partition start sector and length).
And, also, IDE sector 0 is almost empty. The only entries are those that
seems to correspond to the 10 partitions I created in my HD.


Adriano Camargo Rodrigues da Cunha  ([EMAIL PROTECTED])
http://www.adrpage.cjb.net  MSX: more fun per less MHz

Microsoft Windows... a virus with mouse support.

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html



Re: IDE technical questions

2001-08-25 Thread Nestor Soriano

>   1. Checking my HD sector 0 I think that the partitions start
> and length numbers are stored in (32 bit values) offsets Ah (length)
> and 6h (start), starting at 1FAh (partition 0). In other words, the
> sector 0 of an IDE device has:
>   partition 0: start sector (32 bits) stored in 1FAh
>length stored in 1F6h
>   partition 1: start sector (32 bits) stored in 1EAh
>length stored in 1E6h
>   partition 2: start sector (32 bits) stored in 1DAh
>length stored in 1D6h
>   partition 3: start sector (32 bits) stored in 1CAh
>length stored in 1C6h
>   ...
>   partition 30:start sector (32 bits) stored in 1Ah
>length stored in 16h

It is not so easy. On sector 0 you will find a table with two entries:
one for the partition 0, and another one which is actually a pointer to
another table. This other table has also two entries: one for partition
1 and another pointer, and so on. This is true for any device, not only
IDE. Sorry, I don't have the detailed information here.

> The difference between Windows and a virus? Virus is free.

...and Virus never fails.

-- 
Nestor Soriano <[EMAIL PROTECTED]>

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html



IDE technical questions

2001-08-25 Thread Adriano Camargo Rodrigues da Cunha


Hi,

Can someone answer some questions about Sunrise IDE, please
(Jon?)?

1. Checking my HD sector 0 I think that the partitions start
and length numbers are stored in (32 bit values) offsets Ah (length)
and 6h (start), starting at 1FAh (partition 0). In other words, the
sector 0 of an IDE device has:
partition 0: start sector (32 bits) stored in 1FAh
 length stored in 1F6h
partition 1: start sector (32 bits) stored in 1EAh
 length stored in 1E6h
partition 2: start sector (32 bits) stored in 1DAh
 length stored in 1D6h
partition 3: start sector (32 bits) stored in 1CAh
 length stored in 1C6h
...
partition 30:start sector (32 bits) stored in 1Ah
 length stored in 16h

Is this right? Can I rely on this?

2. IDESYS.TXT says that, when I call 7F89h (absolute sector
read) I must put the device codebyte in register A. Checking the
Drivefield of all my IDE drives I discovered that C1h is the
device codebyte for all them. I used C1h as device codebyte when
calling 7F89h and received a 08h error ("cluster not found"). I
used 01h (since bits 5,6 and 7 of device codebyte aren't used)
as device codebyte and received the same error. I used 00h as
device codebyte and the sector was read! Shouldn't this behaviour
be wrong?

3. If I have a CDROM connected to my IDE (sorry, I don't
have one at this moment), will it appear on IDE workspace? Where?
In the drive fields (IDE workspace)? In the device info field
(IDE workspace)?

Thanks for any help,


Adriano Camargo Rodrigues da Cunha  ([EMAIL PROTECTED])
http://www.adrpage.cjb.net  MSX: more fun per less MHz

The difference between Windows and a virus? Virus is free.

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html