XMsgStartIORequestEx

This commit is contained in:
Ben Vanik 2015-01-09 00:26:47 -08:00
parent 2bc951cd1e
commit 9f765e1291
1 changed files with 22 additions and 0 deletions

View File

@ -53,6 +53,27 @@ SHIM_CALL XMsgStartIORequest_shim(PPCContext* ppc_state, KernelState* state) {
SHIM_SET_RETURN_32(result); SHIM_SET_RETURN_32(result);
} }
SHIM_CALL XMsgStartIORequestEx_shim(PPCContext* ppc_state, KernelState* state) {
uint32_t app = SHIM_GET_ARG_32(0);
uint32_t message = SHIM_GET_ARG_32(1);
uint32_t overlapped_ptr = SHIM_GET_ARG_32(2);
uint32_t buffer = SHIM_GET_ARG_32(3);
uint32_t buffer_length = SHIM_GET_ARG_32(4);
uint32_t unknown_ptr = SHIM_GET_ARG_32(5);
XELOGD("XMsgStartIORequestEx(%.8X, %.8X, %.8X, %.8X, %d, %.8X)", app, message,
overlapped_ptr, buffer, buffer_length, unknown_ptr);
assert_zero(overlapped_ptr);
auto result = state->app_manager()->DispatchMessageAsync(app, message, buffer,
buffer_length);
if (result == X_ERROR_NOT_FOUND) {
XELOGE("XMsgStartIORequestEx: app %.8X undefined", app);
}
SHIM_SET_RETURN_32(result);
}
SHIM_CALL XMsgCancelIORequest_shim(PPCContext* ppc_state, KernelState* state) { SHIM_CALL XMsgCancelIORequest_shim(PPCContext* ppc_state, KernelState* state) {
uint32_t overlapped_ptr = SHIM_GET_ARG_32(0); uint32_t overlapped_ptr = SHIM_GET_ARG_32(0);
uint32_t wait = SHIM_GET_ARG_32(1); uint32_t wait = SHIM_GET_ARG_32(1);
@ -79,5 +100,6 @@ void xe::kernel::xam::RegisterMsgExports(ExportResolver* export_resolver,
KernelState* state) { KernelState* state) {
SHIM_SET_MAPPING("xam.xex", XMsgInProcessCall, state); SHIM_SET_MAPPING("xam.xex", XMsgInProcessCall, state);
SHIM_SET_MAPPING("xam.xex", XMsgStartIORequest, state); SHIM_SET_MAPPING("xam.xex", XMsgStartIORequest, state);
SHIM_SET_MAPPING("xam.xex", XMsgStartIORequestEx, state);
SHIM_SET_MAPPING("xam.xex", XMsgCancelIORequest, state); SHIM_SET_MAPPING("xam.xex", XMsgCancelIORequest, state);
} }