Stubs for XamSessionCreateHandler+co; enough to make games skip it.
Fixes #150.
This commit is contained in:
parent
c846ec30c3
commit
bde6cf0d85
|
@ -63,6 +63,16 @@ X_RESULT XXGIApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
|
||||||
achievements_ptr);
|
achievements_ptr);
|
||||||
return X_ERROR_SUCCESS;
|
return X_ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
case 0x000B0010: {
|
||||||
|
assert_true(!buffer_length || buffer_length == 28);
|
||||||
|
// Sequence:
|
||||||
|
// - XamSessionCreateHandle
|
||||||
|
// - XamSessionRefObjByHandle
|
||||||
|
// - [this]
|
||||||
|
// - CloseHandle
|
||||||
|
XELOGD("XSessionCreateImpl(...)");
|
||||||
|
return X_ERROR_FUNCTION_FAILED;
|
||||||
|
}
|
||||||
case 0x000B0041: {
|
case 0x000B0041: {
|
||||||
assert_true(!buffer_length || buffer_length == 32);
|
assert_true(!buffer_length || buffer_length == 32);
|
||||||
// 00000000 2789fecc 00000000 00000000 200491e0 00000000 200491f0 20049340
|
// 00000000 2789fecc 00000000 00000000 200491e0 00000000 200491f0 20049340
|
||||||
|
|
|
@ -416,6 +416,29 @@ SHIM_CALL XamWriteGamerTile_shim(PPCContext* ppc_state, KernelState* state) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SHIM_CALL XamSessionCreateHandle_shim(PPCContext* ppc_state, KernelState* state) {
|
||||||
|
uint32_t handle_ptr = SHIM_GET_ARG_32(0);
|
||||||
|
|
||||||
|
XELOGD("XamSessionCreateHandle(%.8X)", handle_ptr);
|
||||||
|
|
||||||
|
SHIM_SET_MEM_32(handle_ptr, 0xCAFEDEAD);
|
||||||
|
|
||||||
|
SHIM_SET_RETURN_32(X_ERROR_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
SHIM_CALL XamSessionRefObjByHandle_shim(PPCContext* ppc_state, KernelState* state) {
|
||||||
|
uint32_t handle = SHIM_GET_ARG_32(0);
|
||||||
|
uint32_t obj_ptr = SHIM_GET_ARG_32(1);
|
||||||
|
|
||||||
|
XELOGD("XamSessionRefObjByHandle(%.8X, %.8X)", handle, obj_ptr);
|
||||||
|
|
||||||
|
assert_true(handle == 0xCAFEDEAD);
|
||||||
|
|
||||||
|
SHIM_SET_MEM_32(obj_ptr, 0);
|
||||||
|
|
||||||
|
SHIM_SET_RETURN_32(X_ERROR_FUNCTION_FAILED);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace kernel
|
} // namespace kernel
|
||||||
} // namespace xe
|
} // namespace xe
|
||||||
|
|
||||||
|
@ -434,4 +457,6 @@ void xe::kernel::xam::RegisterUserExports(ExportResolver* export_resolver,
|
||||||
SHIM_SET_MAPPING("xam.xex", XamParseGamerTileKey, state);
|
SHIM_SET_MAPPING("xam.xex", XamParseGamerTileKey, state);
|
||||||
SHIM_SET_MAPPING("xam.xex", XamReadTileToTexture, state);
|
SHIM_SET_MAPPING("xam.xex", XamReadTileToTexture, state);
|
||||||
SHIM_SET_MAPPING("xam.xex", XamWriteGamerTile, state);
|
SHIM_SET_MAPPING("xam.xex", XamWriteGamerTile, state);
|
||||||
|
SHIM_SET_MAPPING("xam.xex", XamSessionCreateHandle, state);
|
||||||
|
SHIM_SET_MAPPING("xam.xex", XamSessionRefObjByHandle, state);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue