From 7df629843371ba55202eebfe2b3a5c23cba5c1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Thu, 22 May 2008 16:45:57 +0000 Subject: [PATCH] use device attribute fields for ioctl remote check function (Future Shock svga upgrade); thanks to ripa Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3159 --- src/dos/dos_ioctl.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/dos/dos_ioctl.cpp b/src/dos/dos_ioctl.cpp index a921a0f1..14dd3d88 100644 --- a/src/dos/dos_ioctl.cpp +++ b/src/dos/dos_ioctl.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_ioctl.cpp,v 1.30 2008-03-19 17:55:58 c2woody Exp $ */ +/* $Id: dos_ioctl.cpp,v 1.31 2008-05-22 16:45:57 c2woody Exp $ */ #include #include "dosbox.h" @@ -115,10 +115,15 @@ bool DOS_IOCTL(void) { } return true; case 0x09: /* Check if block device remote */ - reg_dx=0; - if (Drives[drive]->isRemote()) reg_dx|=(1 << 12); - //TODO Set bit 9 on drives that don't support direct I/O - reg_al=0; + if (Drives[drive]->isRemote()) { + reg_dx=0x1000; // device is remote + // undocumented bits always clear + } else { + reg_dx=0x0800; // Open/Close supported + // undocumented bits from device attribute word + // TODO Set bit 9 on drives that don't support direct I/O + } + reg_ax=0x300; return true; case 0x0D: /* Generic block device request */ {