From ce67dea010b2b2ed39dfd593ad2d642d62d9e64e Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Wed, 29 Aug 2018 12:52:36 -0500 Subject: [PATCH 01/10] Move HLE's Intercept and Patches to their own folder First step to organize the filesystem! (Beside hardware files has its own directory, good job!) --- build/win32/Cxbx.vcxproj | 13 ++--- build/win32/Cxbx.vcxproj.filters | 26 +++++---- src/CxbxKrnl/CxbxKrnl.cpp | 2 +- src/CxbxKrnl/Emu.cpp | 2 +- src/CxbxKrnl/EmuD3D8.cpp | 2 +- src/CxbxKrnl/EmuX86.cpp | 2 +- src/CxbxKrnl/EmuXapi.cpp | 2 +- .../HLE/Intercept.cpp} | 58 +++++++++---------- .../HLEIntercept.h => core/HLE/Intercept.hpp} | 10 ++-- .../HLEPatches.cpp => core/HLE/Patches.cpp} | 10 ++-- .../HLEPatches.h => core/HLE/Patches.hpp} | 6 +- src/devices/Xbox.cpp | 2 +- src/devices/video/nv2a.cpp | 2 +- 13 files changed, 70 insertions(+), 67 deletions(-) rename src/{CxbxKrnl/HLEIntercept.cpp => core/HLE/Intercept.cpp} (99%) rename src/{CxbxKrnl/HLEIntercept.h => core/HLE/Intercept.hpp} (95%) rename src/{CxbxKrnl/HLEPatches.cpp => core/HLE/Patches.cpp} (99%) rename src/{CxbxKrnl/HLEPatches.h => core/HLE/Patches.hpp} (94%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index 1f0fb073f..e3411f05d 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -247,8 +247,8 @@ - - + + @@ -499,13 +499,8 @@ - - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - - + + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index e6a712e55..b45e649bf 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -145,8 +145,8 @@ Emulator - - Emulator + + core\HLE Kernel @@ -320,11 +320,6 @@ Cross Platform\Win32 - - Emulator - - - GUI @@ -427,8 +422,8 @@ Emulator - - Emulator + + core\HLE Emulator @@ -631,9 +626,12 @@ Cross Platform - - Emulator + + core\HLE + + core\HLE + @@ -767,6 +765,12 @@ {76faeca9-d66f-43fb-9efa-ffb0668f8843} + + {6d7b4608-3bf3-401f-924e-52617798e6b8} + + + {563da04b-4c54-4c1b-a055-809ce0f5bf97} + diff --git a/src/CxbxKrnl/CxbxKrnl.cpp b/src/CxbxKrnl/CxbxKrnl.cpp index 33c11b791..7d01b5e7c 100644 --- a/src/CxbxKrnl/CxbxKrnl.cpp +++ b/src/CxbxKrnl/CxbxKrnl.cpp @@ -56,7 +56,7 @@ namespace xboxkrnl #include "EmuKrnl.h" #include "EmuShared.h" #include "EmuXTL.h" -#include "HLEIntercept.h" +#include "core/HLE/Intercept.hpp" #include "ReservedMemory.h" // For virtual_memory_placeholder #include "VMManager.h" #include "CxbxDebugger.h" diff --git a/src/CxbxKrnl/Emu.cpp b/src/CxbxKrnl/Emu.cpp index f4ed2de85..f1e9b236f 100644 --- a/src/CxbxKrnl/Emu.cpp +++ b/src/CxbxKrnl/Emu.cpp @@ -47,7 +47,7 @@ namespace xboxkrnl #include "EmuFS.h" #include "EmuXTL.h" #include "EmuShared.h" -#include "HLEIntercept.h" +#include "core/HLE/Intercept.hpp" #include "CxbxDebugger.h" #ifdef _DEBUG diff --git a/src/CxbxKrnl/EmuD3D8.cpp b/src/CxbxKrnl/EmuD3D8.cpp index 4af439259..83a20d9a3 100644 --- a/src/CxbxKrnl/EmuD3D8.cpp +++ b/src/CxbxKrnl/EmuD3D8.cpp @@ -57,7 +57,7 @@ namespace xboxkrnl #include "EmuXTL.h" #include "Logging.h" #include "EmuD3D8Logging.h" -#include "HLEIntercept.h" // for bLLE_GPU +#include "core/HLE/Intercept.hpp" // for bLLE_GPU #include "Cxbx/ResCxbx.h" #include diff --git a/src/CxbxKrnl/EmuX86.cpp b/src/CxbxKrnl/EmuX86.cpp index 6c96923f1..7571ac2eb 100644 --- a/src/CxbxKrnl/EmuX86.cpp +++ b/src/CxbxKrnl/EmuX86.cpp @@ -49,7 +49,7 @@ #include "CxbxKrnl.h" #include "Emu.h" // For EmuLog #include "EmuX86.h" -#include "HLEIntercept.h" // for bLLE_GPU +#include "core/HLE/Intercept.hpp" // for bLLE_GPU #include #include "devices\Xbox.h" // For g_PCIBus diff --git a/src/CxbxKrnl/EmuXapi.cpp b/src/CxbxKrnl/EmuXapi.cpp index ff3a2594e..f4af31186 100644 --- a/src/CxbxKrnl/EmuXapi.cpp +++ b/src/CxbxKrnl/EmuXapi.cpp @@ -54,7 +54,7 @@ namespace xboxkrnl #include "EmuXTL.h" #include "EmuShared.h" #include "../Common/Win32/XBPortMapping.h" -#include "HLEIntercept.h" +#include "core/HLE/Intercept.hpp" #include "CxbxVSBC/CxbxVSBC.h" #include "Windef.h" #include diff --git a/src/CxbxKrnl/HLEIntercept.cpp b/src/core/HLE/Intercept.cpp similarity index 99% rename from src/CxbxKrnl/HLEIntercept.cpp rename to src/core/HLE/Intercept.cpp index 43ad2ff8e..8eace8807 100644 --- a/src/CxbxKrnl/HLEIntercept.cpp +++ b/src/core/HLE/Intercept.cpp @@ -38,18 +38,18 @@ #include #include // For std::setfill and std::setw -#include "CxbxKrnl.h" -#include "Emu.h" -#include "EmuFS.h" -#include "EmuXTL.h" -#include "EmuShared.h" -#include "CxbxDebugger.h" +#include "CxbxKrnl/CxbxKrnl.h" +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuFS.h" +#include "CxbxKrnl/EmuXTL.h" +#include "CxbxKrnl/EmuShared.h" +#include "Common/CxbxDebugger.h" #include "Logging.h" #pragma comment(lib, "XbSymbolDatabase.lib") #include "../../import/XbSymbolDatabase/XbSymbolDatabase.h" -#include "HLEIntercept.h" -#include "HLEPatches.h" -#include "xxhash32.h" +#include "Intercept.hpp" +#include "Patches.hpp" +#include "CxbxKrnl/xxhash32.h" #include #include #include @@ -60,19 +60,19 @@ std::map g_SymbolAddresses; bool g_HLECacheUsed = false; // D3D build version -uint32 g_BuildVersion = 0; - +uint32 g_BuildVersion = 0; + bool bLLE_APU = false; // Set this to true for experimental APU (sound) LLE -bool bLLE_GPU = false; // Set this to true for experimental GPU (graphics) LLE +bool bLLE_GPU = false; // Set this to true for experimental GPU (graphics) LLE bool bLLE_USB = false; // Set this to true for experimental USB (input) LLE bool bLLE_JIT = false; // Set this to true for experimental JIT void* GetXboxFunctionPointer(std::string functionName) -{ - void* ptr = GetPatchedFunctionTrampoline(functionName); - if (ptr != nullptr) { - return ptr; - } +{ + void* ptr = GetPatchedFunctionTrampoline(functionName); + if (ptr != nullptr) { + return ptr; + } // If we got here, the function wasn't patched, so we can just look it up the HLE cache // and return the correct offset @@ -134,7 +134,7 @@ bool VerifySymbolAddressAgainstXRef(char *SymbolName, xbaddr Address, int XRef) } // For XREF_D3DTSS_TEXCOORDINDEX, Kabuki Warriors hits this case - CxbxPopupMessage(LOG_PREFIX, LOG_LEVEL::WARNING, CxbxMsgDlgIcon_Warn, + CxbxPopupMessage(LOG_PREFIX, LOG_LEVEL::WARNING, CxbxMsgDlgIcon_Warn, "Verification of %s failed : XREF was 0x%.8X while lookup gave 0x%.8X", SymbolName, XRefAddr, Address); // For XREF_D3DTSS_TEXCOORDINDEX, Kabuki Warriors hits this case return false; @@ -266,10 +266,10 @@ void CDECL EmuRegisterSymbol(const char* library_str, output << "\t*NO PATCH AVAILABLE!*"; } } -#endif - - output << "\n"; - +#endif + + output << "\n"; + g_SymbolAddresses[symbol_str] = func_addr; printf(output.str().c_str()); } @@ -316,16 +316,16 @@ uint EmuUpdateLLEStatus(uint32_t XbLibScan) bLLE_APU = true; FlagsLLE ^= LLE_APU; EmuOutputMessage(XB_OUTPUT_MESSAGE_INFO, "Fallback to LLE APU."); - } -#if 0 // Reenable this when LLE USB actually works + } +#if 0 // Reenable this when LLE USB actually works if ((FlagsLLE & LLE_USB) == false && (XbLibScan & XbSymbolLib_XAPILIB) == 0) { bLLE_USB = true; FlagsLLE ^= LLE_USB; EmuOutputMessage(XB_OUTPUT_MESSAGE_INFO, "Fallback to LLE USB."); - } + } #endif - ipc_send_gui_update(IPC_UPDATE_GUI::LLE_FLAGS, FlagsLLE); + ipc_send_gui_update(IPC_UPDATE_GUI::LLE_FLAGS, FlagsLLE); return FlagsLLE; } @@ -472,8 +472,8 @@ void EmuHLEIntercept(Xbe::Header *pXbeHeader) } // If the HLE Cache was used, go straight to patching, no need to re-scan - if (g_HLECacheUsed) { - EmuInstallPatches(); + if (g_HLECacheUsed) { + EmuInstallPatches(); return; } @@ -574,7 +574,7 @@ void EmuHLEIntercept(Xbe::Header *pXbeHeader) std::stringstream cacheAddress; cacheAddress << std::hex << (*it).second; WritePrivateProfileString("Symbols", (*it).first.c_str(), cacheAddress.str().c_str(), filename.c_str()); - } + } EmuInstallPatches(); } diff --git a/src/CxbxKrnl/HLEIntercept.h b/src/core/HLE/Intercept.hpp similarity index 95% rename from src/CxbxKrnl/HLEIntercept.h rename to src/core/HLE/Intercept.hpp index 17a149593..d1cfe7ab9 100644 --- a/src/CxbxKrnl/HLEIntercept.h +++ b/src/core/HLE/Intercept.hpp @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->HLEIntercept.h +// * src->core->HLE->Intercept.hpp // * // * This file is part of the Cxbx project. // * @@ -31,13 +31,13 @@ // * All rights reserved // * // ****************************************************************** -#ifndef HLEINTERCEPT_H -#define HLEINTERCEPT_H +#ifndef HLEINTERCEPT_HPP +#define HLEINTERCEPT_HPP #include extern bool bLLE_APU; // Set this to true for experimental APU (sound) LLE -extern bool bLLE_GPU; // Set this to true for experimental GPU (graphics) LLE +extern bool bLLE_GPU; // Set this to true for experimental GPU (graphics) LLE extern bool bLLE_USB; // Set this to true for experimental USB (input) LLE extern bool bLLE_JIT; // Set this to true for experimental JIT @@ -57,4 +57,4 @@ void* GetXboxFunctionPointer(std::string functionName); void VerifyHLEDataBase(); #endif -#endif // HLEINTERCEPT_H +#endif diff --git a/src/CxbxKrnl/HLEPatches.cpp b/src/core/HLE/Patches.cpp similarity index 99% rename from src/CxbxKrnl/HLEPatches.cpp rename to src/core/HLE/Patches.cpp index 62b5069d8..30ac0bcad 100644 --- a/src/CxbxKrnl/HLEPatches.cpp +++ b/src/core/HLE/Patches.cpp @@ -35,11 +35,11 @@ // * // ****************************************************************** -#include "CxbxKrnl.h" -#include "Emu.h" -#include "EmuXTL.h" -#include "HLEPatches.h" -#include "HLEIntercept.h" +#include "CxbxKrnl/CxbxKrnl.h" +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuXTL.h" +#include "Patches.hpp" +#include "Intercept.hpp" #include #include diff --git a/src/CxbxKrnl/HLEPatches.h b/src/core/HLE/Patches.hpp similarity index 94% rename from src/CxbxKrnl/HLEPatches.h rename to src/core/HLE/Patches.hpp index faba42ca2..eb1efe3af 100644 --- a/src/CxbxKrnl/HLEPatches.h +++ b/src/core/HLE/Patches.hpp @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->HLEPatches.h +// * src->core->HLE->Patches.hpp // * // * This file is part of the Cxbx project. // * @@ -31,8 +31,12 @@ // * All rights reserved // * // ****************************************************************** +#ifndef HLEPATCHES_HPP +#define HLEPATCHES_HPP #include void EmuInstallPatches(); void* GetPatchedFunctionTrampoline(std::string functionName); + +#endif diff --git a/src/devices/Xbox.cpp b/src/devices/Xbox.cpp index 3b23a86cd..85b7fb2dc 100644 --- a/src/devices/Xbox.cpp +++ b/src/devices/Xbox.cpp @@ -36,7 +36,7 @@ #include "Xbox.h" // For HardwareModel #include "Xbe.h" // Without this HLEIntercept complains about some undefined xbe variables -#include "..\CxbxKrnl\HLEIntercept.h" +#include "core/HLE/Intercept.hpp" PCIBus* g_PCIBus; SMBus* g_SMBus; diff --git a/src/devices/video/nv2a.cpp b/src/devices/video/nv2a.cpp index 9ca8f1f7e..bc4252e23 100644 --- a/src/devices/video/nv2a.cpp +++ b/src/devices/video/nv2a.cpp @@ -65,7 +65,7 @@ namespace xboxkrnl #include "CxbxKrnl\Emu.h" #include "CxbxKrnl\EmuFS.h" #include "CxbxKrnl\EmuKrnl.h" -#include "CxbxKrnl\HLEIntercept.h" +#include "core/HLE/Intercept.hpp" #include "Logging.h" #include "vga.h" From 5ff6e9e6b5d5c7123eede802a7766eee062267d9 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Wed, 29 Aug 2018 13:44:53 -0500 Subject: [PATCH 02/10] Move DirectSound plugin to its own folder Will eventually need to separate the APIs and its classes into a generic class. --- build/win32/Cxbx.vcxproj | 11 +++-------- build/win32/Cxbx.vcxproj.filters | 18 ++++++++++++------ src/CxbxKrnl/EmuXTL.h | 2 +- .../HLE/DSound/DirectSound/DirectSound.cpp} | 12 ++++++------ .../HLE/DSound/DirectSound/DirectSound.hpp} | 0 .../DSound/DirectSound/DirectSoundInline.hpp} | 0 6 files changed, 22 insertions(+), 21 deletions(-) rename src/{CxbxKrnl/EmuDSound.cpp => core/HLE/DSound/DirectSound/DirectSound.cpp} (99%) mode change 100755 => 100644 rename src/{CxbxKrnl/EmuDSound.h => core/HLE/DSound/DirectSound/DirectSound.hpp} (100%) mode change 100755 => 100644 rename src/{CxbxKrnl/EmuDSoundInline.hpp => core/HLE/DSound/DirectSound/DirectSoundInline.hpp} (100%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index e3411f05d..e8b74e273 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -228,8 +228,8 @@ - - + + @@ -425,12 +425,7 @@ %(PreprocessorDefinitions) %(PreprocessorDefinitions) - - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index b45e649bf..d87ae0004 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -112,8 +112,8 @@ Emulator - - Emulator + + core\HLE\DSound\DirectSound Emulator @@ -389,8 +389,8 @@ Emulator - - Emulator + + core\HLE\DSound\DirectSound Emulator @@ -464,8 +464,8 @@ Shared - - Emulator + + core\HLE\DSound\DirectSound GUI @@ -771,6 +771,12 @@ {563da04b-4c54-4c1b-a055-809ce0f5bf97} + + {5fcb96a1-736d-4749-ba21-a87dedc72427} + + + {9b3e7b4d-161e-4eeb-9338-3368e134b439} + diff --git a/src/CxbxKrnl/EmuXTL.h b/src/CxbxKrnl/EmuXTL.h index d9f9de73a..3ae2c96a8 100644 --- a/src/CxbxKrnl/EmuXTL.h +++ b/src/CxbxKrnl/EmuXTL.h @@ -47,7 +47,7 @@ namespace XTL #include "EmuD3D8\PixelShader.h" #include "EmuD3D8\State.h" #include "EmuDInput.h" - #include "EmuDSound.h" + #include "core/HLE/DSound/DirectSound/DirectSound.hpp" #include "EmuXOnline.h" #include "EmuXG.h" #include "EmuXactEng.h" diff --git a/src/CxbxKrnl/EmuDSound.cpp b/src/core/HLE/DSound/DirectSound/DirectSound.cpp old mode 100755 new mode 100644 similarity index 99% rename from src/CxbxKrnl/EmuDSound.cpp rename to src/core/HLE/DSound/DirectSound/DirectSound.cpp index 7de683c98..53881c945 --- a/src/CxbxKrnl/EmuDSound.cpp +++ b/src/core/HLE/DSound/DirectSound/DirectSound.cpp @@ -45,11 +45,11 @@ namespace xboxkrnl { #include #include -#include "CxbxKrnl.h" -#include "Emu.h" -#include "EmuFS.h" -#include "EmuShared.h" -#include "EmuXTL.h" +#include "CxbxKrnl/CxbxKrnl.h" +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuFS.h" +#include "CxbxKrnl/EmuShared.h" +#include "CxbxKrnl/EmuXTL.h" #include "Common/Settings.hpp" @@ -220,7 +220,7 @@ static void dsound_thread_worker(LPVOID); EmuLog(LOG_PREFIX, LOG_LEVEL::WARNING, "An issue has been found. Please report game title and console's output of return result," \ " function, and file name to https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/issues/485"); } return hRet; } -#include "EmuDSoundInline.hpp" +#include "DirectSoundInline.hpp" #ifdef __cplusplus extern "C" { diff --git a/src/CxbxKrnl/EmuDSound.h b/src/core/HLE/DSound/DirectSound/DirectSound.hpp old mode 100755 new mode 100644 similarity index 100% rename from src/CxbxKrnl/EmuDSound.h rename to src/core/HLE/DSound/DirectSound/DirectSound.hpp diff --git a/src/CxbxKrnl/EmuDSoundInline.hpp b/src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp similarity index 100% rename from src/CxbxKrnl/EmuDSoundInline.hpp rename to src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp From a650e1e4f3cb857f02727c820c8bf22087e431b7 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Wed, 29 Aug 2018 14:14:52 -0500 Subject: [PATCH 03/10] Move Xapi, XInput, and DInput into their own folder Both XInput and DInput are migrated together. It's best to keep them in XInput folder. As for Xapi files, may not require any plugin? Or possible put into their own folder? --- build/win32/Cxbx.vcxproj | 22 ++++---------- build/win32/Cxbx.vcxproj.filters | 30 +++++++++++-------- src/CxbxKrnl/EmuXTL.h | 6 ++-- .../HLE/XAPI/XInput/DInput.cpp} | 8 ++--- .../HLE/XAPI/XInput/DInput.h} | 0 .../HLE/XAPI/XInput/XInput.cpp} | 10 +++---- .../HLE/XAPI/XInput/XInput.h} | 0 .../EmuXapi.cpp => core/HLE/XAPI/Xapi.cpp} | 14 ++++----- .../EmuXapi.h => core/HLE/XAPI/Xapi.h} | 0 9 files changed, 43 insertions(+), 47 deletions(-) rename src/{CxbxKrnl/EmuDInput.cpp => core/HLE/XAPI/XInput/DInput.cpp} (97%) rename src/{CxbxKrnl/EmuDInput.h => core/HLE/XAPI/XInput/DInput.h} (100%) rename src/{CxbxKrnl/EmuXInput.cpp => core/HLE/XAPI/XInput/XInput.cpp} (98%) rename src/{CxbxKrnl/EmuXInput.h => core/HLE/XAPI/XInput/XInput.h} (100%) rename src/{CxbxKrnl/EmuXapi.cpp => core/HLE/XAPI/Xapi.cpp} (99%) rename src/{CxbxKrnl/EmuXapi.h => core/HLE/XAPI/Xapi.h} (100%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index e8b74e273..499262bd0 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -227,7 +227,7 @@ - + @@ -240,9 +240,9 @@ - + - + @@ -419,12 +419,7 @@ %(PreprocessorDefinitions) %(PreprocessorDefinitions) - - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) @@ -472,19 +467,14 @@ - - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index d87ae0004..6eaea4125 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -109,8 +109,8 @@ Emulator - - Emulator + + core\HLE\XAPI\XInput core\HLE\DSound\DirectSound @@ -133,14 +133,14 @@ Emulator - - Emulator + + core\HLE\XAPI Emulator - - Emulator + + core\HLE\XAPI\XInput Emulator @@ -386,8 +386,8 @@ Emulator - - Emulator + + core\HLE\XAPI\XInput core\HLE\DSound\DirectSound @@ -407,14 +407,14 @@ Emulator - - Emulator + + core\HLE\XAPI Emulator - - Emulator + + core\HLE\XAPI\XInput Emulator @@ -777,6 +777,12 @@ {9b3e7b4d-161e-4eeb-9338-3368e134b439} + + {6f4e7159-1112-4a80-9e76-11963812811e} + + + {69e32fa9-3fcd-400a-8d45-66b7ec3d555c} + diff --git a/src/CxbxKrnl/EmuXTL.h b/src/CxbxKrnl/EmuXTL.h index 3ae2c96a8..324a8f789 100644 --- a/src/CxbxKrnl/EmuXTL.h +++ b/src/CxbxKrnl/EmuXTL.h @@ -38,7 +38,7 @@ namespace XTL { - #include "EmuXapi.h" + #include "core/HLE/XAPI/Xapi.h" #include "EmuD3D8.h" #include "EmuD3D8\Convert.h" #include "EmuD3D8\VertexBuffer.h" @@ -46,12 +46,12 @@ namespace XTL #include "EmuD3D8\VertexShader.h" #include "EmuD3D8\PixelShader.h" #include "EmuD3D8\State.h" - #include "EmuDInput.h" + #include "core/HLE/XAPI/XInput/DInput.h" #include "core/HLE/DSound/DirectSound/DirectSound.hpp" #include "EmuXOnline.h" #include "EmuXG.h" #include "EmuXactEng.h" - #include "EmuXInput.h" + #include "core/HLE/XAPI/XInput/XInput.h" } extern XTL::IDirect3DDevice *g_pD3DDevice; diff --git a/src/CxbxKrnl/EmuDInput.cpp b/src/core/HLE/XAPI/XInput/DInput.cpp similarity index 97% rename from src/CxbxKrnl/EmuDInput.cpp rename to src/core/HLE/XAPI/XInput/DInput.cpp index 8016ad9e7..7e361c2ad 100644 --- a/src/CxbxKrnl/EmuDInput.cpp +++ b/src/core/HLE/XAPI/XInput/DInput.cpp @@ -37,10 +37,10 @@ #define LOG_PREFIX CXBXR_MODULE::DINP -#include "Emu.h" -#include "EmuXTL.h" -#include "EmuShared.h" -#include "Common/Win32/DInputController.h" +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuXTL.h" +#include "CxbxKrnl/EmuShared.h" +#include "Common/Win32/DInputController.h" #include "Logging.h" // ****************************************************************** diff --git a/src/CxbxKrnl/EmuDInput.h b/src/core/HLE/XAPI/XInput/DInput.h similarity index 100% rename from src/CxbxKrnl/EmuDInput.h rename to src/core/HLE/XAPI/XInput/DInput.h diff --git a/src/CxbxKrnl/EmuXInput.cpp b/src/core/HLE/XAPI/XInput/XInput.cpp similarity index 98% rename from src/CxbxKrnl/EmuXInput.cpp rename to src/core/HLE/XAPI/XInput/XInput.cpp index 0d4b5bf0c..c35461bd4 100644 --- a/src/CxbxKrnl/EmuXInput.cpp +++ b/src/core/HLE/XAPI/XInput/XInput.cpp @@ -37,12 +37,12 @@ #define LOG_PREFIX CXBXR_MODULE::XINP -#include "Emu.h" -#include "EmuXTL.h" -#include "EmuShared.h" -#include "EmuXInput.h" +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuXTL.h" +#include "CxbxKrnl/EmuShared.h" +#include "XInput.h" -#include +#include #include "Logging.h" diff --git a/src/CxbxKrnl/EmuXInput.h b/src/core/HLE/XAPI/XInput/XInput.h similarity index 100% rename from src/CxbxKrnl/EmuXInput.h rename to src/core/HLE/XAPI/XInput/XInput.h diff --git a/src/CxbxKrnl/EmuXapi.cpp b/src/core/HLE/XAPI/Xapi.cpp similarity index 99% rename from src/CxbxKrnl/EmuXapi.cpp rename to src/core/HLE/XAPI/Xapi.cpp index f4af31186..a8eddc8ef 100644 --- a/src/CxbxKrnl/EmuXapi.cpp +++ b/src/core/HLE/XAPI/Xapi.cpp @@ -45,14 +45,14 @@ namespace xboxkrnl }; #include -#include "CxbxKrnl.h" +#include "CxbxKrnl/CxbxKrnl.h" #include "Logging.h" -#include "Emu.h" -#include "EmuKrnl.h" // For DefaultLaunchDataPage -#include "EmuFile.h" -#include "EmuFS.h" -#include "EmuXTL.h" -#include "EmuShared.h" +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuKrnl.h" // For DefaultLaunchDataPage +#include "CxbxKrnl/EmuFile.h" +#include "CxbxKrnl/EmuFS.h" +#include "CxbxKrnl/EmuXTL.h" +#include "CxbxKrnl/EmuShared.h" #include "../Common/Win32/XBPortMapping.h" #include "core/HLE/Intercept.hpp" #include "CxbxVSBC/CxbxVSBC.h" diff --git a/src/CxbxKrnl/EmuXapi.h b/src/core/HLE/XAPI/Xapi.h similarity index 100% rename from src/CxbxKrnl/EmuXapi.h rename to src/core/HLE/XAPI/Xapi.h From ba9dd0b3995e6fe330b845dc0a697b31e48854fa Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 1 Sep 2018 12:47:53 -0500 Subject: [PATCH 04/10] Move XInput plugin in OHCI folder --- build/win32/Cxbx.vcxproj | 8 +++---- build/win32/Cxbx.vcxproj.filters | 21 +++++++++++-------- src/CxbxKrnl/EmuXTL.h | 4 ++-- .../HLE/XAPI/{ => OHCI}/XInput/DInput.cpp | 2 +- src/core/HLE/XAPI/{ => OHCI}/XInput/DInput.h | 2 +- .../HLE/XAPI/{ => OHCI}/XInput/XInput.cpp | 2 +- src/core/HLE/XAPI/{ => OHCI}/XInput/XInput.h | 2 +- 7 files changed, 22 insertions(+), 19 deletions(-) rename src/core/HLE/XAPI/{ => OHCI}/XInput/DInput.cpp (98%) rename src/core/HLE/XAPI/{ => OHCI}/XInput/DInput.h (97%) rename src/core/HLE/XAPI/{ => OHCI}/XInput/XInput.cpp (99%) rename src/core/HLE/XAPI/{ => OHCI}/XInput/XInput.h (97%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index 499262bd0..e66b8f785 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -227,7 +227,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -419,7 +419,7 @@ %(PreprocessorDefinitions) %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) @@ -474,7 +474,7 @@ %(PreprocessorDefinitions) %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index 6eaea4125..a790e3bad 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -109,8 +109,8 @@ Emulator - - core\HLE\XAPI\XInput + + core\HLE\XAPI\OHCI\XInput core\HLE\DSound\DirectSound @@ -139,8 +139,8 @@ Emulator - - core\HLE\XAPI\XInput + + core\HLE\XAPI\OHCI\XInput Emulator @@ -386,8 +386,8 @@ Emulator - - core\HLE\XAPI\XInput + + core\HLE\XAPI\OHCI\XInput core\HLE\DSound\DirectSound @@ -413,8 +413,8 @@ Emulator - - core\HLE\XAPI\XInput + + core\HLE\XAPI\OHCI\XInput Emulator @@ -780,7 +780,10 @@ {6f4e7159-1112-4a80-9e76-11963812811e} - + + {f9c6738c-bb93-4de5-b3ae-490f2d80fa74} + + {69e32fa9-3fcd-400a-8d45-66b7ec3d555c} diff --git a/src/CxbxKrnl/EmuXTL.h b/src/CxbxKrnl/EmuXTL.h index 324a8f789..1cb1d5ecd 100644 --- a/src/CxbxKrnl/EmuXTL.h +++ b/src/CxbxKrnl/EmuXTL.h @@ -46,12 +46,12 @@ namespace XTL #include "EmuD3D8\VertexShader.h" #include "EmuD3D8\PixelShader.h" #include "EmuD3D8\State.h" - #include "core/HLE/XAPI/XInput/DInput.h" + #include "core/HLE/XAPI/OHCI/XInput/DInput.h" #include "core/HLE/DSound/DirectSound/DirectSound.hpp" #include "EmuXOnline.h" #include "EmuXG.h" #include "EmuXactEng.h" - #include "core/HLE/XAPI/XInput/XInput.h" + #include "core/HLE/XAPI/OHCI/XInput/XInput.h" } extern XTL::IDirect3DDevice *g_pD3DDevice; diff --git a/src/core/HLE/XAPI/XInput/DInput.cpp b/src/core/HLE/XAPI/OHCI/XInput/DInput.cpp similarity index 98% rename from src/core/HLE/XAPI/XInput/DInput.cpp rename to src/core/HLE/XAPI/OHCI/XInput/DInput.cpp index 7e361c2ad..0a0d1691c 100644 --- a/src/core/HLE/XAPI/XInput/DInput.cpp +++ b/src/core/HLE/XAPI/OHCI/XInput/DInput.cpp @@ -9,7 +9,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuDInput.cpp +// * src->core->HLE->XAPI->OHCI->XInput->DInput.cpp // * // * This file is part of the Cxbx project. // * diff --git a/src/core/HLE/XAPI/XInput/DInput.h b/src/core/HLE/XAPI/OHCI/XInput/DInput.h similarity index 97% rename from src/core/HLE/XAPI/XInput/DInput.h rename to src/core/HLE/XAPI/OHCI/XInput/DInput.h index 313d39c96..e82217b01 100644 --- a/src/core/HLE/XAPI/XInput/DInput.h +++ b/src/core/HLE/XAPI/OHCI/XInput/DInput.h @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuDInput.h +// * src->core->HLE->XAPI->OHCI->XInput->DInput.h // * // * This file is part of the Cxbx project. // * diff --git a/src/core/HLE/XAPI/XInput/XInput.cpp b/src/core/HLE/XAPI/OHCI/XInput/XInput.cpp similarity index 99% rename from src/core/HLE/XAPI/XInput/XInput.cpp rename to src/core/HLE/XAPI/OHCI/XInput/XInput.cpp index c35461bd4..da9aae948 100644 --- a/src/core/HLE/XAPI/XInput/XInput.cpp +++ b/src/core/HLE/XAPI/OHCI/XInput/XInput.cpp @@ -9,7 +9,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuDInput.cpp +// * src->core->HLE->XAPI->OHCI->XInput->DInput.cpp // * // * This file is part of the Cxbx project. // * diff --git a/src/core/HLE/XAPI/XInput/XInput.h b/src/core/HLE/XAPI/OHCI/XInput/XInput.h similarity index 97% rename from src/core/HLE/XAPI/XInput/XInput.h rename to src/core/HLE/XAPI/OHCI/XInput/XInput.h index 852d3d60b..41d99d9c2 100644 --- a/src/core/HLE/XAPI/XInput/XInput.h +++ b/src/core/HLE/XAPI/OHCI/XInput/XInput.h @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXInput.h +// * src->core->HLE->XAPI->OHCI->XInput->XInput.h // * // * This file is part of the Cxbx project. // * From 696dc019d512fb7ef17022358412d422e2cb422b Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 1 Sep 2018 12:55:13 -0500 Subject: [PATCH 05/10] Fix file path comments --- src/core/HLE/DSound/DirectSound/DirectSound.cpp | 2 +- src/core/HLE/DSound/DirectSound/DirectSound.hpp | 2 +- src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp | 2 +- src/core/HLE/Intercept.cpp | 2 +- src/core/HLE/Patches.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/HLE/DSound/DirectSound/DirectSound.cpp b/src/core/HLE/DSound/DirectSound/DirectSound.cpp index 53881c945..53e89ea84 100644 --- a/src/core/HLE/DSound/DirectSound/DirectSound.cpp +++ b/src/core/HLE/DSound/DirectSound/DirectSound.cpp @@ -9,7 +9,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuDSound.cpp +// * src->core->HLE->DSound->DirectSound->DirectSound.cpp // * // * This file is part of the Cxbx project. // * diff --git a/src/core/HLE/DSound/DirectSound/DirectSound.hpp b/src/core/HLE/DSound/DirectSound/DirectSound.hpp index 166ce467e..1d4b8d17a 100644 --- a/src/core/HLE/DSound/DirectSound/DirectSound.hpp +++ b/src/core/HLE/DSound/DirectSound/DirectSound.hpp @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuDSound.h +// * src->core->HLE->DSound->DirectSound->DirectSound.h // * // * This file is part of the Cxbx project. // * diff --git a/src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp b/src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp index ff4c1fb36..96663cfdb 100644 --- a/src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp +++ b/src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuDSoundInline.hpp +// * src->core->HLE->DSound->DirectSound->DirectSoundInline.hpp // * // * This file is part of the Cxbx project. // * diff --git a/src/core/HLE/Intercept.cpp b/src/core/HLE/Intercept.cpp index 8eace8807..18ecd3107 100644 --- a/src/core/HLE/Intercept.cpp +++ b/src/core/HLE/Intercept.cpp @@ -9,7 +9,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->HLEIntercept.cpp +// * src->core->HLE->Intercept.cpp // * // * This file is part of the Cxbx project. // * diff --git a/src/core/HLE/Patches.cpp b/src/core/HLE/Patches.cpp index 30ac0bcad..72e0a4228 100644 --- a/src/core/HLE/Patches.cpp +++ b/src/core/HLE/Patches.cpp @@ -10,7 +10,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->HLEPatches.cpp +// * src->core->HLE->Patches.cpp // * // * This file is part of the Cxbx project. // * From dc24c3f1c1e41874007c542d1192812518d2eedd Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 1 Sep 2018 13:34:50 -0500 Subject: [PATCH 06/10] Move XActEng files to its own folder --- build/win32/Cxbx.vcxproj | 4 ++-- build/win32/Cxbx.vcxproj.filters | 11 +++++++---- src/CxbxKrnl/EmuXTL.h | 2 +- .../HLE/XACTENG/XactEng.cpp} | 16 ++++++++-------- .../EmuXactEng.h => core/HLE/XACTENG/XactEng.h} | 4 ++-- 5 files changed, 20 insertions(+), 17 deletions(-) rename src/{CxbxKrnl/EmuXactEng.cpp => core/HLE/XACTENG/XactEng.cpp} (98%) rename src/{CxbxKrnl/EmuXactEng.h => core/HLE/XACTENG/XactEng.h} (99%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index e66b8f785..c74ca9d4a 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -239,7 +239,7 @@ - + @@ -466,7 +466,7 @@ - + %(AdditionalIncludeDirectories) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index a790e3bad..62c8f2b60 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -130,8 +130,8 @@ Emulator - - Emulator + + core\HLE\XACTENG core\HLE\XAPI @@ -404,8 +404,8 @@ Emulator - - Emulator + + core\HLE\XACTENG core\HLE\XAPI @@ -786,6 +786,9 @@ {69e32fa9-3fcd-400a-8d45-66b7ec3d555c} + + {dd1295ad-f875-47dc-a6bb-d5679452f236} + diff --git a/src/CxbxKrnl/EmuXTL.h b/src/CxbxKrnl/EmuXTL.h index 1cb1d5ecd..b593a0dd2 100644 --- a/src/CxbxKrnl/EmuXTL.h +++ b/src/CxbxKrnl/EmuXTL.h @@ -50,7 +50,7 @@ namespace XTL #include "core/HLE/DSound/DirectSound/DirectSound.hpp" #include "EmuXOnline.h" #include "EmuXG.h" - #include "EmuXactEng.h" + #include "core/HLE/XACTENG/XactEng.h" #include "core/HLE/XAPI/OHCI/XInput/XInput.h" } diff --git a/src/CxbxKrnl/EmuXactEng.cpp b/src/core/HLE/XACTENG/XactEng.cpp similarity index 98% rename from src/CxbxKrnl/EmuXactEng.cpp rename to src/core/HLE/XACTENG/XactEng.cpp index 417107fe2..5f8ec6657 100644 --- a/src/CxbxKrnl/EmuXactEng.cpp +++ b/src/core/HLE/XACTENG/XactEng.cpp @@ -9,7 +9,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXactEng.cpp +// * src->core->HLE->XACTENG->XactEng.cpp // * // * This file is part of the Cxbx project. // * @@ -43,13 +43,13 @@ namespace xboxkrnl #include }; -#include "CxbxKrnl.h" -#include "Logging.h" -#include "Emu.h" -#include "EmuFS.h" -#include "EmuShared.h" -#include "EmuXTL.h" -#include "VMManager.h" +#include "CxbxKrnl/CxbxKrnl.h" +#include "Common/Logging.h" +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuFS.h" +#include "CxbxKrnl/EmuShared.h" +#include "CxbxKrnl/EmuXTL.h" +#include "CxbxKrnl/VMManager.h" #include #include diff --git a/src/CxbxKrnl/EmuXactEng.h b/src/core/HLE/XACTENG/XactEng.h similarity index 99% rename from src/CxbxKrnl/EmuXactEng.h rename to src/core/HLE/XACTENG/XactEng.h index 63ac302e4..fb2f25151 100644 --- a/src/CxbxKrnl/EmuXactEng.h +++ b/src/core/HLE/XACTENG/XactEng.h @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXactEng.h +// * src->core->HLE->XACTENG->XactEng.h // * // * This file is part of the Cxbx project. // * @@ -352,4 +352,4 @@ HRESULT WINAPI EMUPATCH(IXACTEngine_UnRegisterWaveBank) X_XACTWaveBank* pWaveBank ); -#endif \ No newline at end of file +#endif From 81d3ae8510923993cff42c46162794af9a923869 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 1 Sep 2018 14:11:37 -0500 Subject: [PATCH 07/10] Move XOnline files to its own folder --- build/win32/Cxbx.vcxproj | 9 ++------- build/win32/Cxbx.vcxproj.filters | 11 +++++++---- src/CxbxKrnl/EmuXTL.h | 2 +- .../EmuXOnline.cpp => core/HLE/XONLINE/XOnline.cpp} | 10 +++++----- .../EmuXOnline.h => core/HLE/XONLINE/XOnline.h} | 6 +++--- 5 files changed, 18 insertions(+), 20 deletions(-) rename src/{CxbxKrnl/EmuXOnline.cpp => core/HLE/XONLINE/XOnline.cpp} (97%) rename src/{CxbxKrnl/EmuXOnline.h => core/HLE/XONLINE/XOnline.h} (97%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index c74ca9d4a..e4d5c8c7e 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -243,7 +243,7 @@ - + @@ -475,12 +475,7 @@ %(PreprocessorDefinitions) - - %(AdditionalIncludeDirectories) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(PreprocessorDefinitions) - + diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index 62c8f2b60..825350c51 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -142,8 +142,8 @@ core\HLE\XAPI\OHCI\XInput - - Emulator + + core\HLE\XONLINE core\HLE @@ -416,8 +416,8 @@ core\HLE\XAPI\OHCI\XInput - - Emulator + + core\HLE\XONLINE Emulator @@ -789,6 +789,9 @@ {dd1295ad-f875-47dc-a6bb-d5679452f236} + + {c6ea372d-ae98-46eb-917f-009302c000c5} + diff --git a/src/CxbxKrnl/EmuXTL.h b/src/CxbxKrnl/EmuXTL.h index b593a0dd2..5624bbb6d 100644 --- a/src/CxbxKrnl/EmuXTL.h +++ b/src/CxbxKrnl/EmuXTL.h @@ -48,7 +48,7 @@ namespace XTL #include "EmuD3D8\State.h" #include "core/HLE/XAPI/OHCI/XInput/DInput.h" #include "core/HLE/DSound/DirectSound/DirectSound.hpp" - #include "EmuXOnline.h" + #include "core/HLE/XONLINE/XOnline.h" #include "EmuXG.h" #include "core/HLE/XACTENG/XactEng.h" #include "core/HLE/XAPI/OHCI/XInput/XInput.h" diff --git a/src/CxbxKrnl/EmuXOnline.cpp b/src/core/HLE/XONLINE/XOnline.cpp similarity index 97% rename from src/CxbxKrnl/EmuXOnline.cpp rename to src/core/HLE/XONLINE/XOnline.cpp index 0b3537b09..68ed34b8c 100644 --- a/src/CxbxKrnl/EmuXOnline.cpp +++ b/src/core/HLE/XONLINE/XOnline.cpp @@ -9,7 +9,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXOnline.cpp +// * src->core->HLE->XONLINE->XOnline.cpp // * // * This file is part of the Cxbx project. // * @@ -37,10 +37,10 @@ #define LOG_PREFIX CXBXR_MODULE::XONLINE -#include "Emu.h" -#include "Logging.h" -#include "EmuFS.h" -#include "EmuXTL.h" +#include "CxbxKrnl/Emu.h" +#include "Common/Logging.h" +#include "CxbxKrnl/EmuFS.h" +#include "CxbxKrnl/EmuXTL.h" /* // ****************************************************************** diff --git a/src/CxbxKrnl/EmuXOnline.h b/src/core/HLE/XONLINE/XOnline.h similarity index 97% rename from src/CxbxKrnl/EmuXOnline.h rename to src/core/HLE/XONLINE/XOnline.h index b8a6f7447..5a5b32cab 100644 --- a/src/CxbxKrnl/EmuXOnline.h +++ b/src/core/HLE/XONLINE/XOnline.h @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXOnline.h +// * src->core->HLE->XONLINE->XOnline.h // * // * This file is part of the Cxbx project. // * @@ -31,8 +31,8 @@ // * All rights reserved // * // ****************************************************************** -#ifndef EMUXONLINE_H -#define EMUXONLINE_H +#ifndef XONLINE_H +#define XONLINE_H // Flags returned by XNetGetEthernetLinkStatus() From f083da6666f659b9671f9fce641c00b703c06dbc Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 1 Sep 2018 14:22:58 -0500 Subject: [PATCH 08/10] Move XGraphic to its own folder --- build/win32/Cxbx.vcxproj | 4 ++-- build/win32/Cxbx.vcxproj.filters | 11 +++++++---- src/CxbxKrnl/EmuXTL.h | 2 +- .../EmuXG.cpp => core/HLE/XGRAPHIC/XGraphic.cpp} | 12 ++++++------ .../EmuXG.h => core/HLE/XGRAPHIC/XGraphic.h} | 6 +++--- 5 files changed, 19 insertions(+), 16 deletions(-) rename src/{CxbxKrnl/EmuXG.cpp => core/HLE/XGRAPHIC/XGraphic.cpp} (97%) rename src/{CxbxKrnl/EmuXG.h => core/HLE/XGRAPHIC/XGraphic.h} (97%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index e4d5c8c7e..e0f319c2a 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -241,7 +241,7 @@ - + @@ -468,7 +468,7 @@ - + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index 825350c51..58137604f 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -136,8 +136,8 @@ core\HLE\XAPI - - Emulator + + core\HLE\XGRAPHIC core\HLE\XAPI\OHCI\XInput @@ -410,8 +410,8 @@ core\HLE\XAPI - - Emulator + + core\HLE\XGRAPHIC core\HLE\XAPI\OHCI\XInput @@ -792,6 +792,9 @@ {c6ea372d-ae98-46eb-917f-009302c000c5} + + {c494f79e-ff8e-4b45-b1c3-1da0b4b9ee49} + diff --git a/src/CxbxKrnl/EmuXTL.h b/src/CxbxKrnl/EmuXTL.h index 5624bbb6d..a54c8a288 100644 --- a/src/CxbxKrnl/EmuXTL.h +++ b/src/CxbxKrnl/EmuXTL.h @@ -49,7 +49,7 @@ namespace XTL #include "core/HLE/XAPI/OHCI/XInput/DInput.h" #include "core/HLE/DSound/DirectSound/DirectSound.hpp" #include "core/HLE/XONLINE/XOnline.h" - #include "EmuXG.h" + #include "core/HLE/XGRAPHIC/XGraphic.h" #include "core/HLE/XACTENG/XactEng.h" #include "core/HLE/XAPI/OHCI/XInput/XInput.h" } diff --git a/src/CxbxKrnl/EmuXG.cpp b/src/core/HLE/XGRAPHIC/XGraphic.cpp similarity index 97% rename from src/CxbxKrnl/EmuXG.cpp rename to src/core/HLE/XGRAPHIC/XGraphic.cpp index 2a1575a9c..c095cdaa7 100644 --- a/src/CxbxKrnl/EmuXG.cpp +++ b/src/core/HLE/XGRAPHIC/XGraphic.cpp @@ -9,7 +9,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXG.cpp +// * core->HLE->XGRAPHIC->XGraphic.cpp // * // * This file is part of the Cxbx project. // * @@ -40,11 +40,11 @@ #undef FIELD_OFFSET // prevent macro redefinition warnings #include -#include "Emu.h" -#include "EmuFS.h" -#include "Logging.h" -#include "EmuXTL.h" -#include "EmuD3D8Logging.h" // for log rendering of X_D3DFORMAT, etc. +#include "CxbxKrnl/Emu.h" +#include "CxbxKrnl/EmuFS.h" +#include "Common/Logging.h" +#include "CxbxKrnl/EmuXTL.h" +#include "CxbxKrnl/EmuD3D8Logging.h" // for log rendering of X_D3DFORMAT, etc. // ****************************************************************** // * patch: XGIsSwizzledFormat diff --git a/src/CxbxKrnl/EmuXG.h b/src/core/HLE/XGRAPHIC/XGraphic.h similarity index 97% rename from src/CxbxKrnl/EmuXG.h rename to src/core/HLE/XGRAPHIC/XGraphic.h index d9ee7780f..0aa8290f7 100644 --- a/src/CxbxKrnl/EmuXG.h +++ b/src/core/HLE/XGRAPHIC/XGraphic.h @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXG.h +// * core->HLE->XGRAPHIC->XGraphic.h // * // * This file is part of the Cxbx project. // * @@ -31,8 +31,8 @@ // * All rights reserved // * // ****************************************************************** -#ifndef EMUXG_H -#define EMUXG_H +#ifndef XGRAPHIC_H +#define XGRAPHIC_H typedef struct _XGPOINT3D { From a89f702d1e3eaa4f2fe5020a86367aaaf5293080 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 1 Sep 2018 14:23:18 -0500 Subject: [PATCH 09/10] Add D3D8 filter to visual studio --- build/win32/Cxbx.vcxproj.filters | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index 58137604f..4893ed239 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -795,6 +795,9 @@ {c494f79e-ff8e-4b45-b1c3-1da0b4b9ee49} + + {6f39b9de-ab9d-4780-b687-2d930f86738e} + From a2c667f70685e82c097a71a0b25960a8e9bc928d Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 1 Sep 2018 14:49:03 -0500 Subject: [PATCH 10/10] Final clean up except for D3D8 files. --- build/win32/Cxbx.vcxproj | 6 +++--- build/win32/Cxbx.vcxproj.filters | 16 ++++++++-------- src/CxbxKrnl/EmuXTL.h | 2 +- .../DirectSound/DirectSound.cpp | 0 .../DirectSound/DirectSound.hpp | 0 .../DirectSound/DirectSoundInline.hpp | 0 src/core/HLE/XAPI/OHCI/XInput/DInput.h | 4 ++-- src/core/HLE/XAPI/OHCI/XInput/XInput.h | 4 ++-- src/core/HLE/XAPI/Xapi.h | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) rename src/core/HLE/{DSound => DSOUND}/DirectSound/DirectSound.cpp (100%) rename src/core/HLE/{DSound => DSOUND}/DirectSound/DirectSound.hpp (100%) rename src/core/HLE/{DSound => DSOUND}/DirectSound/DirectSoundInline.hpp (100%) diff --git a/build/win32/Cxbx.vcxproj b/build/win32/Cxbx.vcxproj index e0f319c2a..1f122c870 100644 --- a/build/win32/Cxbx.vcxproj +++ b/build/win32/Cxbx.vcxproj @@ -228,8 +228,8 @@ - - + + @@ -420,7 +420,7 @@ %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) %(AdditionalIncludeDirectories) diff --git a/build/win32/Cxbx.vcxproj.filters b/build/win32/Cxbx.vcxproj.filters index 4893ed239..4f84615ac 100644 --- a/build/win32/Cxbx.vcxproj.filters +++ b/build/win32/Cxbx.vcxproj.filters @@ -112,8 +112,8 @@ core\HLE\XAPI\OHCI\XInput - - core\HLE\DSound\DirectSound + + core\HLE\DSOUND\DirectSound Emulator @@ -389,8 +389,8 @@ core\HLE\XAPI\OHCI\XInput - - core\HLE\DSound\DirectSound + + core\HLE\DSOUND\DirectSound Emulator @@ -464,8 +464,8 @@ Shared - - core\HLE\DSound\DirectSound + + core\HLE\DSOUND\DirectSound GUI @@ -771,10 +771,10 @@ {563da04b-4c54-4c1b-a055-809ce0f5bf97} - + {5fcb96a1-736d-4749-ba21-a87dedc72427} - + {9b3e7b4d-161e-4eeb-9338-3368e134b439} diff --git a/src/CxbxKrnl/EmuXTL.h b/src/CxbxKrnl/EmuXTL.h index a54c8a288..19a79ddfc 100644 --- a/src/CxbxKrnl/EmuXTL.h +++ b/src/CxbxKrnl/EmuXTL.h @@ -47,7 +47,7 @@ namespace XTL #include "EmuD3D8\PixelShader.h" #include "EmuD3D8\State.h" #include "core/HLE/XAPI/OHCI/XInput/DInput.h" - #include "core/HLE/DSound/DirectSound/DirectSound.hpp" + #include "core/HLE/DSOUND/DirectSound/DirectSound.hpp" #include "core/HLE/XONLINE/XOnline.h" #include "core/HLE/XGRAPHIC/XGraphic.h" #include "core/HLE/XACTENG/XactEng.h" diff --git a/src/core/HLE/DSound/DirectSound/DirectSound.cpp b/src/core/HLE/DSOUND/DirectSound/DirectSound.cpp similarity index 100% rename from src/core/HLE/DSound/DirectSound/DirectSound.cpp rename to src/core/HLE/DSOUND/DirectSound/DirectSound.cpp diff --git a/src/core/HLE/DSound/DirectSound/DirectSound.hpp b/src/core/HLE/DSOUND/DirectSound/DirectSound.hpp similarity index 100% rename from src/core/HLE/DSound/DirectSound/DirectSound.hpp rename to src/core/HLE/DSOUND/DirectSound/DirectSound.hpp diff --git a/src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp b/src/core/HLE/DSOUND/DirectSound/DirectSoundInline.hpp similarity index 100% rename from src/core/HLE/DSound/DirectSound/DirectSoundInline.hpp rename to src/core/HLE/DSOUND/DirectSound/DirectSoundInline.hpp diff --git a/src/core/HLE/XAPI/OHCI/XInput/DInput.h b/src/core/HLE/XAPI/OHCI/XInput/DInput.h index e82217b01..d3a2ccd0d 100644 --- a/src/core/HLE/XAPI/OHCI/XInput/DInput.h +++ b/src/core/HLE/XAPI/OHCI/XInput/DInput.h @@ -31,8 +31,8 @@ // * All rights reserved // * // ****************************************************************** -#ifndef EMUDINPUT_H -#define EMUDINPUT_H +#ifndef DINPUT_H +#define DINPUT_H #define DIRECTINPUT_VERSION 0x0800 #include diff --git a/src/core/HLE/XAPI/OHCI/XInput/XInput.h b/src/core/HLE/XAPI/OHCI/XInput/XInput.h index 41d99d9c2..72c7d56c1 100644 --- a/src/core/HLE/XAPI/OHCI/XInput/XInput.h +++ b/src/core/HLE/XAPI/OHCI/XInput/XInput.h @@ -31,8 +31,8 @@ // * All rights reserved // * // ****************************************************************** -#ifndef EMUXINPUT_H -#define EMUXINPUT_H +#ifndef XINPUT_H +#define XINPUT_H //query the total connected xinput gamepad DWORD XInputGamepad_Connected(void); diff --git a/src/core/HLE/XAPI/Xapi.h b/src/core/HLE/XAPI/Xapi.h index 80ed26a29..8e8fd9731 100644 --- a/src/core/HLE/XAPI/Xapi.h +++ b/src/core/HLE/XAPI/Xapi.h @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuXapi.h +// * src->core->HLE->XAPI->Xapi.h // * // * This file is part of the Cxbx project. // * @@ -31,8 +31,8 @@ // * All rights reserved // * // ****************************************************************** -#ifndef EMUXAPI_H -#define EMUXAPI_H +#ifndef XAPI_H +#define XAPI_H // ****************************************************************** // * calling conventions