2024-06-10 14:18:42 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <filesystem>
|
|
|
|
#include <thread>
|
|
|
|
|
|
|
|
#include <common/singleton.h>
|
|
|
|
#include "core/linker.h"
|
|
|
|
#include "input/controller.h"
|
|
|
|
#include "sdl_window.h"
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
2024-06-26 13:43:01 +02:00
|
|
|
using HLEInitDef = void (*)(Core::Loader::SymbolsResolver* sym);
|
|
|
|
|
|
|
|
struct SysModules {
|
|
|
|
std::string_view module_name;
|
|
|
|
HLEInitDef callback;
|
|
|
|
};
|
|
|
|
|
2024-06-10 14:18:42 +02:00
|
|
|
class Emulator {
|
|
|
|
public:
|
|
|
|
Emulator();
|
|
|
|
~Emulator();
|
|
|
|
|
|
|
|
void Run(const std::filesystem::path& file);
|
|
|
|
|
|
|
|
private:
|
2024-06-10 17:26:37 +02:00
|
|
|
void LoadSystemModules(const std::filesystem::path& file);
|
2024-07-01 12:35:35 +02:00
|
|
|
|
|
|
|
Core::MemoryManager* memory;
|
2024-06-10 14:18:42 +02:00
|
|
|
Input::GameController* controller = Common::Singleton<Input::GameController>::Instance();
|
2024-06-10 17:26:37 +02:00
|
|
|
Core::Linker* linker = Common::Singleton<Core::Linker>::Instance();
|
2024-06-10 14:18:42 +02:00
|
|
|
Frontend::WindowSDL window;
|
|
|
|
};
|
|
|
|
|
2024-06-13 23:58:57 +02:00
|
|
|
} // namespace Core
|