Add a minimum IPS value at compile time.
This is used for calculating the minimum speed for the realtime PIT and for flagging errors with user IPS values.
This commit is contained in:
parent
ac49ea2418
commit
5bc28d6dfa
@ -202,6 +202,11 @@
|
||||
// gui definition so that they don't waste their time trying.
|
||||
#define BX_USE_IDLE_HACK 0
|
||||
|
||||
// Minimum Emulated IPS.
|
||||
// This is used in the realtime PIT as well as for checking the
|
||||
// IPS value set in the config file.
|
||||
#define BX_MIN_IPS 200000
|
||||
|
||||
// Use Static Member Funtions to eliminate 'this' pointer passing
|
||||
// If you want the efficiency of 'C', you can make all the
|
||||
// members of the C++ CPU class to be static.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: pit_wrap.cc,v 1.35 2002-10-29 22:26:32 yakovlev Exp $
|
||||
// $Id: pit_wrap.cc,v 1.36 2002-10-30 18:30:29 yakovlev Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -80,10 +80,15 @@ bx_pit_c bx_pit;
|
||||
#define DEBUG_GETTIMEOFDAY_WITH_PRINTF 0
|
||||
|
||||
|
||||
#define USEC_PER_SECOND (1000000)
|
||||
|
||||
#define TIME_DIVIDER (1)
|
||||
#define TIME_MULTIPLIER (1)
|
||||
#define TIME_HEADSTART (1)
|
||||
#define MIN_USEC_PER_SECOND (((((Bit64u)USEC_PER_SECOND)*((Bit64u)BX_MIN_IPS))/((Bit64u)(bx_options.Oips->get())))+(Bit64u)1)
|
||||
#if 0
|
||||
#define MIN_USEC_PER_SECOND (150000)
|
||||
#endif
|
||||
//USEC_ALPHA is multiplier for the past.
|
||||
//USEC_ALPHA_B is 1-USEC_ALPHA, or multiplier for the present.
|
||||
#define USEC_ALPHA ((double)(.8))
|
||||
@ -102,7 +107,6 @@ bx_pit_c bx_pit;
|
||||
//1.193181MHz Clock
|
||||
//1193/1000 Ticks Per usecond.
|
||||
#define TICKS_PER_SECOND (1193181)
|
||||
#define USEC_PER_SECOND (1000000)
|
||||
#define TIME_MULT 1.193
|
||||
#define REAL_TICKS_TO_USEC(a) ( ((a)*USEC_PER_SECOND)/TICKS_PER_SECOND )
|
||||
#define REAL_USEC_TO_TICKS(a) ( ((a)*TICKS_PER_SECOND)/USEC_PER_SECOND )
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: main.cc,v 1.170 2002-10-29 22:26:31 yakovlev Exp $
|
||||
// $Id: main.cc,v 1.171 2002-10-30 18:30:29 yakovlev Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 MandrakeSoft S.A.
|
||||
@ -2741,7 +2741,7 @@ parse_line_formatted(char *context, int num_params, char *params[])
|
||||
PARSE_ERR(("%s: ips directive: wrong # args.", context));
|
||||
}
|
||||
bx_options.Oips->set (atol(params[1]));
|
||||
if (bx_options.Oips->get () < 200000) {
|
||||
if (bx_options.Oips->get () < BX_MIN_IPS) {
|
||||
BX_ERROR(("%s: WARNING: ips is AWFULLY low!", context));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user