SSBM Decomp
Loading...
Searching...
No Matches
dvdfs.c File Reference
#include <dolphin.h>
#include "__dvd.h"
#include <dolphin/dvd.h>

Data Structures

struct  FSTEntry

Macros

#define entryIsDir(i)
#define stringOff(i)
#define parentDir(i)
#define nextDir(i)
#define filePosition(i)
#define fileLength(i)
#define offsetof(type, memb)
#define RoundUp32KB(x)
#define Is32KBAligned(x)

Functions

static BOOL isSame (const char *path, const char *string)
static u32 myStrncpy (char *dest, char *src, u32 maxlen)
static u32 entryToPath (u32 entry, char *path, u32 maxlen)
static BOOL DVDConvertEntrynumToPath (s32 entrynum, char *path, u32 maxlen)
static void cbForReadAsync (s32 result, DVDCommandBlock *block)
static void cbForReadSync ()
static void cbForSeekAsync (long result, struct DVDCommandBlock *block)
static void cbForSeekSync ()
static void cbForPrepareStreamAsync (s32 result, DVDCommandBlock *block)
static void cbForPrepareStreamSync ()
void __DVDFSInit ()
s32 DVDConvertPathToEntrynum (const char *pathPtr)
BOOL DVDFastOpen (s32 entrynum, DVDFileInfo *fileInfo)
BOOL DVDOpen (char *fileName, DVDFileInfo *fileInfo)
BOOL DVDClose (DVDFileInfo *fileInfo)
BOOL DVDGetCurrentDir (char *path, u32 maxlen)
BOOL DVDChangeDir (char *dirName)
BOOL DVDReadAsyncPrio (DVDFileInfo *fileInfo, void *addr, s32 length, s32 offset, DVDCallback callback, s32 prio)
long DVDReadPrio (struct DVDFileInfo *fileInfo, void *addr, long length, long offset, long prio)
int DVDSeekAsyncPrio (struct DVDFileInfo *fileInfo, long offset, void(*callback)(long, struct DVDFileInfo *), long prio)
long DVDSeekPrio (struct DVDFileInfo *fileInfo, long offset, long prio)
long DVDGetFileInfoStatus (struct DVDFileInfo *fileInfo)
int DVDOpenDir (char *dirName, DVDDir *dir)
int DVDReadDir (DVDDir *dir, DVDDirEntry *dirent)
int DVDCloseDir (DVDDir *dir)
void * DVDGetFSTLocation ()
BOOL DVDPrepareStreamAsync (DVDFileInfo *fileInfo, u32 length, u32 offset, DVDCallback callback)
s32 DVDPrepareStream (DVDFileInfo *fileInfo, u32 length, u32 offset)
static void cbForPrepareStreamSync (s32 result, DVDCommandBlock *block)
s32 DVDGetTransferredSize (DVDFileInfo *fileinfo)

Variables

static struct OSBootInfo_s * BootInfo
static struct FSTEntryFstStart
static char * FstStringStart
static unsigned long MaxEntryNum
static unsigned long currentDirectory
OSThreadQueue __DVDThreadQueue
unsigned long __DVDLongFileNameFlag

Macro Definition Documentation

◆ entryIsDir

#define entryIsDir ( i)
Value:
(((FstStart[i].isDirAndStringOff & 0xff000000) == 0) ? FALSE : TRUE)
static struct FSTEntry * FstStart
Definition dvdfs.c:14
#define TRUE
Definition types.h:28
#define FALSE
Definition types.h:27

◆ stringOff

#define stringOff ( i)
Value:
(FstStart[i].isDirAndStringOff & ~0xff000000)

◆ parentDir

#define parentDir ( i)
Value:
(FstStart[i].parentOrPosition)

◆ nextDir

#define nextDir ( i)
Value:
(FstStart[i].nextEntryOrLength)

◆ filePosition

#define filePosition ( i)
Value:
(FstStart[i].parentOrPosition)

◆ fileLength

#define fileLength ( i)
Value:
(FstStart[i].nextEntryOrLength)

◆ offsetof

#define offsetof ( type,
memb )
Value:
((u32) & ((type*) 0)->memb)
unsigned int u32
Definition types.h:13

◆ RoundUp32KB

#define RoundUp32KB ( x)
Value:
(((u32) (x) + 32 * 1024 - 1) & ~(32 * 1024 - 1))

