Impl sceSystemServiceLoadExec (#3647)

* Add support for restarting the emulator with new configurations

- Implement `Restart` function in `Emulator` to enable process relaunch with updated parameters.
- Modify `sceSystemServiceLoadExec` to use the restart functionality.

* Add logging for emulator restart and system service load execution

* Add IPC emulator PID output command

Impl `PID` output command to return the emulator process ID
- required for launches supporting emulator restart

* Add log file append mode support (used after restarting to keep the same log file)

* Keep game root between restarts

* add --wait-for-debugger option flag

* add --wait-for-pid flag

used for sync between parent & child process during restart

* impl restart via ipc

* fix override game root

* add qt flags to allow restart
This commit is contained in:
Vinicius Rangel
2025-09-25 23:01:52 -03:00
committed by GitHub
parent a6f5e4c7dc
commit 71f343d2d6
16 changed files with 432 additions and 43 deletions

View File

@@ -55,7 +55,7 @@ Linker::Linker() : memory{Memory::Instance()} {}
Linker::~Linker() = default;
void Linker::Execute(const std::vector<std::string> args) {
void Linker::Execute(const std::vector<std::string>& args) {
if (Config::debugDump()) {
DebugDump();
}
@@ -115,7 +115,7 @@ void Linker::Execute(const std::vector<std::string> args) {
0, "SceKernelInternalMemory");
ASSERT_MSG(ret == 0, "Unable to perform sceKernelInternalMemory mapping");
main_thread.Run([this, module, args](std::stop_token) {
main_thread.Run([this, module, &args](std::stop_token) {
Common::SetCurrentThreadName("GAME_MainThread");
if (auto& ipc = IPC::Instance()) {
ipc.WaitForStart();
@@ -140,9 +140,9 @@ void Linker::Execute(const std::vector<std::string> args) {
params.argc = 1;
params.argv[0] = "eboot.bin";
if (!args.empty()) {
params.argc = args.size() + 1;
for (int i = 0; i < args.size() && i < 32; i++) {
params.argv[i + 1] = args[i].c_str();
params.argc = args.size();
for (int i = 0; i < args.size() && i < 33; i++) {
params.argv[i] = args[i].c_str();
}
}
params.entry_addr = module->GetEntryAddress();