diff --git a/src/dos/dos.cpp b/src/dos/dos.cpp index fd5ebbe1..5c6cf7e8 100644 --- a/src/dos/dos.cpp +++ b/src/dos/dos.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos.cpp,v 1.117 2009-04-16 12:16:52 qbix79 Exp $ */ +/* $Id: dos.cpp,v 1.118 2009-07-15 17:05:07 c2woody Exp $ */ #include #include @@ -397,8 +397,10 @@ static Bitu DOS_21Handler(void) { case 0x1f: /* Get drive parameter block for default drive */ case 0x32: /* Get drive parameter block for specific drive */ { /* Officially a dpb should be returned as well. The disk detection part is implemented */ - Bitu drive=reg_dl;if(!drive || reg_ah==0x1f) drive = DOS_GetDefaultDrive();else drive--; - if(Drives[drive]) { + Bit8u drive=reg_dl; + if (!drive || reg_ah==0x1f) drive = DOS_GetDefaultDrive(); + else drive--; + if (Drives[drive]) { reg_al = 0x00; SegSet16(ds,dos.tables.dpb); reg_bx = drive;//Faking only the first entry (that is the driveletter) @@ -813,6 +815,8 @@ static Bitu DOS_21Handler(void) { break; default: LOG(LOG_DOSMISC,LOG_ERROR)("DOS:58:Not Supported Set//Get memory allocation call %X",reg_al); + reg_ax=1; + CALLBACK_SCF(true); } break; case 0x59: /* Get Extended error information */ @@ -945,7 +949,7 @@ static Bitu DOS_21Handler(void) { { int in = reg_dl; int out = toupper(in); - reg_dl = out; + reg_dl = (Bit8u)out; } CALLBACK_SCF(false); break; @@ -960,8 +964,8 @@ static Bitu DOS_21Handler(void) { MEM_BlockRead(data,dos_copybuf,len); dos_copybuf[len] = 0; //No upcase as String(0x21) might be multiple asciz strings - for(Bitu count = 0; count < len;count++) - dos_copybuf[count] = toupper(*reinterpret_cast(dos_copybuf+count)); + for (Bitu count = 0; count < len;count++) + dos_copybuf[count] = (Bit8u)toupper(*reinterpret_cast(dos_copybuf+count)); MEM_BlockWrite(data,dos_copybuf,len); } CALLBACK_SCF(false); @@ -1149,7 +1153,7 @@ public: static DOS* test; -void DOS_ShutDown(Section* sec) { +void DOS_ShutDown(Section* /*sec*/) { delete test; } diff --git a/src/dos/dos_memory.cpp b/src/dos/dos_memory.cpp index efe8a46c..67533716 100644 --- a/src/dos/dos_memory.cpp +++ b/src/dos/dos_memory.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_memory.cpp,v 1.44 2009-06-08 17:20:02 c2woody Exp $ */ +/* $Id: dos_memory.cpp,v 1.45 2009-07-15 17:05:07 c2woody Exp $ */ #include "dosbox.h" #include "mem.h" @@ -347,7 +347,7 @@ bool DOS_LinkUMBsToMemChain(Bit16u linkstate) { Bit16u umb_start=dos_infoblock.GetStartOfUMBChain(); if (umb_start!=UMB_START_SEG) { if (umb_start!=0xffff) LOG(LOG_DOSMISC,LOG_ERROR)("Corrupt UMB chain: %x",umb_start); - return true; + return false; } if ((linkstate&1)==(dos_infoblock.GetUMBChainState()&1)) return true;