1
0
Fork 0

Add a trick for Ishar 3 of the Ishar 3 Triology. File reads and writes take actually cycles now.(4 times the amount of transfered data)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2608
This commit is contained in:
Peter Veenstra 2006-04-21 08:23:40 +00:00
parent b43c3d6643
commit 632f579361

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos.cpp,v 1.93 2006-03-08 15:57:23 qbix79 Exp $ */
/* $Id: dos.cpp,v 1.94 2006-04-21 08:23:40 qbix79 Exp $ */
#include <stdlib.h>
#include <string.h>
@ -41,6 +41,18 @@ void DOS_SetError(Bit16u code) {
dos.errorcode=code;
}
#define DATA_TRANSFERS_TAKE_CYCLES 1
#ifdef DATA_TRANSFERS_TAKE_CYCLES
#include "cpu.h"
static inline void modify_cycles(Bitu value) {
if((4*value+5) < CPU_Cycles) CPU_Cycles -= 4*value; else CPU_Cycles = 5;
}
#else
static inline void modify_cycles(Bitu /* value */) {
return;
}
#endif
#define DOSNAMEBUF 256
static Bitu DOS_21Handler(void) {
if (((reg_ah != 0x50) && (reg_ah != 0x51) && (reg_ah != 0x62) && (reg_ah != 0x64)) && (reg_ah<0x6c)) {
@ -499,6 +511,7 @@ static Bitu DOS_21Handler(void) {
reg_ax=dos.errorcode;
CALLBACK_SCF(true);
}
modify_cycles(reg_ax);
dos.echo=false;
break;
}
@ -513,6 +526,7 @@ static Bitu DOS_21Handler(void) {
reg_ax=dos.errorcode;
CALLBACK_SCF(true);
}
modify_cycles(reg_ax);
break;
};
case 0x41: /* UNLINK Delete file */