diff --git a/src/dos/dos_misc.cpp b/src/dos/dos_misc.cpp index 6d4079b7..3ef6a1ae 100644 --- a/src/dos/dos_misc.cpp +++ b/src/dos/dos_misc.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: dos_misc.cpp,v 1.21 2008-10-05 14:44:52 qbix79 Exp $ */ +/* $Id: dos_misc.cpp,v 1.22 2009-04-28 18:47:04 c2woody Exp $ */ #include "dosbox.h" #include "callback.h" @@ -88,12 +88,12 @@ static bool DOS_MultiplexFunctions(void) { } else { Bit8u drive=Files[reg_bx]->GetDrive(); - mem_writew(sftptr+sftofs+0x02,Files[reg_bx]->flags&3); // file open mode - mem_writeb(sftptr+sftofs+0x04,(Bit8u)(Files[reg_bx]->attr)); // file attribute - mem_writew(sftptr+sftofs+0x05,0x40|drive); // device info word - mem_writed(sftptr+sftofs+0x07,RealMake(dos.tables.dpb,drive)); // dpb of the drive - mem_writew(sftptr+sftofs+0x0d,Files[reg_bx]->time); // packed file time - mem_writew(sftptr+sftofs+0x0f,Files[reg_bx]->date); // packed file date + mem_writew(sftptr+sftofs+0x02,(Bit16u)(Files[reg_bx]->flags&3)); // file open mode + mem_writeb(sftptr+sftofs+0x04,(Bit8u)(Files[reg_bx]->attr)); // file attribute + mem_writew(sftptr+sftofs+0x05,0x40|drive); // device info word + mem_writed(sftptr+sftofs+0x07,RealMake(dos.tables.dpb,drive)); // dpb of the drive + mem_writew(sftptr+sftofs+0x0d,Files[reg_bx]->time); // packed file time + mem_writew(sftptr+sftofs+0x0f,Files[reg_bx]->date); // packed file date Bit32u curpos=0; Files[reg_bx]->Seek(&curpos,DOS_SEEK_CUR); Bit32u endpos=0; diff --git a/src/hardware/dbopl.cpp b/src/hardware/dbopl.cpp index 02106d86..99e45c90 100644 --- a/src/hardware/dbopl.cpp +++ b/src/hardware/dbopl.cpp @@ -332,7 +332,7 @@ inline void Operator::UpdateRelease( const Chip* chip ) { } inline void Operator::UpdateAttenuation( ) { - Bit8u kslBase = (chanData >> SHIFT_KSLBASE) & 0xff; + Bit8u kslBase = (Bit8u)((chanData >> SHIFT_KSLBASE) & 0xff); Bit32u tl = reg40 & 0x3f; Bit8u kslShift = KslShiftTable[ reg40 >> 6 ]; //Make sure the attenuation goes to the right bits @@ -357,7 +357,7 @@ void Operator::UpdateFrequency( ) { void Operator::UpdateRates( const Chip* chip ) { //Mame seems to reverse this where enabling ksr actually lowers //the rate, but pdf manuals says otherwise? - Bit8u newKsr = (chanData >> SHIFT_KEYCODE) & 0xff; + Bit8u newKsr = (Bit8u)((chanData >> SHIFT_KEYCODE) & 0xff); if ( !( reg20 & MASK_KSR ) ) { newKsr >>= 2; }