[Kernel] Set flag 5 in XboxHardwareInfo.
[Kernel] Set flag 5 (indicates storage is initialized) in XboxHardwareInfo.
This commit is contained in:
parent
362251df0b
commit
ce1a31faad
|
@ -156,11 +156,14 @@ XboxkrnlModule::XboxkrnlModule(Emulator* emulator, KernelState* kernel_state)
|
||||||
//
|
//
|
||||||
// aomega08 says the value is 0x02000817, bit 27: debug mode on.
|
// aomega08 says the value is 0x02000817, bit 27: debug mode on.
|
||||||
// When that is set, though, allocs crash in weird ways.
|
// When that is set, though, allocs crash in weird ways.
|
||||||
|
//
|
||||||
|
// From kernel dissasembly, after storage is initialized
|
||||||
|
// XboxHardwareInfo flags is set with flag 5 (0x20).
|
||||||
uint32_t pXboxHardwareInfo = memory_->SystemHeapAlloc(16);
|
uint32_t pXboxHardwareInfo = memory_->SystemHeapAlloc(16);
|
||||||
auto lpXboxHardwareInfo = memory_->TranslateVirtual(pXboxHardwareInfo);
|
auto lpXboxHardwareInfo = memory_->TranslateVirtual(pXboxHardwareInfo);
|
||||||
export_resolver_->SetVariableMapping(
|
export_resolver_->SetVariableMapping(
|
||||||
"xboxkrnl.exe", ordinals::XboxHardwareInfo, pXboxHardwareInfo);
|
"xboxkrnl.exe", ordinals::XboxHardwareInfo, pXboxHardwareInfo);
|
||||||
xe::store_and_swap<uint32_t>(lpXboxHardwareInfo + 0, 0); // flags
|
xe::store_and_swap<uint32_t>(lpXboxHardwareInfo + 0, 0x20); // flags
|
||||||
xe::store_and_swap<uint8_t>(lpXboxHardwareInfo + 4, 0x06); // cpu count
|
xe::store_and_swap<uint8_t>(lpXboxHardwareInfo + 4, 0x06); // cpu count
|
||||||
// Remaining 11b are zeroes?
|
// Remaining 11b are zeroes?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue