mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 04:29:13 +12:00
[CFG & NCCH archive] Add bad word list & the user time offset config
This commit is contained in:
parent
7834f6d734
commit
16d150496d
5 changed files with 145 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "fs/archive_ncch.hpp"
|
||||
#include "fs/bad_word_list.hpp"
|
||||
#include "fs/country_list..hpp"
|
||||
#include "fs/mii_data.hpp"
|
||||
#include <algorithm>
|
||||
|
@ -88,8 +89,11 @@ std::optional<u32> NCCHArchive::readFile(FileSession* file, u64 offset, u32 size
|
|||
if (lowProgramID == miiData) fileData = std::vector<u8>(std::begin(MII_DATA), std::end(MII_DATA));
|
||||
else if (lowProgramID == regionManifest) fileData = std::vector<u8>(std::begin(COUNTRY_LIST_DATA), std::end(COUNTRY_LIST_DATA));
|
||||
else Helpers::panic("[NCCH archive] Read unimplemented NAND file. ID: %08X", lowProgramID);
|
||||
} else if (highProgramID == systemDataArchive && lowProgramID == badWordList) {
|
||||
fileData = std::vector<u8>(std::begin(BAD_WORD_LIST_DATA), std::end(BAD_WORD_LIST_DATA));
|
||||
} else {
|
||||
Helpers::panic("[NCCH archive] Read from NAND but not the shared data archive");
|
||||
Helpers::panic("[NCCH archive] Read from unimplemented NCCH archive file. High program ID: %08X, low ID: %08X",
|
||||
highProgramID, lowProgramID);
|
||||
}
|
||||
|
||||
if (offset >= fileData.size()) {
|
||||
|
|
|
@ -86,8 +86,11 @@ void CFGService::getConfigInfoBlk2(u32 messagePointer) {
|
|||
} else if (size == 4 && blockID == 0xB0003) { // Coordinates (latidude and longtitude) as s16
|
||||
mem.write16(output, 0); // Latitude
|
||||
mem.write16(output + 2, 0); // Longtitude
|
||||
} else if (size == 8 && blockID == 0x30001) { // User time offset
|
||||
printf("Read from user time offset field in NAND. TODO: What is this\n");
|
||||
mem.write64(output, 0);
|
||||
} else {
|
||||
Helpers::panic("Unhandled GetConfigInfoBlk2 configuration");
|
||||
Helpers::panic("Unhandled GetConfigInfoBlk2 configuration. Size = %d, block = %X", size, blockID);
|
||||
}
|
||||
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue