usbloadergx/source/usbloader/wbfs/wbfs_fat.h
dimok321 d625c5adfc *Added support for using USB port 1 (ONLY ON HERMES CIOS)
*Added support for using both USB ports at once (ONLY ON HERMES CIOS)

Big thanks to rodries for writing the necessary ehcmodules!

NOTE: You can change port of USB device in the Loader Settings. The loader currently does not support loading configs off port 1 (only from port 0)

If you select to use both usb ports the loader will switch between ports automatically, on demand. It is not possible to use both ports at once currently. Right now the wiilight blinks each time it switches the port. I will talk to rodries and see if we can disable it. Using the "both ports" option only makes sense in combination with "Multiple Partitions" option. In that case all games on all partitions from BOTH HDDs will be loaded. I think I don't have to say that switching between ports and loading all games is slower than normal mode with one port only in use. You might wanna just set one port and switch yourself when you need to. Well the option for both ports (automatic switching) is there for the lazy ones who don't like to hit the settings button ;).
2011-02-05 21:06:52 +00:00

65 lines
1.7 KiB
C++

#ifndef _WBFS_FAT_H
#define _WBFS_FAT_H
#include <ogcsys.h>
#include "usbloader/splits.h"
#include "usbloader/wbfs.h"
#include "wbfs_base.h"
class Wbfs_Fat: public Wbfs
{
public:
Wbfs_Fat(u32 lba, u32 size, u32 part);
virtual s32 Open();
virtual void Close();
wbfs_disc_t* OpenDisc(u8 *);
void CloseDisc(wbfs_disc_t *);
s32 GetCount(u32 *);
s32 GetHeaders(struct discHdr *, u32, u32);
s32 AddGame();
s32 RemoveGame(u8 *);
s32 DiskSpace(f32 *, f32 *);
s32 RenameGame(u8 *, const void *);
s32 ReIDGame(u8 *, const void *);
u64 EstimateGameSize();
virtual int GetFragList(u8 *);
virtual bool ShowFreeSpace(void);
virtual const u8 GetFSType(void) const { return PART_FS_FAT; }
protected:
split_info_t split;
struct discHdr *fat_hdr_list;
u32 fat_hdr_count;
char wbfs_fs_drive[16];
wbfs_t* OpenPart(char *fname);
void ClosePart(wbfs_t* part);
wbfs_t* CreatePart(u8 *id, char *path);
int FindFilename(u8 *id, char *fname, int len);
void Filename(u8 *id, char *fname, int len, char *path);
bool CheckLayoutB(char *fname, int len, u8* id, char *fname_title);
s32 GetHeadersCount();
void GetDir(struct discHdr *header, char *path);
void mk_title_txt(struct discHdr *header, char *path);
void mk_gameid_title(struct discHdr *header, char *name, int re_space, int layout);
void title_filename(char *title);
bool is_gameid(char *id);
static int nop_rw_sector(void *_fp, u32 lba, u32 count, void* buf)
{
return 0;
}
};
#endif //_WBFS_FAT_H