Author
| Harddisk image
|
Kwik msx lover Posts: 105 | Posted: May 25 2007, 10:31   |
Hi,
I'm building support for Sunrise harddisk images for Nowind. Right now we support harddisk images, but only when there is no partition info and MBR stuff in front. Is there some general information available on the format of these images?
I'm also interested in how the partition table works.
Thanks.
|
|
turbor msx freak Posts: 179 | Posted: May 25 2007, 10:54   |
I depends on the manufacturers code how the partition table is created/used.
Are you talking about the IDE interface? Most info you're looking for can be found in the diskmanipulator code of openMSX.
openmsx.svn.sourceforge.net/viewvc/openmsx/openmsx/trunk/src/fdc/MSXtar.cc?revision=6463&view=markup
The code you are looking for is mostly in the createDiskFile
it is a large list of beginsector and size. Afterwards you can handle each partition as a normal disk like you do now, only taking care of the offset of the sector you got from the partition list
Most SCSI bioses created for the MSX treat the partitions in a different manner, most of them are non-PC compatible :-\
|
|
manuel msx guru Posts: 3525 | Posted: May 25 2007, 13:50   |
Our harddisk images are the same as floppy disk image: it's just a huge file of bytes which represent the bytes on the disk. So, a harddisk image of 1024*1024*100 bytes has 1024*1024*100/512 sectors (204800). All partition info and the MBR is on those sectors... AFAIK this is also how blueMSX handles harddisk images.
This is compatible with how you have access to disks in Linux: if you make a disk image, you can just cat the device (e.g. hda) to a file and you get exactly such a disk image (AFAIK, at least for floppy disks, this is true, but I don't see why it would be different for harddisks).
|
|
Patsie msx freak Posts: 189 | Posted: May 25 2007, 14:09   |
It isn't any different. The harddisk images I make of SymbOS, from my Sunrise IDE CF card, are made bij 'dd'ing /dev/sdf (my CF interface) to a file.
|
|
Kwik msx lover Posts: 105 | Posted: May 25 2007, 15:03   |
Thinks all for your help. What i (think to) understand right now:
The first 512 bytes start with EB FE 90 MSX_IDE. This is the MBR. It also contains info on where the partitions are on the image. All partitions start with EB FE 90 IDE_PART. These are normal disk images like F8 or F9 or a harddisk image with F0. Am i right so far?
I figured out how to determine the start sector of a partition and its length. Both are 32 bit numbers. What i didn't understand was the meaning of the other bytes near these numbers. I'm looking for a description of these bytes. (i'm sure i can figure it out studying the openMSX source, but i'm feeling rather lazy at the moment...  |
|
Kwik msx lover Posts: 105 | Posted: May 26 2007, 13:21   |
|
|
Patsie msx freak Posts: 189 | Posted: May 26 2007, 13:53   |
Be careful to know that the fdisk packaged with the sunrise interface doesn't number the first 4 partitions as 'usual', if you fdisk on linux or windows, partitions and drives are the other way around (partition 1 becomes MSX drive D:, partition 2 becomes MSX drive C:, partition 3 becomes MSX drive B: and partition 4 becomes MSX drive A  |
|
manuel msx guru Posts: 3525 | Posted: May 26 2007, 14:32   |
In other words: better not rely on PC sources.... MSX partition formats are a bit different. Especially for SCSI carts, btw!
|
|
Kwik msx lover Posts: 105 | Posted: May 26 2007, 15:51   |
Thanks for the info. Another question: should the partition which has the boot flag enabled always be assigned to drive A: ?
|
|
|
|
|