From a4373c0995d960cf8664c85ae841c03fee42c6a8 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 4 Apr 2018 11:14:03 +0000 Subject: [PATCH] Add basic support for INT 13 call 15. Used by korean powerdolls to detect harddrive. SF bug #477 Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4091 --- src/ints/bios_disk.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) 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