1
0
Fork 0

int13 unconditionally enables the interrupt flag on return (ripsaw, fixes some pirates booter version);

change the set/clear flag for callback return functions a bit (hal)


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3458
This commit is contained in:
Sebastian Strohhäcker 2009-08-23 17:24:54 +00:00
parent 404af77c9b
commit decb3823d2
3 changed files with 22 additions and 9 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: callback.h,v 1.25 2009-06-11 16:05:17 c2woody Exp $ */
/* $Id: callback.h,v 1.26 2009-08-23 17:24:54 c2woody Exp $ */
#ifndef DOSBOX_CALLBACK_H
#define DOSBOX_CALLBACK_H
@ -71,6 +71,7 @@ bool CALLBACK_Free(Bitu callback);
void CALLBACK_SCF(bool val);
void CALLBACK_SZF(bool val);
void CALLBACK_SIF(bool val);
extern Bitu call_priv_io;

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: callback.cpp,v 1.41 2009-06-11 16:05:17 c2woody Exp $ */
/* $Id: callback.cpp,v 1.42 2009-08-23 17:24:54 c2woody Exp $ */
#include <stdlib.h>
#include <string.h>
@ -109,15 +109,24 @@ void CALLBACK_RunRealInt(Bit8u intnum) {
}
void CALLBACK_SZF(bool val) {
Bit16u tempf=mem_readw(SegPhys(ss)+reg_sp+4) & 0xFFBF;
Bit16u newZF=(val==true) << 6;
mem_writew(SegPhys(ss)+reg_sp+4,(tempf | newZF));
Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
if (val) tempf |= FLAG_ZF;
else tempf &= ~FLAG_ZF;
mem_writew(SegPhys(ss)+reg_sp+4,tempf);
}
void CALLBACK_SCF(bool val) {
Bit16u tempf=mem_readw(SegPhys(ss)+reg_sp+4) & 0xFFFE;
Bit16u newCF=(val==true);
mem_writew(SegPhys(ss)+reg_sp+4,(tempf | newCF));
Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
if (val) tempf |= FLAG_CF;
else tempf &= ~FLAG_CF;
mem_writew(SegPhys(ss)+reg_sp+4,tempf);
}
void CALLBACK_SIF(bool val) {
Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
if (val) tempf |= FLAG_IF;
else tempf &= ~FLAG_IF;
mem_writew(SegPhys(ss)+reg_sp+4,tempf);
}
void CALLBACK_SetDescription(Bitu nr, const char* descr) {

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: bios_disk.cpp,v 1.39 2009-08-12 21:16:09 c2woody Exp $ */
/* $Id: bios_disk.cpp,v 1.40 2009-08-23 17:24:54 c2woody Exp $ */
#include "dosbox.h"
#include "callback.h"
@ -309,6 +309,9 @@ static Bitu INT13_DiskHandler(void) {
if(imageDiskList[i]) any_images=true;
}
// unconditionally enable the interrupt flag
CALLBACK_SIF(true);
//drivenum = 0;
//LOG_MSG("INT13: Function %x called on drive %x (dos drive %d)", reg_ah, reg_dl, drivenum);
switch(reg_ah) {