Per request, keep hard drive type in boot block.
Update the .PhysicalDrive in boot block. Update the first fat entries to match MediaDescriptor of boot block.
This commit is contained in:
parent
e2afc36dae
commit
12bb62eadd
@ -106,10 +106,11 @@ static FAT_BootBlock const BootBlock = {
|
||||
.FATCopies = 2,
|
||||
.RootDirectoryEntries = (ROOT_DIR_SECTORS * 512 / 32),
|
||||
.TotalSectors16 = NUM_FAT_BLOCKS - 2,
|
||||
.MediaDescriptor = 0xF0,
|
||||
.MediaDescriptor = 0xF8,
|
||||
.SectorsPerFAT = SECTORS_PER_FAT,
|
||||
.SectorsPerTrack = 1,
|
||||
.Heads = 1,
|
||||
.PhysicalDriveNum = 0x80, // to match MediaDescriptor of 0xF8
|
||||
.ExtendedBootSig = 0x29,
|
||||
.VolumeSerialNumber = 0x00420042,
|
||||
.VolumeLabel = VOLUME_LABEL,
|
||||
@ -187,7 +188,7 @@ void read_block(uint32_t block_no, uint8_t *data) {
|
||||
if (sectionIdx >= SECTORS_PER_FAT)
|
||||
sectionIdx -= SECTORS_PER_FAT;
|
||||
if (sectionIdx == 0) {
|
||||
data[0] = 0xf0;
|
||||
data[0] = 0xf8;
|
||||
for (int i = 1; i < NUM_INFO * 2 + 4; ++i) {
|
||||
data[i] = 0xff;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user