KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
vmu_dir_t Struct Reference

VMU FS Directory entries, 32 bytes each. More...

#include <dc/vmufs.h>

Data Fields

uint8_t filetype
 0x00 = no file; 0x33 = data; 0xcc = a game
 
uint8_t copyprotect
 0x00 = copyable; 0xff = copy protected
 
uint16_t firstblk
 Location of the first block in the file.
 
char filename [VMU_FILENAME_SIZE]
 Note: there is no null terminator.
 
vmu_timestamp_t timestamp
 File time.
 
uint16_t filesize
 Size of the file in blocks.
 
uint16_t hdroff
 Offset of header, in blocks from start of file.
 
uint8_t dirty
 See header notes.
 
uint8_t pad1 [3]
 All zeros.
 

Detailed Description

VMU FS Directory entries, 32 bytes each.

Note
vmu_dir_t::dirty should always be zero when written out to the VMU. What this lets us do, though, is conserve on flash writes. If you only want to modify one single file (which is the standard case) then re-writing all of the dir blocks is a big waste. Instead, you should set the dirty flag on the in-mem copy of the directory, and writing it back out will only flush the containing block back to the VMU, setting it back to zero in the process. Loaded blocks should always have zero here (though we enforce that in the code to make sure) so it will be non-dirty by default.

Field Documentation

◆ copyprotect

uint8_t vmu_dir_t::copyprotect

0x00 = copyable; 0xff = copy protected

◆ dirty

uint8_t vmu_dir_t::dirty

See header notes.

◆ filename

char vmu_dir_t::filename[VMU_FILENAME_SIZE]

Note: there is no null terminator.

◆ filesize

uint16_t vmu_dir_t::filesize

Size of the file in blocks.

◆ filetype

uint8_t vmu_dir_t::filetype

0x00 = no file; 0x33 = data; 0xcc = a game

◆ firstblk

uint16_t vmu_dir_t::firstblk

Location of the first block in the file.

◆ hdroff

uint16_t vmu_dir_t::hdroff

Offset of header, in blocks from start of file.

◆ pad1

uint8_t vmu_dir_t::pad1[3]

All zeros.

◆ timestamp

vmu_timestamp_t vmu_dir_t::timestamp

File time.


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