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