#include <revolution/vf.h>
typedef s32 VFErr;
VFErr VFAttachDriveNANDFlash( const char* drive );
VFErr VFAttachDriveNANDFlashW( const VFWchar* drive );
VFErr VFAttachDriveNANDFlashCache( const char* drive, void* cacheAddress, u32 cacheSize );
VFErr VFAttachDriveNANDFlashCacheW( const VFWchar* drive, void* cacheAddress, u32 cacheSize );
VFErr VFAttachDriveRam( const char* drive );
VFErr VFAttachDriveRamW( const VFWchar* drive );
VFErr VFAttachDriveRamCache( const char* drive, void* cacheAddress, u32 cacheSize );
VFErr VFAttachDriveRamCacheW( const VFWchar* drive, void* cacheAddress, u32 cacheSize );
VFErr VFAttachDriveDVD( const char* drive );
VFErr VFAttachDriveDVDW( const VFWchar* drive );
VFErr VFAttachDriveDVDCache( const char* drive, void* cacheAddress, u32 cacheSize );
VFErr VFAttachDriveDVDCacheW( const VFWchar* drive, void* cacheAddress, u32 cacheSize );
drive |
The name of the drive to be attached. Specify a single letter. |
cacheAddress |
The cache address (specify NULL if not needed). |
cacheSize |
The cache size (use a value equal to VF_CACHE_SIZE_MIN or greater, when used). |
When successful, 0.
When failed, a VFErr other than 0.
Reserves the specified drive. VF_ERR_ALREADY_ATTACHED_DRV_NAME is returned if the specified drive name is already reserved.
Calls should be differentiated by the type of media to be used. Drive letters from A to Z may be specified for the drive name.
Although the number of drives that can be mounted simultaneously will depend on the number of files that can be opened with the particular device, the maximum number of drives that can be mounted at once is 26.
Within the VF, a cache of VF_CACHE_SIZE_MIN (10KB) is set for each drive.
To increase speed, set cacheAddress and cacheSize to use a cache of a specified size.
This dramatically increases the speed for file creation in directories with many entries.
The set cache buffers are enabled until either VFDetachDrive() or VFUnmountDrive() is called.
Also be aware that cache buffers cannot be shared between drives.
VFActivateDrive, VFInactivateDrive, VFDetachDrive
2006/09/27 Initial version.
CONFIDENTIAL