general refactoring and coding format fixes
This commit is contained in:
parent
30c1062893
commit
3e60a67785
|
@ -39,7 +39,7 @@ add_executable(shadps4
|
||||||
src/Lib/Threads.h
|
src/Lib/Threads.h
|
||||||
src/Core/PS4/HLE/Kernel/Objects/physical_memory.h
|
src/Core/PS4/HLE/Kernel/Objects/physical_memory.h
|
||||||
src/Core/PS4/HLE/Kernel/Objects/physical_memory.cpp
|
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)
|
find_package(OpenGL REQUIRED)
|
||||||
target_link_libraries(shadps4 PUBLIC fmt spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY})
|
target_link_libraries(shadps4 PUBLIC fmt spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY})
|
||||||
|
|
|
@ -7,8 +7,8 @@ constexpr u64 SCE_KERNEL_MAIN_DMEM_SIZE = 5376_MB; // ~ 6GB
|
||||||
|
|
||||||
// memory types
|
// memory types
|
||||||
|
|
||||||
typedef enum : int {
|
enum MemoryTypes : u32 {
|
||||||
SCE_KERNEL_WB_ONION = 0, // write - back mode (Onion bus)
|
SCE_KERNEL_WB_ONION = 0, // write - back mode (Onion bus)
|
||||||
SCE_KERNEL_WC_GARLIC = 3, // write - combining mode (Garlic bus)
|
SCE_KERNEL_WC_GARLIC = 3, // write - combining mode (Garlic bus)
|
||||||
SCE_KERNEL_WB_GARLIC = 10 // write - back mode (Garlic bus)
|
SCE_KERNEL_WB_GARLIC = 10 // write - back mode (Garlic bus)
|
||||||
} memory_types;
|
};
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
#include <bit>
|
#include <bit>
|
||||||
#include <magic_enum.hpp>
|
#include <magic_enum.hpp>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
#include "../../../../Debug.h"
|
#include <debug.h>
|
||||||
#include "../../../../Util/Log.h"
|
#include "../../../../Util/Log.h"
|
||||||
#include "../../../../Util/Singleton.h"
|
#include "../../../../Util/Singleton.h"
|
||||||
#include "../ErrorCodes.h"
|
#include "../ErrorCodes.h"
|
||||||
|
@ -42,7 +43,7 @@ int PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u
|
||||||
// TODO debug logging
|
// TODO debug logging
|
||||||
return SCE_KERNEL_ERROR_EINVAL;
|
return SCE_KERNEL_ERROR_EINVAL;
|
||||||
}
|
}
|
||||||
auto memtype = magic_enum::enum_cast<memory_types>(memoryType);
|
auto memtype = magic_enum::enum_cast<MemoryTypes>(memoryType);
|
||||||
|
|
||||||
LOG_INFO_IF(true, "search_start = {:#018x}\n", searchStart);
|
LOG_INFO_IF(true, "search_start = {:#018x}\n", searchStart);
|
||||||
LOG_INFO_IF(true, "search_end = {:#018x}\n", searchEnd);
|
LOG_INFO_IF(true, "search_end = {:#018x}\n", searchEnd);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
#include <debug.h>
|
||||||
#include "ThreadManagement.h"
|
#include "ThreadManagement.h"
|
||||||
#include "../ErrorCodes.h"
|
#include "../ErrorCodes.h"
|
||||||
#include "../../../../Debug.h"
|
|
||||||
|
|
||||||
namespace HLE::Libs::LibKernel::ThreadManagement
|
namespace HLE::Libs::LibKernel::ThreadManagement
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "LibC.h"
|
#include "LibC.h"
|
||||||
#include "Libs.h"
|
#include "Libs.h"
|
||||||
#include "../Loader/Elf.h"
|
#include "../Loader/Elf.h"
|
||||||
#include "../../../Debug.h"
|
#include <debug.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
namespace HLE::Libs::LibC {
|
namespace HLE::Libs::LibC {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "../Loader/Elf.h"
|
#include "../Loader/Elf.h"
|
||||||
#include "LibKernel.h"
|
#include "LibKernel.h"
|
||||||
#include "Libs.h"
|
#include "Libs.h"
|
||||||
#include "../../../Debug.h"
|
#include <debug.h>
|
||||||
#include "../../../Util/Log.h"
|
#include "../../../Util/Log.h"
|
||||||
#include "Kernel/MemoryManagement.h"
|
#include "Kernel/MemoryManagement.h"
|
||||||
#include "../../../Util/Singleton.h"
|
#include "../../../Util/Singleton.h"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "LibSceVideoOut.h"
|
#include "LibSceVideoOut.h"
|
||||||
#include "Libs.h"
|
#include "Libs.h"
|
||||||
#include "../Loader/Elf.h"
|
#include "../Loader/Elf.h"
|
||||||
#include "../../../Debug.h"
|
#include <debug.h>
|
||||||
#include "VideoOut/VideoOutCodes.h"
|
#include "VideoOut/VideoOutCodes.h"
|
||||||
#include "UserManagement/UsrMngCodes.h"
|
#include "UserManagement/UsrMngCodes.h"
|
||||||
#include "../../../Util/Log.h"
|
#include "../../../Util/Log.h"
|
||||||
|
|
|
@ -34,14 +34,15 @@
|
||||||
// Main code
|
// Main code
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
if (argc == 1) {
|
/* if (argc == 1) {
|
||||||
printf("Usage: %s <elf or eboot.bin path>\n", argv[0]);
|
printf("Usage: %s <elf or eboot.bin path>\n", argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
logging::init(true); // init logging
|
logging::init(true); // init logging
|
||||||
Lib::InitThreads();
|
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<Linker>::Instance();
|
auto* linker = Singleton<Linker>::Instance();
|
||||||
HLE::Libs::Init_HLE_Libs(linker->getHLESymbols());
|
HLE::Libs::Init_HLE_Libs(linker->getHLESymbols());
|
||||||
|
|
Loading…
Reference in New Issue