System: Rewrite EXE override/loading

Relies on POST=7 as a kernel initialization indicator, instead of
patching the BIOS.

Fixes EXE loading with OpenBIOS and PS2 BIOS, and fast boot getting
baked into save states.
This commit is contained in:
Stenzek
2024-07-28 16:16:05 +10:00
parent 7b99fcbbf3
commit 6fe0c986fa
13 changed files with 327 additions and 322 deletions

View File

@ -1,14 +1,18 @@
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
#pragma once
#include "types.h"
#include <map>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
class Error;
namespace PSFLoader {
#pragma pack(push, 1)
@ -40,7 +44,7 @@ public:
int GetTagInt(const char* tag_name, int default_value) const;
float GetTagFloat(const char* tag_name, float default_value) const;
bool Load(const char* path);
bool Load(const char* path, Error* error);
private:
enum : u32
@ -53,6 +57,6 @@ private:
DiscRegion m_region = DiscRegion::Other;
};
bool Load(const char* path);
bool Load(const std::string& path, Error* error);
} // namespace PSFLoader