Cleaning up some line ending issues.

This commit is contained in:
Ben Vanik 2015-02-06 09:03:47 -08:00
parent 22c72544ad
commit 29719b8f4d
13 changed files with 276 additions and 276 deletions

0
private/runtest.sh Executable file → Normal file
View File

0
src/alloy/frontend/ppc/test/update.sh Executable file → Normal file
View File

View File

@ -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 <gflags/gflags.h>
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 <gflags/gflags.h>
DECLARE_string(gpu);
DECLARE_bool(trace_ring_buffer);
DECLARE_string(dump_shaders);
DECLARE_bool(vsync);
#endif // XENIA_GPU_PRIVATE_H_

View File

@ -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

View File

@ -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 <atomic>
#include <thread>
#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 <atomic>
#include <thread>
#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_

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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',
],
}

View File

@ -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',
],
}
]
}

0
third_party/binutils/build.sh vendored Executable file → Normal file
View File

0
xenia-build.py Executable file → Normal file
View File