mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-08 19:32:39 +08:00
merge changes
This commit is contained in:
parent
b8578218b0
commit
f5707a2987
@ -4519,16 +4519,24 @@ private:
|
|||||||
|
|
||||||
bool DetectMFMsectorPartition(Bit8u buf[], Bit32u fcsize, Bitu sizes[]) {
|
bool DetectMFMsectorPartition(Bit8u buf[], Bit32u fcsize, Bitu sizes[]) {
|
||||||
// This is used for plain MFM sector format as created by IMGMAKE
|
// This is used for plain MFM sector format as created by IMGMAKE
|
||||||
Bit8u starthead = 0;
|
// It tries to find the first partition. Addressing is in CHS format.
|
||||||
Bit8u startsect = 0;
|
/* Offset | Length | Description
|
||||||
Bit16u startcyl = 0;
|
* +0 | 1 byte | 80 hex = active, 00 = inactive
|
||||||
Bit16u endcyl = 0;
|
* +1 | 3 bytes | CHS of first sector in partition
|
||||||
|
* +4 | 1 byte | partition type
|
||||||
|
* +5 | 3 bytes | CHS of last sector in partition
|
||||||
|
* +8 | 4 bytes | LBA of first sector in partition
|
||||||
|
* +C | 4 bytes | Number of sectors in partition. 0 may mean, use LBA
|
||||||
|
*/
|
||||||
|
Bit8u starthead = 0; // start head of partition
|
||||||
|
Bit8u startsect = 0; // start sector of partition
|
||||||
|
Bit16u startcyl = 0; // start cylinder of partition
|
||||||
Bit8u ptype = 0; // Partition Type
|
Bit8u ptype = 0; // Partition Type
|
||||||
Bit8u heads = 0;
|
Bit16u endcyl = 0; // end cylinder of partition
|
||||||
Bit8u sectors = 0;
|
Bit8u heads = 0; // heads in partition
|
||||||
Bitu pe1_size = host_readd(&buf[0x1ca]);
|
Bit8u sectors = 0; // sectors per track in partition
|
||||||
(void)ptype;//unused
|
Bit32u pe1_size = host_readd(&buf[0x1ca]);
|
||||||
if ((Bit16u)host_readd(&buf[0x1fa]) != 0) { // DOS 2.0-3.21 partition table
|
if ((Bit32u)host_readd(&buf[0x1fa]) != 0) { // DOS 2.0-3.21 partition table
|
||||||
pe1_size = host_readd(&buf[0x1fa]);
|
pe1_size = host_readd(&buf[0x1fa]);
|
||||||
starthead = buf[0x1ef];
|
starthead = buf[0x1ef];
|
||||||
startsect = (buf[0x1f0] & 0x3fu) - 1u;
|
startsect = (buf[0x1f0] & 0x3fu) - 1u;
|
||||||
@ -4537,7 +4545,7 @@ private:
|
|||||||
ptype = buf[0x1f2];
|
ptype = buf[0x1f2];
|
||||||
heads = buf[0x1f3] + 1u;
|
heads = buf[0x1f3] + 1u;
|
||||||
sectors = buf[0x1f4] & 0x3fu;
|
sectors = buf[0x1f4] & 0x3fu;
|
||||||
} else if (pe1_size != 0) { // DOS 3.3+ partition table
|
} else if (pe1_size != 0) { // DOS 3.3+ partition table, starting at 0x1BE
|
||||||
starthead = buf[0x1bf];
|
starthead = buf[0x1bf];
|
||||||
startsect = (buf[0x1c0] & 0x3fu) - 1u;
|
startsect = (buf[0x1c0] & 0x3fu) - 1u;
|
||||||
startcyl = (unsigned char)buf[0x1c1] | (unsigned int)((buf[0x1c0] & 0xc0) << 2u);
|
startcyl = (unsigned char)buf[0x1c1] | (unsigned int)((buf[0x1c0] & 0xc0) << 2u);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user