port dsv movie fix from trunk, and also touch 100 files for no good reason

This commit is contained in:
zeromus 2010-07-29 18:53:43 +00:00
parent e46d3e9da5
commit 1e7ca654d5
5 changed files with 23 additions and 11 deletions

View File

@ -976,8 +976,15 @@ void MMU_Reset()
//HACK!!! //HACK!!!
//until we improve all our session tracking stuff, we need to save the backup memory filename //until we improve all our session tracking stuff, we need to save the backup memory filename
std::string bleh = MMU_new.backupDevice.filename; std::string bleh = MMU_new.backupDevice.filename;
new(&MMU_new) MMU_struct_new; BackupDevice tempBackupDevice;
MMU_new.backupDevice.load_rom(bleh.c_str()); bool bleh2 = MMU_new.backupDevice.isMovieMode;
if(bleh2) tempBackupDevice = MMU_new.backupDevice;
reconstruct(&MMU_new);
if(bleh2) {
MMU_new.backupDevice = tempBackupDevice;
MMU_new.backupDevice.reset_hardware();
}
else MMU_new.backupDevice.load_rom(bleh.c_str());
MMU_timing.arm7codeFetch.Reset(); MMU_timing.arm7codeFetch.Reset();
MMU_timing.arm7dataFetch.Reset(); MMU_timing.arm7dataFetch.Reset();

View File

@ -327,17 +327,21 @@ void BackupDevice::movie_mode()
reset(); reset();
} }
void BackupDevice::reset() void BackupDevice::reset_hardware()
{ {
write_enable = FALSE;
com = 0; com = 0;
addr = addr_counter = 0; addr = addr_counter = 0;
state = DETECTING;
flushPending = false; flushPending = false;
lazyFlushPending = false; lazyFlushPending = false;
data.resize(0); }
write_enable = FALSE;
data_autodetect.resize(0);
state = DETECTING; void BackupDevice::reset()
{
reset_hardware();
data.resize(0);
data_autodetect.resize(0);
addr_size = 0; addr_size = 0;
loadfile(); loadfile();

View File

@ -82,6 +82,7 @@ public:
void reset(); void reset();
void close_rom(); void close_rom();
void reset_hardware();
bool save_state(EMUFILE* os); bool save_state(EMUFILE* os);
bool load_state(EMUFILE* is); bool load_state(EMUFILE* is);
@ -120,13 +121,13 @@ public:
public: //SHOULD BE PRIVATE!!!!!!!! public: //SHOULD BE PRIVATE!!!!!!!!
std::string filename; std::string filename;
bool isMovieMode;
private: private:
bool write_enable; //is write enabled? bool write_enable; //is write enabled?
u32 com; //persistent command actually handled u32 com; //persistent command actually handled
u32 addr_size, addr_counter; u32 addr_size, addr_counter;
u32 addr; u32 addr;
bool isMovieMode;
std::vector<u8> data; std::vector<u8> data;
std::vector<u8> data_autodetect; std::vector<u8> data_autodetect;

View File

@ -437,7 +437,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/MP3" AdditionalOptions="/MP"
Optimization="2" Optimization="2"
InlineFunctionExpansion="2" InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"

View File

@ -3636,7 +3636,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
DesEnableMenuItem(mainMenu, IDM_FILE_RECORDAVI, romloaded); DesEnableMenuItem(mainMenu, IDM_FILE_RECORDAVI, romloaded);
DesEnableMenuItem(mainMenu, IDM_FILE_RECORDWAV, romloaded); DesEnableMenuItem(mainMenu, IDM_FILE_RECORDWAV, romloaded);
DesEnableMenuItem(mainMenu, IDM_EJECTCARD, romloaded && movieMode == MOVIEMODE_INACTIVE); DesEnableMenuItem(mainMenu, IDM_EJECTCARD, romloaded && movieMode == MOVIEMODE_INACTIVE);
DesEnableMenuItem(mainMenu, IDM_RESET, romloaded && movieMode != MOVIEMODE_PLAY); DesEnableMenuItem(mainMenu, IDM_RESET, romloaded && !(movieMode == MOVIEMODE_PLAY && movie_readonly));
DesEnableMenuItem(mainMenu, IDM_CLOSEROM, romloaded); DesEnableMenuItem(mainMenu, IDM_CLOSEROM, romloaded);
DesEnableMenuItem(mainMenu, IDM_SHUT_UP, romloaded); DesEnableMenuItem(mainMenu, IDM_SHUT_UP, romloaded);
DesEnableMenuItem(mainMenu, IDM_CHEATS_LIST, romloaded); DesEnableMenuItem(mainMenu, IDM_CHEATS_LIST, romloaded);
@ -5907,7 +5907,7 @@ static LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam
void ResetGame() void ResetGame()
{ {
if(movieMode != MOVIEMODE_PLAY) if(!(movieMode == MOVIEMODE_PLAY && movie_readonly))
{ {
NDS_Reset(); NDS_Reset();
if(movieMode == MOVIEMODE_INACTIVE) if(movieMode == MOVIEMODE_INACTIVE)