mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-10-05 05:05:08 +02:00
e8f5ab07bd
* Fixed bug in http.c (where realloc *might* choose another address, thanks Dr. Clipper) * Added support to /wbfs/Game Title [GAMEID].wbfs files (thanks oggzee) * Fixed bug in cfg_cleanup when switching partitions * Added BGM class again (for playing background music, requested by dimok) * Added settings for background music again * Fixed bug in MEM2 class (returning an invalid handle when no memory could be allocated, thanks to dimok) * Updated DIP module to OpenDIP (report bugs with this one if you've found them, but report them here: http://github.com/spacemanspiff/odip-plugin) * Added initial code for cios 222 rev5 (THIS DOES NOT WORK YET! DON'T FILE BUGS ON THIS ONE!) * Added fatffs module by Hermes and Waninkoko (THIS DOES NOT WORK YET! DON'T FILE BUGS ON THIS ONE!) * Fixed bug in Settings, which resulted in a crash when the partition was changed. * Added caching for gamelist entries, so switching between different screens/sort options/display modes should be faster * Changed defines in ehc_module, in order to prevent clashes with new defines in rev5
64 lines
1.6 KiB
C++
64 lines
1.6 KiB
C++
#ifndef _WBFS_FAT_H
|
|
#define _WBFS_FAT_H
|
|
|
|
#include <ogcsys.h>
|
|
|
|
#include "usbloader/splits.h"
|
|
#include "wbfs_base.h"
|
|
|
|
class Wbfs_Fat : public Wbfs
|
|
{
|
|
public:
|
|
Wbfs_Fat(u32 device, u32 lba, u32 size);
|
|
~Wbfs_Fat();
|
|
|
|
virtual s32 Open();
|
|
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 *);
|
|
|
|
f32 EstimateGameSize();
|
|
|
|
int GetFragList(u8 *);
|
|
virtual int GetFragList(char *, _frag_append_t, FragList *);
|
|
virtual bool ShowFreeSpace(void);
|
|
|
|
protected:
|
|
static char wbfs_fs_drive[16];
|
|
private:
|
|
split_info_t split;
|
|
|
|
static u32 fat_sector_size;
|
|
static char wbfs_fat_dir[16];
|
|
static char invalid_path[];
|
|
static struct discHdr *fat_hdr_list;
|
|
static u32 fat_hdr_count;
|
|
|
|
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
|