◆ Is32KBAligned

#define Is32KBAligned ( x)
Value:
(((u32) (x) & (32 * 1024 - 1)) == 0)

Function Documentation

◆ isSame()

BOOL isSame ( const char * path,
const char * string )
static

◆ myStrncpy()

u32 myStrncpy ( char * dest,
char * src,
u32 maxlen )
static

◆ entryToPath()

u32 entryToPath ( u32 entry,
char * path,
u32 maxlen )
static

◆ DVDConvertEntrynumToPath()

BOOL DVDConvertEntrynumToPath ( s32 entrynum,
char * path,
u32 maxlen )
static

◆ cbForReadAsync()

void cbForReadAsync ( s32 result,
DVDCommandBlock * block )
static

◆ cbForReadSync()

void cbForReadSync ( )
static

◆ cbForSeekAsync()

void cbForSeekAsync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForSeekSync()

void cbForSeekSync ( )
static

◆ cbForPrepareStreamAsync()

void cbForPrepareStreamAsync ( s32 result,
DVDCommandBlock * block )
static

◆ cbForPrepareStreamSync() [1/2]

void cbForPrepareStreamSync ( )
static

◆ __DVDFSInit()

void __DVDFSInit ( )

◆ DVDConvertPathToEntrynum()

s32 DVDConvertPathToEntrynum ( const char * pathPtr)

◆ DVDFastOpen()

BOOL DVDFastOpen ( s32 entrynum,
DVDFileInfo * fileInfo )

◆ DVDOpen()

BOOL DVDOpen ( char * fileName,
DVDFileInfo * fileInfo )

◆ DVDClose()

BOOL DVDClose ( DVDFileInfo * fileInfo)

◆ DVDGetCurrentDir()

BOOL DVDGetCurrentDir ( char * path,
u32 maxlen )

◆ DVDChangeDir()

BOOL DVDChangeDir ( char * dirName)

◆ DVDReadAsyncPrio()

BOOL DVDReadAsyncPrio ( DVDFileInfo * fileInfo,
void * addr,
s32 length,
s32 offset,
DVDCallback callback,
s32 prio )

◆ DVDReadPrio()

long DVDReadPrio ( struct DVDFileInfo * fileInfo,
void * addr,
long length,
long offset,
long prio )

◆ DVDSeekAsyncPrio()

int DVDSeekAsyncPrio ( struct DVDFileInfo * fileInfo,
long offset,
void(* callback )(long, struct DVDFileInfo *),
long prio )

◆ DVDSeekPrio()

long DVDSeekPrio ( struct DVDFileInfo * fileInfo,
long offset,
long prio )

◆ DVDGetFileInfoStatus()

long DVDGetFileInfoStatus ( struct DVDFileInfo * fileInfo)

◆ DVDOpenDir()

int DVDOpenDir ( char * dirName,
DVDDir * dir )

◆ DVDReadDir()

int DVDReadDir ( DVDDir * dir,
DVDDirEntry * dirent )

◆ DVDCloseDir()

int DVDCloseDir ( DVDDir * dir)

◆ DVDGetFSTLocation()

void * DVDGetFSTLocation ( )

◆ DVDPrepareStreamAsync()

BOOL DVDPrepareStreamAsync ( DVDFileInfo * fileInfo,
u32 length,
u32 offset,
DVDCallback callback )

◆ DVDPrepareStream()

s32 DVDPrepareStream ( DVDFileInfo * fileInfo,
u32 length,
u32 offset )

◆ cbForPrepareStreamSync() [2/2]

void cbForPrepareStreamSync ( s32 result,
DVDCommandBlock * block )
static

◆ DVDGetTransferredSize()

s32 DVDGetTransferredSize ( DVDFileInfo * fileinfo)

Variable Documentation

◆ BootInfo

struct OSBootInfo_s* BootInfo
static

◆ FstStart

struct FSTEntry* FstStart
static

◆ FstStringStart

char* FstStringStart
static

◆ MaxEntryNum

unsigned long MaxEntryNum
static

◆ currentDirectory

unsigned long currentDirectory
static

◆ __DVDThreadQueue

OSThreadQueue __DVDThreadQueue

◆ __DVDLongFileNameFlag

unsigned long __DVDLongFileNameFlag