Part 1 of kernel simplification/cleanup: removing externs.
This commit is contained in:
parent
56ce363ac5
commit
916dc397ab
|
@ -76,3 +76,4 @@ build-test/
|
|||
# Local-only paths
|
||||
# ==============================================================================
|
||||
attic/
|
||||
third_party/vasm/
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
|
||||
#include <xenia/kernel/objects/xthread.h>
|
||||
|
||||
#include <poly/math.h>
|
||||
|
||||
#include <poly/poly.h>
|
||||
#include <xdb/protocol.h>
|
||||
#include <xenia/cpu/cpu.h>
|
||||
#include <xenia/kernel/native_list.h>
|
||||
#include <xenia/kernel/xboxkrnl_threading.h>
|
||||
#include <xenia/kernel/objects/xevent.h>
|
||||
#include <xenia/kernel/objects/xuser_module.h>
|
||||
|
||||
|
@ -27,7 +25,7 @@ using namespace xe::kernel;
|
|||
|
||||
namespace {
|
||||
static uint32_t next_xthread_id = 0;
|
||||
static uint32_t current_thread_tls = xeKeTlsAlloc();
|
||||
static thread_local XThread* current_thread_tls;
|
||||
static xe_mutex_t* critical_region_ = xe_mutex_alloc(10000);
|
||||
static XThread* shared_kernel_thread_ = 0;
|
||||
}
|
||||
|
@ -110,7 +108,7 @@ XThread::~XThread() {
|
|||
}
|
||||
|
||||
XThread* XThread::GetCurrentThread() {
|
||||
XThread* thread = (XThread*)xeKeTlsGetValue(current_thread_tls);
|
||||
XThread* thread = current_thread_tls;
|
||||
if (!thread) {
|
||||
// Assume this is some shared interrupt thread/etc.
|
||||
XThread::EnterCriticalRegion();
|
||||
|
@ -119,7 +117,7 @@ XThread* XThread::GetCurrentThread() {
|
|||
thread = new XThread(
|
||||
KernelState::shared(), 32 * 1024, 0, 0, 0, 0);
|
||||
shared_kernel_thread_ = thread;
|
||||
xeKeTlsSetValue(current_thread_tls, (uint64_t)thread);
|
||||
current_thread_tls = thread;
|
||||
}
|
||||
XThread::LeaveCriticalRegion();
|
||||
}
|
||||
|
@ -292,9 +290,9 @@ X_STATUS XThread::Exit(int exit_code) {
|
|||
static uint32_t __stdcall XThreadStartCallbackWin32(void* param) {
|
||||
XThread* thread = reinterpret_cast<XThread*>(param);
|
||||
xe::Profiler::ThreadEnter(thread->name());
|
||||
xeKeTlsSetValue(current_thread_tls, (uint64_t)thread);
|
||||
current_thread_tls = thread;
|
||||
thread->Execute();
|
||||
xeKeTlsSetValue(current_thread_tls, NULL);
|
||||
current_thread_tls = nullptr;
|
||||
thread->Release();
|
||||
xe::Profiler::ThreadExit();
|
||||
return 0;
|
||||
|
@ -335,9 +333,9 @@ X_STATUS XThread::PlatformExit(int exit_code) {
|
|||
static void* XThreadStartCallbackPthreads(void* param) {
|
||||
XThread* thread = reinterpret_cast<XThread*>(param);
|
||||
xe::Profiler::ThreadEnter(thread->name());
|
||||
xeKeTlsSetValue(current_thread_tls, (uint64_t)thread);
|
||||
current_thread_tls = thread;
|
||||
thread->Execute();
|
||||
xeKeTlsSetValue(current_thread_tls, NULL);
|
||||
current_thread_tls = nullptr;
|
||||
thread->Release();
|
||||
xe::Profiler::ThreadExit();
|
||||
return 0;
|
||||
|
|
|
@ -18,63 +18,39 @@
|
|||
'user_profile.cc',
|
||||
'user_profile.h',
|
||||
'xam_content.cc',
|
||||
'xam_content.h',
|
||||
'xam_info.cc',
|
||||
'xam_info.h',
|
||||
'xam_input.cc',
|
||||
'xam_input.h',
|
||||
'xam_module.cc',
|
||||
'xam_module.h',
|
||||
'xam_msg.cc',
|
||||
'xam_msg.h',
|
||||
'xam_net.cc',
|
||||
'xam_net.h',
|
||||
'xam_notify.cc',
|
||||
'xam_notify.h',
|
||||
'xam_ordinals.h',
|
||||
'xam_private.h',
|
||||
'xam_table.inc',
|
||||
'xam_ui.cc',
|
||||
'xam_ui.h',
|
||||
'xam_user.cc',
|
||||
'xam_user.h',
|
||||
'xam_video.cc',
|
||||
'xam_video.h',
|
||||
'xam_voice.cc',
|
||||
'xam_voice.h',
|
||||
'xboxkrnl_audio.cc',
|
||||
'xboxkrnl_audio.h',
|
||||
'xboxkrnl_debug.cc',
|
||||
'xboxkrnl_debug.h',
|
||||
'xboxkrnl_hal.cc',
|
||||
'xboxkrnl_hal.h',
|
||||
'xboxkrnl_io.cc',
|
||||
'xboxkrnl_io.h',
|
||||
'xboxkrnl_memory.cc',
|
||||
'xboxkrnl_memory.h',
|
||||
'xboxkrnl_misc.cc',
|
||||
'xboxkrnl_misc.h',
|
||||
'xboxkrnl_module.cc',
|
||||
'xboxkrnl_module.h',
|
||||
'xboxkrnl_modules.cc',
|
||||
'xboxkrnl_modules.h',
|
||||
'xboxkrnl_nt.cc',
|
||||
'xboxkrnl_nt.h',
|
||||
'xboxkrnl_ob.cc',
|
||||
'xboxkrnl_ob.h',
|
||||
'xboxkrnl_ordinals.h',
|
||||
'xboxkrnl_private.h',
|
||||
'xboxkrnl_rtl.cc',
|
||||
'xboxkrnl_rtl.h',
|
||||
'xboxkrnl_strings.cc',
|
||||
'xboxkrnl_strings.h',
|
||||
'xboxkrnl_table.inc',
|
||||
'xboxkrnl_threading.cc',
|
||||
'xboxkrnl_threading.h',
|
||||
'xboxkrnl_usbcam.cc',
|
||||
'xboxkrnl_usbcam.h',
|
||||
'xboxkrnl_video.cc',
|
||||
'xboxkrnl_video.h',
|
||||
'xobject.cc',
|
||||
'xobject.h',
|
||||
],
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_content.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_CONTENT_H_
|
||||
#define XENIA_KERNEL_XAM_CONTENT_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_CONTENT_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_info.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/objects/xenumerator.h>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_INFO_H_
|
||||
#define XENIA_KERNEL_XAM_INFO_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_INFO_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_input.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/emulator.h>
|
||||
#include <xenia/hid/hid.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_INPUT_H_
|
||||
#define XENIA_KERNEL_XAM_INPUT_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_INPUT_H_
|
|
@ -17,10 +17,6 @@
|
|||
#include <xenia/kernel/xam_ordinals.h>
|
||||
#include <xenia/kernel/objects/xkernel_module.h>
|
||||
|
||||
// All of the exported functions:
|
||||
#include <xenia/kernel/xam_info.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_msg.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/objects/xevent.h>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_MSG_H_
|
||||
#define XENIA_KERNEL_XAM_MSG_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_MSG_H_
|
|
@ -9,8 +9,9 @@
|
|||
|
||||
#include <winsock2.h>
|
||||
|
||||
#include <xenia/kernel/xam_net.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_NET_H_
|
||||
#define XENIA_KERNEL_XAM_NET_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_NET_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_notify.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/objects/xnotify_listener.h>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_NOTIFY_H_
|
||||
#define XENIA_KERNEL_XAM_NOTIFY_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_NOTIFY_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_ui.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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_UI_H_
|
||||
#define XENIA_KERNEL_XAM_UI_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_UI_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_user.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/objects/xenumerator.h>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_USER_H_
|
||||
#define XENIA_KERNEL_XAM_USER_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_USER_H_
|
|
@ -7,14 +7,13 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_video.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
||||
#include <xenia/kernel/modules.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::kernel;
|
||||
|
@ -24,7 +23,8 @@ using namespace xe::kernel::xam;
|
|||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
// TODO(benvanik): actually check to see if these are the same.
|
||||
void xeVdQueryVideoMode(X_VIDEO_MODE *video_mode, bool swap);
|
||||
SHIM_CALL XGetVideoMode_shim(
|
||||
PPCContext* ppc_state, KernelState* state) {
|
||||
uint32_t video_mode_ptr = SHIM_GET_ARG_32(0);
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XAM_VIDEO_H_
|
||||
#define XENIA_KERNEL_XAM_VIDEO_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_VIDEO_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xam_input.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/emulator.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xam_private.h>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_audio.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/emulator.h>
|
||||
#include <xenia/apu/apu.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_AUDIO_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_AUDIO_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_AUDIO_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_debug.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/objects/xthread.h>
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_DEBUG_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_DEBUG_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
void xeDbgBreakPoint();
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_DEBUG_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_hal.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_HAL_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_HAL_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
void xeHalReturnToFirmware(uint32_t routine);
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_HAL_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_io.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/async_request.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_IO_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_IO_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_IO_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_memory.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_MEMORY_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_MEMORY_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct {
|
||||
uint32_t base_address;
|
||||
uint32_t allocation_base;
|
||||
uint32_t allocation_protect;
|
||||
uint32_t region_size;
|
||||
uint32_t state;
|
||||
uint32_t protect;
|
||||
uint32_t type;
|
||||
}
|
||||
X_MEMORY_BASIC_INFORMATION;
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
X_STATUS xeNtAllocateVirtualMemory(
|
||||
uint32_t* base_addr_ptr, uint32_t* region_size_ptr,
|
||||
uint32_t allocation_type, uint32_t protect_bits,
|
||||
uint32_t unknown);
|
||||
X_STATUS xeNtFreeVirtualMemory(
|
||||
uint32_t* base_addr_ptr, uint32_t* region_size_ptr,
|
||||
uint32_t free_type, uint32_t unknown);
|
||||
|
||||
uint32_t xeMmAllocatePhysicalMemoryEx(
|
||||
uint32_t type, uint32_t region_size, uint32_t protect_bits,
|
||||
uint32_t min_addr_range, uint32_t max_addr_range, uint32_t alignment);
|
||||
void xeMmFreePhysicalMemory(uint32_t type, uint32_t base_address);
|
||||
uint32_t xeMmQueryAddressProtect(uint32_t base_address);
|
||||
uint32_t xeMmGetPhysicalAddress(uint32_t base_address);
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_MEMORY_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_misc.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/objects/xthread.h>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_MISC_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_MISC_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_MISC_H_
|
|
@ -46,7 +46,6 @@ XboxkrnlModule::XboxkrnlModule(Emulator* emulator, KernelState* kernel_state) :
|
|||
RegisterMemoryExports(export_resolver_, kernel_state);
|
||||
RegisterMiscExports(export_resolver_, kernel_state);
|
||||
RegisterModuleExports(export_resolver_, kernel_state);
|
||||
RegisterNtExports(export_resolver_, kernel_state);
|
||||
RegisterObExports(export_resolver_, kernel_state);
|
||||
RegisterRtlExports(export_resolver_, kernel_state_);
|
||||
RegisterStringExports(export_resolver_, kernel_state_);
|
||||
|
|
|
@ -18,13 +18,7 @@
|
|||
#include <xenia/kernel/objects/xkernel_module.h>
|
||||
|
||||
// All of the exported functions:
|
||||
#include <xenia/kernel/xboxkrnl_debug.h>
|
||||
#include <xenia/kernel/xboxkrnl_hal.h>
|
||||
#include <xenia/kernel/xboxkrnl_memory.h>
|
||||
#include <xenia/kernel/xboxkrnl_module.h>
|
||||
#include <xenia/kernel/xboxkrnl_rtl.h>
|
||||
#include <xenia/kernel/xboxkrnl_threading.h>
|
||||
#include <xenia/kernel/xboxkrnl_video.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_modules.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/objects/xuser_module.h>
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_MODULES_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_MODULES_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
X_STATUS xeExGetXConfigSetting(
|
||||
uint16_t category, uint16_t setting, void* buffer, uint16_t buffer_size,
|
||||
uint16_t* required_size);
|
||||
|
||||
int xeXexCheckExecutablePriviledge(uint32_t privilege);
|
||||
|
||||
int xeXexGetModuleHandle(const char* module_name,
|
||||
X_HANDLE* module_handle_ptr);
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_MODULES_H_
|
|
@ -1,32 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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/xboxkrnl_nt.h>
|
||||
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::kernel;
|
||||
using namespace xe::kernel::xboxkrnl;
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
void xe::kernel::xboxkrnl::RegisterNtExports(
|
||||
ExportResolver* export_resolver, KernelState* state) {
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_NT_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_NT_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_NT_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_ob.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/xobject.h>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_OB_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_OB_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_OB_H_
|
|
@ -30,7 +30,6 @@ void RegisterIoExports(ExportResolver* export_resolver, KernelState* state);
|
|||
void RegisterMemoryExports(ExportResolver* export_resolver, KernelState* state);
|
||||
void RegisterMiscExports(ExportResolver* export_resolver, KernelState* state);
|
||||
void RegisterModuleExports(ExportResolver* export_resolver, KernelState* state);
|
||||
void RegisterNtExports(ExportResolver* export_resolver, KernelState* state);
|
||||
void RegisterObExports(ExportResolver* export_resolver, KernelState* state);
|
||||
void RegisterRtlExports(ExportResolver* export_resolver, KernelState* state);
|
||||
void RegisterStringExports(ExportResolver* export_resolver, KernelState* state);
|
||||
|
|
|
@ -27,6 +27,32 @@ namespace xe {
|
|||
namespace kernel {
|
||||
|
||||
|
||||
//RtlCompareMemory
|
||||
struct x {
|
||||
};
|
||||
|
||||
struct RtlCompareMemoryExport {
|
||||
KernelState* state;
|
||||
static void Call(PPCContext* ppc_state) {
|
||||
uint32_t source1 = SHIM_GET_ARG_32(0);
|
||||
uint32_t source2 = SHIM_GET_ARG_32(1);
|
||||
uint32_t length = SHIM_GET_ARG_32(2);
|
||||
|
||||
XELOGD(
|
||||
"RtlCompareMemory(%.8X, %.8X, %d)",
|
||||
source1, source2, length);
|
||||
|
||||
uint32_t result = 0;
|
||||
SHIM_SET_RETURN_64(result);
|
||||
}
|
||||
virtual void Log() {
|
||||
//
|
||||
}
|
||||
X_STATUS RtlCompareMemory(uint32_t source1_ptr, uint32_t source2_ptr, uint32_t length) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ff561778
|
||||
uint32_t xeRtlCompareMemory(uint32_t source1_ptr, uint32_t source2_ptr,
|
||||
uint32_t length) {
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
|
@ -20,26 +19,6 @@ namespace xe {
|
|||
namespace kernel {
|
||||
|
||||
|
||||
uint32_t xeRtlCompareMemory(uint32_t source1_ptr, uint32_t source2_ptr,
|
||||
uint32_t length);
|
||||
uint32_t xeRtlCompareMemoryUlong(uint32_t source_ptr, uint32_t length,
|
||||
uint32_t pattern);
|
||||
void xeRtlFillMemoryUlong(uint32_t destination_ptr, uint32_t length,
|
||||
uint32_t pattern);
|
||||
|
||||
void xeRtlInitAnsiString(uint32_t destination_ptr, uint32_t source_ptr);
|
||||
void xeRtlFreeAnsiString(uint32_t string_ptr);
|
||||
|
||||
void xeRtlInitUnicodeString(uint32_t destination_ptr, uint32_t source_ptr);
|
||||
void xeRtlFreeUnicodeString(uint32_t string_ptr);
|
||||
X_STATUS xeRtlUnicodeStringToAnsiString(
|
||||
uint32_t destination_ptr, uint32_t source_ptr, uint32_t alloc_dest);
|
||||
|
||||
uint32_t xeRtlNtStatusToDosError(X_STATUS status);
|
||||
|
||||
uint32_t xeRtlImageXexHeaderField(uint32_t xex_header_base_ptr,
|
||||
uint32_t image_field);
|
||||
|
||||
void xeRtlInitializeCriticalSection(uint32_t cs_ptr);
|
||||
X_STATUS xeRtlInitializeCriticalSectionAndSpinCount(
|
||||
uint32_t cs_ptr, uint32_t spin_count);
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_rtl.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/objects/xthread.h>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_STRINGS_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_STRINGS_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_STRINGS_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_threading.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/cpu/processor.h>
|
||||
#include <xenia/kernel/dispatcher.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_THREADING_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_THREADING_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
X_STATUS xeExCreateThread(
|
||||
uint32_t* handle_ptr, uint32_t stack_size, uint32_t* thread_id_ptr,
|
||||
uint32_t xapi_thread_startup,
|
||||
uint32_t start_address, uint32_t start_context, uint32_t creation_flags);
|
||||
|
||||
X_STATUS xeNtResumeThread(uint32_t handle, uint32_t* out_suspend_count);
|
||||
X_STATUS xeNtSuspendThread(uint32_t handle, uint32_t* out_suspend_count);
|
||||
|
||||
uint32_t xeKeSetAffinityThread(void* thread_ptr, uint32_t affinity);
|
||||
|
||||
uint32_t xeKeGetCurrentProcessType();
|
||||
|
||||
uint64_t xeKeQueryPerformanceFrequency();
|
||||
void xeKeQuerySystemTime(uint64_t* time_ptr);
|
||||
|
||||
X_STATUS xeKeDelayExecutionThread(
|
||||
uint32_t processor_mode, uint32_t alertable, uint64_t interval);
|
||||
|
||||
uint32_t xeKeTlsAlloc();
|
||||
int KeTlsFree(uint32_t tls_index);
|
||||
uint64_t xeKeTlsGetValue(uint32_t tls_index);
|
||||
int xeKeTlsSetValue(uint32_t tls_index, uint64_t tls_value);
|
||||
|
||||
X_STATUS xeNtCreateEvent(uint32_t* handle_ptr, void* obj_attributes,
|
||||
uint32_t event_type, uint32_t initial_state);
|
||||
int32_t xeKeSetEvent(void* event_ptr, uint32_t increment, uint32_t wait);
|
||||
int32_t xeKeResetEvent(void* event_ptr);
|
||||
|
||||
X_STATUS xeKeWaitForSingleObject(
|
||||
void* object_ptr, uint32_t wait_reason, uint32_t processor_mode,
|
||||
uint32_t alertable, uint64_t* opt_timeout);
|
||||
|
||||
uint32_t xeKfAcquireSpinLock(uint32_t* lock_ptr);
|
||||
void xeKfReleaseSpinLock(uint32_t* lock_ptr, uint32_t old_irql);
|
||||
|
||||
void xeKeEnterCriticalRegion();
|
||||
void xeKeLeaveCriticalRegion();
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_THREADING_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_usbcam.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/kernel/kernel_state.h>
|
||||
#include <xenia/kernel/xboxkrnl_private.h>
|
||||
#include <xenia/kernel/util/shim_utils.h>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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_XBOXKRNL_USBCAM_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_USBCAM_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_USBCAM_H_
|
|
@ -7,8 +7,9 @@
|
|||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <xenia/kernel/xboxkrnl_video.h>
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
#include <xenia/xbox.h>
|
||||
#include <xenia/emulator.h>
|
||||
#include <xenia/cpu/cpu.h>
|
||||
#include <xenia/gpu/gpu.h>
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
******************************************************************************
|
||||
* 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. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_KERNEL_XBOXKRNL_VIDEO_H_
|
||||
#define XENIA_KERNEL_XBOXKRNL_VIDEO_H_
|
||||
|
||||
#include <xenia/common.h>
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/xbox.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
|
||||
|
||||
// http://ffplay360.googlecode.com/svn/trunk/Common/XTLOnPC.h
|
||||
#pragma pack(push, 1)
|
||||
typedef struct {
|
||||
uint32_t display_width;
|
||||
uint32_t display_height;
|
||||
uint32_t is_interlaced;
|
||||
uint32_t is_widescreen;
|
||||
uint32_t is_hi_def;
|
||||
float refresh_rate;
|
||||
uint32_t video_standard;
|
||||
uint32_t unknown_0x8a;
|
||||
uint32_t unknown_0x01;
|
||||
uint32_t reserved[3];
|
||||
}
|
||||
X_VIDEO_MODE;
|
||||
#pragma pack(pop)
|
||||
static_assert_size(X_VIDEO_MODE, 48);
|
||||
|
||||
void xeVdGetCurrentDisplayGamma(uint32_t* arg0, float* arg1);
|
||||
uint32_t xeVdQueryVideoFlags();
|
||||
void xeVdQueryVideoMode(X_VIDEO_MODE *video_mode, bool swap);
|
||||
|
||||
void xeVdInitializeEngines(uint32_t unk0, uint32_t callback, uint32_t unk1,
|
||||
uint32_t unk2_ptr, uint32_t unk3_ptr);
|
||||
void xeVdSetGraphicsInterruptCallback(uint32_t callback, uint32_t user_data);
|
||||
void xeVdEnableRingBufferRPtrWriteBack(uint32_t ptr, uint32_t block_size);
|
||||
|
||||
|
||||
} // namespace kernel
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_KERNEL_XBOXKRNL_VIDEO_H_
|
|
@ -17,6 +17,9 @@
|
|||
namespace xe {
|
||||
|
||||
|
||||
#pragma pack(push, 4)
|
||||
|
||||
|
||||
typedef uint32_t X_HANDLE;
|
||||
#define X_INVALID_HANDLE_VALUE ((X_HANDLE)-1)
|
||||
|
||||
|
@ -193,6 +196,17 @@ typedef enum _X_FILE_INFORMATION_CLASS {
|
|||
} X_FILE_INFORMATION_CLASS;
|
||||
|
||||
|
||||
struct X_MEMORY_BASIC_INFORMATION {
|
||||
uint32_t base_address;
|
||||
uint32_t allocation_base;
|
||||
uint32_t allocation_protect;
|
||||
uint32_t region_size;
|
||||
uint32_t state;
|
||||
uint32_t protect;
|
||||
uint32_t type;
|
||||
};
|
||||
|
||||
|
||||
inline void XOverlappedSetResult(void* ptr, uint32_t value) {
|
||||
auto p = reinterpret_cast<uint32_t*>(ptr);
|
||||
poly::store_and_swap<uint32_t>(&p[0], value);
|
||||
|
@ -299,6 +313,22 @@ public:
|
|||
typedef uint32_t XNotificationID;
|
||||
|
||||
|
||||
// http://ffplay360.googlecode.com/svn/trunk/Common/XTLOnPC.h
|
||||
struct X_VIDEO_MODE {
|
||||
uint32_t display_width;
|
||||
uint32_t display_height;
|
||||
uint32_t is_interlaced;
|
||||
uint32_t is_widescreen;
|
||||
uint32_t is_hi_def;
|
||||
float refresh_rate;
|
||||
uint32_t video_standard;
|
||||
uint32_t unknown_0x8a;
|
||||
uint32_t unknown_0x01;
|
||||
uint32_t reserved[3];
|
||||
};
|
||||
static_assert_size(X_VIDEO_MODE, 48);
|
||||
|
||||
|
||||
typedef enum _X_INPUT_FLAG {
|
||||
X_INPUT_FLAG_GAMEPAD = 0x00000001,
|
||||
} X_INPUT_FLAG;
|
||||
|
@ -482,6 +512,9 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
} // namespace xe
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue