1
0
Fork 0

Slight corrections to r4091, CX and DX should not be changed for floppies. Changing reported floppy type to one without changeline as we don't support that call.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4101
This commit is contained in:
Peter Veenstra 2018-05-09 18:41:47 +00:00
parent 54c993669a
commit a8633eff6a

View file

@ -512,17 +512,19 @@ static Bitu INT13_DiskHandler(void) {
Bit64u largesize = tmpheads*tmpcyl*tmpsect*tmpsize;
largesize/=512;
Bit32u ts = static_cast<Bit32u>(largesize);
reg_ah = (drivenum <2)?2:3;
reg_cx = static_cast<Bit16u>(ts >>16);
reg_dx = static_cast<Bit16u>(ts & 0xffff);
reg_ah = (drivenum <2)?1:3; //With 2 for floppy MSDOS starts calling int 13 ah 16
if(reg_ah == 3) {
reg_cx = static_cast<Bit16u>(ts >>16);
reg_dx = static_cast<Bit16u>(ts & 0xffff);
}
CALLBACK_SCF(false);
} else {
if (drivenum <DOS_DRIVES && (Drives[drivenum] != 0 || drivenum <2)) {
if (drivenum <2) {
//TODO use actual size (using 1.44 for now).
reg_ah = 0x2; // type
reg_cx = 0;
reg_dx = 0x2880;
reg_ah = 0x1; // type
// reg_cx = 0;
// reg_dx = 2880; //Only set size for harddrives.
} else {
//TODO use actual size (using 105 mb for now).
reg_ah = 0x3; // type