From 78ee6c9ee9d1acc6866dd54ce6464def944ff593 Mon Sep 17 00:00:00 2001 From: Rick Gibbed Date: Sun, 26 May 2013 22:42:07 -0700 Subject: [PATCH] Added video submodule for xboxkrnl and xam modules. --- src/xenia/kernel/modules/xam/sources.gypi | 2 ++ src/xenia/kernel/modules/xam/xam_module.cc | 1 + src/xenia/kernel/modules/xam/xam_private.h | 1 + src/xenia/kernel/modules/xboxkrnl/module.cc | 1 + src/xenia/kernel/modules/xboxkrnl/module.h | 1 + src/xenia/kernel/modules/xboxkrnl/sources.gypi | 2 ++ .../kernel/modules/xboxkrnl/xboxkrnl_private.h | 17 +++++++++-------- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/xenia/kernel/modules/xam/sources.gypi b/src/xenia/kernel/modules/xam/sources.gypi index a82e712a5..888018922 100644 --- a/src/xenia/kernel/modules/xam/sources.gypi +++ b/src/xenia/kernel/modules/xam/sources.gypi @@ -10,5 +10,7 @@ 'xam_state.cc', 'xam_state.h', 'xam_table.inc', + 'xam_video.cc', + 'xam_video.h', ], } diff --git a/src/xenia/kernel/modules/xam/xam_module.cc b/src/xenia/kernel/modules/xam/xam_module.cc index c17a07cf8..34438569f 100644 --- a/src/xenia/kernel/modules/xam/xam_module.cc +++ b/src/xenia/kernel/modules/xam/xam_module.cc @@ -42,6 +42,7 @@ XamModule::XamModule(Runtime* runtime) : // Register all exported functions. RegisterInfoExports(export_resolver_.get(), xam_state.get()); + RegisterVideoExports(export_resolver_.get(), xam_state.get()); } XamModule::~XamModule() { diff --git a/src/xenia/kernel/modules/xam/xam_private.h b/src/xenia/kernel/modules/xam/xam_private.h index cfc0b3533..d15cf7265 100644 --- a/src/xenia/kernel/modules/xam/xam_private.h +++ b/src/xenia/kernel/modules/xam/xam_private.h @@ -31,6 +31,7 @@ extern XamState* shared_xam_state_; // Registration functions, one per file. void RegisterInfoExports(ExportResolver* export_resolver, XamState* state); +void RegisterVideoExports(ExportResolver* export_resolver, XamState* state); } // namespace xam diff --git a/src/xenia/kernel/modules/xboxkrnl/module.cc b/src/xenia/kernel/modules/xboxkrnl/module.cc index 40c5cfaaa..f00191d6e 100644 --- a/src/xenia/kernel/modules/xboxkrnl/module.cc +++ b/src/xenia/kernel/modules/xboxkrnl/module.cc @@ -56,6 +56,7 @@ XboxkrnlModule::XboxkrnlModule(Runtime* runtime) : RegisterModuleExports(resolver, kernel_state_.get()); RegisterRtlExports(resolver, kernel_state_.get()); RegisterThreadingExports(resolver, kernel_state_.get()); + RegisterVideoExports(resolver, kernel_state_.get()); // TODO(benvanik): alloc heap memory somewhere in user space // TODO(benvanik): tools for reading/writing to heap memory diff --git a/src/xenia/kernel/modules/xboxkrnl/module.h b/src/xenia/kernel/modules/xboxkrnl/module.h index d2ccd3277..643b9f68e 100644 --- a/src/xenia/kernel/modules/xboxkrnl/module.h +++ b/src/xenia/kernel/modules/xboxkrnl/module.h @@ -23,6 +23,7 @@ #include #include #include +#include namespace xe { diff --git a/src/xenia/kernel/modules/xboxkrnl/sources.gypi b/src/xenia/kernel/modules/xboxkrnl/sources.gypi index 2a62109fc..aa43d3f06 100644 --- a/src/xenia/kernel/modules/xboxkrnl/sources.gypi +++ b/src/xenia/kernel/modules/xboxkrnl/sources.gypi @@ -18,6 +18,8 @@ 'xboxkrnl_table.inc', 'xboxkrnl_threading.cc', 'xboxkrnl_threading.h', + 'xboxkrnl_video.cc', + 'xboxkrnl_video.h', 'xobject.cc', 'xobject.h', ], diff --git a/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_private.h b/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_private.h index b78355d92..fd3fd9506 100644 --- a/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_private.h +++ b/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_private.h @@ -22,20 +22,21 @@ namespace xboxkrnl { class KernelState; - -// This is a global object initialized with the XboxkrnlModule. -// It references the current kernel state object that all kernel methods should + +// This is a global object initialized with the XboxkrnlModule. +// It references the current kernel state object that all kernel methods should // be using to stash their variables. extern KernelState* shared_kernel_state_; -// Registration functions, one per file. -void RegisterHalExports(ExportResolver* export_resolver, KernelState* state); +// Registration functions, one per file. +void RegisterHalExports(ExportResolver* export_resolver, KernelState* state); void RegisterMemoryExports(ExportResolver* export_resolver, KernelState* state); -void RegisterModuleExports(ExportResolver* export_resolver, KernelState* state); -void RegisterRtlExports(ExportResolver* export_resolver, KernelState* state); -void RegisterThreadingExports(ExportResolver* export_resolver, +void RegisterModuleExports(ExportResolver* export_resolver, KernelState* state); +void RegisterRtlExports(ExportResolver* export_resolver, KernelState* state); +void RegisterThreadingExports(ExportResolver* export_resolver, KernelState* state); +void RegisterVideoExports(ExportResolver* export_resolver, KernelState* state); } // namespace xboxkrnl