mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-20 05:51:44 +12:00
Filesystem stuff
This commit is contained in:
parent
5992a58351
commit
272cdefca1
13 changed files with 222 additions and 32 deletions
|
@ -1,21 +1,32 @@
|
|||
#pragma once
|
||||
#include "fs/archive_ncch.hpp"
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
// Yay, more circular dependencies
|
||||
class Kernel;
|
||||
|
||||
class FSService {
|
||||
Handle handle = KernelHandles::FS;
|
||||
Memory& mem;
|
||||
Kernel& kernel;
|
||||
|
||||
MAKE_LOG_FUNCTION(log, fsLogger)
|
||||
|
||||
SelfNCCHArchive selfNcch;
|
||||
|
||||
ArchiveBase* getArchiveFromID(u32 id);
|
||||
std::optional<Handle> openFile(ArchiveBase* archive, const FSPath& path);
|
||||
|
||||
// Service commands
|
||||
void initialize(u32 messagePointer);
|
||||
void openArchive(u32 messagePointer);
|
||||
void openFileDirectly(u32 messagePointer);
|
||||
|
||||
public:
|
||||
FSService(Memory& mem) : mem(mem) {}
|
||||
FSService(Memory& mem, Kernel& kernel) : mem(mem), selfNcch(mem), kernel(kernel) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
|
@ -10,6 +10,8 @@
|
|||
#include "services/gsp_lcd.hpp"
|
||||
#include "services/ndm.hpp"
|
||||
|
||||
class Kernel;
|
||||
|
||||
class ServiceManager {
|
||||
std::array<u32, 16>& regs;
|
||||
Memory& mem;
|
||||
|
@ -28,7 +30,7 @@ class ServiceManager {
|
|||
void registerClient(u32 messagePointer);
|
||||
|
||||
public:
|
||||
ServiceManager(std::array<u32, 16>& regs, Memory& mem, GPU& gpu, u32& currentPID);
|
||||
ServiceManager(std::array<u32, 16>& regs, Memory& mem, GPU& gpu, u32& currentPID, Kernel& kernel);
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue