From 29719b8f4d6de0f10250862d5fce286d1677b08f Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 6 Feb 2015 09:03:47 -0800 Subject: [PATCH] Cleaning up some line ending issues. --- private/runtest.sh | 0 src/alloy/frontend/ppc/test/update.sh | 0 src/xenia/gpu/gpu-private.h | 44 +++---- src/xenia/gpu/graphics_system.cc | 126 +++++++++---------- src/xenia/gpu/graphics_system.h | 108 ++++++++-------- src/xenia/kernel/util/export_table_post.inc | 28 ++--- src/xenia/kernel/util/export_table_pre.inc | 68 +++++----- src/xenia/kernel/util/ordinal_table_post.inc | 26 ++-- src/xenia/kernel/util/ordinal_table_pre.inc | 54 ++++---- src/xenia/kernel/util/sources.gypi | 26 ++-- third_party/beaengine.gypi | 72 +++++------ third_party/binutils/build.sh | 0 xenia-build.py | 0 13 files changed, 276 insertions(+), 276 deletions(-) mode change 100755 => 100644 private/runtest.sh mode change 100755 => 100644 src/alloy/frontend/ppc/test/update.sh mode change 100755 => 100644 third_party/binutils/build.sh mode change 100755 => 100644 xenia-build.py diff --git a/private/runtest.sh b/private/runtest.sh old mode 100755 new mode 100644 diff --git a/src/alloy/frontend/ppc/test/update.sh b/src/alloy/frontend/ppc/test/update.sh old mode 100755 new mode 100644 diff --git a/src/xenia/gpu/gpu-private.h b/src/xenia/gpu/gpu-private.h index 4b9024447..d51698c4a 100644 --- a/src/xenia/gpu/gpu-private.h +++ b/src/xenia/gpu/gpu-private.h @@ -1,22 +1,22 @@ -/** - ****************************************************************************** - * 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_GPU_PRIVATE_H_ -#define XENIA_GPU_PRIVATE_H_ - -#include - -DECLARE_string(gpu); - -DECLARE_bool(trace_ring_buffer); -DECLARE_string(dump_shaders); - -DECLARE_bool(vsync); - -#endif // XENIA_GPU_PRIVATE_H_ +/** + ****************************************************************************** + * 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_GPU_PRIVATE_H_ +#define XENIA_GPU_PRIVATE_H_ + +#include + +DECLARE_string(gpu); + +DECLARE_bool(trace_ring_buffer); +DECLARE_string(dump_shaders); + +DECLARE_bool(vsync); + +#endif // XENIA_GPU_PRIVATE_H_ diff --git a/src/xenia/gpu/graphics_system.cc b/src/xenia/gpu/graphics_system.cc index 47fce8166..b8528b7e8 100644 --- a/src/xenia/gpu/graphics_system.cc +++ b/src/xenia/gpu/graphics_system.cc @@ -1,63 +1,63 @@ -/** - ****************************************************************************** - * 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/gpu/graphics_system.h" - -#include "poly/poly.h" -#include "xenia/emulator.h" -#include "xenia/cpu/processor.h" -#include "xenia/gpu/gpu-private.h" - -namespace xe { -namespace gpu { - -GraphicsSystem::GraphicsSystem(Emulator* emulator) - : emulator_(emulator), - memory_(emulator->memory()), - interrupt_callback_(0), - interrupt_callback_data_(0) {} - -GraphicsSystem::~GraphicsSystem() {} - -X_STATUS GraphicsSystem::Setup() { - processor_ = emulator_->processor(); - - return X_STATUS_SUCCESS; -} - -void GraphicsSystem::Shutdown() {} - -void GraphicsSystem::SetInterruptCallback(uint32_t callback, - uint32_t user_data) { - interrupt_callback_ = callback; - interrupt_callback_data_ = user_data; - XELOGGPU("SetInterruptCallback(%.4X, %.4X)", callback, user_data); -} - -void GraphicsSystem::DispatchInterruptCallback(uint32_t source, uint32_t cpu) { - if (!interrupt_callback_) { - return; - } - - // Pick a CPU, if needed. We're going to guess 2. Because. - if (cpu == 0xFFFFFFFF) { - cpu = 2; - } - - XELOGGPU("Dispatching GPU interrupt at %.8X w/ mode %d on cpu %d", - interrupt_callback_, source, cpu); - - // NOTE: we may be executing in some random thread. - uint64_t args[] = {source, interrupt_callback_data_}; - processor_->ExecuteInterrupt(cpu, interrupt_callback_, args, - poly::countof(args)); -} - -} // namespace gpu -} // namespace xe +/** + ****************************************************************************** + * 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/gpu/graphics_system.h" + +#include "poly/poly.h" +#include "xenia/emulator.h" +#include "xenia/cpu/processor.h" +#include "xenia/gpu/gpu-private.h" + +namespace xe { +namespace gpu { + +GraphicsSystem::GraphicsSystem(Emulator* emulator) + : emulator_(emulator), + memory_(emulator->memory()), + interrupt_callback_(0), + interrupt_callback_data_(0) {} + +GraphicsSystem::~GraphicsSystem() {} + +X_STATUS GraphicsSystem::Setup() { + processor_ = emulator_->processor(); + + return X_STATUS_SUCCESS; +} + +void GraphicsSystem::Shutdown() {} + +void GraphicsSystem::SetInterruptCallback(uint32_t callback, + uint32_t user_data) { + interrupt_callback_ = callback; + interrupt_callback_data_ = user_data; + XELOGGPU("SetInterruptCallback(%.4X, %.4X)", callback, user_data); +} + +void GraphicsSystem::DispatchInterruptCallback(uint32_t source, uint32_t cpu) { + if (!interrupt_callback_) { + return; + } + + // Pick a CPU, if needed. We're going to guess 2. Because. + if (cpu == 0xFFFFFFFF) { + cpu = 2; + } + + XELOGGPU("Dispatching GPU interrupt at %.8X w/ mode %d on cpu %d", + interrupt_callback_, source, cpu); + + // NOTE: we may be executing in some random thread. + uint64_t args[] = {source, interrupt_callback_data_}; + processor_->ExecuteInterrupt(cpu, interrupt_callback_, args, + poly::countof(args)); +} + +} // namespace gpu +} // namespace xe diff --git a/src/xenia/gpu/graphics_system.h b/src/xenia/gpu/graphics_system.h index fd3184ab0..7c430b412 100644 --- a/src/xenia/gpu/graphics_system.h +++ b/src/xenia/gpu/graphics_system.h @@ -1,54 +1,54 @@ -/** - ****************************************************************************** - * 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_GPU_GRAPHICS_SYSTEM_H_ -#define XENIA_GPU_GRAPHICS_SYSTEM_H_ - -#include -#include - -#include "xenia/common.h" -#include "xenia/emulator.h" -#include "xenia/xbox.h" - -namespace xe { -namespace gpu { - -class GraphicsSystem { - public: - virtual ~GraphicsSystem(); - - Emulator* emulator() const { return emulator_; } - Memory* memory() const { return memory_; } - cpu::Processor* processor() const { return processor_; } - - virtual X_STATUS Setup(); - virtual void Shutdown(); - - void SetInterruptCallback(uint32_t callback, uint32_t user_data); - virtual void InitializeRingBuffer(uint32_t ptr, uint32_t page_count) = 0; - virtual void EnableReadPointerWriteBack(uint32_t ptr, uint32_t block_size) = 0; - - void DispatchInterruptCallback(uint32_t source, uint32_t cpu); - - protected: - GraphicsSystem(Emulator* emulator); - - Emulator* emulator_; - Memory* memory_; - cpu::Processor* processor_; - - uint32_t interrupt_callback_; - uint32_t interrupt_callback_data_; -}; - -} // namespace gpu -} // namespace xe - -#endif // XENIA_GPU_GRAPHICS_SYSTEM_H_ +/** + ****************************************************************************** + * 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_GPU_GRAPHICS_SYSTEM_H_ +#define XENIA_GPU_GRAPHICS_SYSTEM_H_ + +#include +#include + +#include "xenia/common.h" +#include "xenia/emulator.h" +#include "xenia/xbox.h" + +namespace xe { +namespace gpu { + +class GraphicsSystem { + public: + virtual ~GraphicsSystem(); + + Emulator* emulator() const { return emulator_; } + Memory* memory() const { return memory_; } + cpu::Processor* processor() const { return processor_; } + + virtual X_STATUS Setup(); + virtual void Shutdown(); + + void SetInterruptCallback(uint32_t callback, uint32_t user_data); + virtual void InitializeRingBuffer(uint32_t ptr, uint32_t page_count) = 0; + virtual void EnableReadPointerWriteBack(uint32_t ptr, uint32_t block_size) = 0; + + void DispatchInterruptCallback(uint32_t source, uint32_t cpu); + + protected: + GraphicsSystem(Emulator* emulator); + + Emulator* emulator_; + Memory* memory_; + cpu::Processor* processor_; + + uint32_t interrupt_callback_; + uint32_t interrupt_callback_data_; +}; + +} // namespace gpu +} // namespace xe + +#endif // XENIA_GPU_GRAPHICS_SYSTEM_H_ diff --git a/src/xenia/kernel/util/export_table_post.inc b/src/xenia/kernel/util/export_table_post.inc index 26d1da8f3..7c3909fb9 100644 --- a/src/xenia/kernel/util/export_table_post.inc +++ b/src/xenia/kernel/util/export_table_post.inc @@ -1,14 +1,14 @@ -/** - ****************************************************************************** - * 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. * - ****************************************************************************** - */ - -// Post-include file for an export table. - - -#undef FLAG -#undef XE_EXPORT +/** + ****************************************************************************** + * 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. * + ****************************************************************************** + */ + +// Post-include file for an export table. + + +#undef FLAG +#undef XE_EXPORT diff --git a/src/xenia/kernel/util/export_table_pre.inc b/src/xenia/kernel/util/export_table_pre.inc index 687591642..82314fdb9 100644 --- a/src/xenia/kernel/util/export_table_pre.inc +++ b/src/xenia/kernel/util/export_table_pre.inc @@ -1,34 +1,34 @@ -/** - ****************************************************************************** - * 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. * - ****************************************************************************** - */ - -/** - * Pre-include file for an export table. - * Use this to build tables of exports: - * - * // Build the export table used for resolution. - * #include "xenia/kernel/util/export_table_pre.inc" - * static KernelExport my_module_export_table[] = { - * #include "xenia/kernel/my_module/my_module_table.inc" - * }; - * #include "xenia/kernel/util/export_table_post.inc" - * export_resolver_->RegisterTable( - * "my_module.xex", - * my_module_export_table, poly::countof(my_module_export_table)); - */ - - -#define XE_EXPORT(module, ordinal, name, type, flags) \ - { \ - ordinal, \ - KernelExport::type, \ - flags, \ - #name, \ - } - -#define FLAG(t) kXEKernelExportFlag##t +/** + ****************************************************************************** + * 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. * + ****************************************************************************** + */ + +/** + * Pre-include file for an export table. + * Use this to build tables of exports: + * + * // Build the export table used for resolution. + * #include "xenia/kernel/util/export_table_pre.inc" + * static KernelExport my_module_export_table[] = { + * #include "xenia/kernel/my_module/my_module_table.inc" + * }; + * #include "xenia/kernel/util/export_table_post.inc" + * export_resolver_->RegisterTable( + * "my_module.xex", + * my_module_export_table, poly::countof(my_module_export_table)); + */ + + +#define XE_EXPORT(module, ordinal, name, type, flags) \ + { \ + ordinal, \ + KernelExport::type, \ + flags, \ + #name, \ + } + +#define FLAG(t) kXEKernelExportFlag##t diff --git a/src/xenia/kernel/util/ordinal_table_post.inc b/src/xenia/kernel/util/ordinal_table_post.inc index 3b22690ff..722b2da06 100644 --- a/src/xenia/kernel/util/ordinal_table_post.inc +++ b/src/xenia/kernel/util/ordinal_table_post.inc @@ -1,13 +1,13 @@ -/** - ****************************************************************************** - * 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. * - ****************************************************************************** - */ - -// Post-include file for an ordinal table. - - -#undef XE_EXPORT +/** + ****************************************************************************** + * 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. * + ****************************************************************************** + */ + +// Post-include file for an ordinal table. + + +#undef XE_EXPORT diff --git a/src/xenia/kernel/util/ordinal_table_pre.inc b/src/xenia/kernel/util/ordinal_table_pre.inc index d80e5098a..75f18d41b 100644 --- a/src/xenia/kernel/util/ordinal_table_pre.inc +++ b/src/xenia/kernel/util/ordinal_table_pre.inc @@ -1,27 +1,27 @@ -/** - ****************************************************************************** - * 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. * - ****************************************************************************** - */ - -/** - * Pre-include file for an ordinal table. - * Use this to build tables of constants describing the ordinals: - * - * // Build an ordinal enum to make it easy to lookup ordinals. - * #include "xenia/kernel/util/ordinal_table_pre.inc" - * namespace ordinals { - * enum { - * #include "xenia/kernel/my_module/my_module_table.inc" - * }; - * } // namespace ordinals - * #include "xenia/kernel/util/ordinal_table_post.inc" - */ - - -#define XE_EXPORT(module, ordinal, name, type, flags) \ - name = ordinal - +/** + ****************************************************************************** + * 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. * + ****************************************************************************** + */ + +/** + * Pre-include file for an ordinal table. + * Use this to build tables of constants describing the ordinals: + * + * // Build an ordinal enum to make it easy to lookup ordinals. + * #include "xenia/kernel/util/ordinal_table_pre.inc" + * namespace ordinals { + * enum { + * #include "xenia/kernel/my_module/my_module_table.inc" + * }; + * } // namespace ordinals + * #include "xenia/kernel/util/ordinal_table_post.inc" + */ + + +#define XE_EXPORT(module, ordinal, name, type, flags) \ + name = ordinal + diff --git a/src/xenia/kernel/util/sources.gypi b/src/xenia/kernel/util/sources.gypi index a0ce434bb..eeeaae226 100644 --- a/src/xenia/kernel/util/sources.gypi +++ b/src/xenia/kernel/util/sources.gypi @@ -1,13 +1,13 @@ -# Copyright 2013 Ben Vanik. All Rights Reserved. -{ - 'sources': [ - 'export_table_post.inc', - 'export_table_pre.inc', - 'ordinal_table_post.inc', - 'ordinal_table_pre.inc', - 'shim_utils.h', - 'xex2.cc', - 'xex2.h', - 'xex2_info.h', - ], -} +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'export_table_post.inc', + 'export_table_pre.inc', + 'ordinal_table_post.inc', + 'ordinal_table_pre.inc', + 'shim_utils.h', + 'xex2.cc', + 'xex2.h', + 'xex2_info.h', + ], +} diff --git a/third_party/beaengine.gypi b/third_party/beaengine.gypi index 4b310fc5c..911bfa45f 100644 --- a/third_party/beaengine.gypi +++ b/third_party/beaengine.gypi @@ -1,36 +1,36 @@ -# Copyright 2013 Ben Vanik. All Rights Reserved. -{ - 'targets': [ - { - 'target_name': 'beaengine', - 'type': '<(library)', - - 'direct_dependent_settings': { - 'include_dirs': [ - 'beaengine/include/', - ], - 'defines': [ - 'BEA_ENGINE_STATIC=1', - ], - }, - - 'sources': [ - 'beaengine/beaengineSources/BeaEngine.c', - 'beaengine/include/beaengine/basic_types.h', - 'beaengine/include/beaengine/BeaEngine.h', - 'beaengine/include/beaengine/export.h', - 'beaengine/include/beaengine/macros.h', - ], - - 'include_dirs': [ - 'beaengine/beaengineSources/', - 'beaengine/include/', - ], - - 'defines': [ - 'BEA_ENGINE_STATIC=1', - #'BEA_LIGHT_DISASSEMBLY=1', - ], - } - ] -} +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'targets': [ + { + 'target_name': 'beaengine', + 'type': '<(library)', + + 'direct_dependent_settings': { + 'include_dirs': [ + 'beaengine/include/', + ], + 'defines': [ + 'BEA_ENGINE_STATIC=1', + ], + }, + + 'sources': [ + 'beaengine/beaengineSources/BeaEngine.c', + 'beaengine/include/beaengine/basic_types.h', + 'beaengine/include/beaengine/BeaEngine.h', + 'beaengine/include/beaengine/export.h', + 'beaengine/include/beaengine/macros.h', + ], + + 'include_dirs': [ + 'beaengine/beaengineSources/', + 'beaengine/include/', + ], + + 'defines': [ + 'BEA_ENGINE_STATIC=1', + #'BEA_LIGHT_DISASSEMBLY=1', + ], + } + ] +} diff --git a/third_party/binutils/build.sh b/third_party/binutils/build.sh old mode 100755 new mode 100644 diff --git a/xenia-build.py b/xenia-build.py old mode 100755 new mode 100644