mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-02 21:36:20 +12:00
Stub FS service, we now get to main in libctru
This commit is contained in:
parent
083a0d04d7
commit
91356f1de9
6 changed files with 70 additions and 4 deletions
36
src/core/services/fs.cpp
Normal file
36
src/core/services/fs.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include "services/fs.hpp"
|
||||
|
||||
namespace FSCommands {
|
||||
enum : u32 {
|
||||
Initialize = 0x08010002,
|
||||
OpenArchive = 0x080C00C2
|
||||
};
|
||||
}
|
||||
|
||||
namespace Result {
|
||||
enum : u32 {
|
||||
Success = 0,
|
||||
Failure = 0xFFFF'FFFF
|
||||
};
|
||||
}
|
||||
|
||||
void FSService::reset() {}
|
||||
|
||||
void FSService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case FSCommands::Initialize: initialize(messagePointer); break;
|
||||
case FSCommands::OpenArchive: openArchive(messagePointer); break;
|
||||
default: Helpers::panic("FS service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
||||
void FSService::initialize(u32 messagePointer) {
|
||||
printf("FS: Initialize (failure)\n");
|
||||
mem.write32(messagePointer + 4, Result::Failure);
|
||||
}
|
||||
|
||||
void FSService::openArchive(u32 messagePointer) {
|
||||
printf("FS: OpenArchive (failure)\n");
|
||||
mem.write32(messagePointer + 4, Result::Failure);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue