diff --git a/CMakeLists.txt b/CMakeLists.txt index 60b0cbfa..e8bee95d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ add_executable(shadps4 src/Lib/Threads.h src/Core/PS4/HLE/Kernel/Objects/physical_memory.h src/Core/PS4/HLE/Kernel/Objects/physical_memory.cpp - "src/Util/Singleton.h" "src/Util/Disassembler.cpp" "src/Util/Disassembler.h" "src/Util/StringUtil.h" "src/Core/PS4/Util/aerolib.h" "src/Core/PS4/Loader/SymbolsResolver.h" "src/Core/PS4/Loader/SymbolsResolver.cpp" "src/Core/PS4/HLE/Libs.cpp" "src/Core/PS4/HLE/Libs.h" "src/Core/PS4/HLE/LibC.cpp" "src/Core/PS4/HLE/LibC.h" "src/Lib/Timer.cpp" "src/Lib/Timer.h" "src/Core/PS4/HLE/LibKernel.cpp" "src/Core/PS4/HLE/LibKernel.h" "src/Core/PS4/HLE/LibSceVideoOut.cpp" "src/Core/PS4/HLE/LibSceVideoOut.h" "src/Core/PS4/HLE/LibSceGnmDriver.cpp" "src/Core/PS4/HLE/LibSceGnmDriver.h" "src/Core/PS4/HLE/Kernel/ThreadManagement.cpp" "src/Core/PS4/HLE/Kernel/ThreadManagement.h" "src/Core/PS4/HLE/ErrorCodes.h" "src/Debug.h" "src/Core/PS4/HLE/Kernel/MemoryManagement.cpp" "src/Core/PS4/HLE/Kernel/MemoryManagement.h" "src/Core/PS4/HLE/Kernel/MemMngCodes.h" "src/Util/StringUtil.cpp") + "src/Util/Singleton.h" "src/Util/Disassembler.cpp" "src/Util/Disassembler.h" "src/Util/StringUtil.h" "src/Core/PS4/Util/aerolib.h" "src/Core/PS4/Loader/SymbolsResolver.h" "src/Core/PS4/Loader/SymbolsResolver.cpp" "src/Core/PS4/HLE/Libs.cpp" "src/Core/PS4/HLE/Libs.h" "src/Core/PS4/HLE/LibC.cpp" "src/Core/PS4/HLE/LibC.h" "src/Lib/Timer.cpp" "src/Lib/Timer.h" "src/Core/PS4/HLE/LibKernel.cpp" "src/Core/PS4/HLE/LibKernel.h" "src/Core/PS4/HLE/LibSceVideoOut.cpp" "src/Core/PS4/HLE/LibSceVideoOut.h" "src/Core/PS4/HLE/LibSceGnmDriver.cpp" "src/Core/PS4/HLE/LibSceGnmDriver.h" "src/Core/PS4/HLE/Kernel/ThreadManagement.cpp" "src/Core/PS4/HLE/Kernel/ThreadManagement.h" "src/Core/PS4/HLE/ErrorCodes.h" "src/debug.h" "src/Core/PS4/HLE/Kernel/MemoryManagement.cpp" "src/Core/PS4/HLE/Kernel/MemoryManagement.h" "src/Core/PS4/HLE/Kernel/MemMngCodes.h" "src/Util/StringUtil.cpp") find_package(OpenGL REQUIRED) target_link_libraries(shadps4 PUBLIC fmt spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY}) diff --git a/src/Core/PS4/HLE/Kernel/MemMngCodes.h b/src/Core/PS4/HLE/Kernel/MemMngCodes.h index 056c0d2a..be68f994 100644 --- a/src/Core/PS4/HLE/Kernel/MemMngCodes.h +++ b/src/Core/PS4/HLE/Kernel/MemMngCodes.h @@ -7,8 +7,8 @@ constexpr u64 SCE_KERNEL_MAIN_DMEM_SIZE = 5376_MB; // ~ 6GB // memory types -typedef enum : int { +enum MemoryTypes : u32 { SCE_KERNEL_WB_ONION = 0, // write - back mode (Onion bus) SCE_KERNEL_WC_GARLIC = 3, // write - combining mode (Garlic bus) SCE_KERNEL_WB_GARLIC = 10 // write - back mode (Garlic bus) -} memory_types; \ No newline at end of file +}; \ No newline at end of file diff --git a/src/Core/PS4/HLE/Kernel/MemoryManagement.cpp b/src/Core/PS4/HLE/Kernel/MemoryManagement.cpp index 38e58837..5183a894 100644 --- a/src/Core/PS4/HLE/Kernel/MemoryManagement.cpp +++ b/src/Core/PS4/HLE/Kernel/MemoryManagement.cpp @@ -2,8 +2,9 @@ #include #include +#include -#include "../../../../Debug.h" +#include #include "../../../../Util/Log.h" #include "../../../../Util/Singleton.h" #include "../ErrorCodes.h" @@ -42,7 +43,7 @@ int PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u // TODO debug logging return SCE_KERNEL_ERROR_EINVAL; } - auto memtype = magic_enum::enum_cast(memoryType); + auto memtype = magic_enum::enum_cast(memoryType); LOG_INFO_IF(true, "search_start = {:#018x}\n", searchStart); LOG_INFO_IF(true, "search_end = {:#018x}\n", searchEnd); diff --git a/src/Core/PS4/HLE/Kernel/ThreadManagement.cpp b/src/Core/PS4/HLE/Kernel/ThreadManagement.cpp index bf0029fb..79573d83 100644 --- a/src/Core/PS4/HLE/Kernel/ThreadManagement.cpp +++ b/src/Core/PS4/HLE/Kernel/ThreadManagement.cpp @@ -1,6 +1,6 @@ +#include #include "ThreadManagement.h" #include "../ErrorCodes.h" -#include "../../../../Debug.h" namespace HLE::Libs::LibKernel::ThreadManagement { diff --git a/src/Core/PS4/HLE/LibC.cpp b/src/Core/PS4/HLE/LibC.cpp index 6590941e..72624578 100644 --- a/src/Core/PS4/HLE/LibC.cpp +++ b/src/Core/PS4/HLE/LibC.cpp @@ -1,7 +1,7 @@ #include "LibC.h" #include "Libs.h" #include "../Loader/Elf.h" -#include "../../../Debug.h" +#include #include namespace HLE::Libs::LibC { diff --git a/src/Core/PS4/HLE/LibKernel.cpp b/src/Core/PS4/HLE/LibKernel.cpp index 0c633937..2a20ed5a 100644 --- a/src/Core/PS4/HLE/LibKernel.cpp +++ b/src/Core/PS4/HLE/LibKernel.cpp @@ -1,7 +1,7 @@ #include "../Loader/Elf.h" #include "LibKernel.h" #include "Libs.h" -#include "../../../Debug.h" +#include #include "../../../Util/Log.h" #include "Kernel/MemoryManagement.h" #include "../../../Util/Singleton.h" diff --git a/src/Core/PS4/HLE/LibSceVideoOut.cpp b/src/Core/PS4/HLE/LibSceVideoOut.cpp index e4929cf4..0f0f55f7 100644 --- a/src/Core/PS4/HLE/LibSceVideoOut.cpp +++ b/src/Core/PS4/HLE/LibSceVideoOut.cpp @@ -1,7 +1,7 @@ #include "LibSceVideoOut.h" #include "Libs.h" #include "../Loader/Elf.h" -#include "../../../Debug.h" +#include #include "VideoOut/VideoOutCodes.h" #include "UserManagement/UsrMngCodes.h" #include "../../../Util/Log.h" diff --git a/src/main.cpp b/src/main.cpp index 64e5d845..a32af977 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,14 +34,15 @@ // Main code int main(int argc, char* argv[]) { - if (argc == 1) { + /* if (argc == 1) { printf("Usage: %s \n", argv[0]); return -1; - } + }*/ - logging::init(true);//init logging + logging::init(true); // init logging Lib::InitThreads(); - const char* const path = argv[1]; // argument 1 is the path of self file to boot + const char* const path = "videoout_basic.elf"; // argv[1]; //argument 1 is the path of self file to boot + // const char* const path = "F:\\ps4games\\CUSA03840 - Resident Evil 6\\eboot.bin"; auto* linker = Singleton::Instance(); HLE::Libs::Init_HLE_Libs(linker->getHLESymbols());