Migration to the new dir struct (in code only!, no deletion of old dirs...yet). VS projects copy Data/* to Binary/<arch>. Added SConscript to some projects where it was missing. This is the time to move over all your files!

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1140 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman committed 2008-11-12 04:54:17 +00:00
1 parent 8c7d7a6c36
commit f7cb34f1e0
30 files changed
+218 -126

No files matched your search

+6 -6
View File
@@ -185,7 +185,7 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
{
LOG(BOOT, "Faking Wii BIOS...");
FILE* pDump = fopen("WII/dump_0x0000_0x4000.bin", "rb");
FILE* pDump = fopen(FULL_WII_SYS_DIR "dump_0x0000_0x4000.bin", "rb");
if (pDump != NULL)
{
LOG(MASTER_LOG, "Init from memory dump.");
@@ -198,26 +198,26 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
{
// load settings.txt
{
std::string filename("WII/setting-eur.txt");
std::string filename(WII_EUR_SETTING_FILE);
if (VolumeHandler::IsValid())
{
switch(VolumeHandler::GetVolume()->GetCountry())
{
case DiscIO::IVolume::COUNTRY_JAP:
filename = "WII/setting-jpn.txt";
filename = WII_JAP_SETTING_FILE;
break;
case DiscIO::IVolume::COUNTRY_USA:
filename = "WII/setting-usa.txt";
filename = WII_USA_SETTING_FILE;
break;
case DiscIO::IVolume::COUNTRY_EUROPE:
filename = "WII/setting-eur.txt";
filename = WII_EUR_SETTING_FILE;
break;
default:
PanicAlert("Unknown country. Wii boot process will be switched to European settings.");
filename = "WII/setting-eur.txt";
filename = WII_EUR_SETTING_FILE;
break;
}
}
+13 -17
View File
@@ -50,11 +50,7 @@ void SCoreStartupParameter::LoadDefaults()
bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
{
static const char *s_DataBasePath_EUR = "Data_EUR";
static const char *s_DataBasePath_USA = "Data_USA";
static const char *s_DataBasePath_JAP = "Data_JAP";
std::string BaseDataPath(s_DataBasePath_EUR);
std::string Region(EUR_DIR);
switch (_BootBios)
{
@@ -81,18 +77,18 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
{
case DiscIO::IVolume::COUNTRY_USA:
bNTSC = true;
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
break;
case DiscIO::IVolume::COUNTRY_JAP:
bNTSC = true;
BaseDataPath = s_DataBasePath_JAP;
Region = JAP_DIR;
break;
case DiscIO::IVolume::COUNTRY_EUROPE:
case DiscIO::IVolume::COUNTRY_FRANCE:
bNTSC = false;
BaseDataPath = s_DataBasePath_EUR;
Region = EUR_DIR;
break;
default:
@@ -105,13 +101,13 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
else if (!strcasecmp(Extension.c_str(), ".elf"))
{
bWii = CBoot::IsElfWii(m_strFilename.c_str());
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
m_BootType = BOOT_ELF;
bNTSC = true;
}
else if (!strcasecmp(Extension.c_str(), ".dol"))
{
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
m_BootType = BOOT_DOL;
bNTSC = true;
}
@@ -124,29 +120,29 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
break;
case BOOT_BIOS_USA:
BaseDataPath = s_DataBasePath_USA;
Region = USA_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BIOS_JAP:
BaseDataPath = s_DataBasePath_JAP;
Region = JAP_DIR;
m_strFilename.clear();
bNTSC = true;
break;
case BOOT_BIOS_EUR:
BaseDataPath = s_DataBasePath_EUR;
Region = EUR_DIR;
m_strFilename.clear();
bNTSC = false;
break;
}
// setup paths
m_strBios = BaseDataPath + "/IPL.bin";
m_strMemoryCardA = BaseDataPath + "/MemoryCardA.raw";
m_strMemoryCardB = BaseDataPath + "/MemoryCardB.raw";
m_strSRAM = BaseDataPath + "/SRAM.raw";
m_strBios = FULL_GC_SYS_DIR + Region + DIR_SEP GC_IPL;
m_strMemoryCardA = FULL_GC_USER_DIR + Region + DIR_SEP GC_MEMCARDA;
m_strMemoryCardB = FULL_GC_USER_DIR + Region + DIR_SEP GC_MEMCARDB;
m_strSRAM = GC_SRAM_FILE;
if (!File::Exists(m_strBios.c_str())) {
LOG(BOOT, "BIOS file %s not found - using HLE.", m_strBios.c_str());
bHLEBios = true;
+14 -14
View File
@@ -59,10 +59,10 @@ CEXIIPL::CEXIIPL() :
m_uRWOffset(0),
m_count(0)
{
// load the IPL
// Load the IPL
m_pIPL = (u8*)AllocateMemoryPages(ROM_SIZE);
FILE* pStream = NULL;
pStream = fopen("./Data/font_ansi.bin", "rb");
pStream = fopen(FONT_ANSI_FILE, "rb");
if (pStream != NULL)
{
fseek(pStream, 0, SEEK_END);
@@ -77,7 +77,7 @@ CEXIIPL::CEXIIPL() :
PanicAlert("Error: failed to load font_ansi.bin. Fonts may bug");
}
pStream = fopen("./Data/font_sjis.bin", "rb");
pStream = fopen(FONT_SJIS_FILE, "rb");
if (pStream != NULL)
{
fseek(pStream, 0, SEEK_END);
@@ -94,10 +94,10 @@ CEXIIPL::CEXIIPL() :
memcpy(m_pIPL, iplver, sizeof(iplver));
// clear RTC
// Clear RTC
memset(m_RTC, 0, sizeof(m_RTC));
// SRam
// SRAM
pStream = fopen(Core::GetStartupParameter().m_strSRAM.c_str(), "rb");
if (pStream != NULL)
{
@@ -129,7 +129,7 @@ CEXIIPL::~CEXIIPL()
m_pIPL = NULL;
}
// SRam
// SRAM
FILE* pStream = NULL;
pStream = fopen(Core::GetStartupParameter().m_strSRAM.c_str(), "wb");
if (pStream != NULL)
@@ -154,8 +154,8 @@ bool CEXIIPL::IsPresent()
void CEXIIPL::TransferByte(u8& _uByte)
{
// the first 4 bytes must be the address
// if we havnt read it, do it now
// The first 4 bytes must be the address
// If we haven't read it, do it now
if (m_uPosition < 4)
{
m_uAddress <<= 8;
@@ -163,10 +163,10 @@ void CEXIIPL::TransferByte(u8& _uByte)
m_uRWOffset = 0;
_uByte = 0xFF;
// check if the command is complete
// Check if the command is complete
if (m_uPosition == 3)
{
// get the time ...
// Get the time ...
u32 GCTime = CEXIIPL::GetGCTime();
u8* pGCTime = (u8*)&GCTime;
for (int i=0; i<4; i++)
@@ -231,7 +231,7 @@ void CEXIIPL::TransferByte(u8& _uByte)
_uByte = m_RTC[(m_uAddress & 0x03) + m_uRWOffset];
}
//
// --- SRam ---
// --- SRAM ---
//
else if ((m_uAddress & 0x7FFFFF00) == 0x20000100)
{
@@ -266,7 +266,7 @@ void CEXIIPL::TransferByte(u8& _uByte)
u32 CEXIIPL::GetGCTime()
{
// get sram bias
// Get SRAM bias
u32 Bias;
for (int i=0; i<4; i++)
@@ -274,8 +274,8 @@ u32 CEXIIPL::GetGCTime()
((u8*)&Bias)[i] = sram_dump[0xc + (i^3)];
}
// get the time ...
const u32 cJanuary2000 = 0x386d35a1; // seconds between 1.1.1970 and 1.1.2000
// Get the time ...
const u32 cJanuary2000 = 0x386d35a1; // Seconds between 1.1.1970 and 1.1.2000
u64 ltime = Common::Timer::GetTimeSinceJan1970();
return ((u32)ltime - cJanuary2000 - Bias);
}
@@ -26,7 +26,7 @@ std::string HLE_IPC_BuildFilename(const char* _pFilename, int _size)
char Buffer[128];
memcpy(Buffer, _pFilename, _size);
std::string Filename("WII");
std::string Filename(WII_SYS_DIR);
if (Buffer[1] == '0')
Filename += std::string("/title"); // this looks and feel like an hack...
@@ -46,7 +46,7 @@ bool CWII_IPC_HLE_Device_fs::Open(u32 _CommandAddress, u32 _Mode)
{
// clear tmp folder
{
std::string WiiTempFolder("Wii/tmp");
std::string WiiTempFolder(FULL_WII_USER_DIR "tmp");
bool Result = File::DeleteDirRecursively(WiiTempFolder.c_str());
if (Result == false)
{
@@ -64,7 +64,7 @@ bool CWII_IPC_HLE_Device_fs::Open(u32 _CommandAddress, u32 _Mode)
char* pTitleID = (char*)&TitleID;
char Path[260+1];
sprintf(Path, "Wii/title/00010000/%02x%02x%02x%02x/data/nocopy/", (u8)pTitleID[3], (u8)pTitleID[2], (u8)pTitleID[1], (u8)pTitleID[0]);
sprintf(Path, FULL_WII_USER_DIR "title/00010000/%02x%02x%02x%02x/data/nocopy/", (u8)pTitleID[3], (u8)pTitleID[2], (u8)pTitleID[1], (u8)pTitleID[0]);
CreateDirectoryStruct(Path);
}