shadPS4/src/main.cpp

32 lines
791 B
C++
Raw Normal View History

2024-02-23 21:32:32 +00:00
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2023-11-10 17:52:41 +00:00
#include <fmt/core.h>
#include "common/memory_patcher.h"
#include "emulator.h"
2023-11-10 17:52:41 +00:00
2023-10-13 06:40:59 +00:00
int main(int argc, char* argv[]) {
2023-08-03 10:06:23 +00:00
if (argc == 1) {
fmt::print("Usage: {} <elf or eboot.bin path>\n", argv[0]);
2023-07-07 10:54:44 +00:00
return -1;
2023-08-03 10:06:23 +00:00
}
// check if eboot file exists
if (!std::filesystem::exists(argv[1])) {
fmt::print("Eboot.bin file not found\n");
return -1;
}
2023-08-11 22:02:42 +00:00
for (int i = 0; i < argc; i++) {
std::string curArg = argv[i];
if (curArg == "-p") {
std::string patchFile = argv[i + 1];
MemoryPatcher::patchFile = patchFile;
}
}
Core::Emulator emulator;
emulator.Run(argv[1]);
2023-04-27 16:13:19 +00:00
return 0;
}