1
0
Fork 0

Slightly improve stability with some lot's of fileloading game, while being picky on the sound irq timing.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3243
This commit is contained in:
Peter Veenstra 2008-12-11 09:16:31 +00:00
parent 8b56a6db1f
commit 53b9323bd7

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: dos.cpp,v 1.113 2008-09-07 10:55:14 c2woody Exp $ */
/* $Id: dos.cpp,v 1.114 2008-12-11 09:16:31 qbix79 Exp $ */
#include <stdlib.h>
#include <string.h>
@ -46,7 +46,13 @@ void DOS_SetError(Bit16u code) {
#ifdef DATA_TRANSFERS_TAKE_CYCLES
#include "cpu.h"
static inline void modify_cycles(Bits value) {
if((4*value+5) < CPU_Cycles) CPU_Cycles -= 4*value; else CPU_Cycles = 5;
if((4*value+5) < CPU_Cycles) {
CPU_Cycles -= 4*value;
CPU_IODelayRemoved += 4*value;
} else {
CPU_IODelayRemoved += CPU_Cycles/*-5*/; //don't want to mess with negative
CPU_Cycles = 5;
}
}
#else
static inline void modify_cycles(Bits /* value */) {