From 9a3a22b1ae0119e4f4bf435ac18d63380271b7c7 Mon Sep 17 00:00:00 2001 From: Volker Ruppert Date: Tue, 24 Aug 2004 15:15:19 +0000 Subject: [PATCH] - CDROM_MODE_SENSE now returns the medium type if a medium is present (patch from Ben Lunt) --- bochs/iodev/harddrv.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bochs/iodev/harddrv.cc b/bochs/iodev/harddrv.cc index 205d0b252..c4362dd63 100644 --- a/bochs/iodev/harddrv.cc +++ b/bochs/iodev/harddrv.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: harddrv.cc,v 1.124 2004-08-23 09:39:45 vruppert Exp $ +// $Id: harddrv.cc,v 1.125 2004-08-24 15:15:19 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (C) 2002 MandrakeSoft S.A. @@ -161,7 +161,7 @@ bx_hard_drive_c::init(void) char string[5]; char sbtext[8]; - BX_DEBUG(("Init $Id: harddrv.cc,v 1.124 2004-08-23 09:39:45 vruppert Exp $")); + BX_DEBUG(("Init $Id: harddrv.cc,v 1.125 2004-08-24 15:15:19 vruppert Exp $")); for (channel=0; channelget() == 1) { @@ -3186,7 +3186,10 @@ bx_hard_drive_c::init_mode_sense_single(Bit8u channel, const void* src, int size // Header BX_SELECTED_CONTROLLER(channel).buffer[0] = (size+6) >> 8; BX_SELECTED_CONTROLLER(channel).buffer[1] = (size+6) & 0xff; - BX_SELECTED_CONTROLLER(channel).buffer[2] = 0x70; // no media present + if (bx_options.atadevice[channel][BX_HD_THIS channels[channel].drive_select].Ostatus->get () == BX_INSERTED) + BX_SELECTED_CONTROLLER(channel).buffer[2] = 0x12; // media present 120mm CD-ROM (CD-R) data/audio door closed + else + BX_SELECTED_CONTROLLER(channel).buffer[2] = 0x70; // no media present BX_SELECTED_CONTROLLER(channel).buffer[3] = 0; // reserved BX_SELECTED_CONTROLLER(channel).buffer[4] = 0; // reserved BX_SELECTED_CONTROLLER(channel).buffer[5] = 0; // reserved