Merge pull request #220 from DrChat/portal_fixes
A few fixes for portal
This commit is contained in:
commit
327edc592e
|
@ -84,6 +84,17 @@ SHIM_CALL XamGetExecutionId_shim(PPCContext* ppc_state, KernelState* state) {
|
||||||
SHIM_SET_RETURN_32(0);
|
SHIM_SET_RETURN_32(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SHIM_CALL XamLoaderSetLaunchData_shim(PPCContext* ppc_state,
|
||||||
|
KernelState* state) {
|
||||||
|
uint32_t data_ptr = SHIM_GET_ARG_32(0);
|
||||||
|
uint32_t data_size = SHIM_GET_ARG_32(1);
|
||||||
|
|
||||||
|
XELOGD("XamLoaderSetLaunchData(%.8X, %d)", data_ptr, data_size);
|
||||||
|
|
||||||
|
// Unknown return value.
|
||||||
|
SHIM_SET_RETURN_32(0);
|
||||||
|
}
|
||||||
|
|
||||||
SHIM_CALL XamLoaderGetLaunchDataSize_shim(PPCContext* ppc_state,
|
SHIM_CALL XamLoaderGetLaunchDataSize_shim(PPCContext* ppc_state,
|
||||||
KernelState* state) {
|
KernelState* state) {
|
||||||
uint32_t size_ptr = SHIM_GET_ARG_32(0);
|
uint32_t size_ptr = SHIM_GET_ARG_32(0);
|
||||||
|
@ -205,8 +216,9 @@ void xe::kernel::xam::RegisterInfoExports(
|
||||||
SHIM_SET_MAPPING("xam.xex", XGetLanguage, state);
|
SHIM_SET_MAPPING("xam.xex", XGetLanguage, state);
|
||||||
|
|
||||||
SHIM_SET_MAPPING("xam.xex", XamVoiceIsActiveProcess, state);
|
SHIM_SET_MAPPING("xam.xex", XamVoiceIsActiveProcess, state);
|
||||||
|
|
||||||
SHIM_SET_MAPPING("xam.xex", XamGetExecutionId, state);
|
SHIM_SET_MAPPING("xam.xex", XamGetExecutionId, state);
|
||||||
|
|
||||||
|
SHIM_SET_MAPPING("xam.xex", XamLoaderSetLaunchData, state);
|
||||||
SHIM_SET_MAPPING("xam.xex", XamLoaderGetLaunchDataSize, state);
|
SHIM_SET_MAPPING("xam.xex", XamLoaderGetLaunchDataSize, state);
|
||||||
SHIM_SET_MAPPING("xam.xex", XamLoaderGetLaunchData, state);
|
SHIM_SET_MAPPING("xam.xex", XamLoaderGetLaunchData, state);
|
||||||
SHIM_SET_MAPPING("xam.xex", XamLoaderLaunchTitle, state);
|
SHIM_SET_MAPPING("xam.xex", XamLoaderLaunchTitle, state);
|
||||||
|
|
|
@ -306,8 +306,6 @@ SHIM_CALL MmAllocatePhysicalMemoryEx_shim(PPCContext* ppc_state,
|
||||||
// and the memory must be allocated there. I haven't seen a game do this,
|
// and the memory must be allocated there. I haven't seen a game do this,
|
||||||
// and instead they all do min=0 / max=-1 to indicate the system should pick.
|
// and instead they all do min=0 / max=-1 to indicate the system should pick.
|
||||||
// If we have to suport arbitrary placement things will get nasty.
|
// If we have to suport arbitrary placement things will get nasty.
|
||||||
assert_true(min_addr_range == 0);
|
|
||||||
assert_true(max_addr_range == 0xFFFFFFFF);
|
|
||||||
|
|
||||||
uint32_t allocation_type = kMemoryAllocationReserve | kMemoryAllocationCommit;
|
uint32_t allocation_type = kMemoryAllocationReserve | kMemoryAllocationCommit;
|
||||||
uint32_t protect = FromXdkProtectFlags(protect_bits);
|
uint32_t protect = FromXdkProtectFlags(protect_bits);
|
||||||
|
|
|
@ -380,11 +380,13 @@ SHIM_CALL VdPersistDisplay_shim(PPCContext* ppc_state, KernelState* state) {
|
||||||
|
|
||||||
// unk1_ptr needs to be populated with a pointer passed to
|
// unk1_ptr needs to be populated with a pointer passed to
|
||||||
// MmFreePhysicalMemory(1, *unk1_ptr).
|
// MmFreePhysicalMemory(1, *unk1_ptr).
|
||||||
|
if (unk1_ptr) {
|
||||||
auto heap = state->memory()->LookupHeapByType(true, 16 * 1024);
|
auto heap = state->memory()->LookupHeapByType(true, 16 * 1024);
|
||||||
uint32_t unk1_value;
|
uint32_t unk1_value;
|
||||||
heap->Alloc(64, 32, kMemoryAllocationReserve | kMemoryAllocationCommit,
|
heap->Alloc(64, 32, kMemoryAllocationReserve | kMemoryAllocationCommit,
|
||||||
kMemoryProtectNoAccess, false, &unk1_value);
|
kMemoryProtectNoAccess, false, &unk1_value);
|
||||||
SHIM_SET_MEM_32(unk1_ptr, unk1_value);
|
SHIM_SET_MEM_32(unk1_ptr, unk1_value);
|
||||||
|
}
|
||||||
|
|
||||||
// ?
|
// ?
|
||||||
SHIM_SET_RETURN_64(1);
|
SHIM_SET_RETURN_64(1);
|
||||||
|
|
Loading…
Reference in New Issue