Hi, some discussion between me and Jon
JP:
1> Does the IDE interface use the Master Boor Record of the HDD?
Jon (the guru):
It only uses the partition info. It doesn't execute any code stored in this
sector 0.
On the PC sector 0 of the hd contains partition info AND code to execute (that's
why it is called master boot record). There is no such thing on MSX.
After init of all cartridges, the MSX disk operating starts and tries to boot
from A:. To do this, sector 0 of A: is loaded and the code is executed. Normally
this code tries to load MSXDOS.SYS. If it fails, MSX Disk Basic is started.
So making a 'bootmanager' can be done in two ways:
1. you intercept the init of the (IDE)cartridges and choose the partition that
is used for A:
2. you modify the bootsector of the partition that is normally mapped to A: in
such a way that it won't try to load MSXDOS.SYS, but that it executes your own
code. In this code, you could remap A: yourselve.
I think 1. is the best.
JP:
> I am thinking about a bootmanager, If the MBR is used for booting then it would not be too difficult?
> Have you maybe given this thought?
Jon:
yes, but as most of the times: is it really needed? you can change which A:
drive to use by disabling/enabling partitions with IDEFDISK. I agree it would be
easier if you could just select this during boot time, but how many people
actually need it? Not many.
There is already something foreseen in IDEFDISK: you could set the bootpartition
with it. In this way you don't need to disable the partitions which are coming
before the bootpartition. However the latest IDEbios doesn't use this info. So a
first step could be to support this setting.
JP:
2> How is the partitions's drivenames allocated?
> Simply the first 5 (if more is active) in sequence of partitiontable position? Can it be manipulated?
Jon:
during boot the driveletters are assigned starting from A:. So the first (=with
the lowest slot number) diskromcartridge starts at A: and uses as many
driveletters as wished (max. 8). The next diskromcartridge (this can be an IDE
cartridge) continues where the previous cartridge stopped.
An IDE cartridge will occupy a maximum of 6 drive letters. This was done so that
in most cases there are still 2 drive letters left for the floppy and ramdisk.
If CTRL is pressed, the floppy diskroms will only create 1 drive. For the IDE:
if DEL is pushed, the IDE diskrom won't create any drives.
When creating drives, the IDE will start with the master IDE device, and next,
if there are still drives left (=less than 6 drives created), it will continue
with the slave IDE device.
For a CDROM or an unpartitioned medium it will create 1 drive. For a partitioned
medium it will create a drive for each partition that is enabled (and this until
a max of 6 drives are created for this interface (or until a total of 8 MSX
drives are created).
So if you could interfere here by letting the user choose which partition to use
for the first drive, then you would have a kind of bootmanager. Note that it is
not guaranteed that this drive will be drive A: !! Because if there is for
example a SCSI cartridge present in a slot before the IDE cartridge, then these
SCSI devices will for example become A:, B: and C:. Then your boot manager in
the IDE will only make a choice for D:, but the boot is done from the SCSI (A

.
In case that you only have an IDE interface, it will work of course.
I could try to make something that lets you choose which partition number to
select for the first drive. It would also be nice if I check if that partition
is of FAT12 type and display the volume name if present.
However I don't know if this is going to be easy to put this into the current
code.
Regards,
Jon
JP
> Thanks