mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-11 17:47:52 +00:00
[fs] Remove remaining files from NCA bypass and fix some asserts (#2502)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2502 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: MaranBr <maranbr@outlook.com> Co-committed-by: MaranBr <maranbr@outlook.com>
This commit is contained in:
parent
cda6958111
commit
8ac495acee
5 changed files with 2 additions and 40 deletions
|
@ -107,7 +107,6 @@ add_library(core STATIC
|
||||||
file_sys/fssystem/fssystem_nca_header.cpp
|
file_sys/fssystem/fssystem_nca_header.cpp
|
||||||
file_sys/fssystem/fssystem_nca_header.h
|
file_sys/fssystem/fssystem_nca_header.h
|
||||||
file_sys/fssystem/fssystem_nca_reader.cpp
|
file_sys/fssystem/fssystem_nca_reader.cpp
|
||||||
file_sys/fssystem/fssystem_passthrough_storage.h
|
|
||||||
file_sys/fssystem/fssystem_pooled_buffer.cpp
|
file_sys/fssystem/fssystem_pooled_buffer.cpp
|
||||||
file_sys/fssystem/fssystem_pooled_buffer.h
|
file_sys/fssystem/fssystem_pooled_buffer.h
|
||||||
file_sys/fssystem/fssystem_sparse_storage.cpp
|
file_sys/fssystem/fssystem_sparse_storage.cpp
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/settings.h"
|
|
||||||
#include "core/file_sys/errors.h"
|
#include "core/file_sys/errors.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_bucket_tree.h"
|
#include "core/file_sys/fssystem/fssystem_bucket_tree.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_bucket_tree_utils.h"
|
#include "core/file_sys/fssystem/fssystem_bucket_tree_utils.h"
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/settings.h"
|
|
||||||
#include "core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h"
|
#include "core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_aes_ctr_storage.h"
|
#include "core/file_sys/fssystem/fssystem_aes_ctr_storage.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_aes_xts_storage.h"
|
#include "core/file_sys/fssystem/fssystem_aes_xts_storage.h"
|
||||||
|
@ -14,7 +13,6 @@
|
||||||
#include "core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h"
|
#include "core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_indirect_storage.h"
|
#include "core/file_sys/fssystem/fssystem_indirect_storage.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_integrity_romfs_storage.h"
|
#include "core/file_sys/fssystem/fssystem_integrity_romfs_storage.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_passthrough_storage.h"
|
|
||||||
#include "core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h"
|
#include "core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_nca_file_system_driver.h"
|
#include "core/file_sys/fssystem/fssystem_nca_file_system_driver.h"
|
||||||
#include "core/file_sys/fssystem/fssystem_sparse_storage.h"
|
#include "core/file_sys/fssystem/fssystem_sparse_storage.h"
|
||||||
|
|
|
@ -13,13 +13,11 @@ u8 NcaHeader::GetProperKeyGeneration() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NcaPatchInfo::HasIndirectTable() const {
|
bool NcaPatchInfo::HasIndirectTable() const {
|
||||||
static constexpr unsigned char BKTR[4] = {'B', 'K', 'T', 'R'};
|
return this->indirect_size != 0;
|
||||||
return std::memcmp(indirect_header.data(), BKTR, sizeof(BKTR)) == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NcaPatchInfo::HasAesCtrExTable() const {
|
bool NcaPatchInfo::HasAesCtrExTable() const {
|
||||||
static constexpr unsigned char BKTR[4] = {'B', 'K', 'T', 'R'};
|
return this->aes_ctr_ex_size != 0;
|
||||||
return std::memcmp(aes_ctr_ex_header.data(), BKTR, sizeof(BKTR)) == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace FileSys
|
} // namespace FileSys
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "core/file_sys/fssystem/fs_i_storage.h"
|
|
||||||
#include "core/file_sys/vfs/vfs.h"
|
|
||||||
|
|
||||||
namespace FileSys {
|
|
||||||
|
|
||||||
//TODO: No integrity verification.
|
|
||||||
class PassthroughStorage final : public IReadOnlyStorage {
|
|
||||||
YUZU_NON_COPYABLE(PassthroughStorage);
|
|
||||||
YUZU_NON_MOVEABLE(PassthroughStorage);
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit PassthroughStorage(VirtualFile base) : base_(std::move(base)) {}
|
|
||||||
~PassthroughStorage() override = default;
|
|
||||||
|
|
||||||
size_t Read(u8* buffer, size_t size, size_t offset) const override {
|
|
||||||
if (!base_ || size == 0)
|
|
||||||
return 0;
|
|
||||||
return base_->Read(buffer, size, offset);
|
|
||||||
}
|
|
||||||
size_t GetSize() const override {
|
|
||||||
return base_ ? base_->GetSize() : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
VirtualFile base_{};
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace FileSys
|
|
Loading…
Add table
Add a link
Reference in a new issue