Merge branch 'desync-fixes' into movie-fixes

This commit is contained in:
rog 2012-11-26 12:37:27 -05:00
commit db458a234a
9 changed files with 86 additions and 17 deletions

View File

@ -384,7 +384,11 @@
<ClCompile Include="Src\PowerPC\PPCTables.cpp" /> <ClCompile Include="Src\PowerPC\PPCTables.cpp" />
<ClCompile Include="Src\PowerPC\Profiler.cpp" /> <ClCompile Include="Src\PowerPC\Profiler.cpp" />
<ClCompile Include="Src\PowerPC\SignatureDB.cpp" /> <ClCompile Include="Src\PowerPC\SignatureDB.cpp" />
<ClCompile Include="Src\State.cpp" /> <ClCompile Include="Src\State.cpp">
<OpenMPSupport Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'">false</OpenMPSupport>
<OpenMPSupport Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</OpenMPSupport>
<OpenMPSupport Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</OpenMPSupport>
</ClCompile>
<ClCompile Include="Src\stdafx.cpp"> <ClCompile Include="Src\stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>

View File

@ -193,7 +193,8 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
case 0x0004: case 0x0004:
// PBs are here now // PBs are here now
m_addressPBs = HLEMemory_Read_U32(uAddress); m_addressPBs = HLEMemory_Read_U32(uAddress);
soundStream->GetMixer()->SetHLEReady(true); if (soundStream)
soundStream->GetMixer()->SetHLEReady(true);
// soundStream->Update(); // soundStream->Update();
uAddress += 4; uAddress += 4;
break; break;

View File

@ -136,9 +136,9 @@ void DoState(unsigned char **ptr, int mode)
{ {
// TODO: // TODO:
//PointerWrap p(ptr, mode); PointerWrap p(ptr, mode);
//for (unsigned int i=0; i<4; ++i) for (unsigned int i=0; i<4; ++i)
// ((WiimoteEmu::Wiimote*)g_plugin.controllers[i])->DoState(p); ((WiimoteEmu::Wiimote*)g_plugin.controllers[i])->DoState(p);
} }
// ___________________________________________________________________________ // ___________________________________________________________________________

View File

@ -594,13 +594,69 @@ void Wiimote::SendReadDataReply(ReadRequest& _request)
void Wiimote::DoState(PointerWrap& p) void Wiimote::DoState(PointerWrap& p)
{ {
// not working :( p.Do(m_extension->active_extension);
//if (p.MODE_READ == p.GetMode()) p.Do(m_extension->switch_extension);
//{
// // LOAD p.Do(m_accel);
// Reset(); // should cause a status report to be sent, then wii should re-setup wiimote p.Do(m_index);
//} p.Do(ir_sin);
//p.Do(m_reporting_channel); p.Do(ir_cos);
p.Do(m_rumble_on);
p.Do(m_speaker_mute);
p.Do(m_motion_plus_present);
p.Do(m_motion_plus_active);
p.Do(m_reporting_auto);
p.Do(m_reporting_mode);
p.Do(m_reporting_channel);
p.Do(m_shake_step);
p.Do(m_sensor_bar_on_top);
p.Do(m_status);
p.Do(m_adpcm_state);
p.Do(m_ext_key);
p.Do(m_eeprom);
p.Do(m_reg_motion_plus);
p.Do(m_reg_ir);
p.Do(m_reg_ext);
p.Do(m_reg_speaker);
//Do 'm_read_requests' queue
{
u32 size;
if (p.mode == PointerWrap::MODE_READ)
{
//clear
while (m_read_requests.size())
m_read_requests.pop();
p.Do(size);
while (size--)
{
ReadRequest tmp;
p.Do(tmp.address);
p.Do(tmp.position);
p.Do(tmp.size);
tmp.data = new u8[tmp.size];
p.DoArray(tmp.data, tmp.size);
m_read_requests.push(tmp);
}
}
else
{
std::queue<ReadRequest> tmp_queue(m_read_requests);
size = m_read_requests.size();
p.Do(size);
while (!tmp_queue.empty())
{
ReadRequest tmp = tmp_queue.front();
p.Do(tmp.address);
p.Do(tmp.position);
p.Do(tmp.size);
p.DoArray(tmp.data, tmp.size);
tmp_queue.pop();
}
}
}
p.DoMarker("Wiimote");
} }
} }

View File

@ -62,7 +62,11 @@ public:
virtual ~IWII_IPC_HLE_Device() { } virtual ~IWII_IPC_HLE_Device() { }
virtual void DoState(PointerWrap& p) { DoStateShared(p); } virtual void DoState(PointerWrap& p)
{
DoStateShared(p);
p.Do(m_Active);
}
void DoStateShared(PointerWrap& p); void DoStateShared(PointerWrap& p);

View File

@ -112,6 +112,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::DoState(PointerWrap &p)
std::deque<SQueuedEvent> m_EventQueue; std::deque<SQueuedEvent> m_EventQueue;
*/ */
p.Do(m_ControllerBD);
p.Do(m_CtrlSetup); p.Do(m_CtrlSetup);
p.Do(m_ACLSetup); p.Do(m_ACLSetup);
p.Do(m_HCIEndpoint); p.Do(m_HCIEndpoint);

View File

@ -102,6 +102,7 @@ void CWII_IPC_HLE_WiiMote::DoState(PointerWrap &p)
p.Do(uclass); p.Do(uclass);
p.Do(features); p.Do(features);
p.Do(lmp_version); p.Do(lmp_version);
p.Do(lmp_subversion);
p.Do(m_LinkKey); p.Do(m_LinkKey);
p.Do(m_Name); p.Do(m_Name);

View File

@ -71,7 +71,7 @@ static Common::Event g_compressAndDumpStateSyncEvent;
static std::thread g_save_thread; static std::thread g_save_thread;
// Don't forget to increase this after doing changes on the savestate system // Don't forget to increase this after doing changes on the savestate system
static const int STATE_VERSION = 8; static const int STATE_VERSION = 9;
struct StateHeader struct StateHeader
{ {

View File

@ -111,7 +111,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> <OpenMPSupport>false</OpenMPSupport>
</ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
</Link> </Link>
@ -129,7 +130,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<OpenMPSupport>true</OpenMPSupport> <OpenMPSupport>false</OpenMPSupport>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@ -141,7 +142,8 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugFast|Win32'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\Common\Src;..\Core\Src;..\..\..\Externals\SOIL;..\..\..\Externals\CLRun\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> <OpenMPSupport>false</OpenMPSupport>
</ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>