diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index 67694677..87e1abfc 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -497,6 +497,46 @@ static Bitu INT13_DiskHandler(void) { reg_ah = 0x00; CALLBACK_SCF(false); break; + case 0x15: /* Get disk type */ + /* Korean Powerdolls uses this to detect harddrives */ + LOG(LOG_BIOS,LOG_WARN)("INT13: Get disktype used!"); + if (any_images) { + if(driveInactive(drivenum)) { + last_status = 0x07; + reg_ah = last_status; + CALLBACK_SCF(true); + return CBRET_NONE; + } + Bit32u tmpheads, tmpcyl, tmpsect, tmpsize; + imageDiskList[drivenum]->Get_Geometry(&tmpheads, &tmpcyl, &tmpsect, &tmpsize); + Bit64u largesize = tmpheads*tmpcyl*tmpsect*tmpsize; + largesize/=512; + Bit32u ts = static_cast(largesize); + reg_ah = (drivenum <2)?2:3; + reg_cx = static_cast(ts >>16); + reg_dx = static_cast(ts & 0xffff); + CALLBACK_SCF(false); + } else { + if (drivenum