From f07d6205538d5f1e7bcd0eb32aa0ca5838f2e5f2 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sat, 27 Jun 2015 11:44:40 -0700 Subject: [PATCH] Moving misc stuff out of xbox.h. Progress on #297. --- src/xenia/kernel/kernel_state.h | 5 +++++ src/xenia/kernel/objects/xthread.h | 4 ++++ src/xenia/kernel/xam_info.cc | 3 +++ src/xenia/kernel/xam_video.cc | 2 +- src/xenia/xbox.h | 16 ---------------- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/xenia/kernel/kernel_state.h b/src/xenia/kernel/kernel_state.h index c9dadb998..a022eda78 100644 --- a/src/xenia/kernel/kernel_state.h +++ b/src/xenia/kernel/kernel_state.h @@ -44,6 +44,11 @@ class XNotifyListener; class XThread; class XUserModule; +// (?), used by KeGetCurrentProcessType +constexpr uint32_t X_PROCTYPE_IDLE = 0; +constexpr uint32_t X_PROCTYPE_USER = 1; +constexpr uint32_t X_PROCTYPE_SYSTEM = 2; + struct ProcessInfoBlock { xe::be unk_00; xe::be unk_04; // blink diff --git a/src/xenia/kernel/objects/xthread.h b/src/xenia/kernel/objects/xthread.h index 6e85fb6d0..03516833f 100644 --- a/src/xenia/kernel/objects/xthread.h +++ b/src/xenia/kernel/objects/xthread.h @@ -24,6 +24,10 @@ namespace kernel { class NativeList; class XEvent; +constexpr uint32_t X_CREATE_SUSPENDED = 0x00000004; + +constexpr uint32_t X_TLS_OUT_OF_INDEXES = UINT32_MAX; + struct XAPC { static const uint32_t kSize = 40; static const uint32_t kDummyKernelRoutine = 0xF00DFF00; diff --git a/src/xenia/kernel/xam_info.cc b/src/xenia/kernel/xam_info.cc index 154fd3a43..7121d056e 100644 --- a/src/xenia/kernel/xam_info.cc +++ b/src/xenia/kernel/xam_info.cc @@ -19,6 +19,9 @@ namespace xe { namespace kernel { +constexpr uint32_t X_LANGUAGE_ENGLISH = 1; +constexpr uint32_t X_LANGUAGE_JAPANESE = 2; + SHIM_CALL XamGetSystemVersion_shim(PPCContext* ppc_context, KernelState* kernel_state) { XELOGD("XamGetSystemVersion()"); diff --git a/src/xenia/kernel/xam_video.cc b/src/xenia/kernel/xam_video.cc index 4f99152e6..a5029c4c0 100644 --- a/src/xenia/kernel/xam_video.cc +++ b/src/xenia/kernel/xam_video.cc @@ -22,7 +22,7 @@ void VdQueryVideoMode(pointer_t video_mode); void XGetVideoMode(pointer_t video_mode) { VdQueryVideoMode(std::move(video_mode)); } -DECLARE_XAM_EXPORT(XGetVideoMode, ExportTag::kVideo | ExportTag::kStub); +DECLARE_XAM_EXPORT(XGetVideoMode, ExportTag::kVideo | ExportTag::kSketchy); dword_result_t XGetVideoCapabilities() { return 0; } DECLARE_XAM_EXPORT(XGetVideoCapabilities, ExportTag::kVideo | ExportTag::kStub); diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 6c5f17e1f..3f169541b 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -135,26 +135,10 @@ typedef uint32_t X_HRESULT; #define X_PAGE_NOCACHE 0x00000200 #define X_PAGE_WRITECOMBINE 0x00000400 - -// (?), used by KeGetCurrentProcessType -#define X_PROCTYPE_IDLE 0 -#define X_PROCTYPE_USER 1 -#define X_PROCTYPE_SYSTEM 2 - // Sockets/networking. #define X_INVALID_SOCKET (uint32_t)(~0) #define X_SOCKET_ERROR (uint32_t)(-1) -// Thread enums. -#define X_CREATE_SUSPENDED 0x00000004 - -// TLS specials. -#define X_TLS_OUT_OF_INDEXES UINT32_MAX // (-1) - -// Languages. -#define X_LANGUAGE_ENGLISH 1 -#define X_LANGUAGE_JAPANESE 2 - enum X_FILE_ATTRIBUTES : uint32_t { X_FILE_ATTRIBUTE_NONE = 0x0000, X_FILE_ATTRIBUTE_READONLY = 0x0001,