Use a fixed cycle rate in auto cycles mode when calculating RDTSC. Improves Tie break Tennis 98
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3748
This commit is contained in:
parent
173fb5510e
commit
ee982d5754
2 changed files with 3 additions and 2 deletions
|
@ -502,7 +502,7 @@ l_M_Ed:
|
|||
continue;
|
||||
case D_RDTSC: {
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_PENTIUMSLOW) goto illegalopcode;
|
||||
Bit64s tsc=(Bit64s)(PIC_FullIndex()*(double)CPU_CycleMax);
|
||||
Bit64s tsc=(Bit64s)(PIC_FullIndex()*(double)(CPU_CycleAutoAdjust?70000:CPU_CycleMax));
|
||||
reg_edx=(Bit32u)(tsc>>32);
|
||||
reg_eax=(Bit32u)(tsc&0xffffffff);
|
||||
break;
|
||||
|
|
|
@ -228,7 +228,8 @@
|
|||
CASE_0F_B(0x31) /* RDTSC */
|
||||
{
|
||||
if (CPU_ArchitectureType<CPU_ARCHTYPE_PENTIUMSLOW) goto illegal_opcode;
|
||||
Bit64s tsc=(Bit64s)(PIC_FullIndex()*(double)CPU_CycleMax);
|
||||
/* Use a fixed number when in auto cycles mode as else the reported value changes constantly */
|
||||
Bit64s tsc=(Bit64s)(PIC_FullIndex()*(double) (CPU_CycleAutoAdjust?70000:CPU_CycleMax));
|
||||
reg_edx=(Bit32u)(tsc>>32);
|
||||
reg_eax=(Bit32u)(tsc&0xffffffff);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue