From 48a339fd17489f1658ae0faa2c51017f1ba6250d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandro=20S=C3=A1nchez=20Bach?= Date: Fri, 1 Aug 2014 01:52:43 +0200 Subject: [PATCH 1/2] cellGcmSys updated * cellGcmGetTiledPitchSize (thanks 3141card), cellGcmFunc15. * sysPrxForUser: _sys_memset * Created headers cellGcmSys.h and sysPrxForUser.h * int, int32_t -> s32 and uint32_t -> u32. --- rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp | 103 ++++++++----------- rpcs3/Emu/SysCalls/Modules/cellGcmSys.h | 35 +++++++ rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp | 25 ++--- rpcs3/Emu/SysCalls/Modules/sysPrxForUser.h | 18 ++++ rpcs3/emucore.vcxproj | 2 + rpcs3/emucore.vcxproj.filters | 6 ++ 6 files changed, 115 insertions(+), 74 deletions(-) create mode 100644 rpcs3/Emu/SysCalls/Modules/cellGcmSys.h create mode 100644 rpcs3/Emu/SysCalls/Modules/sysPrxForUser.h diff --git a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp index 73c606527..9c31b9130 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp @@ -5,6 +5,8 @@ #include "Emu/SysCalls/Modules.h" #include "Emu/SysCalls/SysCalls.h" #include "Emu/GS/GCM.h" +#include "sysPrxForUser.h" +#include "cellGcmSys.h" //void cellGcmSys_init(); //void cellGcmSys_load(); @@ -12,48 +14,22 @@ //Module cellGcmSys(0x0010, cellGcmSys_init, cellGcmSys_load, cellGcmSys_unload); Module *cellGcmSys = nullptr; +const u32 tiled_pitches[] = { + 0x00000000, 0x00000200, 0x00000300, 0x00000400, + 0x00000500, 0x00000600, 0x00000700, 0x00000800, + 0x00000A00, 0x00000C00, 0x00000D00, 0x00000E00, + 0x00001000, 0x00001400, 0x00001800, 0x00001A00, + 0x00001C00, 0x00002000, 0x00002800, 0x00003000, + 0x00003400, 0x00003800, 0x00004000, 0x00005000, + 0x00006000, 0x00006800, 0x00007000, 0x00008000, + 0x0000A000, 0x0000C000, 0x0000D000, 0x0000E000, + 0x00010000 +}; + u32 local_size = 0; u32 local_addr = 0; u32 system_mode = 0; -enum -{ - CELL_GCM_ERROR_FAILURE = 0x802100ff, - CELL_GCM_ERROR_NO_IO_PAGE_TABLE = 0x80210001, - CELL_GCM_ERROR_INVALID_ENUM = 0x80210002, - CELL_GCM_ERROR_INVALID_VALUE = 0x80210003, - CELL_GCM_ERROR_INVALID_ALIGNMENT = 0x80210004, - CELL_GCM_ERROR_ADDRESS_OVERWRAP = 0x80210005 -}; - -// Function declaration -int cellGcmSetPrepareFlip(mem_ptr_t ctxt, u32 id); - -//---------------------------------------------------------------------------- -// Memory Mapping -//---------------------------------------------------------------------------- - -struct gcm_offset -{ - u64 io; - u64 ea; -}; - -void InitOffsetTable(); -int32_t cellGcmAddressToOffset(u64 address, mem32_t offset); -uint32_t cellGcmGetMaxIoMapSize(); -void cellGcmGetOffsetTable(mem_ptr_t table); -int32_t cellGcmIoOffsetToAddress(u32 ioOffset, u64 address); -int32_t cellGcmMapEaIoAddress(const u32 ea, const u32 io, const u32 size); -int32_t cellGcmMapEaIoAddressWithFlags(const u32 ea, const u32 io, const u32 size, const u32 flags); -int32_t cellGcmMapMainMemory(u64 ea, u32 size, mem32_t offset); -int32_t cellGcmReserveIoMapSize(const u32 size); -int32_t cellGcmUnmapEaIoAddress(u64 ea); -int32_t cellGcmUnmapIoAddress(u64 io); -int32_t cellGcmUnreserveIoMapSize(u32 size); - -//---------------------------------------------------------------------------- - CellGcmConfig current_config; CellGcmContextData current_context; gcmInfo gcm_info; @@ -287,10 +263,14 @@ int cellGcmGetFlipStatus() u32 cellGcmGetTiledPitchSize(u32 size) { - cellGcmSys->Warning("cellGcmGetTiledPitchSize(size=%d)", size); - // TODO: + cellGcmSys->Log("cellGcmGetTiledPitchSize(size=%d)", size); - return size; + for (size_t i=0; i < sizeof(tiled_pitches)/sizeof(tiled_pitches[0]) - 1; i++) { + if (tiled_pitches[i] < size && size <= tiled_pitches[i+1]) { + return tiled_pitches[i+1]; + } + } + return 0; } int cellGcmInit(u32 context_addr, u32 cmdSize, u32 ioSize, u32 ioAddress) @@ -467,7 +447,7 @@ void cellGcmSetFlipStatus() Emu.GetGSManager().GetRender().m_flip_status = 0; } -int cellGcmSetPrepareFlip(mem_ptr_t ctxt, u32 id) +s32 cellGcmSetPrepareFlip(mem_ptr_t ctxt, u32 id) { cellGcmSys->Log("cellGcmSetPrepareFlip(ctx=0x%x, id=0x%x)", ctxt.GetAddr(), id); @@ -808,7 +788,7 @@ void InitOffsetTable() } } -int32_t cellGcmAddressToOffset(u64 address, mem32_t offset) +s32 cellGcmAddressToOffset(u64 address, mem32_t offset) { cellGcmSys->Log("cellGcmAddressToOffset(address=0x%x,offset_addr=0x%x)", address, offset.GetAddr()); @@ -827,14 +807,11 @@ int32_t cellGcmAddressToOffset(u64 address, mem32_t offset) { u16 upper12Bits = Memory.Read16(offsetTable.io + sizeof(u16)*(address >> 20)); - if (upper12Bits != 0xFFFF) - { + if (upper12Bits != 0xFFFF) { result = (((u64)upper12Bits << 20) | (address & (0xFFFFF))); } // address is not mapped in IO - else - { - + else { return CELL_GCM_ERROR_FAILURE; } } @@ -843,7 +820,7 @@ int32_t cellGcmAddressToOffset(u64 address, mem32_t offset) return CELL_OK; } -uint32_t cellGcmGetMaxIoMapSize() +u32 cellGcmGetMaxIoMapSize() { return Memory.RSXIOMem.GetEndAddr() - Memory.RSXIOMem.GetStartAddr() - Memory.RSXIOMem.GetReservedAmount(); } @@ -854,7 +831,7 @@ void cellGcmGetOffsetTable(mem_ptr_t table) table->ea = re(offsetTable.ea); } -int32_t cellGcmIoOffsetToAddress(u32 ioOffset, u64 address) +s32 cellGcmIoOffsetToAddress(u32 ioOffset, u64 address) { u64 realAddr; @@ -866,7 +843,7 @@ int32_t cellGcmIoOffsetToAddress(u32 ioOffset, u64 address) return CELL_OK; } -int32_t cellGcmMapEaIoAddress(const u32 ea, const u32 io, const u32 size) +s32 cellGcmMapEaIoAddress(u32 ea, u32 io, u32 size) { cellGcmSys->Warning("cellGcmMapEaIoAddress(ea=0x%x, io=0x%x, size=0x%x)", ea, io, size); @@ -891,13 +868,13 @@ int32_t cellGcmMapEaIoAddress(const u32 ea, const u32 io, const u32 size) return CELL_OK; } -int32_t cellGcmMapEaIoAddressWithFlags(const u32 ea, const u32 io, const u32 size, const u32 flags) +s32 cellGcmMapEaIoAddressWithFlags(u32 ea, u32 io, u32 size, u32 flags) { cellGcmSys->Warning("cellGcmMapEaIoAddressWithFlags(ea=0x%x, io=0x%x, size=0x%x, flags=0x%x)", ea, io, size, flags); return cellGcmMapEaIoAddress(ea, io, size); // TODO: strict ordering } -int32_t cellGcmMapLocalMemory(u64 address, u64 size) +s32 cellGcmMapLocalMemory(u64 address, u64 size) { if (!local_size && !local_addr) { @@ -916,7 +893,7 @@ int32_t cellGcmMapLocalMemory(u64 address, u64 size) return CELL_OK; } -int32_t cellGcmMapMainMemory(u64 ea, u32 size, mem32_t offset) +s32 cellGcmMapMainMemory(u64 ea, u32 size, mem32_t offset) { cellGcmSys->Warning("cellGcmMapMainMemory(ea=0x%x,size=0x%x,offset_addr=0x%x)", ea, size, offset.GetAddr()); @@ -950,7 +927,7 @@ int32_t cellGcmMapMainMemory(u64 ea, u32 size, mem32_t offset) return CELL_OK; } -int32_t cellGcmReserveIoMapSize(const u32 size) +s32 cellGcmReserveIoMapSize(u32 size) { if (size & 0xFFFFF) { @@ -968,7 +945,7 @@ int32_t cellGcmReserveIoMapSize(const u32 size) return CELL_OK; } -int32_t cellGcmUnmapEaIoAddress(u64 ea) +s32 cellGcmUnmapEaIoAddress(u64 ea) { u32 size = Memory.RSXIOMem.UnmapRealAddress(ea); if (size) @@ -992,7 +969,7 @@ int32_t cellGcmUnmapEaIoAddress(u64 ea) return CELL_OK; } -int32_t cellGcmUnmapIoAddress(u64 io) +s32 cellGcmUnmapIoAddress(u64 io) { u32 size = Memory.RSXIOMem.UnmapAddress(io); if (size) @@ -1016,7 +993,7 @@ int32_t cellGcmUnmapIoAddress(u64 io) return CELL_OK; } -int32_t cellGcmUnreserveIoMapSize(u32 size) +s32 cellGcmUnreserveIoMapSize(u32 size) { if (size & 0xFFFFF) @@ -1094,9 +1071,15 @@ int cellGcmSetFlipCommand(u32 ctx, u32 id) return cellGcmSetPrepareFlip(ctx, id); } -s64 cellGcmFunc15() +s64 cellGcmFunc15(u32 unk_addr) { - cellGcmSys->Todo("cellGcmFunc15()"); + cellGcmSys->Todo("cellGcmFunc15(unk_addr=0x%x)", unk_addr); + + if (0/*TODO: If what?*/) { + _sys_memset(unk_addr, 0, 0x84); + } + + // TODO return 0; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.h b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.h new file mode 100644 index 000000000..610b177ed --- /dev/null +++ b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.h @@ -0,0 +1,35 @@ +#pragma once + +enum +{ + CELL_GCM_ERROR_FAILURE = 0x802100ff, + CELL_GCM_ERROR_NO_IO_PAGE_TABLE = 0x80210001, + CELL_GCM_ERROR_INVALID_ENUM = 0x80210002, + CELL_GCM_ERROR_INVALID_VALUE = 0x80210003, + CELL_GCM_ERROR_INVALID_ALIGNMENT = 0x80210004, + CELL_GCM_ERROR_ADDRESS_OVERWRAP = 0x80210005 +}; + +struct gcm_offset +{ + u64 io; + u64 ea; +}; + +// Auxiliary functions +void InitOffsetTable(); + +// SysCalls +s32 cellGcmSetPrepareFlip(mem_ptr_t ctxt, u32 id); + +s32 cellGcmAddressToOffset(u64 address, mem32_t offset); +u32 cellGcmGetMaxIoMapSize(); +void cellGcmGetOffsetTable(mem_ptr_t table); +s32 cellGcmIoOffsetToAddress(u32 ioOffset, u64 address); +s32 cellGcmMapEaIoAddress(u32 ea, u32 io, u32 size); +s32 cellGcmMapEaIoAddressWithFlags(u32 ea, u32 io, u32 size, u32 flags); +s32 cellGcmMapMainMemory(u64 ea, u32 size, mem32_t offset); +s32 cellGcmReserveIoMapSize(u32 size); +s32 cellGcmUnmapEaIoAddress(u64 ea); +s32 cellGcmUnmapIoAddress(u64 io); +s32 cellGcmUnreserveIoMapSize(u32 size); diff --git a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp index d114db993..2ab01ebac 100644 --- a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.cpp @@ -10,25 +10,12 @@ #include "Emu/SysCalls/lv2/sys_spu.h" #include "Loader/ELF.h" #include "Emu/Cell/RawSPUThread.h" +#include "sysPrxForUser.h" //void sysPrxForUser_init(); //Module sysPrxForUser("sysPrxForUser", sysPrxForUser_init); Module *sysPrxForUser = nullptr; -struct HeapInfo -{ - u32 heap_addr; - u32 align; - u32 size; - - HeapInfo(u32 _heap_addr, u32 _align, u32 _size) - : heap_addr(_heap_addr) - , align(_align) - , size(_size) - { - } -}; - int sys_heap_create_heap(const u32 heap_addr, const u32 align, const u32 size) { sysPrxForUser->Warning("sys_heap_create_heap(heap_addr=0x%x, align=0x%x, size=0x%x)", heap_addr, align, size); @@ -177,6 +164,14 @@ int sys_raw_spu_image_load(int id, mem_ptr_t img) return CELL_OK; } +s32 _sys_memset(u32 addr, s32 value, u32 size) +{ + sysPrxForUser->Log("_sys_memset(addr=0x%x, value=%d, size=%d)", addr, value, size); + + memset(Memory + addr, value, size); + return CELL_OK; +} + void sysPrxForUser_init() { sysPrxForUser->AddFunc(0x744680a2, sys_initialize_tls); @@ -249,4 +244,6 @@ void sysPrxForUser_init() sysPrxForUser->AddFunc(0x67f9fedb, sys_game_process_exitspawn2); sysPrxForUser->AddFunc(0xfc52a7a9, sys_game_process_exitspawn); + + sysPrxForUser->AddFunc(0x68b9b011, _sys_memset); } diff --git a/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.h b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.h new file mode 100644 index 000000000..d32efb69c --- /dev/null +++ b/rpcs3/Emu/SysCalls/Modules/sysPrxForUser.h @@ -0,0 +1,18 @@ +# pragma once + +struct HeapInfo +{ + u32 heap_addr; + u32 align; + u32 size; + + HeapInfo(u32 _heap_addr, u32 _align, u32 _size) + : heap_addr(_heap_addr) + , align(_align) + , size(_size) + { + } +}; + +// SysCalls +s32 _sys_memset(u32 addr, s32 value, u32 num); diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 2ed228080..8c856e1d4 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -346,6 +346,7 @@ + @@ -367,6 +368,7 @@ + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 5a9604bec..3b692b7c0 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -1105,5 +1105,11 @@ Emu\SysCalls + + Emu\SysCalls\Modules + + + Emu\SysCalls\Modules + From f07c35d9aeb7dfd476c5e933aa3f0602e916c77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandro=20S=C3=A1nchez=20Bach?= Date: Mon, 4 Aug 2014 01:33:57 +0200 Subject: [PATCH 2/2] Renamed Emu/GS -> Emu/RSX --- rpcs3/Emu/{GS => RSX}/GCM.h | 0 rpcs3/Emu/{GS => RSX}/GL/GLBuffers.cpp | 0 rpcs3/Emu/{GS => RSX}/GL/GLBuffers.h | 0 .../Emu/{GS => RSX}/GL/GLFragmentProgram.cpp | 0 rpcs3/Emu/{GS => RSX}/GL/GLFragmentProgram.h | 2 +- rpcs3/Emu/{GS => RSX}/GL/GLGSRender.cpp | 0 rpcs3/Emu/{GS => RSX}/GL/GLGSRender.h | 4 +- rpcs3/Emu/{GS => RSX}/GL/GLProcTable.h | 0 rpcs3/Emu/{GS => RSX}/GL/GLProgram.cpp | 0 rpcs3/Emu/{GS => RSX}/GL/GLProgram.h | 0 rpcs3/Emu/{GS => RSX}/GL/GLProgramBuffer.cpp | 0 rpcs3/Emu/{GS => RSX}/GL/GLProgramBuffer.h | 0 rpcs3/Emu/{GS => RSX}/GL/GLShaderParam.h | 0 rpcs3/Emu/{GS => RSX}/GL/GLVertexProgram.cpp | 0 rpcs3/Emu/{GS => RSX}/GL/GLVertexProgram.h | 2 +- rpcs3/Emu/{GS => RSX}/GL/OpenGL.cpp | 0 rpcs3/Emu/{GS => RSX}/GL/OpenGL.h | 0 rpcs3/Emu/{GS => RSX}/GSManager.cpp | 0 rpcs3/Emu/{GS => RSX}/GSManager.h | 0 rpcs3/Emu/{GS => RSX}/GSRender.cpp | 0 rpcs3/Emu/{GS => RSX}/GSRender.h | 4 +- rpcs3/Emu/{GS => RSX}/Null/NullGSRender.h | 2 +- rpcs3/Emu/{GS => RSX}/RSXFragmentProgram.h | 0 rpcs3/Emu/{GS => RSX}/RSXTexture.cpp | 0 rpcs3/Emu/{GS => RSX}/RSXTexture.h | 0 rpcs3/Emu/{GS => RSX}/RSXThread.cpp | 0 rpcs3/Emu/{GS => RSX}/RSXThread.h | 0 rpcs3/Emu/{GS => RSX}/RSXVertexProgram.h | 0 rpcs3/Emu/{GS => RSX}/sysutil_video.h | 0 rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp | 2 +- rpcs3/Emu/System.h | 2 +- rpcs3/Gui/MainFrame.cpp | 2 +- rpcs3/Gui/RSXDebugger.cpp | 4 +- rpcs3/emucore.vcxproj | 56 +++--- rpcs3/emucore.vcxproj.filters | 186 +++++++++--------- 35 files changed, 137 insertions(+), 129 deletions(-) rename rpcs3/Emu/{GS => RSX}/GCM.h (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLBuffers.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLBuffers.h (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLFragmentProgram.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLFragmentProgram.h (99%) rename rpcs3/Emu/{GS => RSX}/GL/GLGSRender.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLGSRender.h (99%) rename rpcs3/Emu/{GS => RSX}/GL/GLProcTable.h (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLProgram.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLProgram.h (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLProgramBuffer.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLProgramBuffer.h (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLShaderParam.h (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLVertexProgram.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GL/GLVertexProgram.h (99%) rename rpcs3/Emu/{GS => RSX}/GL/OpenGL.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GL/OpenGL.h (100%) rename rpcs3/Emu/{GS => RSX}/GSManager.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GSManager.h (100%) rename rpcs3/Emu/{GS => RSX}/GSRender.cpp (100%) rename rpcs3/Emu/{GS => RSX}/GSRender.h (94%) rename rpcs3/Emu/{GS => RSX}/Null/NullGSRender.h (92%) rename rpcs3/Emu/{GS => RSX}/RSXFragmentProgram.h (100%) rename rpcs3/Emu/{GS => RSX}/RSXTexture.cpp (100%) rename rpcs3/Emu/{GS => RSX}/RSXTexture.h (100%) rename rpcs3/Emu/{GS => RSX}/RSXThread.cpp (100%) rename rpcs3/Emu/{GS => RSX}/RSXThread.h (100%) rename rpcs3/Emu/{GS => RSX}/RSXVertexProgram.h (100%) rename rpcs3/Emu/{GS => RSX}/sysutil_video.h (100%) diff --git a/rpcs3/Emu/GS/GCM.h b/rpcs3/Emu/RSX/GCM.h similarity index 100% rename from rpcs3/Emu/GS/GCM.h rename to rpcs3/Emu/RSX/GCM.h diff --git a/rpcs3/Emu/GS/GL/GLBuffers.cpp b/rpcs3/Emu/RSX/GL/GLBuffers.cpp similarity index 100% rename from rpcs3/Emu/GS/GL/GLBuffers.cpp rename to rpcs3/Emu/RSX/GL/GLBuffers.cpp diff --git a/rpcs3/Emu/GS/GL/GLBuffers.h b/rpcs3/Emu/RSX/GL/GLBuffers.h similarity index 100% rename from rpcs3/Emu/GS/GL/GLBuffers.h rename to rpcs3/Emu/RSX/GL/GLBuffers.h diff --git a/rpcs3/Emu/GS/GL/GLFragmentProgram.cpp b/rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp similarity index 100% rename from rpcs3/Emu/GS/GL/GLFragmentProgram.cpp rename to rpcs3/Emu/RSX/GL/GLFragmentProgram.cpp diff --git a/rpcs3/Emu/GS/GL/GLFragmentProgram.h b/rpcs3/Emu/RSX/GL/GLFragmentProgram.h similarity index 99% rename from rpcs3/Emu/GS/GL/GLFragmentProgram.h rename to rpcs3/Emu/RSX/GL/GLFragmentProgram.h index 0ff5af0d4..6219d9304 100644 --- a/rpcs3/Emu/GS/GL/GLFragmentProgram.h +++ b/rpcs3/Emu/RSX/GL/GLFragmentProgram.h @@ -1,6 +1,6 @@ #pragma once #include "GLShaderParam.h" -#include "Emu/GS/RSXFragmentProgram.h" +#include "Emu/RSX/RSXFragmentProgram.h" struct GLFragmentDecompilerThread : public ThreadBase { diff --git a/rpcs3/Emu/GS/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp similarity index 100% rename from rpcs3/Emu/GS/GL/GLGSRender.cpp rename to rpcs3/Emu/RSX/GL/GLGSRender.cpp diff --git a/rpcs3/Emu/GS/GL/GLGSRender.h b/rpcs3/Emu/RSX/GL/GLGSRender.h similarity index 99% rename from rpcs3/Emu/GS/GL/GLGSRender.h rename to rpcs3/Emu/RSX/GL/GLGSRender.h index 325bca7fa..e2cf5f9d6 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.h +++ b/rpcs3/Emu/RSX/GL/GLGSRender.h @@ -1,6 +1,6 @@ #pragma once -#include "Emu/GS/GSRender.h" -#include "Emu/GS/RSXThread.h" +#include "Emu/RSX/GSRender.h" +#include "Emu/RSX/RSXThread.h" #include "Utilities/rPlatform.h" #include "GLBuffers.h" #include "GLProgramBuffer.h" diff --git a/rpcs3/Emu/GS/GL/GLProcTable.h b/rpcs3/Emu/RSX/GL/GLProcTable.h similarity index 100% rename from rpcs3/Emu/GS/GL/GLProcTable.h rename to rpcs3/Emu/RSX/GL/GLProcTable.h diff --git a/rpcs3/Emu/GS/GL/GLProgram.cpp b/rpcs3/Emu/RSX/GL/GLProgram.cpp similarity index 100% rename from rpcs3/Emu/GS/GL/GLProgram.cpp rename to rpcs3/Emu/RSX/GL/GLProgram.cpp diff --git a/rpcs3/Emu/GS/GL/GLProgram.h b/rpcs3/Emu/RSX/GL/GLProgram.h similarity index 100% rename from rpcs3/Emu/GS/GL/GLProgram.h rename to rpcs3/Emu/RSX/GL/GLProgram.h diff --git a/rpcs3/Emu/GS/GL/GLProgramBuffer.cpp b/rpcs3/Emu/RSX/GL/GLProgramBuffer.cpp similarity index 100% rename from rpcs3/Emu/GS/GL/GLProgramBuffer.cpp rename to rpcs3/Emu/RSX/GL/GLProgramBuffer.cpp diff --git a/rpcs3/Emu/GS/GL/GLProgramBuffer.h b/rpcs3/Emu/RSX/GL/GLProgramBuffer.h similarity index 100% rename from rpcs3/Emu/GS/GL/GLProgramBuffer.h rename to rpcs3/Emu/RSX/GL/GLProgramBuffer.h diff --git a/rpcs3/Emu/GS/GL/GLShaderParam.h b/rpcs3/Emu/RSX/GL/GLShaderParam.h similarity index 100% rename from rpcs3/Emu/GS/GL/GLShaderParam.h rename to rpcs3/Emu/RSX/GL/GLShaderParam.h diff --git a/rpcs3/Emu/GS/GL/GLVertexProgram.cpp b/rpcs3/Emu/RSX/GL/GLVertexProgram.cpp similarity index 100% rename from rpcs3/Emu/GS/GL/GLVertexProgram.cpp rename to rpcs3/Emu/RSX/GL/GLVertexProgram.cpp diff --git a/rpcs3/Emu/GS/GL/GLVertexProgram.h b/rpcs3/Emu/RSX/GL/GLVertexProgram.h similarity index 99% rename from rpcs3/Emu/GS/GL/GLVertexProgram.h rename to rpcs3/Emu/RSX/GL/GLVertexProgram.h index ffa19e823..2605410a3 100644 --- a/rpcs3/Emu/GS/GL/GLVertexProgram.h +++ b/rpcs3/Emu/RSX/GL/GLVertexProgram.h @@ -1,6 +1,6 @@ #pragma once #include "GLShaderParam.h" -#include "Emu/GS/RSXVertexProgram.h" +#include "Emu/RSX/RSXVertexProgram.h" struct GLVertexDecompilerThread : public ThreadBase { diff --git a/rpcs3/Emu/GS/GL/OpenGL.cpp b/rpcs3/Emu/RSX/GL/OpenGL.cpp similarity index 100% rename from rpcs3/Emu/GS/GL/OpenGL.cpp rename to rpcs3/Emu/RSX/GL/OpenGL.cpp diff --git a/rpcs3/Emu/GS/GL/OpenGL.h b/rpcs3/Emu/RSX/GL/OpenGL.h similarity index 100% rename from rpcs3/Emu/GS/GL/OpenGL.h rename to rpcs3/Emu/RSX/GL/OpenGL.h diff --git a/rpcs3/Emu/GS/GSManager.cpp b/rpcs3/Emu/RSX/GSManager.cpp similarity index 100% rename from rpcs3/Emu/GS/GSManager.cpp rename to rpcs3/Emu/RSX/GSManager.cpp diff --git a/rpcs3/Emu/GS/GSManager.h b/rpcs3/Emu/RSX/GSManager.h similarity index 100% rename from rpcs3/Emu/GS/GSManager.h rename to rpcs3/Emu/RSX/GSManager.h diff --git a/rpcs3/Emu/GS/GSRender.cpp b/rpcs3/Emu/RSX/GSRender.cpp similarity index 100% rename from rpcs3/Emu/GS/GSRender.cpp rename to rpcs3/Emu/RSX/GSRender.cpp diff --git a/rpcs3/Emu/GS/GSRender.h b/rpcs3/Emu/RSX/GSRender.h similarity index 94% rename from rpcs3/Emu/GS/GSRender.h rename to rpcs3/Emu/RSX/GSRender.h index 86d74748a..f1b6b7408 100644 --- a/rpcs3/Emu/GS/GSRender.h +++ b/rpcs3/Emu/RSX/GSRender.h @@ -1,6 +1,6 @@ #pragma once -#include "Emu/GS/GCM.h" -#include "Emu/GS/RSXThread.h" +#include "Emu/RSX/GCM.h" +#include "Emu/RSX/RSXThread.h" struct GSRender : public RSXThread { diff --git a/rpcs3/Emu/GS/Null/NullGSRender.h b/rpcs3/Emu/RSX/Null/NullGSRender.h similarity index 92% rename from rpcs3/Emu/GS/Null/NullGSRender.h rename to rpcs3/Emu/RSX/Null/NullGSRender.h index 26663236b..1fa710435 100644 --- a/rpcs3/Emu/GS/Null/NullGSRender.h +++ b/rpcs3/Emu/RSX/Null/NullGSRender.h @@ -1,5 +1,5 @@ #pragma once -#include "Emu/GS/GSRender.h" +#include "Emu/RSX/GSRender.h" class NullGSRender : public GSRender diff --git a/rpcs3/Emu/GS/RSXFragmentProgram.h b/rpcs3/Emu/RSX/RSXFragmentProgram.h similarity index 100% rename from rpcs3/Emu/GS/RSXFragmentProgram.h rename to rpcs3/Emu/RSX/RSXFragmentProgram.h diff --git a/rpcs3/Emu/GS/RSXTexture.cpp b/rpcs3/Emu/RSX/RSXTexture.cpp similarity index 100% rename from rpcs3/Emu/GS/RSXTexture.cpp rename to rpcs3/Emu/RSX/RSXTexture.cpp diff --git a/rpcs3/Emu/GS/RSXTexture.h b/rpcs3/Emu/RSX/RSXTexture.h similarity index 100% rename from rpcs3/Emu/GS/RSXTexture.h rename to rpcs3/Emu/RSX/RSXTexture.h diff --git a/rpcs3/Emu/GS/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp similarity index 100% rename from rpcs3/Emu/GS/RSXThread.cpp rename to rpcs3/Emu/RSX/RSXThread.cpp diff --git a/rpcs3/Emu/GS/RSXThread.h b/rpcs3/Emu/RSX/RSXThread.h similarity index 100% rename from rpcs3/Emu/GS/RSXThread.h rename to rpcs3/Emu/RSX/RSXThread.h diff --git a/rpcs3/Emu/GS/RSXVertexProgram.h b/rpcs3/Emu/RSX/RSXVertexProgram.h similarity index 100% rename from rpcs3/Emu/GS/RSXVertexProgram.h rename to rpcs3/Emu/RSX/RSXVertexProgram.h diff --git a/rpcs3/Emu/GS/sysutil_video.h b/rpcs3/Emu/RSX/sysutil_video.h similarity index 100% rename from rpcs3/Emu/GS/sysutil_video.h rename to rpcs3/Emu/RSX/sysutil_video.h diff --git a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp index 9c31b9130..17d34d161 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGcmSys.cpp @@ -4,7 +4,7 @@ #include "Emu/System.h" #include "Emu/SysCalls/Modules.h" #include "Emu/SysCalls/SysCalls.h" -#include "Emu/GS/GCM.h" +#include "Emu/RSX/GCM.h" #include "sysPrxForUser.h" #include "cellGcmSys.h" diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index 3b9f992ee..7052d0511 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -5,7 +5,7 @@ #include "Emu/Io/Pad.h" #include "Emu/Io/Keyboard.h" #include "Emu/Io/Mouse.h" -#include "Emu/GS/GSManager.h" +#include "Emu/RSX/GSManager.h" #include "Emu/Audio/AudioManager.h" #include "Emu/FS/VFS.h" #include "Loader/Loader.h" diff --git a/rpcs3/Gui/MainFrame.cpp b/rpcs3/Gui/MainFrame.cpp index 5c71f2abd..923390d63 100644 --- a/rpcs3/Gui/MainFrame.cpp +++ b/rpcs3/Gui/MainFrame.cpp @@ -11,7 +11,7 @@ #include "git-version.h" #include "Ini.h" -#include "Emu/GS/sysutil_video.h" +#include "Emu/RSX/sysutil_video.h" #include "Gui/VHDDManager.h" #include "Gui/VFSManager.h" #include "Gui/AboutDialog.h" diff --git a/rpcs3/Gui/RSXDebugger.cpp b/rpcs3/Gui/RSXDebugger.cpp index b145d4907..d3aeb017a 100644 --- a/rpcs3/Gui/RSXDebugger.cpp +++ b/rpcs3/Gui/RSXDebugger.cpp @@ -4,8 +4,8 @@ #include "Emu/System.h" #include "RSXDebugger.h" -#include "Emu/GS/sysutil_video.h" -#include "Emu/GS/GCM.h" +#include "Emu/RSX/sysutil_video.h" +#include "Emu/RSX/GCM.h" #include "MemoryViewer.h" diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 8c856e1d4..ff0f638f7 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -74,22 +74,22 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -284,22 +284,6 @@ - - - - - - - - - - - - - - - - @@ -314,6 +298,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters index 3b692b7c0..e976ffed5 100644 --- a/rpcs3/emucore.vcxproj.filters +++ b/rpcs3/emucore.vcxproj.filters @@ -33,15 +33,6 @@ {c04826b8-05a1-4015-b3aa-ef44805531a2} - - {c344f241-48a9-4950-8b94-8b60adc4a67f} - - - {9aaa9b5c-c890-485c-a729-d2b5e783406f} - - - {f81523a6-0846-4abc-96b2-1284b2506485} - {b26b6b08-a8ce-4bb5-8339-c5352a23ce96} @@ -81,6 +72,15 @@ {187d33b8-7b69-4081-9545-de6ad1d8fe98} + + {fadb4b36-57af-4583-891d-d22ff369e266} + + + {4adca4fa-b90f-4662-9eb0-1d29cf3cd2eb} + + + {6f1da5b2-52c5-416b-9b5c-b9897bc1b300} + @@ -236,39 +236,6 @@ Emu\Io - - Emu\GS - - - Emu\GS - - - Emu\GS - - - Emu\GS - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - Emu\FS @@ -587,6 +554,39 @@ Emu\SysCalls\Modules + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX + @@ -730,54 +730,6 @@ Emu\Io\Windows - - Emu\GS - - - Emu\GS - - - Emu\GS - - - Emu\GS - - - Emu\GS - - - Emu\GS - - - Emu\GS - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\GL - - - Emu\GS\Null - Emu\FS @@ -1111,5 +1063,59 @@ Emu\SysCalls\Modules + + Emu\RSX\Null + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX\GL + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX + + + Emu\RSX +