[Base] Test changing frequency to 49.875 instead of 50

Some public slides mention this is the actual frequency it runs at (slide 15: https://slideplayer.com/slide/9528088/)
KeQueryPerfFrequency always returns 50MHz though.
This commit is contained in:
emoose 2020-01-05 22:27:00 +00:00
parent f92f660251
commit 1b36f593c8
2 changed files with 3 additions and 4 deletions

View File

@ -119,8 +119,8 @@ X_STATUS Emulator::Setup(
display_window_ = display_window;
// Initialize clock.
// 360 uses a 50MHz clock.
Clock::set_guest_tick_frequency(50000000);
// 360 uses a ~49.875MHz clock.
Clock::set_guest_tick_frequency(49875000);
// We could reset this with save state data/constant value to help replays.
Clock::set_guest_system_time_base(Clock::QueryHostSystemTime());
// This can be adjusted dynamically, as well.

View File

@ -283,8 +283,7 @@ void KeSetCurrentProcessType(dword_t type) {
DECLARE_XBOXKRNL_EXPORT1(KeSetCurrentProcessType, kThreading, kImplemented);
dword_result_t KeQueryPerformanceFrequency() {
uint64_t result = Clock::guest_tick_frequency();
return static_cast<uint32_t>(result);
return 50000000; // always returns 50MHz, even though X360 is at 49.875 or so
}
DECLARE_XBOXKRNL_EXPORT2(KeQueryPerformanceFrequency, kThreading, kImplemented,
kHighFrequency);