Submit all kind of misc little changes and cleanup so I get a clean slate. There should be nothing in here that really changes anything important, except fixing some types in the filesystemgc stuff.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@717 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-09-28 16:49:58 +00:00
parent 60c65b53a5
commit b2c619da61
15 changed files with 201 additions and 231 deletions

View File

@ -49,7 +49,7 @@
void CBoot::Load_FST(bool _bIsWii)
{
if(VolumeHandler::IsValid())
if (VolumeHandler::IsValid())
{
// copy first 20 bytes of disc to start of Mem 1
VolumeHandler::ReadToPtr(Memory::GetPointer(0x80000000), 0, 0x20);
@ -58,11 +58,11 @@ void CBoot::Load_FST(bool _bIsWii)
Memory::Write_U32(Memory::Read_U32(0x80000000), 0x80003180);
u32 shift = 0;
if(_bIsWii)
if (_bIsWii)
shift = 2;
u32 fstOffset = VolumeHandler::Read32(0x0424) << shift;
u32 fstSize = VolumeHandler::Read32(0x0428) << shift;
u32 fstOffset = VolumeHandler::Read32(0x0424) << shift;
u32 fstSize = VolumeHandler::Read32(0x0428) << shift;
u32 maxFstSize = VolumeHandler::Read32(0x042c) << shift;
u32 arenaHigh = 0x817FFFF4 - maxFstSize;
@ -150,7 +150,7 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara)
g_symbolDB.Clear();
VideoInterface::PreInit(_StartupPara.bNTSC);
switch(_StartupPara.m_BootType)
switch (_StartupPara.m_BootType)
{
// GCM
// ===================================================================================
@ -244,18 +244,12 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara)
}
// load image or create virtual drive from directory
if(!_StartupPara.m_strDVDRoot.empty())
{
if (!_StartupPara.m_strDVDRoot.empty())
VolumeHandler::SetVolumeDirectory(_StartupPara.m_strDVDRoot, elfWii);
}
else if(!_StartupPara.m_strDefaultGCM.empty())
{
else if (!_StartupPara.m_strDefaultGCM.empty())
VolumeHandler::SetVolumeName(_StartupPara.m_strDefaultGCM);
}
else
{
VolumeHandler::SetVolumeDirectory(_StartupPara.m_strFilename, elfWii);
}
DVDInterface::SetDiscInside(VolumeHandler::IsValid());

View File

