libElysianVMU 1.6.0
Full-featured, accurate, cross-platform library emulating the Dreamcast's Visual Memory Unit
Loading...
Searching...
No Matches
EvmuFat Struct Reference

#include <evmu_fat.h>

Inheritance diagram for EvmuFat:
EvmuFlash EvmuPeripheral EvmuIMemory EvmuIBehavior EvmuFileManager

Data Fields

union { 
 
   EvmuFatClass *   pClass 
 
   EvmuFlash   base 
 
};  
 
- Data Fields inherited from EvmuFlash
union { 
 
   EvmuFlashClass *   pClass 
 
   EvmuPeripheral   base 
 
};  
 
GblBool dataChanged
 
- Data Fields inherited from EvmuPeripheral
union { 
 
   EvmuPeripheralClass *   pClass 
 
   GblObject   base 
 
};  
 
GblFlags logLevel
 

Related Symbols

(Note that these are not member symbols.)

General File System

FAT utilities and configuration info

EvmuRootBlockEvmuFat_root (const EvmuFat *pSelf)
 
EVMU_RESULT EvmuFat_info (const EvmuFat *pSelf, EvmuFatInfo *pInfo)
 
EVMU_RESULT EvmuFat_format (const EvmuFat *pSelf, const EvmuRootBlock *pRoot)
 
GblBool EvmuFat_isFormatted (const EvmuFat *pSelf)
 
size_t EvmuFat_capacity (const EvmuFat *pSelf)
 
size_t EvmuFat_toBlocks (const EvmuFat *pSelf, size_t bytes)
 
void EvmuFat_usage (const EvmuFat *pSelf, EvmuFatUsage *pUsage)
 
size_t EvmuFat_seqFreeBlocks (const EvmuFat *pSelf)
 
size_t EvmuFat_userBlocks (const EvmuFat *pSelf)
 
void EvmuFat_log (const EvmuFat *pSelf)
 
Block Management

Querying and managing FAT blocks

size_t EvmuFat_blockSize (const EvmuFat *pSelf)
 
size_t EvmuFat_blockCount (const EvmuFat *pSelf)
 
EvmuBlock EvmuFat_blockTable (const EvmuFat *pSelf)
 
EvmuBlock EvmuFat_blockDirectory (const EvmuFat *pSelf)
 
const void * EvmuFat_blockData (const EvmuFat *pSelf, EvmuBlock block)
 
EvmuBlock EvmuFat_blockNext (const EvmuFat *pSelf, EvmuBlock block)
 
EVMU_RESULT EvmuFat_blockLink (const EvmuFat *pSelf, EvmuBlock b, EvmuBlock lnk)
 
EVMU_RESULT EvmuFat_blockFree (const EvmuFat *pSelf, EvmuBlock block)
 
EvmuBlock EvmuFat_blockAlloc (const EvmuFat *pSelf, EvmuBlock prev, EVMU_FILE_TYPE type)
 
Directory Management

Querying and managing the directory

size_t EvmuFat_dirEntryCount (const EvmuFat *pSelf)
 
EvmuDirEntryEvmuFat_dirEntry (const EvmuFat *pSelf, size_t index)
 
size_t EvmuFat_dirEntryIndex (const EvmuFat *pSelf, const EvmuDirEntry *pEntry)
 
EvmuDirEntryEvmuFat_dirEntryAlloc (const EvmuFat *pSelf, EVMU_FILE_TYPE fileType)
 
void EvmuFat_dirEntryLog (const EvmuFat *pSelf, const EvmuDirEntry *pEntry)
 

Detailed Description

Peripheral providing 8-bit FAT API.

EvmuFat provides the following 3 filesystem APIs:

  • Block-based reads/writes
  • FAT Table allocation and management
  • Directory allocation and management
See also
EvmuFatClass

Definition at line 204 of file evmu_fat.h.

Friends And Related Symbol Documentation

◆ EvmuFat_blockAlloc()

EvmuBlock EvmuFat_blockAlloc ( const EvmuFat * pSelf,
EvmuBlock prev,
EVMU_FILE_TYPE type )
related

Allocates a block in the file allocation table based on the given type, linking it to the previous block.

◆ EvmuFat_blockCount()

size_t EvmuFat_blockCount ( const EvmuFat * pSelf)
related

Returns the total number of blocks in the filesystem.

◆ EvmuFat_blockData()

const void * EvmuFat_blockData ( const EvmuFat * pSelf,
EvmuBlock block )
related

Returns the actual raw data at the given block location.

◆ EvmuFat_blockDirectory()

