From 121b29e6f1f1fda5b2550da181c0973c5fd2f671 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 1 Sep 2005 17:34:39 +0000 Subject: [PATCH] improve support for 2 images booters. (only pressing enter instead of having to swap disks). Fix verify disk. Makes Triva games boot Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2296 --- src/ints/bios_disk.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index d975f07e..0fd03402 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: bios_disk.cpp,v 1.20 2005-08-28 09:48:42 c2woody Exp $ */ +/* $Id: bios_disk.cpp,v 1.21 2005-09-01 17:34:39 qbix79 Exp $ */ #include "dosbox.h" #include "callback.h" @@ -197,7 +197,17 @@ imageDisk::imageDisk(FILE *imgFile, Bit8u *imgName, Bit32u imgSizeK, bool isHard } if(!founddisk) { active = false; - } else mem_writeb(BIOS_CONFIGURATION,mem_readb(BIOS_CONFIGURATION)|1); + } else { + Bit16u equipment=mem_readw(BIOS_CONFIGURATION); + if(equipment&1) { + Bitu numofdisks = (equipment>>5)&3; + numofdisks++; + if(numofdisks > 1) numofdisks=1;//max 2 floppies at the moment + equipment&=~0x00C0; + equipment|=(numofdisks<<5); + } else equipment|=1; + mem_writew(BIOS_CONFIGURATION,equipment); + } } } @@ -374,8 +384,9 @@ static Bitu INT13_DiskHandler(void) { } }*/ reg_ah = 0x00; + //Qbix: The following codes don't match my specs. al should be number of sector verified //reg_al = 0x10; /* CRC verify failed */ - reg_al = 0x00; /* CRC verify succeeded */ + //reg_al = 0x00; /* CRC verify succeeded */ CALLBACK_SCF(false); break;