From 5a4f738a37053120e3ca31403e6b44c5036ec6f2 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Tue, 7 Jan 2014 21:55:46 -0800 Subject: [PATCH] Dummy ExRegisterTitleTerminateNotification. --- src/xenia/kernel/xboxkrnl_io.cc | 5 +++-- src/xenia/kernel/xboxkrnl_modules.cc | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/xenia/kernel/xboxkrnl_io.cc b/src/xenia/kernel/xboxkrnl_io.cc index 5305e5972..6d2d11401 100644 --- a/src/xenia/kernel/xboxkrnl_io.cc +++ b/src/xenia/kernel/xboxkrnl_io.cc @@ -124,7 +124,7 @@ SHIM_CALL NtReadFile_shim( size_t byte_offset = byte_offset_ptr ? SHIM_MEM_64(byte_offset_ptr) : 0; XELOGD( - "NtReadFile(%.8X, %.8X, %.8X, %.8X, %.8X, %.8X, %d, %d)", + "NtReadFile(%.8X, %.8X, %.8X, %.8X, %.8X, %.8X, %d, %.8X(%d))", file_handle, event_handle, apc_routine_ptr, @@ -132,7 +132,8 @@ SHIM_CALL NtReadFile_shim( io_status_block_ptr, buffer, buffer_length, - byte_offset_ptr); + byte_offset_ptr, + byte_offset); // Async not supported yet. XEASSERTNULL(apc_routine_ptr); diff --git a/src/xenia/kernel/xboxkrnl_modules.cc b/src/xenia/kernel/xboxkrnl_modules.cc index bc64e26bf..0d780bd36 100644 --- a/src/xenia/kernel/xboxkrnl_modules.cc +++ b/src/xenia/kernel/xboxkrnl_modules.cc @@ -243,6 +243,30 @@ SHIM_CALL XexGetProcedureAddress_shim( } +SHIM_CALL ExRegisterTitleTerminateNotification_shim( + PPCContext* ppc_state, KernelState* state) { + uint32_t registration_ptr = SHIM_GET_ARG_32(0); + uint32_t create = SHIM_GET_ARG_32(1); + + uint32_t routine = SHIM_MEM_32(registration_ptr + 0); + uint32_t priority = SHIM_MEM_32(registration_ptr + 4); + // list entry flink + // list entry blink + + XELOGD( + "ExRegisterTitleTerminateNotification(%.8X(%.8X), %.1X)", + registration_ptr, routine, create); + + if (create) { + // Adding. + // TODO(benvanik): add to master list (kernel?). + } else { + // Removing. + // TODO(benvanik): remove from master list. + } +} + + } // namespace kernel } // namespace xe @@ -256,4 +280,6 @@ void xe::kernel::xboxkrnl::RegisterModuleExports( SHIM_SET_MAPPING("xboxkrnl.exe", XexGetModuleHandle, state); // SHIM_SET_MAPPING("xboxkrnl.exe", XexGetModuleSection, state); SHIM_SET_MAPPING("xboxkrnl.exe", XexGetProcedureAddress, state); + + SHIM_SET_MAPPING("xboxkrnl.exe", ExRegisterTitleTerminateNotification, state); }