mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
FS: Stub card SPI and some other things
This commit is contained in:
parent
055dbc7fb6
commit
cc669d7cab
12 changed files with 139 additions and 21 deletions
|
@ -35,6 +35,7 @@ namespace ArchiveID {
|
|||
SDMC = 9,
|
||||
SDMCWriteOnly = 0xA,
|
||||
|
||||
CardSPI = 0x12345679,
|
||||
SavedataAndNcch = 0x2345678A,
|
||||
// 3DBrew: This is the same as the regular SaveData archive, except with this the savedata ID and mediatype is loaded from the input archive
|
||||
// lowpath.
|
||||
|
|
30
include/fs/archive_card_spi.hpp
Normal file
30
include/fs/archive_card_spi.hpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
#include "archive_base.hpp"
|
||||
#include "result/result.hpp"
|
||||
|
||||
using Result::HorizonResult;
|
||||
|
||||
class CardSPIArchive : public ArchiveBase {
|
||||
public:
|
||||
CardSPIArchive(Memory& mem) : ArchiveBase(mem) {}
|
||||
std::string name() override { return "Card SPI"; }
|
||||
|
||||
u64 getFreeBytes() override {
|
||||
Helpers::warn("Unimplemented GetFreeBytes for Card SPI archive");
|
||||
return 0_MB;
|
||||
}
|
||||
|
||||
HorizonResult createDirectory(const FSPath& path) override;
|
||||
HorizonResult createFile(const FSPath& path, u64 size) override;
|
||||
HorizonResult deleteFile(const FSPath& path) override;
|
||||
|
||||
Rust::Result<ArchiveBase*, HorizonResult> openArchive(const FSPath& path) override;
|
||||
Rust::Result<DirectorySession, HorizonResult> openDirectory(const FSPath& path) override;
|
||||
|
||||
FileDescriptor openFile(const FSPath& path, const FilePerms& perms) override;
|
||||
|
||||
std::optional<u32> readFile(FileSession* file, u64 offset, u32 size, u32 dataPointer) override {
|
||||
Helpers::panic("Unimplemented ReadFile for Card SPI archive");
|
||||
return {};
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue