Appendix 64DD MFS Functions


This appendix provides descriptions of 64DD Multi File System (MFS) Library functions.

High-Level Library Functions
The ROM and RAM areas can be assigned virtual drives, and file and directory names can be specified by their full pathnames. Relative paths can also be used, and these cannot be back-tracked.

mfsHInitDiskBoot Initialize library (for disk boot)
mfsHInitCasBoot Initialize library (for cartridge boot)
mfsHMediaCheck Check media status of drive
mfsHMediaFormat Format media in MFS format
mfsHFopen Open file
mfsHFread Read data
mfsHFwrite Write data
mfsHFclose Close file
mfsHFseek Seek head
mfsHFtell Get file location
mfsHFstat Get information about file
mfsHFgetAttr Get file attributes
mfsHFsetAttr Set file attributes
mfsHFgetCopyCount Get file copy counter value
mfsHFsetCopyCount Set copy counter value
mfsHFgetRC Get file refresh counter value
mfsHFresetRC Reset refresh counter value
mfsHRemoveFile Delete file
mfsHRenameFile Rename file
mfsHGetFileCopyCount Get file copy count
mfsHSetFileCopyCount Set file copy count
mfsHGetAttr Get file (directory) attributes
mfsHSetAttr Set file (directory) attributes
mfsHGetRC Get file (directory) refresh counter value
mfsHResetRC Reset refresh counter value
mfsHGetStat Get file or directory information
mfsHGetCwd Get current directory
mfsHChDir Change current directory
mfsHRmDir Remove directory
mfsHMkDir Make directory
mfsHGetVolumeInfo Get volume information
mfsHGetVolumeAttr Get volume attributes
mfsHSetVolumeAttr Set volume attributes
mfsHGetVolumeRC Get volume refresh counter
mfsHResetVolumeRC Reset volume refresh counter
mfsHFnsplit Split structural element in path name
mfsHFnmerge Merge elements to create path name
mfsHGetDisk Get current drive number
mfsHSetDisk Change current drive
mfsHFindFirst Find directory
mfsHFindNext Find next file


Low-Level Library Functions
There is a group of functions for the ROM area and a group of functions for the RAM area. Since writing to the ROM area is disabled, there are no write related functions in the ROM area group.


(1) Initialization Functions
mfsInit Initialize internal variables
mfsInitDiskRom Initialize for disk operation
mfsInitDiskRam Initialize for disk operation
mfsInitDiskRomRam Initialize for disk operation
mfsRamInit Initialize RAM area library
mfsRomInit Initialize ROM area library

(2) Disk Operation Functions
mfsDiskIdCheck Read and check disk ID
mfsRamMediaFormat Format media
mfsRomMediaCheck Media check
mfsRamMediaCheck Media check
mfsRamFlash Write header area
mfsRamGetFreeSize Get free space
mfsRamGetFreeDirEntryNum Get number of files (directories) which can be registered
mfsRomGetFileNum Get number of files associated with specified directory
mfsRamGetFileNum Get number of files associated with specified directory
mfsRomGetVolumeAttr Get volume attributes
mfsRamGetVolumeAttr Get volume attributes
mfsRomGetVolumeName Get volume name
mfsRamGetVolumeName Get volume name
mfsRomGetVolumeDate Get volume date
mfsRamGetVolumeDate Get volume date
mfsRamGetVolumeRC Get refresh counter value
mfsRomGetDiskType Get disk type
mfsRamGetDiskType Get disk type
mfsRomGetDestination Get destination code
mfsRamGetDestination Get destination code
mfsRamSetVolumeAttr Set volume attributes
mfsRamSetVolumeName Set volume name
mfsRamSetVolumeDate Set volume date
mfsRamSetDestination Set destination code
mfsRamResetVolumeRC Reset refresh counter
mfsRamRepairHeader Repair header area

(3) Directory Functions
mfsRamMakeDir Make directory
mfsRomGetDirID Get directory ID
mfsRamGetDirID Get directory ID
mfsRomGetDirName Get directory name
mfsRamGetDirName Get directory name
mfsRamRemoveDir Remove directory
mfsRamRenameDir Rename directory

(4) File Operation Functions
mfsRamCreateFile Create file
mfsRomGetFileDirID Get directory ID of file
mfsRamGetFileDirID Get directory ID of file
mfsRomReadFile Read data
mfsRamReadFile Read data
mfsRamWriteFile Read data
mfsRomSeekFile Seek head
mfsRamSeekFile Seek head
mfsRomGetFileName Get file name
mfsRamGetFileName Get file name
mfsRamRemoveFile Delete file
mfsRamRenameFile Rename file
mfsRomGetFileAttr Get file (directory) attributes
mfsRamGetFileAttr Get file (directory) attributes
mfsRomGetFileDate Get file (directory) date
mfsRamGetFileDate Get file (directory) date
mfsRomGetFileParentDir Get directory ID of parent directory
mfsRamGetFileParentDir Get directory ID of parent directory
mfsRomGetFileSize Get file size
mfsRamGetFileSize Get file size
mfsRamGetFileCopyCount Get file (directory) copy limit count
mfsRomGetFileGameCode Get company code, game code of file (directory)
mfsRamGetFileGameCode Get company code, game code of file (directory)
mfsRamGetFileRC Get refresh counter value of file (directory)
mfsRamSetFiletAttr Set file (directory) attributes
mfsRamSetFileDate Set file (directory) date
mfsRamSetFileCopyCount Set file (directory) copy limit number
mfsRamSetFileGameCode Set company code, game code of file (directory)
mfsRamResetFileRC Reset refresh counter value of file (directory)
mfsRamSetFileParentDir Change parent directory
mfsRamResizeFile Resize file
mfsRomGetFileStat Get information
mfsRamGetFileStat Get information
mfsRomGetDirListFirst Get directory contents (list directory)
mfsRamGetDirListFirst Get directory contents (list directory)
mfsRomGetDirListNext Continue to get directory contents (next page of directory list)
mfsRamGetDirListNext Continue to get directory contents (next page of directory list)


Device Functions
mfsReadWriteLBA Read/write from/to disk
mfsReadLBA Read disk
mfsWriteLBA Write to disk
mfsReadDiskID Read disk ID
mfsSpdlMotor Control 64DD head and motor
mfsTestUnit Check status of 64DD
mfsReadRtc Read date and time from internal RTC
mfsSetRtc Set internal RTC


Other Functions
mfsGetGameCode Get company code, game code
mfsSetGameCode Set company code, game code
mfsStrCmp Compare text strings
mfsStrnCmp Compare text strings
mfsStrCpy Copy text string
mfsStrnCpy Copy text string
mfsStrLen Calculate length of text string
mfsStrrChr Find location of last appearance of character "c"
mfsStrCat Connect text string
mfsStrWCmp Compare text string (wild card version)
mfsSetLeoBusyFunc Register PI control function (before using PI)
mfsSetLeoReadyFunc Register PI control function (after using PI)
mfsSetLeoErrorFunc Register error processing function for Leo function


Global Variables
mfsError Stores errors when LEO function is called inside MFS library
mfsDiskInfo Structure for storing information regarding disk inside MFS library