Force floppy diskette parameter table (DPT) pointed to by int 1Eh to use 512 bytes per sector; fixes issue with memdisk 3.x & 4.0 which swaps DPT byte values for bps with sectors per track.

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1633 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Kenneth J Davis 2011-06-18 12:27:28 +00:00
parent ac7f32468b
commit a108714c31

View File

@ -1262,6 +1262,8 @@ void ReadAllPartitionTables(void)
/* quick adjustment of diskette parameter table */ /* quick adjustment of diskette parameter table */
fmemcpy(int1e_table, *(char FAR * FAR *)MK_FP(0, 0x1e*4), sizeof(int1e_table)); fmemcpy(int1e_table, *(char FAR * FAR *)MK_FP(0, 0x1e*4), sizeof(int1e_table));
/* currently only 512 bytes per sector floppies are supported, log2(512/128)=2 */
int1e_table[3] = 2;
/* enforce min. 9 sectors per track */ /* enforce min. 9 sectors per track */
if (int1e_table[4] < 9) if (int1e_table[4] < 9)
int1e_table[4] = 9; int1e_table[4] = 9;