libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
evmu_fat.h
Go to the documentation of this file.
1/*! \file
2 * \brief EvmuFat peripheral and FAT filesystem API
3 * \ingroup file_system
4 *
5 * EvmuFat offers a mid-level API around the VMU's flash storage,
6 * which sits above the physical flash controller and below an
7 * actual filesystem API. The API operates at the block-level and
8 * also offers a low-level 8-bit FAT abstraction.
9 *
10 * \todo
11 * - public members for volume allocation information
12 * - signals for filesystem events/changes
13 * - Remove EvmuFat_capacity(), add at EvmuFlash level
14 * - Remove EvmuFileManager_defrag() and add at this level
15 * - Don't just let user blindly write to block data
16 * - dataChanged flag and signals won't be updated
17 * - Need a write function
18 * - Make EvmuFat_blockData() read-only
19 *
20 * \test
21 * - Needs whole unit test suite
22 *
23 * \author 2023 Falco Girgis
24 * \copyright MIT License
25 */
26#ifndef EVMU_FAT_H
27#define EVMU_FAT_H
28
29#include "../hw/evmu_flash.h"
30#include "evmu_fs_utils.h"
31#include <gimbal/utils/gimbal_date_time.h>
32
33/*! \defgroup file_system File System
34 * \brief File System-related types and APIs
35 *
36 * This module contains a collection of the various
37 * different headers, types, and components of the
38 * VMU's flash storage and internal file system.
39 */
40
41/*! \name Type System
42 * \brief Type UUID and cast operators
43 * @{
44 */
45#define EVMU_FAT_TYPE (GBL_TYPEID(EvmuFat)) //!< UUID for EvmuFat type
46#define EVMU_FAT(self) (GBL_CAST(EvmuFat, self)) //!< Function-tyle GblInstance cast
47#define EVMU_FAT_CLASS(klass) (GBL_CLASS_CAST(EvmuFat, klass)) //!< Function-style GblClass cast
48#define EVMU_FAT_GET_CLASS(self) (GBL_CLASSOF(EvmuFat, self)) //!< Get EvmuFatClass from GblInstance
49//! @}
50
51#define EVMU_FAT_NAME "fat" //!< EvmuFat GblObject name
52#define EVMU_FAT_GAME_VMS_HEADER_OFFSET 0x200 //!< Offset of the VMS header from the file start for a GAME
53
54/*! \name Default Volume Info
55 * \brief Size and location of volume and system regions
56 * @{
57 */
58#define EVMU_FAT_BLOCK_SIZE 512 //!< Default block size for a standard VMU
59#define EVMU_FAT_BLOCK_COUNT_DEFAULT 256 //!< Default block capacity for a standard VMU
60#define EVMU_FAT_BLOCK_ROOT 255 //!< Default root block number for a standard VMU
61#define EVMU_FAT_BLOCK_ROOT_SIZE 1 //!< Default root size for a standard VMU
62#define EVMU_FAT_BLOCK_USERDATA_DEFAULT 0 //!< Default userdata start block for a standard VMU
63#define EVMU_FAT_BLOCK_USERDATA_SIZE_DEFAULT 200 //!< Default number of userdata blocks for a standard VMU
64#define EVMU_FAT_BLOCK_EXTRA_DEFAULT 200 //!< Default hidden start block for a standard VMU
65#define EVMU_FAT_BLOCK_EXTRA_SIZE_DEFAULT 31 //!< Default number of hidden blocks for a standard VMU
66#define EVMU_FAT_BLOCK_DIRECTORY_DEFAULT 253 //!< Default directory start block for a standard VMU
67#define EVMU_FAT_BLOCK_DIRECTORY_SIZE_DEFAULT 13 //!< Default number of directory blocks for a standard VMU
68#define EVMU_FAT_BLOCK_DIRECTORY_ENTRIES_DEFAULT 200 //!< Default number of directory entries for a standard-sized directory
69#define EVMU_FAT_BLOCK_FAT_DEFAULT 254 //!< Default FAT start block for a standard VMU
70#define EVMU_FAT_BLOCK_FAT_SIZE_DEFAULT 1 //!< Default number of FAT blocks for a standard VMU
71#define EVMU_FAT_BLOCK_FAT_COUNT_DEFAULT 256 //!< Default number of FAT entries for a standard-sized FAT
72//! @}
73
74/*! \name Root Block Info
75 * \brief Sizes and values used with EvmuRootBlock
76 * @{
77 */
78#define EVMU_FAT_ROOT_BLOCK_FORMATTED_SIZE 16 //!< Size in bytes of the format string in the EvmuRootBlock structure
79#define EVMU_FAT_ROOT_BLOCK_FORMATTED_BYTE 0x55 //!< Value string that must be preset in the EvmuRootBlock to signify a formatted card
80#define EVMU_FAT_ROOT_BLOCK_VOLUME_LABEL_SIZE 32 //!< Size in bytes of the volume label in the EvmuRootBlock structure
81#define EVMU_FAT_ROOT_BLOCK_ICON_SHAPE_MAX 123 //!< Maximum allowable value for icon shape in the EvmuRootBlock structure
82#define EVMU_FAT_ROOT_BLOCK_RESERVED_SIZE 8 //!< Size in bytes of the first reserved field in the EvmuRootBlock structure
83#define EVMU_FAT_ROOT_BLOCK_RESERVED2_SIZE 8 //!< Size in bytes of the second reserved field in the EvmuRootBlock structure
84//! @}
85
86/*! \name FAT Table Values
87 * \brief Special values used as FAT table entries
88 * @{
89 */
90#define EVMU_FAT_BLOCK_FAT_UNALLOCATED 0xfffc //!< FAT entry value signifying an unallocated block
91#define EVMU_FAT_BLOCK_FAT_LAST_IN_FILE 0xfffa //!< FAT entry value signifying the last block of a file
92#define EVMU_FAT_BLOCK_FAT_DAMAGED 0xffff //!< FAT entry value signifying an unused, damaged block
93//! @}
94
95#define GBL_SELF_TYPE EvmuFat
96
97GBL_DECLS_BEGIN
98
99GBL_FORWARD_DECLARE_STRUCT(EvmuNewFileInfo);
100GBL_FORWARD_DECLARE_STRUCT(EvmuVms);
101GBL_FORWARD_DECLARE_STRUCT(EvmuFat);
102
103//! FAT block index
104typedef uint16_t EvmuBlock;
105
106/*! Filesystem root FAT block
107 *
108 * The root block is the master system block containing
109 * configuration attributes for the rest of the filesystem.
110 *
111 * This includes:
112 * - VMU volume color
113 * - VMU volume icon
114 * - Date/Time formatted
115 * - System FAT region layouts
116 * - Partition size/info
117 *
118 * \ingroup file_system
119 */
120typedef struct EvmuRootBlock {
121 //! Set to 0x55 to signify formatted device
123 union {
124 struct {
125 uint8_t customColor; //!< 1 if using color, 0 otherwise
126 uint8_t b; //!< Custom color blue channel (0-255)
127 uint8_t g; //!< Custom color green channel (0-255)
128 uint8_t r; //!< Custom color red channel (0-255)
129 uint8_t a; //!< Custom color alpha channel (0-255)
130 } vmu;
131 //! Raw byte size of volume label (32 bytes, everything after vmu struct is unknown/unused)
133 } volumeLabel; //!< Volume label inner structure
134 EvmuTimestamp timestamp; //!< Timestamp when device was formatted (BCD)
135 //! Reserved or unused, all zeroes
137 uint16_t totalSize; //!< Last indexable block in partition (default: 255)
138 uint16_t partition; //!< Partition number (default: 0)
139 uint16_t rootBlock; //!< Location of Root block (default: 255)
140 uint16_t fatBlock; //!< Location of FAT table (default: 254)
141 uint16_t fatSize; //!< Size of FAT table in blocks (default: 1)
142 uint16_t dirBlock; //!< Location of Directory (default: 253)
143 uint16_t dirSize; //!< Size of Directory in blocks (default: 13)
144 uint8_t iconShape; //!< Icon type or shape (built into BIOS font: 0-123)
145 uint8_t sortFlag; //!< Sort flag? (no fucking idea)
146 uint16_t extraBlock; //!< Location of Extra region (default: 200)
147 uint16_t extraSize; //!< Size of Extra region in blocks (default: 41)
148 uint16_t gameBlock; //!< Starting location for GAME file (default: 0)
149 uint16_t gameSize; //!< Maximum size of GAME file (default: 128?)
150 //! Reserved or unused, all zeroes
152} EvmuRootBlock;
153
154//! Struct used for querying current FAT block allocation status
155typedef struct EvmuFatUsage {
156 uint16_t blocksUsed; //!< Total number of allocated blocks
157 uint16_t blocksFree; //!< Number of available blocks
158 uint16_t blocksHidden; //!< Number of unavailable, hidden system blocks
159 uint16_t blocksDamaged; //!< Number of unusable, damaged blocks
160} EvmuFatUsage;
161
162//! Matches maple attributes for describing storage medium
163typedef struct EvmuFatInfo {
164 uint8_t partitions; //!< Number of partitions on the device
165 uint16_t blockSize; //!< Number of bytes within a single block
166 struct {
167 uint8_t reads: 4; //!< Number of reads required to fetch whole block of data
168 uint8_t writes: 4; //!< Number of writes required to fetch whole block of data
169 } accessesPerBlock; //!< Number of accesses required to operate on a whole block of data
170 struct {
171 uint8_t removable: 1; //!< 1 if medium is a removable device, 0 if fixed
172 uint8_t crcCheck: 1; //!< 1 if CRC calculation is required for read/writes, 0 otherwise
173 uint8_t: 6; //!< Unused/reserved, set to 0s
174 } config; //!< Additional configuration info
175} EvmuFatInfo;
176
177/*! \struct EvmuFatClass
178 * \extends EvmuFlashClass
179 * \brief GblClass structure for EvmuFat
180 *
181 * Virtual table structure for EvmuFat, providing overridable
182 * virtual methods for returning the storage medium info. The
183 * default returns the expected configuration for a VMU.
184 *
185 * \sa EvmuFat
186 */
187GBL_CLASS_DERIVE(EvmuFat, EvmuFlash)
188 EVMU_RESULT (*pFnInfo)(GBL_CSELF, EvmuFatInfo* pInfo); //!< Virtual method for fetching volume info
189 EVMU_RESULT (*pFnRoot)(GBL_CSELF, EvmuRootBlock** ppRoot); //!< Virtual method for fetching root block data
190GBL_CLASS_END
191
192/*! \struct EvmuFat
193 * \extends EvmuFlash
194 * \ingroup file_system
195 * \brief Peripheral providing 8-bit FAT API
196 *
197 * EvmuFat provides the following 3 filesystem APIs:
198 * * Block-based reads/writes
199 * * FAT Table allocation and management
200 * * Directory allocation and management
201 *
202 * \sa EvmuFatClass
203 */
204GBL_INSTANCE_DERIVE_EMPTY(EvmuFat, EvmuFlash)
205
206//! \cond
207GBL_PROPERTIES(EvmuFat,
208 (color, GBL_GENERIC, (READ, WRITE), GBL_UINT32_TYPE),
209 (icon, GBL_GENERIC, (READ, WRITE), GBL_UINT8_TYPE),
210 (formatted, GBL_GENERIC, (READ), GBL_BOOL_TYPE),
211 (fatSize, GBL_GENERIC, (READ), GBL_UINT32_TYPE),
212 (directorySize, GBL_GENERIC, (READ), GBL_UINT32_TYPE),
213 (userSize, GBL_GENERIC, (READ), GBL_UINT32_TYPE),
214 (gameSize, GBL_GENERIC, (READ), GBL_UINT32_TYPE),
215 (blocksUsed, GBL_GENERIC, (READ), GBL_UINT16_TYPE),
216 (blocksFree, GBL_GENERIC, (READ), GBL_UINT16_TYPE),
217 (blocksHidden, GBL_GENERIC, (READ), GBL_UINT16_TYPE),
218 (blocksDamaged, GBL_GENERIC, (READ), GBL_UINT16_TYPE)
219)
220//! \endcond
221
222//! Returns the GblType UUID associated with EvmuFat
223EVMU_EXPORT GblType EvmuFat_type (void) GBL_NOEXCEPT;
224
225/*! \name General File System
226 * \brief FAT utilities and configuration info
227 * \relatesalso EvmuFat
228 * @{
229 */
230//! Returns a pointer to the root block of the filesystem
231EVMU_EXPORT EvmuRootBlock* EvmuFat_root (GBL_CSELF) GBL_NOEXCEPT;
232//! Populates the given EvmuFatInfo structure with information on the volume
233EVMU_EXPORT EVMU_RESULT EvmuFat_info (GBL_CSELF, EvmuFatInfo* pInfo) GBL_NOEXCEPT;
234//! Formats the filesystem, erasing all files and resetting everything to defaults
235EVMU_EXPORT EVMU_RESULT EvmuFat_format (GBL_CSELF, const EvmuRootBlock* pRoot) GBL_NOEXCEPT;
236//! Checks whether the given filesystem has the correct EvmuRootBlock::formatted field values
237EVMU_EXPORT GblBool EvmuFat_isFormatted (GBL_CSELF) GBL_NOEXCEPT;
238//! Returns the total capacity of the filesystem in bytes
239EVMU_EXPORT size_t EvmuFat_capacity (GBL_CSELF) GBL_NOEXCEPT;
240//! Converts the given number of bytes to the number of blocks required to hold them
241EVMU_EXPORT size_t EvmuFat_toBlocks (GBL_CSELF, size_t bytes) GBL_NOEXCEPT;
242//! Queries the fat table for filesystem block usage information, populating the given EvmuFatUsage object
243EVMU_EXPORT void EvmuFat_usage (GBL_CSELF, EvmuFatUsage* pUsage) GBL_NOEXCEPT;
244//! Returns the total number of sequential free blocks, starting at block 0 (used for GAME file allocation)
245EVMU_EXPORT size_t EvmuFat_seqFreeBlocks (GBL_CSELF) GBL_NOEXCEPT;
246//! Returns the total number of blocks available to the user for storing files
247EVMU_EXPORT size_t EvmuFat_userBlocks (GBL_CSELF) GBL_NOEXCEPT;
248//! Dumps detailed information about the entire filesystem to the libGimbal log for debugging
249EVMU_EXPORT void EvmuFat_log (GBL_CSELF) GBL_NOEXCEPT;
250//! @}
251
252/*! \name Block Management
253 * \brief Querying and managing FAT blocks
254 * \relatesalso EvmuFat
255 * @{
256 */
257//! Returns the size in bytes of a single block in the file system
258EVMU_EXPORT size_t EvmuFat_blockSize (GBL_CSELF) GBL_NOEXCEPT;
259//! Returns the total number of blocks in the filesystem
260EVMU_EXPORT size_t EvmuFat_blockCount (GBL_CSELF) GBL_NOEXCEPT;
261//! Returns the block location of the file allocation table (FAT) region
262EVMU_EXPORT EvmuBlock EvmuFat_blockTable (GBL_CSELF) GBL_NOEXCEPT;
263//! Returns the block location of the FAT directory region
265//! Returns the actual raw data at the given block location
266EVMU_EXPORT const void* EvmuFat_blockData (GBL_CSELF, EvmuBlock block) GBL_NOEXCEPT;
267//! Returns the next block pointed to by the given block in the file allocation table
268EVMU_EXPORT EvmuBlock EvmuFat_blockNext (GBL_CSELF, EvmuBlock block) GBL_NOEXCEPT;
269//! Sets the given block to point to the linked block as its next entry in the file allocation table
270EVMU_EXPORT EVMU_RESULT EvmuFat_blockLink (GBL_CSELF, EvmuBlock b, EvmuBlock lnk) GBL_NOEXCEPT;
271//! Frees the given block in the file allocation table
272EVMU_EXPORT EVMU_RESULT EvmuFat_blockFree (GBL_CSELF, EvmuBlock block) GBL_NOEXCEPT;
273//! Allocates a block in the file allocation table based on the given type, linking it to the previous block
275 EvmuBlock prev,
276 EVMU_FILE_TYPE type) GBL_NOEXCEPT;
277//! @}
278
279/*! \name Directory Management
280 * \brief Querying and managing the directory
281 * \relatesalso EvmuFat
282 * @{
283 */
284//! Returns the total number of entries in the file system directory, including unused ones
285EVMU_EXPORT size_t EvmuFat_dirEntryCount (GBL_CSELF) GBL_NOEXCEPT;
286//! Returns the directory entry at the given index (may be unused)
287EVMU_EXPORT EvmuDirEntry* EvmuFat_dirEntry (GBL_CSELF, size_t index) GBL_NOEXCEPT;
288//! Returns the index into the directory for the given directory entry
289EVMU_EXPORT size_t EvmuFat_dirEntryIndex (GBL_CSELF, const EvmuDirEntry* pEntry) GBL_NOEXCEPT;
290//! Allocates an entry within the directory for the given file type
291EVMU_EXPORT EvmuDirEntry* EvmuFat_dirEntryAlloc (GBL_CSELF, EVMU_FILE_TYPE fileType) GBL_NOEXCEPT;
292//! Dumps information about a given directory to the libGimbal log for debugging
293EVMU_EXPORT void EvmuFat_dirEntryLog (GBL_CSELF, const EvmuDirEntry* pEntry) GBL_NOEXCEPT;
294//! @}
295
296GBL_DECLS_END
297
298#undef GBL_SELF_TYPE
299
300#endif // EVMU_FAT_H
#define EVMU_EXPORT
Define used for adding attributes to export public symbols.
Definition evmu_api.h:18
#define EVMU_FAT_ROOT_BLOCK_FORMATTED_SIZE
Size in bytes of the format string in the EvmuRootBlock structure.
Definition evmu_fat.h:78
#define EVMU_FAT_ROOT_BLOCK_RESERVED2_SIZE
Definition evmu_fat.h:83
uint16_t EvmuBlock
FAT block index.
Definition evmu_fat.h:104
#define EVMU_FAT_ROOT_BLOCK_RESERVED_SIZE
Size in bytes of the first reserved field in the EvmuRootBlock structure.
Definition evmu_fat.h:82
GblType EvmuFat_type(void)
Returns the GblType UUID associated with EvmuFat.
#define EVMU_FAT_ROOT_BLOCK_VOLUME_LABEL_SIZE
Size in bytes of the volume label in the EvmuRootBlock structure.
Definition evmu_fat.h:80
#define GBL_UINT16_TYPE
#define GBL_BOOL_TYPE
#define GBL_UINT8_TYPE
#define GBL_UINT32_TYPE
#define GBL_PROPERTIES(object,...)
uint8_t GblBool
uintptr_t GblType
Peripheral providing 8-bit FAT API.
Definition evmu_fat.h:204
EVMU_RESULT EvmuFat_blockLink(const EvmuFat *pSelf, EvmuBlock b, EvmuBlock lnk)
Sets the given block to point to the linked block as its next entry in the file allocation table.
size_t EvmuFat_blockCount(const EvmuFat *pSelf)
Returns the total number of blocks in the filesystem.
void EvmuFat_dirEntryLog(const EvmuFat *pSelf, const EvmuDirEntry *pEntry)
Dumps information about a given directory to the libGimbal log for debugging.
void EvmuFat_log(const EvmuFat *pSelf)
Dumps detailed information about the entire filesystem to the libGimbal log for debugging.
EvmuBlock EvmuFat_blockNext(const EvmuFat *pSelf, EvmuBlock block)
Returns the next block pointed to by the given block in the file allocation table.
EvmuBlock EvmuFat_blockTable(const EvmuFat *pSelf)
Returns the block location of the file allocation table (FAT) region.
size_t EvmuFat_userBlocks(const EvmuFat *pSelf)
Returns the total number of blocks available to the user for storing files.
void EvmuFat_usage(const EvmuFat *pSelf, EvmuFatUsage *pUsage)
Queries the fat table for filesystem block usage information, populating the given EvmuFatUsage objec...
EvmuDirEntry * EvmuFat_dirEntryAlloc(const EvmuFat *pSelf, EVMU_FILE_TYPE fileType)
Allocates an entry within the directory for the given file type.
size_t EvmuFat_seqFreeBlocks(const EvmuFat *pSelf)
Returns the total number of sequential free blocks, starting at block 0 (used for GAME file allocatio...
size_t EvmuFat_dirEntryCount(const EvmuFat *pSelf)
Returns the total number of entries in the file system directory, including unused ones.
EVMU_RESULT EvmuFat_format(const EvmuFat *pSelf, const EvmuRootBlock *pRoot)
Formats the filesystem, erasing all files and resetting everything to defaults.
GblBool EvmuFat_isFormatted(const EvmuFat *pSelf)
Checks whether the given filesystem has the correct EvmuRootBlock::formatted field values.
size_t EvmuFat_dirEntryIndex(const EvmuFat *pSelf, const EvmuDirEntry *pEntry)
Returns the index into the directory for the given directory entry.
EVMU_RESULT EvmuFat_blockFree(const EvmuFat *pSelf, EvmuBlock block)
Frees the given block in the file allocation table.
EvmuBlock EvmuFat_blockAlloc(const EvmuFat *pSelf, EvmuBlock prev, EVMU_FILE_TYPE type)
Allocates a block in the file allocation table based on the given type, linking it to the previous bl...
size_t EvmuFat_toBlocks(const EvmuFat *pSelf, size_t bytes)
Converts the given number of bytes to the number of blocks required to hold them.
EVMU_RESULT EvmuFat_info(const EvmuFat *pSelf, EvmuFatInfo *pInfo)
Populates the given EvmuFatInfo structure with information on the volume.
EvmuBlock EvmuFat_blockDirectory(const EvmuFat *pSelf)
Returns the block location of the FAT directory region.
const void * EvmuFat_blockData(const EvmuFat *pSelf, EvmuBlock block)
Returns the actual raw data at the given block location.
EvmuDirEntry * EvmuFat_dirEntry(const EvmuFat *pSelf, size_t index)
Returns the directory entry at the given index (may be unused)
size_t EvmuFat_capacity(const EvmuFat *pSelf)
Returns the total capacity of the filesystem in bytes.
size_t EvmuFat_blockSize(const EvmuFat *pSelf)
Returns the size in bytes of a single block in the file system.
EvmuRootBlock * EvmuFat_root(const EvmuFat *pSelf)
Returns a pointer to the root block of the filesystem.
Matches maple attributes for describing storage medium.
Definition evmu_fat.h:163
uint8_t writes
Number of writes required to fetch whole block of data.
Definition evmu_fat.h:168
uint16_t blockSize
Number of bytes within a single block.
Definition evmu_fat.h:165
uint8_t crcCheck
1 if CRC calculation is required for read/writes, 0 otherwise
Definition evmu_fat.h:172
uint8_t partitions
Number of partitions on the device.
Definition evmu_fat.h:164
uint8_t reads
Number of reads required to fetch whole block of data.
Definition evmu_fat.h:167
uint8_t removable
1 if medium is a removable device, 0 if fixed
Definition evmu_fat.h:171
Struct used for querying current FAT block allocation status.
Definition evmu_fat.h:155
uint16_t blocksDamaged
Number of unusable, damaged blocks.
Definition evmu_fat.h:159
uint16_t blocksUsed
Total number of allocated blocks.
Definition evmu_fat.h:156
uint16_t blocksFree
Number of available blocks.
Definition evmu_fat.h:157
uint16_t blocksHidden
Number of unavailable, hidden system blocks.
Definition evmu_fat.h:158
Filesystem root FAT block.
Definition evmu_fat.h:120
uint8_t bytes[32]
Raw byte size of volume label (32 bytes, everything after vmu struct is unknown/unused)
Definition evmu_fat.h:132
uint16_t totalSize
Last indexable block in partition (default: 255)
Definition evmu_fat.h:137
uint16_t gameSize
Definition evmu_fat.h:149
uint16_t dirSize
Size of Directory in blocks (default: 13)
Definition evmu_fat.h:143
uint16_t extraBlock
Location of Extra region (default: 200)
Definition evmu_fat.h:146
uint8_t reserved2[8]
Reserved or unused, all zeroes.
Definition evmu_fat.h:151
uint8_t sortFlag
Sort flag? (no fucking idea)
Definition evmu_fat.h:145
uint8_t g
Custom color green channel (0-255)
Definition evmu_fat.h:127
uint16_t rootBlock
Location of Root block (default: 255)
Definition evmu_fat.h:139
uint8_t r
Custom color red channel (0-255)
Definition evmu_fat.h:128
uint8_t customColor
1 if using color, 0 otherwise
Definition evmu_fat.h:125
uint16_t fatBlock
Location of FAT table (default: 254)
Definition evmu_fat.h:140
uint16_t fatSize
Size of FAT table in blocks (default: 1)
Definition evmu_fat.h:141
uint16_t extraSize
Size of Extra region in blocks (default: 41)
Definition evmu_fat.h:147
uint8_t reserved[8]
Reserved or unused, all zeroes.
Definition evmu_fat.h:136
uint8_t b
Custom color blue channel (0-255)
Definition evmu_fat.h:126
uint16_t dirBlock
Location of Directory (default: 253)
Definition evmu_fat.h:142
EvmuTimestamp timestamp
Definition evmu_fat.h:134
uint8_t a
Custom color alpha channel (0-255)
Definition evmu_fat.h:129
uint8_t iconShape
Icon type or shape (built into BIOS font: 0-123)
Definition evmu_fat.h:144
uint8_t formatted[16]
Set to 0x55 to signify formatted device.
Definition evmu_fat.h:122
uint16_t partition
Partition number (default: 0)
Definition evmu_fat.h:138
uint16_t gameBlock
Starting location for GAME file (default: 0)
Definition evmu_fat.h:148
#define GBL_CLASS_CAST(cType, klass)
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)