@ -39,7 +39,6 @@ void SCoreStartupParameter::LoadDefaults()
SelectedLanguage = 0;
}
bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
{
static const char *s_DataBasePath_EUR = "Data_EUR";

View File

@ -47,8 +47,8 @@ void TMemCheck::Action(u32 iValue, u32 addr, bool write, int size, u32 pc)
{
if (Log)
{
LOG(MEMMAP,"CHK %08x %s%i at %08x (%s)",
iValue, write ? "Write" : "Read", size*8, addr,
LOG(MEMMAP,"CHK %08x %s%i at %08x (%s)",
iValue, write ? "Write" : "Read", size*8, addr,
g_symbolDB.GetDescription(addr));
}
if (Break)

View File

@ -28,39 +28,32 @@
#include "VolumeCreator.h"
#include "Filesystem.h"
// Hack
u8 coverByte = 0;
// __________________________________________________________________________________________________
//
CWII_IPC_HLE_Device_di::CWII_IPC_HLE_Device_di(u32 _DeviceID, const std::string& _rDeviceName )
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
, m_pVolume(NULL)
, m_pFileSystem(NULL)
{
m_pVolume = VolumeHandler::GetVolume();
if (m_pVolume)
m_pFileSystem = DiscIO::CreateFileSystem(m_pVolume);
}
// __________________________________________________________________________________________________
//
CWII_IPC_HLE_Device_di::~CWII_IPC_HLE_Device_di()
{
delete m_pFileSystem;
delete m_pVolume;
}
// __________________________________________________________________________________________________
//
bool
CWII_IPC_HLE_Device_di::Open(u32 _CommandAddress)
bool CWII_IPC_HLE_Device_di::Open(u32 _CommandAddress)
{
Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
return true;
}
// __________________________________________________________________________________________________
//
bool CWII_IPC_HLE_Device_di::IOCtl(u32 _CommandAddress)
{
LOG(WII_IPC_HLE, "*******************************");
@ -93,8 +86,6 @@ bool CWII_IPC_HLE_Device_di::IOCtl(u32 _CommandAddress)
return true;
}
// __________________________________________________________________________________________________
//
bool CWII_IPC_HLE_Device_di::IOCtlV(u32 _CommandAddress)
{
PanicAlert("CWII_IPC_HLE_Device_di::IOCtlV() unknown");
@ -104,11 +95,6 @@ bool CWII_IPC_HLE_Device_di::IOCtlV(u32 _CommandAddress)
return true;
}
// Hack
u8 coverByte = 0;
// __________________________________________________________________________________________________
//
u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32 _BufferOut, u32 _BufferOutSize)
{
u32 Command = Memory::Read_U32(_BufferIn) >> 24;
@ -160,8 +146,8 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
case 0xd0:
case 0x71:
{
u32 Size = Memory::Read_U32(_BufferIn+0x04);
u64 DVDAddress = (u64)Memory::Read_U32(_BufferIn+0x08) << 2;
u32 Size = Memory::Read_U32(_BufferIn + 0x04);
u64 DVDAddress = (u64)Memory::Read_U32(_BufferIn + 0x08) << 2;
const char* pFilename = m_pFileSystem->GetFileName(DVDAddress);
if (pFilename != NULL)
@ -175,7 +161,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
if (Size > _BufferOutSize)
{
PanicAlert("You try to read more data from the DVD than fit inside the out buffer. Clamp.");
PanicAlert("Detected attempt to read more data from the DVD than fit inside the out buffer. Clamp.");
Size = _BufferOutSize;
}
@ -244,7 +230,9 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
// DVDLowSeek
case 0xab:
{}
{
// PanicAlert("DVDLowSeek");
}
break;
// DVDLowStopMotor

View File

@ -120,7 +120,8 @@ void UpdateFPSCR(UReg_FPSCR fp)
#endif
if (fp.VE || fp.OE || fp.UE || fp.ZE || fp.XE)
{
PanicAlert("FPSCR - exceptions enabled. Please report.");
// PanicAlert("FPSCR - exceptions enabled. Please report.");
// Pokemon Colosseum does this. Gah.
}
// Also corresponding SSE rounding mode setting

View File

@ -105,7 +105,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol &func, int max_size)
while (true)
{
func.size += 4;
if (func.size > 1024*16*4) //weird
if (func.size >= CODEBUFFER_SIZE * 4) //weird
return false;
UGeckoInstruction instr = (UGeckoInstruction)Memory::ReadUnchecked_U32(addr);
@ -311,7 +311,7 @@ CodeOp *Flatten(u32 address, u32 &realsize, BlockStats &st, BlockRegStats &gpa,
Todo todo = Nothing;
//Symbol *f = g_symbolDB.GetSymbolFromAddr(address);
int maxsize = 20000;
int maxsize = CODEBUFFER_SIZE;
//for now, all will return JustCopy :P
/*
if (f)
@ -408,7 +408,6 @@ CodeOp *Flatten(u32 address, u32 &realsize, BlockStats &st, BlockRegStats &gpa,
// Do analysis of the code, look for dependencies etc
int numSystemInstructions = 0;
for (int i = 0; i < 32; i++)
{
gpa.firstRead[i] = -1;
@ -422,10 +421,9 @@ CodeOp *Flatten(u32 address, u32 &realsize, BlockStats &st, BlockRegStats &gpa,
{
UGeckoInstruction inst = code[i].inst;
if (PPCTables::UsesFPU(inst))
{
fpa.any = true;
}
GekkoOPInfo *opinfo = GetOpInfo(code[i].inst);
const GekkoOPInfo *opinfo = GetOpInfo(code[i].inst);
_assert_msg_(GEKKO, opinfo != 0, "Invalid Op - Error scanning %08x op %08x",address+i*4,inst);
int flags = opinfo->flags;
@ -512,6 +510,8 @@ CodeOp *Flatten(u32 address, u32 &realsize, BlockStats &st, BlockRegStats &gpa,
for (int j = 0; j < numIn; j++)
{
int r = code[i].regsIn[j];
if (r < 0 || r > 31)
PanicAlert("wtf");
if (gpa.firstRead[r] == -1)
gpa.firstRead[r] = (short)(i);
gpa.lastRead[r] = (short)(i);
@ -521,6 +521,8 @@ CodeOp *Flatten(u32 address, u32 &realsize, BlockStats &st, BlockRegStats &gpa,
for (int j = 0; j < numOut; j++)
{
int r = code[i].regsOut[j];
if (r < 0 || r > 31)
PanicAlert("wtf");
if (gpa.firstWrite[r] == -1)
gpa.firstWrite[r] = (short)(i);
gpa.lastWrite[r] = (short)(i);

View File

@ -38,10 +38,10 @@ struct CodeOp //16B
u32 address;
u32 branchTo; //if 0, not a branch
int branchToIndex; //index of target block
u8 regsOut[2];
u8 regsIn[3];
u8 fregOut;
u8 fregsIn[3];
s8 regsOut[2];
s8 regsIn[3];
s8 fregOut;
s8 fregsIn[3];
bool isBranchTarget;
bool wantsCR0;
bool wantsCR1;

View File

@ -47,6 +47,8 @@ bool SignatureDB::Load(const char *filename)
memset(&temp, 0, sizeof(temp));
fread(&temp, sizeof(temp), 1, f);
temp.name[sizeof(temp.name)-1] = 0;
DBFunc dbf;
dbf.name = temp.name;
dbf.size = temp.size;
@ -61,7 +63,7 @@ bool SignatureDB::Save(const char *filename)
FILE *f = fopen(filename,"wb");
if (!f)
{
LOG(HLE,"Database save failed");
LOG(HLE, "Database save failed");
return false;
}
int fcount = (int)database.size();

View File

@ -179,16 +179,16 @@ void SymbolDB::FillInCallers()
}
}
void SymbolDB::PrintCalls(u32 funcAddr)
void SymbolDB::PrintCalls(u32 funcAddr) const
{
XFuncMap::iterator iter = functions.find(funcAddr);
XFuncMap::const_iterator iter = functions.find(funcAddr);
if (iter != functions.end())
{
Symbol &f = iter->second;
const Symbol &f = iter->second;
LOG(HLE, "The function %s at %08x calls:", f.name.c_str(), f.address);
for (std::vector<SCall>::iterator fiter = f.calls.begin(); fiter!=f.calls.end(); fiter++)
for (std::vector<SCall>::const_iterator fiter = f.calls.begin(); fiter!=f.calls.end(); fiter++)
{
XFuncMap::iterator n = functions.find(fiter->function);
XFuncMap::const_iterator n = functions.find(fiter->function);
if (n != functions.end())
{
LOG(CONSOLE,"* %08x : %s", fiter->callAddress, n->second.name.c_str());
@ -201,16 +201,16 @@ void SymbolDB::PrintCalls(u32 funcAddr)
}
}
void SymbolDB::PrintCallers(u32 funcAddr)
void SymbolDB::PrintCallers(u32 funcAddr) const
{
XFuncMap::iterator iter = functions.find(funcAddr);
XFuncMap::const_iterator iter = functions.find(funcAddr);
if (iter != functions.end())
{
Symbol &f = iter->second;
const Symbol &f = iter->second;
LOG(CONSOLE,"The function %s at %08x is called by:",f.name.c_str(),f.address);
for (std::vector<SCall>::iterator fiter = f.callers.begin(); fiter != f.callers.end(); fiter++)
for (std::vector<SCall>::const_iterator fiter = f.callers.begin(); fiter != f.callers.end(); fiter++)
{
XFuncMap::iterator n = functions.find(fiter->function);
XFuncMap::const_iterator n = functions.find(fiter->function);
if (n != functions.end())
{
LOG(CONSOLE,"* %08x : %s", fiter->callAddress, n->second.name.c_str());
@ -294,7 +294,7 @@ bool SymbolDB::LoadMap(const char *filename)
return true;
}
bool SymbolDB::SaveMap(const char *filename)
bool SymbolDB::SaveMap(const char *filename) const
{
FILE *f = fopen(filename, "w");
if (!f)

View File

@ -48,12 +48,6 @@ struct Symbol
analyzed(0)
{}
~Symbol()
{
callers.clear();
calls.clear();
}
std::string name;
std::vector<SCall> callers; //addresses of functions that call this function
std::vector<SCall> calls; //addresses of functions that are called by this function
@ -64,7 +58,6 @@ struct Symbol
int numCalls;
int type;
int index; // only used for coloring the disasm view
int analyzed;
};
@ -125,10 +118,10 @@ public:
void FillInCallers();
bool LoadMap(const char *filename);
bool SaveMap(const char *filename);
bool SaveMap(const char *filename) const;
void PrintCalls(u32 funcAddr);
void PrintCallers(u32 funcAddr);
void PrintCalls(u32 funcAddr) const;
void PrintCallers(u32 funcAddr) const;
void LogFunctionCall(u32 addr);
};

View File

@ -85,6 +85,139 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -152,71 +285,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;__WXMSW__"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -282,74 +350,6 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="..\..\..\Externals\wxWidgets\Include;..\..\..\Externals\wxWidgets\Include\msvc;..\Core\Src;;..\Common\Src;..\..\..\Externals\Bochs_disasm"
PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="comctl32.lib rpcrt4.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="DebugFast|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -508,6 +508,14 @@
Optimization="0"
/>
</FileConfiguration>
<FileConfiguration
Name="DebugFast|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
@ -516,14 +524,6 @@
Optimization="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
@ -532,14 +532,6 @@
Optimization="0"
/>
</FileConfiguration>
<FileConfiguration
Name="DebugFast|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
/>
</FileConfiguration>
<FileConfiguration
Name="DebugFast|x64"
>

View File

@ -61,7 +61,7 @@ bool PlainFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
if (nbytes >= 0x100000000ULL)
return false; // WTF, does windows really have this limitation?
DWORD unused;
DWORD unused = 0;
if (!ReadFile(hFile, out_ptr, DWORD(nbytes & 0xFFFFFFFF), &unused, NULL))
return false;
else

View File

@ -43,7 +43,7 @@ bool CFileSystemGCWii::IsInitialized() const
return m_Initialized;
}
size_t CFileSystemGCWii::GetFileSize(const char* _rFullPath) const
u64 CFileSystemGCWii::GetFileSize(const char* _rFullPath) const
{
if (!m_Initialized)
return 0;
@ -70,7 +70,7 @@ const char* CFileSystemGCWii::GetFileName(u64 _Address) const
return NULL;
}
size_t CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const
u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const
{
if (!m_Initialized)
return 0;
@ -170,7 +170,7 @@ bool CFileSystemGCWii::InitFileSystem()
}
// read the whole FST
u32 FSTOffset = Read32(0x424) << m_OffsetShift;
u64 FSTOffset = (u64)Read32(0x424) << m_OffsetShift;
// u32 FSTSize = Read32(0x428);
// u32 FSTMaxSize = Read32(0x42C);

View File

@ -31,9 +31,9 @@ public:
CFileSystemGCWii(const IVolume *_rVolume);
virtual ~CFileSystemGCWii();
virtual bool IsInitialized() const;
virtual size_t GetFileSize(const char* _rFullPath) const;
virtual u64 GetFileSize(const char* _rFullPath) const;
virtual const char* GetFileName(u64 _Address) const;
virtual size_t ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const;
virtual u64 ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const;
virtual bool ExportFile(const char* _rFullPath, const char* _rExportFilename) const;
virtual bool ExportAllFiles(const char* _rFullPath) const;

View File

@ -26,9 +26,9 @@ namespace DiscIO
// file info of an FST entry
struct SFileInfo
{
u32 m_NameOffset;
u64 m_NameOffset;
u64 m_Offset;
u32 m_FileSize;
u64 m_FileSize;
char m_FullPath[512];
bool IsDirectory() const { return (m_NameOffset & 0xFF000000) != 0 ? true : false; }
@ -51,9 +51,8 @@ public:
virtual ~IFileSystem();
virtual bool IsInitialized() const = 0;
virtual size_t GetFileList(std::vector<const SFileInfo *> &_rFilenames) const = 0;
virtual size_t GetFileSize(const char* _rFullPath) const = 0;
virtual size_t ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const = 0;
virtual u64 GetFileSize(const char* _rFullPath) const = 0;
virtual u64 ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const = 0;
virtual bool ExportFile(const char* _rFullPath, const char* _rExportFilename) const = 0;
virtual bool ExportAllFiles(const char* _rFullPath) const = 0;
virtual const char* GetFileName(u64 _Address) const = 0;