mirror of https://github.com/xemu-project/xemu.git
Fix the TSC at 733 MHz
The time stamp counter (accessed via `rdtsc`) may be used as a performance counter in some titles. On the Xbox, the TSC runs at a constant 733 MHz.
This commit is contained in:
parent
81dd2188c4
commit
e3d643ea16
|
@ -144,7 +144,12 @@ static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size)
|
|||
/* TSC handling */
|
||||
uint64_t cpu_get_tsc(CPUX86State *env)
|
||||
{
|
||||
#ifdef TARGET_XBOX
|
||||
return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), 733333333,
|
||||
get_ticks_per_sec());
|
||||
#else
|
||||
return cpu_get_ticks();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* SMM support */
|
||||
|
|
Loading…
Reference in New Issue