Massive refactoring of all code + audio skeleton.
This should make it easier to find files and (in the future) split things up into separate libraries. It also changes around emulator initialization to make it a little more difficult to do things out of order and a little more sensible as to when real init work happens. Also adding a skeleton audio system/driver and reworking CPU register access to be more extensible.
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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_NOP_NOP_PRIVATE_H_
|
||||
#define XENIA_GPU_NOP_NOP_PRIVATE_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/gpu/nop/nop.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace nop {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace nop
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_GPU_NOP_NOP_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_NOP_NOP_GPU_PRIVATE_H_
|
||||
#define XENIA_GPU_NOP_NOP_GPU_PRIVATE_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/gpu/nop/nop_gpu.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace nop {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace nop
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_GPU_NOP_NOP_PRIVATE_H_
|
||||
@@ -1,44 +1,44 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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/nop/nop.h>
|
||||
|
||||
#include <xenia/gpu/nop/nop_graphics_system.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::gpu;
|
||||
using namespace xe::gpu::nop;
|
||||
|
||||
|
||||
namespace {
|
||||
void InitializeIfNeeded();
|
||||
void CleanupOnShutdown();
|
||||
|
||||
void InitializeIfNeeded() {
|
||||
static bool has_initialized = false;
|
||||
if (has_initialized) {
|
||||
return;
|
||||
}
|
||||
has_initialized = true;
|
||||
|
||||
//
|
||||
|
||||
atexit(CleanupOnShutdown);
|
||||
}
|
||||
|
||||
void CleanupOnShutdown() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GraphicsSystem* xe::gpu::nop::Create(const CreationParams* params) {
|
||||
InitializeIfNeeded();
|
||||
return new NopGraphicsSystem(params);
|
||||
}
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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/nop/nop_gpu.h>
|
||||
|
||||
#include <xenia/gpu/nop/nop_graphics_system.h>
|
||||
|
||||
|
||||
using namespace xe;
|
||||
using namespace xe::gpu;
|
||||
using namespace xe::gpu::nop;
|
||||
|
||||
|
||||
namespace {
|
||||
void InitializeIfNeeded();
|
||||
void CleanupOnShutdown();
|
||||
|
||||
void InitializeIfNeeded() {
|
||||
static bool has_initialized = false;
|
||||
if (has_initialized) {
|
||||
return;
|
||||
}
|
||||
has_initialized = true;
|
||||
|
||||
//
|
||||
|
||||
atexit(CleanupOnShutdown);
|
||||
}
|
||||
|
||||
void CleanupOnShutdown() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GraphicsSystem* xe::gpu::nop::Create(Emulator* emulator) {
|
||||
InitializeIfNeeded();
|
||||
return new NopGraphicsSystem(emulator);
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* 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_NOP_NOP_H_
|
||||
#define XENIA_GPU_NOP_NOP_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
|
||||
class CreationParams;
|
||||
class GraphicsSystem;
|
||||
|
||||
namespace nop {
|
||||
|
||||
|
||||
GraphicsSystem* Create(const CreationParams* params);
|
||||
|
||||
|
||||
} // namespace nop
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_GPU_NOP_NOP_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_NOP_NOP_GPU_H_
|
||||
#define XENIA_GPU_NOP_NOP_GPU_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
|
||||
|
||||
XEDECLARECLASS1(xe, Emulator);
|
||||
XEDECLARECLASS2(xe, gpu, GraphicsSystem);
|
||||
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace nop {
|
||||
|
||||
|
||||
GraphicsSystem* Create(Emulator* emulator);
|
||||
|
||||
|
||||
} // namespace nop
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
|
||||
#endif // XENIA_GPU_NOP_NOP_GPU_H_
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/gpu/graphics_driver.h>
|
||||
#include <xenia/gpu/nop/nop-private.h>
|
||||
#include <xenia/gpu/nop/nop_gpu-private.h>
|
||||
#include <xenia/gpu/xenos/xenos.h>
|
||||
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ void __stdcall NopGraphicsSystemVsyncCallback(NopGraphicsSystem* gs, BOOLEAN) {
|
||||
}
|
||||
|
||||
|
||||
NopGraphicsSystem::NopGraphicsSystem(const CreationParams* params) :
|
||||
GraphicsSystem(params),
|
||||
NopGraphicsSystem::NopGraphicsSystem(Emulator* emulator) :
|
||||
GraphicsSystem(emulator),
|
||||
timer_queue_(NULL),
|
||||
vsync_timer_(NULL) {
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <xenia/core.h>
|
||||
|
||||
#include <xenia/gpu/graphics_system.h>
|
||||
#include <xenia/gpu/nop/nop-private.h>
|
||||
#include <xenia/gpu/nop/nop_gpu-private.h>
|
||||
|
||||
|
||||
namespace xe {
|
||||
@@ -23,7 +23,7 @@ namespace nop {
|
||||
|
||||
class NopGraphicsSystem : public GraphicsSystem {
|
||||
public:
|
||||
NopGraphicsSystem(const CreationParams* params);
|
||||
NopGraphicsSystem(Emulator* emulator);
|
||||
virtual ~NopGraphicsSystem();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright 2013 Ben Vanik. All Rights Reserved.
|
||||
{
|
||||
'sources': [
|
||||
'nop-private.h',
|
||||
'nop.cc',
|
||||
'nop.h',
|
||||
'nop_gpu-private.h',
|
||||
'nop_gpu.cc',
|
||||
'nop_gpu.h',
|
||||
'nop_graphics_driver.cc',
|
||||
'nop_graphics_driver.h',
|
||||
'nop_graphics_system.cc',
|
||||
|
||||
Reference in New Issue
Block a user