Merge pull request #550 from RachelBryk/movie-mc2
Add support for 2 memory cards for movies.
This commit is contained in:
commit
a2b0525042
|
@ -219,10 +219,13 @@ bool BootCore(const std::string& _rFilename)
|
|||
StartUp.bFastDiscSpeed = Movie::IsFastDiscSpeed();
|
||||
StartUp.iCPUCore = Movie::GetCPUMode();
|
||||
StartUp.bSyncGPU = Movie::IsSyncGPU();
|
||||
if (Movie::IsUsingMemcard() && Movie::IsStartingFromClearSave() && !StartUp.bWii)
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (File::Exists(File::GetUserPath(D_GCUSER_IDX) + "Movie.raw"))
|
||||
File::Delete(File::GetUserPath(D_GCUSER_IDX) + "Movie.raw");
|
||||
if (Movie::IsUsingMemcard(i) && Movie::IsStartingFromClearSave() && !StartUp.bWii)
|
||||
{
|
||||
if (File::Exists(File::GetUserPath(D_GCUSER_IDX) + StringFromFormat("Movie%s.raw", (i == 0) ? "A" : "B")))
|
||||
File::Delete(File::GetUserPath(D_GCUSER_IDX) + StringFromFormat("Movie%s.raw", (i == 0) ? "A" : "B"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,15 +28,18 @@ void Init()
|
|||
for (u32 i = 0; i < MAX_EXI_CHANNELS; i++)
|
||||
g_Channels[i] = new CEXIChannel(i);
|
||||
|
||||
if (Movie::IsPlayingInput() && Movie::IsUsingMemcard() && Movie::IsConfigSaved())
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_MEMORYCARD, 0); // SlotA
|
||||
else if (Movie::IsPlayingInput() && !Movie::IsUsingMemcard() && Movie::IsConfigSaved())
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_NONE, 0); // SlotA
|
||||
if (Movie::IsPlayingInput() && Movie::IsConfigSaved())
|
||||
{
|
||||
g_Channels[0]->AddDevice(Movie::IsUsingMemcard(0) ? EXIDEVICE_MEMORYCARD : EXIDEVICE_NONE, 0); // SlotA
|
||||
g_Channels[1]->AddDevice(Movie::IsUsingMemcard(1) ? EXIDEVICE_MEMORYCARD : EXIDEVICE_NONE, 0); // SlotB
|
||||
}
|
||||
else
|
||||
{
|
||||
g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[0], 0); // SlotA
|
||||
g_Channels[1]->AddDevice(SConfig::GetInstance().m_EXIDevice[1], 0); // SlotB
|
||||
}
|
||||
g_Channels[0]->AddDevice(EXIDEVICE_MASKROM, 1);
|
||||
g_Channels[0]->AddDevice(SConfig::GetInstance().m_EXIDevice[2], 2); // Serial Port 1
|
||||
g_Channels[1]->AddDevice(SConfig::GetInstance().m_EXIDevice[1], 0); // SlotB
|
||||
g_Channels[2]->AddDevice(EXIDEVICE_AD16, 0);
|
||||
|
||||
changeDevice = CoreTiming::RegisterEvent("ChangeEXIDevice", ChangeDeviceCallback);
|
||||
|
|
|
@ -163,9 +163,9 @@ void CEXIMemoryCard::setupRawMemcard(u16 sizeMb)
|
|||
{
|
||||
std::string filename =
|
||||
(card_index == 0) ? SConfig::GetInstance().m_strMemoryCardA : SConfig::GetInstance().m_strMemoryCardB;
|
||||
if (Movie::IsPlayingInput() && Movie::IsConfigSaved() && Movie::IsUsingMemcard() &&
|
||||
if (Movie::IsPlayingInput() && Movie::IsConfigSaved() && Movie::IsUsingMemcard(card_index) &&
|
||||
Movie::IsStartingFromClearSave())
|
||||
filename = File::GetUserPath(D_GCUSER_IDX) + "Movie.raw";
|
||||
filename = File::GetUserPath(D_GCUSER_IDX) + StringFromFormat("Movie%s.raw", (card_index == 0) ? "A" : "B");
|
||||
|
||||
if (sizeMb == MemCard251Mb)
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ u64 g_currentInputCount = 0, g_totalInputCount = 0; // just stats
|
|||
u64 g_totalTickCount = 0, g_tickCountAtLastInput = 0; // just stats
|
||||
u64 g_recordingStartTime; // seconds since 1970 that recording started
|
||||
bool bSaveConfig = false, bSkipIdle = false, bDualCore = false, bProgressive = false, bDSPHLE = false, bFastDiscSpeed = false;
|
||||
bool bMemcard = false, g_bClearSave = false, bSyncGPU = false, bNetPlay = false;
|
||||
bool g_bClearSave = false, bSyncGPU = false, bNetPlay = false;
|
||||
std::string videoBackend = "unknown";
|
||||
int iCPUCore = 1;
|
||||
bool g_bDiscChange = false;
|
||||
|
@ -66,7 +66,7 @@ std::string g_discChange = "";
|
|||
std::string author = "";
|
||||
u64 g_titleID = 0;
|
||||
unsigned char MD5[16];
|
||||
u8 bongos;
|
||||
u8 bongos, memcards;
|
||||
u8 revision[20];
|
||||
u32 DSPiromHash = 0;
|
||||
u32 DSPcoefHash = 0;
|
||||
|
@ -365,9 +365,9 @@ bool IsStartingFromClearSave()
|
|||
return g_bClearSave;
|
||||
}
|
||||
|
||||
bool IsUsingMemcard()
|
||||
bool IsUsingMemcard(int memcard)
|
||||
{
|
||||
return bMemcard;
|
||||
return memcards & (1 << memcard);
|
||||
}
|
||||
bool IsSyncGPU()
|
||||
{
|
||||
|
@ -707,7 +707,7 @@ void ReadHeader()
|
|||
bFastDiscSpeed = tmpHeader.bFastDiscSpeed;
|
||||
iCPUCore = tmpHeader.CPUCore;
|
||||
g_bClearSave = tmpHeader.bClearSave;
|
||||
bMemcard = tmpHeader.bMemcard;
|
||||
memcards = tmpHeader.memcards;
|
||||
bongos = tmpHeader.bongos;
|
||||
bSyncGPU = tmpHeader.bSyncGPU;
|
||||
bNetPlay = tmpHeader.bNetPlay;
|
||||
|
@ -1143,7 +1143,7 @@ void SaveRecording(const std::string& filename)
|
|||
header.bEFBEmulateFormatChanges = g_ActiveConfig.bEFBEmulateFormatChanges;
|
||||
header.bUseXFB = g_ActiveConfig.bUseXFB;
|
||||
header.bUseRealXFB = g_ActiveConfig.bUseRealXFB;
|
||||
header.bMemcard = bMemcard;
|
||||
header.memcards = memcards;
|
||||
header.bClearSave = g_bClearSave;
|
||||
header.bSyncGPU = bSyncGPU;
|
||||
header.bNetPlay = bNetPlay;
|
||||
|
@ -1212,7 +1212,8 @@ void GetSettings()
|
|||
bNetPlay = NetPlay::IsNetPlayRunning();
|
||||
if (!Core::g_CoreStartupParameter.bWii)
|
||||
g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
|
||||
bMemcard = SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD;
|
||||
memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0;
|
||||
memcards |= (SConfig::GetInstance().m_EXIDevice[1] == EXIDEVICE_MEMORYCARD) << 1;
|
||||
unsigned int tmp;
|
||||
for (int i = 0; i < 20; ++i)
|
||||
{
|
||||
|
|
|
@ -107,7 +107,7 @@ struct DTMHeader
|
|||
bool bEFBEmulateFormatChanges;
|
||||
bool bUseXFB;
|
||||
bool bUseRealXFB;
|
||||
bool bMemcard;
|
||||
u8 memcards;
|
||||
bool bClearSave; // Create a new memory card when playing back a movie if true
|
||||
u8 bongos;
|
||||
bool bSyncGPU;
|
||||
|
@ -136,7 +136,7 @@ bool IsJustStartingRecordingInputFromSaveState();
|
|||
bool IsJustStartingPlayingInputFromSaveState();
|
||||
bool IsPlayingInput();
|
||||
bool IsReadOnly();
|
||||
u64 GetRecordingStartTime();
|
||||
u64 GetRecordingStartTime();
|
||||
|
||||
bool IsConfigSaved();
|
||||
bool IsDualCore();
|
||||
|
@ -144,9 +144,9 @@ bool IsProgressive();
|
|||
bool IsSkipIdle();
|
||||
bool IsDSPHLE();
|
||||
bool IsFastDiscSpeed();
|
||||
int GetCPUMode();
|
||||
int GetCPUMode();
|
||||
bool IsStartingFromClearSave();
|
||||
bool IsUsingMemcard();
|
||||
bool IsUsingMemcard(int memcard);
|
||||
bool IsSyncGPU();
|
||||
void SetGraphicsConfig();
|
||||
void GetSettings();
|
||||
|
|
Loading…
Reference in New Issue