1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: fs_Parameters.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 46347 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_FS_FS_PARAMETERS_H_ 17 #define NN_FS_FS_PARAMETERS_H_ 18 19 #include <nn/types.h> 20 #include <nn/config.h> 21 #include <nn/dbg/dbg_Logger.h> 22 #include <nn/assert.h> 23 #include <nn/util.h> 24 #include <nn/util/util_Int64.h> 25 26 namespace nn { 27 namespace fs { 28 29 static const size_t MAX_ARCHIVE_NAME_LENGTH = 7; 30 static const size_t MAX_SUB_PATH_LENGTH = 253; 31 static const size_t MAX_FILE_PATH_LENGTH = MAX_ARCHIVE_NAME_LENGTH + 1 + MAX_SUB_PATH_LENGTH; 32 33 /* Please see man pages for details 34 35 36 */ 37 static const s64 LATENCY_RECOMMENDED_SD_MAX = 700; 38 39 /* Please see man pages for details 40 41 42 43 */ 44 static const s64 UI_BLOCK_SIZE = 128 * 1024; 45 46 /* Please see man pages for details 47 48 49 50 */ 51 enum OpenMode 52 { 53 OPEN_MODE_READ = (1u << 0), // 54 OPEN_MODE_WRITE = (1u << 1), // 55 OPEN_MODE_CREATE = (1u << 2) // 56 }; 57 58 /* Please see man pages for details 59 60 */ 61 enum PositionBase 62 { 63 POSITION_BASE_BEGIN, // 64 POSITION_BASE_CURRENT, // 65 POSITION_BASE_END // 66 }; 67 68 struct Transaction 69 { 70 bit32 dummy; 71 }; 72 73 /* Please see man pages for details 74 75 76 77 */ 78 struct Attributes 79 { 80 bool isDirectory; // 81 bool isHidden; // 82 bool isArchive; // 83 bool isReadOnly; // 84 }; 85 86 /* Please see man pages for details 87 88 89 90 */ 91 struct ShortName 92 { 93 char body[10]; // 94 char ext[4]; // 95 bool valid; // 96 bit8 pad; 97 }; 98 99 /* Please see man pages for details 100 101 102 103 */ 104 struct DirectoryEntry 105 { 106 wchar_t entryName[MAX_FILE_PATH_LENGTH + 1]; // 107 ShortName shortName; // 108 nn::fs::Attributes attributes; // 109 s64 entrySize; // 110 }; 111 112 enum MediaType 113 { 114 MEDIA_TYPE_NAND = 0, 115 MEDIA_TYPE_SDMC = 1, 116 MEDIA_TYPE_CTRCARD = 2 117 }; 118 119 namespace detail { struct ArchiveHandleTag {}; } 120 typedef nn::util::Int64<bit64, detail::ArchiveHandleTag> ArchiveHandle; 121 122 typedef bit64 ExtSaveDataId; // 123 typedef bit64 TitleId; 124 125 /* Please see man pages for details 126 127 */ 128 enum PriorityForApplication 129 { 130 PRIORITY_APP_REALTIME = -16, // 131 PRIORITY_APP_NORMAL = -8, // 132 PRIORITY_APP_LOW = 8 // 133 }; 134 135 } // end of namespace fs 136 } // end of namespace nn 137 138 namespace nn { namespace CTR { 139 140 typedef struct DUMMY1 141 { 142 bit8 data[948]; 143 } Dummy1; 144 145 typedef struct DUMMY2 146 { 147 bit8 data[9152]; 148 } Dummy2; 149 150 }} 151 152 #endif // ifndef NN_FS_FS_ENUMS_H_ 153