Restore features

This commit is contained in:
AzaharPlus
2025-03-31 12:39:28 +02:00
parent 5ade69f5f4
commit 3e64dc0c8c
51 changed files with 2462 additions and 765 deletions

View File

@@ -81,5 +81,6 @@
// Sys files
#define SHARED_FONT "shared_font.bin"
#define KEYS_FILE "keys.txt"
#define AES_KEYS "aes_keys.txt"
#define BOOTROM9 "boot9.bin"
#define SECRET_SECTOR "sector0x96.bin"

View File

@@ -386,7 +386,15 @@ public:
[[nodiscard]] size_t ReadSpan(std::span<T> data) {
static_assert(std::is_trivially_copyable_v<T>, "Data type must be trivially copyable.");
#ifdef todotodo
return ReadImpl(data.data(), data.size(), sizeof(T));
#else
if (!IsOpen()) {
return 0;
}
return std::fread(data.data(), sizeof(T), data.size(), m_file);
#endif
}
/**
@@ -408,7 +416,15 @@ public:
[[nodiscard]] size_t WriteSpan(std::span<const T> data) {
static_assert(std::is_trivially_copyable_v<T>, "Data type must be trivially copyable.");
#ifdef todotodo
return WriteImpl(data.data(), data.size(), sizeof(T));
#else
if (!IsOpen()) {
return 0;
}
return std::fwrite(data.data(), sizeof(T), data.size(), m_file);
#endif
}
[[nodiscard]] bool IsOpen() const {

View File

@@ -70,6 +70,7 @@ HackManager hack_manager = {
},
}},
#ifdef todotodo
{HackType::ONLINE_LLE_REQUIRED,
HackEntry{
.mode = HackAllowMode::FORCE,
@@ -107,6 +108,7 @@ HackManager hack_manager = {
0x000400000D40D200,
},
}},
#endif
{HackType::REGION_FROM_SECURE,
HackEntry{