EvmuBlock EvmuFat_blockDirectory ( const EvmuFat * pSelf)
related

Returns the block location of the FAT directory region.

◆ EvmuFat_blockFree()

EVMU_RESULT EvmuFat_blockFree ( const EvmuFat * pSelf,
EvmuBlock block )
related

Frees the given block in the file allocation table.

◆ EvmuFat_blockLink()

EVMU_RESULT EvmuFat_blockLink ( const EvmuFat * pSelf,
EvmuBlock b,
EvmuBlock lnk )
related

Sets the given block to point to the linked block as its next entry in the file allocation table.

◆ EvmuFat_blockNext()

EvmuBlock EvmuFat_blockNext ( const EvmuFat * pSelf,
EvmuBlock block )
related

Returns the next block pointed to by the given block in the file allocation table.

◆ EvmuFat_blockSize()

size_t EvmuFat_blockSize ( const EvmuFat * pSelf)
related

Returns the size in bytes of a single block in the file system.

◆ EvmuFat_blockTable()

EvmuBlock EvmuFat_blockTable ( const EvmuFat * pSelf)
related

Returns the block location of the file allocation table (FAT) region.

◆ EvmuFat_capacity()

size_t EvmuFat_capacity ( const EvmuFat * pSelf)
related

Returns the total capacity of the filesystem in bytes.

◆ EvmuFat_dirEntry()

EvmuDirEntry * EvmuFat_dirEntry ( const EvmuFat * pSelf,
size_t index )
related

Returns the directory entry at the given index (may be unused)

◆ EvmuFat_dirEntryAlloc()

EvmuDirEntry * EvmuFat_dirEntryAlloc ( const EvmuFat * pSelf,
EVMU_FILE_TYPE fileType )
related

Allocates an entry within the directory for the given file type.

◆ EvmuFat_dirEntryCount()

size_t EvmuFat_dirEntryCount ( const EvmuFat * pSelf)
related

Returns the total number of entries in the file system directory, including unused ones.

◆ EvmuFat_dirEntryIndex()

size_t EvmuFat_dirEntryIndex ( const EvmuFat * pSelf,
const EvmuDirEntry * pEntry )
related

Returns the index into the directory for the given directory entry.

◆ EvmuFat_dirEntryLog()

void EvmuFat_dirEntryLog ( const EvmuFat * pSelf,
const EvmuDirEntry * pEntry )
related

Dumps information about a given directory to the libGimbal log for debugging.

◆ EvmuFat_format()

EVMU_RESULT EvmuFat_format ( const EvmuFat * pSelf,
const EvmuRootBlock * pRoot )
related

Formats the filesystem, erasing all files and resetting everything to defaults.

◆ EvmuFat_info()

EVMU_RESULT EvmuFat_info ( const EvmuFat * pSelf,
EvmuFatInfo * pInfo )
related

Populates the given EvmuFatInfo structure with information on the volume.

◆ EvmuFat_isFormatted()

GblBool EvmuFat_isFormatted ( const EvmuFat * pSelf)
related

Checks whether the given filesystem has the correct EvmuRootBlock::formatted field values.

◆ EvmuFat_log()

void EvmuFat_log ( const EvmuFat * pSelf)
related

Dumps detailed information about the entire filesystem to the libGimbal log for debugging.

◆ EvmuFat_root()

EvmuRootBlock * EvmuFat_root ( const EvmuFat * pSelf)
related

Returns a pointer to the root block of the filesystem.

◆ EvmuFat_seqFreeBlocks()

size_t EvmuFat_seqFreeBlocks ( const EvmuFat * pSelf)
related

Returns the total number of sequential free blocks, starting at block 0 (used for GAME file allocation)

◆ EvmuFat_toBlocks()

size_t EvmuFat_toBlocks ( const EvmuFat * pSelf,
size_t bytes )
related

Converts the given number of bytes to the number of blocks required to hold them.

◆ EvmuFat_usage()

void EvmuFat_usage ( const EvmuFat * pSelf,
EvmuFatUsage * pUsage )
related

Queries the fat table for filesystem block usage information, populating the given EvmuFatUsage object.

◆ EvmuFat_userBlocks()

size_t EvmuFat_userBlocks ( const EvmuFat * pSelf)
related

Returns the total number of blocks available to the user for storing files.

Field Documentation

◆ base

EvmuFlash EvmuFat::base

Inherited base instance structure.

Definition at line 204 of file evmu_fat.h.

◆ pClass

EvmuFatClass* EvmuFat::pClass

Pointer to class/vtable structure.

Definition at line 204 of file evmu_fat.h.


The documentation for this struct was generated from the following file: