From b8d1d3cf35ff309d071e03d30bea6dd34df36b63 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 3 Jun 2015 18:29:44 -0700 Subject: [PATCH] Stub for avatar stuff to make it immediately bail. --- libxenia.vcxproj | 1 + libxenia.vcxproj.filters | 3 +++ src/xenia/kernel/xam_avatar.cc | 41 ++++++++++++++++++++++++++++++++++ src/xenia/kernel/xam_module.cc | 1 + src/xenia/kernel/xam_private.h | 2 ++ 5 files changed, 48 insertions(+) create mode 100644 src/xenia/kernel/xam_avatar.cc diff --git a/libxenia.vcxproj b/libxenia.vcxproj index 3ce383cf0..b6f8f7589 100644 --- a/libxenia.vcxproj +++ b/libxenia.vcxproj @@ -162,6 +162,7 @@ + diff --git a/libxenia.vcxproj.filters b/libxenia.vcxproj.filters index f5850d60c..958a1cfc1 100644 --- a/libxenia.vcxproj.filters +++ b/libxenia.vcxproj.filters @@ -721,6 +721,9 @@ src\xenia\kernel + + src\xenia\kernel + diff --git a/src/xenia/kernel/xam_avatar.cc b/src/xenia/kernel/xam_avatar.cc new file mode 100644 index 000000000..4d3ef9692 --- /dev/null +++ b/src/xenia/kernel/xam_avatar.cc @@ -0,0 +1,41 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2015 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#include "xenia/base/logging.h" +#include "xenia/kernel/kernel_state.h" +#include "xenia/kernel/util/shim_utils.h" +#include "xenia/kernel/xam_private.h" +#include "xenia/xbox.h" + +namespace xe { +namespace kernel { + +dword_result_t XamAvatarInitialize( + dword_t unk1, // 1, 4, etc + dword_t unk2, // 0 or 1 + dword_t processor_number, // for thread creation? + lpdword_t function_ptrs, // 20b, 5 pointers + lpunknown_t unk5, // ptr in data segment + dword_t unk6 // flags - 0x00300000, 0x30, etc + ) { + // Negative to fail. Game should immediately call XamAvatarShutdown. + return -1; +} +DECLARE_XAM_EXPORT(XamAvatarInitialize, ExportTag::kStub); + +void XamAvatarShutdown() { + // No-op. +} +DECLARE_XAM_EXPORT(XamAvatarShutdown, ExportTag::kStub); + +} // namespace kernel +} // namespace xe + +void xe::kernel::xam::RegisterAvatarExports( + xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state) {} diff --git a/src/xenia/kernel/xam_module.cc b/src/xenia/kernel/xam_module.cc index b4fe1d72d..5a1da05c2 100644 --- a/src/xenia/kernel/xam_module.cc +++ b/src/xenia/kernel/xam_module.cc @@ -21,6 +21,7 @@ XamModule::XamModule(Emulator* emulator, KernelState* kernel_state) RegisterExportTable(export_resolver_); // Register all exported functions. + xam::RegisterAvatarExports(export_resolver_, kernel_state_); xam::RegisterContentExports(export_resolver_, kernel_state_); xam::RegisterInfoExports(export_resolver_, kernel_state_); xam::RegisterInputExports(export_resolver_, kernel_state_); diff --git a/src/xenia/kernel/xam_private.h b/src/xenia/kernel/xam_private.h index 85706c4e4..a6360f70d 100644 --- a/src/xenia/kernel/xam_private.h +++ b/src/xenia/kernel/xam_private.h @@ -22,6 +22,8 @@ xe::cpu::Export* RegisterExport_xam(xe::cpu::Export* export); namespace xam { // Registration functions, one per file. +void RegisterAvatarExports(xe::cpu::ExportResolver* export_resolver, + KernelState* kernel_state); void RegisterContentExports(xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state); void RegisterInfoExports(xe::cpu::ExportResolver* export_resolver,