aboutsummaryrefslogtreecommitdiff
path: root/src/DSi_NAND.h
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2021-08-24 17:46:20 +0200
committerGitHub <noreply@github.com>2021-08-24 17:46:20 +0200
commit235da420c8ac0bcec5a21db6f3cce4ae190fb7c5 (patch)
tree6aaacaa2b8c2f558601ea8321dd8141c8170f46c /src/DSi_NAND.h
parent346e8c0b878541d987d3ee2bfe54b555f626f7bf (diff)
having fun with fatfs (#1189)
* patch TSC coords in DSi mode * DSiware importer and shit
Diffstat (limited to 'src/DSi_NAND.h')
-rw-r--r--src/DSi_NAND.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/DSi_NAND.h b/src/DSi_NAND.h
new file mode 100644
index 0000000..fbd7593
--- /dev/null
+++ b/src/DSi_NAND.h
@@ -0,0 +1,55 @@
+/*
+ Copyright 2016-2021 Arisotura
+
+ This file is part of melonDS.
+
+ melonDS is free software: you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or (at your option)
+ any later version.
+
+ melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with melonDS. If not, see http://www.gnu.org/licenses/.
+*/
+
+#ifndef DSI_NAND_H
+#define DSI_NAND_H
+
+#include "types.h"
+#include <vector>
+#include <string>
+
+namespace DSi_NAND
+{
+
+enum
+{
+ TitleData_PublicSav,
+ TitleData_PrivateSav,
+ TitleData_BannerSav,
+};
+
+bool Init(FILE* nand, u8* es_keyY);
+void DeInit();
+
+void GetIDs(u8* emmc_cid, u64& consoleid);
+
+void PatchTSC();
+
+void ListTitles(u32 category, std::vector<u32>& titlelist);
+bool TitleExists(u32 category, u32 titleid);
+void GetTitleInfo(u32 category, u32 titleid, u32& version, u8* header, u8* banner);
+bool ImportTitle(const char* appfile, u8* tmd, bool readonly);
+void DeleteTitle(u32 category, u32 titleid);
+
+u32 GetTitleDataMask(u32 category, u32 titleid);
+bool ImportTitleData(u32 category, u32 titleid, int type, const char* file);
+bool ExportTitleData(u32 category, u32 titleid, int type, const char* file);
+
+}
+
+#endif // DSI_NAND_H