Adding XamVoice stubs.

This commit is contained in:
Ben Vanik 2014-08-04 14:56:34 -07:00
parent 35885f761c
commit a98b9458b6
5 changed files with 111 additions and 0 deletions

View File

@ -38,6 +38,8 @@
'xam_user.h',
'xam_video.cc',
'xam_video.h',
'xam_voice.cc',
'xam_voice.h',
'xboxkrnl_audio.cc',
'xboxkrnl_audio.h',
'xboxkrnl_debug.cc',

View File

@ -39,6 +39,7 @@ XamModule::XamModule(Emulator* emulator, KernelState* kernel_state) :
RegisterNotifyExports(export_resolver_, kernel_state);
RegisterUserExports(export_resolver_, kernel_state);
RegisterVideoExports(export_resolver_, kernel_state);
RegisterVoiceExports(export_resolver_, kernel_state);
}
XamModule::~XamModule() {

View File

@ -31,6 +31,7 @@ void RegisterNetExports(ExportResolver* export_resolver, KernelState* state);
void RegisterNotifyExports(ExportResolver* export_resolver, KernelState* state);
void RegisterUserExports(ExportResolver* export_resolver, KernelState* state);
void RegisterVideoExports(ExportResolver* export_resolver, KernelState* state);
void RegisterVoiceExports(ExportResolver* export_resolver, KernelState* state);
} // namespace xam
} // namespace kernel

View File

@ -0,0 +1,78 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/kernel/xam_input.h>
#include <xenia/emulator.h>
#include <xenia/kernel/kernel_state.h>
#include <xenia/kernel/xam_private.h>
#include <xenia/kernel/util/shim_utils.h>
using namespace xe;
using namespace xe::hid;
using namespace xe::kernel;
using namespace xe::kernel::xam;
namespace xe {
namespace kernel {
SHIM_CALL XamVoiceCreate_shim(
PPCContext* ppc_state, KernelState* state) {
uint32_t unk1 = SHIM_GET_ARG_32(0); // 0
uint32_t unk2 = SHIM_GET_ARG_32(1); // 0xF
uint32_t out_voice_ptr = SHIM_GET_ARG_32(2);
XELOGD(
"XamVoiceCreate(%.8X, %.8X, %.8X)",
unk1, unk2, out_voice_ptr);
// Null out the ptr.
SHIM_SET_MEM_32(out_voice_ptr, 0);
SHIM_SET_RETURN_32(X_ERROR_ACCESS_DENIED);
}
SHIM_CALL XamVoiceClose_shim(
PPCContext* ppc_state, KernelState* state) {
uint32_t voice_ptr = SHIM_GET_ARG_32(0);
XELOGD(
"XamVoiceClose(%.8X)",
voice_ptr);
SHIM_SET_RETURN_32(0);
}
SHIM_CALL XamVoiceHeadsetPresent_shim(
PPCContext* ppc_state, KernelState* state) {
uint32_t voice_ptr = SHIM_GET_ARG_32(0);
XELOGD(
"XamVoiceHeadsetPresent(%.8X)",
voice_ptr);
SHIM_SET_RETURN_32(0);
}
} // namespace kernel
} // namespace xe
void xe::kernel::xam::RegisterVoiceExports(
ExportResolver* export_resolver, KernelState* state) {
SHIM_SET_MAPPING("xam.xex", XamVoiceCreate, state);
SHIM_SET_MAPPING("xam.xex", XamVoiceClose, state);
SHIM_SET_MAPPING("xam.xex", XamVoiceHeadsetPresent, state);
}

View File

@ -0,0 +1,29 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_KERNEL_XAM_VOICE_H_
#define XENIA_KERNEL_XAM_VOICE_H_
#include <xenia/common.h>
#include <xenia/core.h>
#include <xenia/xbox.h>
namespace xe {
namespace kernel {
} // namespace kernel
} // namespace xe
#endif // XENIA_KERNEL_XAM_VOICE_H_