usbloadergx/source/usbloader/wbfs/wbfs_base.h
dimok321 a3495651f0 *Added support for starting .wbfs game files from fat32/ntfs partitions on a sector size > 512 (tested with 4096)
*modified libcustomfat and ntfs fragment fetch function to support >512 bytes per sector
*Added new ehcmodule (thanks rodries)
*Added real support of using both ports simultaniously without shutting down the other (thanks rodries for the ehcmodule works on this). There is no longer the limitation that the settings have to be on SD card for this. (ONLY HERMES CIOS)
*Moved a few settings to Feature Settings and added a new Hard Drive Settings
*Changed Wiinnertag path to only point to the path and not to the file. You must correct the path manually in custom path settings or reset you configs for this change or Winnertag won't work!!
*Removed a few compile warnings for devkitPPC R23
2011-06-22 17:57:37 +00:00

47 lines
1.4 KiB
C++

#ifndef _H
#define _H
#include "libs/libwbfs/libwbfs.h"
#include "usbloader/utils.h"
#include "usbloader/frag.h"
#include "usbloader/wbfs.h"
#define CACHE_SIZE 32
#define CACHED_SECTORS 64
class Wbfs
{
public:
Wbfs(u32 lba, u32 size, u32 part, u32 usbport);
~Wbfs() { Close(); };
static s32 Init(u32);
s32 CheckGame(u8 *);
s32 GameSize(u8 *, f32 *);
bool IsMounted() { return hdd == 0; };
virtual int GetFragList(u8 *id) { return 0; };
virtual s32 Open() = 0;
virtual void Close() {};
virtual wbfs_disc_t* OpenDisc(u8 *discid) = 0;
virtual void CloseDisc(wbfs_disc_t *disc) = 0;
virtual s32 Format();
virtual s32 GetCount(u32 *) = 0;
virtual s32 GetHeaders(struct discHdr *, u32, u32) = 0;
virtual s32 AddGame(void) = 0;
virtual s32 RemoveGame(u8 *) = 0;
virtual s32 DiskSpace(f32 *, f32 *) = 0;
virtual s32 RenameGame(u8 *, const void *) = 0;
virtual s32 ReIDGame(u8 *discid, const void *newID) = 0;
virtual u64 EstimateGameSize(void) = 0;
virtual u8 GetFSType(void) const { return PART_FS_WBFS; }
const wbfs_t *GetHDDHandle(void) { return hdd; }
protected:
wbfs_t *hdd;
const u32 lba;
const u32 size;
const u32 partition;
const u32 usbport;
};
#endif //_H