mirror of https://github.com/PCSX2/pcsx2.git
* Added toggles for game log output: EE StdOut, EE Deci2, and IOP StdOut. Toggles are provided via a menu in the Console Log.
Dev notes: * Renamed MtgsthreadObject to SysMtgsThread (matches naming pattern of other thread classes). * Added accessors for GetMtgs() and GetCoreThread() [rationale for them documented in source comments] * Removed wxHelpers namespace since we're using px name prefix instead for most stuff. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2238 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
03909ce78c
commit
4828beb3c3
|
@ -541,10 +541,6 @@
|
|||
RelativePath="..\..\include\Utilities\wxGuiTools.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Utilities\wxHelpers.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "wxHelpers.h"
|
||||
#include "wxGuiTools.h"
|
||||
|
||||
class CheckedStaticBox : public wxPanelWithHelpers
|
||||
{
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2009 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include "wxGuiTools.h"
|
||||
|
||||
namespace wxHelpers
|
||||
{
|
||||
extern pxStaticText& InsertStaticTextAt(wxWindow* parent, wxSizer& sizer, int position, const wxString& label, int alignFlags=wxALIGN_CENTRE );
|
||||
}
|
||||
|
||||
|
|
@ -15,20 +15,13 @@
|
|||
|
||||
#include "PrecompiledHeader.h"
|
||||
#include "HashMap.h"
|
||||
#include "wxHelpers.h"
|
||||
#include "wxGuiTools.h"
|
||||
#include "pxStaticText.h"
|
||||
|
||||
#include <wx/cshelp.h>
|
||||
#include <wx/tooltip.h>
|
||||
|
||||
|
||||
pxStaticText& wxHelpers::InsertStaticTextAt(wxWindow* parent, wxSizer& sizer, int position, const wxString& label, int alignFlags )
|
||||
{
|
||||
pxStaticText& temp( *new pxStaticText(parent, label, alignFlags ) );
|
||||
temp.InsertAt( sizer, position );
|
||||
return temp;
|
||||
}
|
||||
|
||||
// =====================================================================================================
|
||||
// wxDialogWithHelpers Class Implementations
|
||||
// =====================================================================================================
|
||||
|
|
|
@ -314,7 +314,7 @@ static void reloadElfInfo(const char* str)
|
|||
|
||||
ElfCRC = loadElfCRC( str );
|
||||
ElfApplyPatches();
|
||||
mtgsThread.SendGameCRC( ElfCRC );
|
||||
GetMTGS().SendGameCRC( ElfCRC );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -248,7 +248,16 @@ struct TraceLogFilters
|
|||
|
||||
struct ConsoleLogFilters
|
||||
{
|
||||
bool ELF;
|
||||
BITFIELD32()
|
||||
bool
|
||||
ELF :1,
|
||||
Deci2 :1,
|
||||
StdoutEE :1,
|
||||
StdoutIOP :1;
|
||||
BITFIELD_END;
|
||||
|
||||
ConsoleLogFilters();
|
||||
void LoadSave( IniInterface& ini );
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
|
@ -597,7 +597,7 @@ void loadElfFile(const wxString& filename)
|
|||
ElfCRC = elfobj.GetCRC();
|
||||
Console.WriteLn( L"loadElfFile: %s; CRC = %8.8X", filename.c_str(), ElfCRC );
|
||||
ElfApplyPatches();
|
||||
mtgsThread.SendGameCRC( ElfCRC );
|
||||
GetMTGS().SendGameCRC( ElfCRC );
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -149,11 +149,11 @@ void __fastcall WriteFIFO_page_6(u32 mem, const mem128_t *value)
|
|||
psHu64(GIF_FIFO + 8) = value[1];
|
||||
|
||||
Registers::Freeze();
|
||||
mtgsThread.PrepDataPacket(GIF_PATH_3, nloop0_packet, 1);
|
||||
u64* data = (u64*)mtgsThread.GetDataPacketPtr();
|
||||
GetMTGS().PrepDataPacket(GIF_PATH_3, nloop0_packet, 1);
|
||||
u64* data = (u64*)GetMTGS().GetDataPacketPtr();
|
||||
data[0] = value[0];
|
||||
data[1] = value[1];
|
||||
mtgsThread.SendDataPacket();
|
||||
GetMTGS().SendDataPacket();
|
||||
Registers::Thaw();
|
||||
}
|
||||
|
||||
|
|
28
pcsx2/GS.cpp
28
pcsx2/GS.cpp
|
@ -65,7 +65,7 @@ void _gs_ChangeTimings( u32 framerate, u32 iTicks )
|
|||
|
||||
void gsOnModeChanged( u32 framerate, u32 newTickrate )
|
||||
{
|
||||
mtgsThread.SendSimplePacket( GS_RINGTYPE_MODECHANGE, framerate, newTickrate, 0 );
|
||||
GetMTGS().SendSimplePacket( GS_RINGTYPE_MODECHANGE, framerate, newTickrate, 0 );
|
||||
}
|
||||
|
||||
static bool gsIsInterlaced = false;
|
||||
|
@ -90,7 +90,7 @@ void gsInit()
|
|||
|
||||
void gsReset()
|
||||
{
|
||||
mtgsThread.ResetGS();
|
||||
GetMTGS().ResetGS();
|
||||
|
||||
gsOnModeChanged(
|
||||
(gsRegionMode == Region_NTSC) ? FRAMERATE_NTSC : FRAMERATE_PAL,
|
||||
|
@ -128,7 +128,7 @@ void gsCSRwrite(u32 value)
|
|||
}
|
||||
else
|
||||
{
|
||||
mtgsThread.SendSimplePacket( GS_RINGTYPE_RESET, 0, 0, 0 );
|
||||
GetMTGS().SendSimplePacket( GS_RINGTYPE_RESET, 0, 0, 0 );
|
||||
}
|
||||
|
||||
CSRw |= 0x1f;
|
||||
|
@ -143,7 +143,7 @@ void gsCSRwrite(u32 value)
|
|||
else
|
||||
{
|
||||
CSRw |= value & 0x1f;
|
||||
mtgsThread.SendSimplePacket( GS_RINGTYPE_WRITECSR, CSRw, 0, 0 );
|
||||
GetMTGS().SendSimplePacket( GS_RINGTYPE_WRITECSR, CSRw, 0, 0 );
|
||||
GSCSRr = ((GSCSRr&~value)&0x1f)|(GSCSRr&~0x1f);
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ __forceinline void gsWrite8(u32 mem, u8 value)
|
|||
gsCSRwrite((CSRw & ~0xff000000) | (value << 24)); break;
|
||||
default:
|
||||
*PS2GS_BASE(mem) = value;
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_MEMWRITE8, mem&0x13ff, value, 0);
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_MEMWRITE8, mem&0x13ff, value, 0);
|
||||
}
|
||||
GIF_LOG("GS write 8 at %8.8lx with data %8.8lx", mem, value);
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ __forceinline void gsWrite16(u32 mem, u16 value)
|
|||
}
|
||||
|
||||
*(u16*)PS2GS_BASE(mem) = value;
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_MEMWRITE16, mem&0x13ff, value, 0);
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_MEMWRITE16, mem&0x13ff, value, 0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -243,7 +243,7 @@ __forceinline void gsWrite32(u32 mem, u32 value)
|
|||
}
|
||||
|
||||
*(u32*)PS2GS_BASE(mem) = value;
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_MEMWRITE32, mem&0x13ff, value, 0);
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_MEMWRITE32, mem&0x13ff, value, 0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -279,7 +279,7 @@ void __fastcall gsWrite64_generic( u32 mem, const mem64_t* value )
|
|||
GIF_LOG("GS Write64 at %8.8lx with data %8.8x_%8.8x", mem, srcval32[1], srcval32[0]);
|
||||
|
||||
*(u64*)PS2GS_BASE(mem) = *value;
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_MEMWRITE64, mem&0x13ff, srcval32[0], srcval32[1]);
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_MEMWRITE64, mem&0x13ff, srcval32[0], srcval32[1]);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -320,8 +320,8 @@ void __fastcall gsWrite128_generic( u32 mem, const mem128_t* value )
|
|||
writeTo[0] = value[0];
|
||||
writeTo[1] = value[1];
|
||||
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_MEMWRITE64, masked_mem, srcval32[0], srcval32[1]);
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_MEMWRITE64, masked_mem+8, srcval32[2], srcval32[3]);
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_MEMWRITE64, masked_mem, srcval32[0], srcval32[1]);
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_MEMWRITE64, masked_mem+8, srcval32[2], srcval32[3]);
|
||||
}
|
||||
|
||||
__forceinline u8 gsRead8(u32 mem)
|
||||
|
@ -363,7 +363,7 @@ void gsSyncLimiterLostTime( s32 deltaTime )
|
|||
|
||||
//Console.WriteLn("LostTime on the EE!");
|
||||
|
||||
mtgsThread.SendSimplePacket(
|
||||
GetMTGS().SendSimplePacket(
|
||||
GS_RINGTYPE_STARTTIME,
|
||||
deltaTime,
|
||||
0,
|
||||
|
@ -507,7 +507,7 @@ __forceinline void gsFrameSkip( bool forceskip )
|
|||
void gsPostVsyncEnd( bool updategs )
|
||||
{
|
||||
*(u32*)(PS2MEM_GS+0x1000) ^= 0x2000; // swap the vsync field
|
||||
mtgsThread.PostVsyncEnd( updategs );
|
||||
GetMTGS().PostVsyncEnd( updategs );
|
||||
}
|
||||
|
||||
void _gs_ResetFrameskip()
|
||||
|
@ -518,14 +518,14 @@ void _gs_ResetFrameskip()
|
|||
// Disables the GS Frameskip at runtime without any racy mess...
|
||||
void gsResetFrameSkip()
|
||||
{
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_FRAMESKIP, 0, 0, 0);
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_FRAMESKIP, 0, 0, 0);
|
||||
}
|
||||
|
||||
void gsDynamicSkipEnable()
|
||||
{
|
||||
if( !m_StrictSkipping ) return;
|
||||
|
||||
mtgsThread.WaitGS();
|
||||
GetMTGS().WaitGS();
|
||||
m_iSlowStart = GetCPUTicks();
|
||||
frameLimitReset();
|
||||
}
|
||||
|
|
18
pcsx2/GS.h
18
pcsx2/GS.h
|
@ -84,7 +84,10 @@ struct MTGS_FreezeData
|
|||
s32 retval; // value returned from the call, valid only after an mtgsWaitGS()
|
||||
};
|
||||
|
||||
class mtgsThreadObject : public SysThreadBase
|
||||
// --------------------------------------------------------------------------------------
|
||||
// SysMtgsThread
|
||||
// --------------------------------------------------------------------------------------
|
||||
class SysMtgsThread : public SysThreadBase
|
||||
{
|
||||
typedef SysThreadBase _parent;
|
||||
|
||||
|
@ -123,10 +126,10 @@ protected:
|
|||
#endif
|
||||
|
||||
public:
|
||||
mtgsThreadObject();
|
||||
virtual ~mtgsThreadObject() throw();
|
||||
SysMtgsThread();
|
||||
virtual ~SysMtgsThread() throw();
|
||||
|
||||
static mtgsThreadObject& Get();
|
||||
static SysMtgsThread& Get();
|
||||
|
||||
// Waits for the GS to empty out the entire ring buffer contents.
|
||||
// Used primarily for plugin startup/shutdown.
|
||||
|
@ -171,7 +174,12 @@ protected:
|
|||
void ExecuteTaskInThread();
|
||||
};
|
||||
|
||||
extern __aligned16 mtgsThreadObject mtgsThread;
|
||||
// GetMtgsThread() is a required external implementation. This function is *NOT*
|
||||
// provided by the PCSX2 core library. It provides an interface for the linking User
|
||||
// Interface apps or DLLs to reference their own instance of SysMtgsThread (also allowing
|
||||
// them to extend the class and override virtual methods).
|
||||
//
|
||||
SysMtgsThread& GetMTGS();
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Generalized GS Functions and Stuff
|
||||
|
|
|
@ -99,12 +99,12 @@ static u32 WRITERING_DMA(u32 *pMem, u32 qwc)
|
|||
gifRegs->stat.APATH = GIF_APATH3;
|
||||
gifRegs->stat.OPH = 1;
|
||||
|
||||
int size = mtgsThread.PrepDataPacket(GIF_PATH_3, pMem, qwc);
|
||||
u8* pgsmem = mtgsThread.GetDataPacketPtr();
|
||||
int size = GetMTGS().PrepDataPacket(GIF_PATH_3, pMem, qwc);
|
||||
u8* pgsmem = GetMTGS().GetDataPacketPtr();
|
||||
|
||||
memcpy_aligned(pgsmem, pMem, size<<4);
|
||||
|
||||
mtgsThread.SendDataPacket();
|
||||
GetMTGS().SendDataPacket();
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,8 +59,6 @@ static const uint RingBufferSize = 1<<RingBufferSizeFactor;
|
|||
// start (the wrapping is what makes it a ringbuffer, yo!)
|
||||
static const uint RingBufferMask = RingBufferSize - 1;
|
||||
|
||||
__aligned16 mtgsThreadObject mtgsThread;
|
||||
|
||||
struct MTGS_BufferedData
|
||||
{
|
||||
u128 m_Ring[RingBufferSize];
|
||||
|
@ -84,15 +82,15 @@ extern bool renderswitch;
|
|||
std::list<uint> ringposStack;
|
||||
#endif
|
||||
|
||||
static __threadlocal mtgsThreadObject* tls_mtgsThread = NULL;
|
||||
static __threadlocal SysMtgsThread* tls_mtgsThread = NULL;
|
||||
|
||||
mtgsThreadObject& mtgsThreadObject::Get()
|
||||
SysMtgsThread& SysMtgsThread::Get()
|
||||
{
|
||||
pxAssertMsg( tls_mtgsThread != NULL, L"This function must be called from the context of a running mtgsThreadObject." );
|
||||
pxAssertMsg( tls_mtgsThread != NULL, L"This function must be called from the context of a running SysMtgsThread." );
|
||||
return *tls_mtgsThread;
|
||||
}
|
||||
|
||||
mtgsThreadObject::mtgsThreadObject() :
|
||||
SysMtgsThread::SysMtgsThread() :
|
||||
SysThreadBase()
|
||||
#ifdef RINGBUF_DEBUG_STACK
|
||||
, m_lock_Stack()
|
||||
|
@ -103,7 +101,7 @@ mtgsThreadObject::mtgsThreadObject() :
|
|||
// All other state vars are initialized by OnStart().
|
||||
}
|
||||
|
||||
void mtgsThreadObject::OnStart()
|
||||
void SysMtgsThread::OnStart()
|
||||
{
|
||||
m_PluginOpened = false;
|
||||
|
||||
|
@ -122,17 +120,17 @@ void mtgsThreadObject::OnStart()
|
|||
_parent::OnStart();
|
||||
}
|
||||
|
||||
mtgsThreadObject::~mtgsThreadObject() throw()
|
||||
SysMtgsThread::~SysMtgsThread() throw()
|
||||
{
|
||||
_parent::Cancel();
|
||||
}
|
||||
|
||||
void mtgsThreadObject::OnResumeReady()
|
||||
void SysMtgsThread::OnResumeReady()
|
||||
{
|
||||
m_sem_OpenDone.Reset();
|
||||
}
|
||||
|
||||
void mtgsThreadObject::ResetGS()
|
||||
void SysMtgsThread::ResetGS()
|
||||
{
|
||||
// MTGS Reset process:
|
||||
// * clear the ringbuffer.
|
||||
|
@ -151,7 +149,7 @@ void mtgsThreadObject::ResetGS()
|
|||
|
||||
static int alterFrameFlush = 0;
|
||||
|
||||
void mtgsThreadObject::PostVsyncEnd( bool updategs )
|
||||
void SysMtgsThread::PostVsyncEnd( bool updategs )
|
||||
{
|
||||
SendSimplePacket( GS_RINGTYPE_VSYNC, (*(u32*)(PS2MEM_GS+0x1000)&0x2000), updategs, 0 );
|
||||
if( alterFrameFlush || (m_WritePos > (RingBufferSize/3)) )
|
||||
|
@ -174,7 +172,7 @@ static void dummyIrqCallback()
|
|||
// (and zerogs does >_<)
|
||||
}
|
||||
|
||||
void mtgsThreadObject::OpenPlugin()
|
||||
void SysMtgsThread::OpenPlugin()
|
||||
{
|
||||
if( m_PluginOpened ) return;
|
||||
|
||||
|
@ -205,7 +203,7 @@ void mtgsThreadObject::OpenPlugin()
|
|||
GSsetGameCRC( ElfCRC, 0 );
|
||||
}
|
||||
|
||||
void mtgsThreadObject::ExecuteTaskInThread()
|
||||
void SysMtgsThread::ExecuteTaskInThread()
|
||||
{
|
||||
tls_mtgsThread = this;
|
||||
|
||||
|
@ -404,7 +402,7 @@ void mtgsThreadObject::ExecuteTaskInThread()
|
|||
}
|
||||
}
|
||||
|
||||
void mtgsThreadObject::ClosePlugin()
|
||||
void SysMtgsThread::ClosePlugin()
|
||||
{
|
||||
if( !m_PluginOpened ) return;
|
||||
m_PluginOpened = false;
|
||||
|
@ -412,13 +410,13 @@ void mtgsThreadObject::ClosePlugin()
|
|||
g_plugins->m_info[PluginId_GS].CommonBindings.Close();
|
||||
}
|
||||
|
||||
void mtgsThreadObject::OnSuspendInThread()
|
||||
void SysMtgsThread::OnSuspendInThread()
|
||||
{
|
||||
ClosePlugin();
|
||||
_parent::OnSuspendInThread();
|
||||
}
|
||||
|
||||
void mtgsThreadObject::OnResumeInThread( bool isSuspended )
|
||||
void SysMtgsThread::OnResumeInThread( bool isSuspended )
|
||||
{
|
||||
if( isSuspended )
|
||||
OpenPlugin();
|
||||
|
@ -426,7 +424,7 @@ void mtgsThreadObject::OnResumeInThread( bool isSuspended )
|
|||
_parent::OnResumeInThread( isSuspended );
|
||||
}
|
||||
|
||||
void mtgsThreadObject::OnCleanupInThread()
|
||||
void SysMtgsThread::OnCleanupInThread()
|
||||
{
|
||||
ClosePlugin();
|
||||
tls_mtgsThread = NULL;
|
||||
|
@ -435,7 +433,7 @@ void mtgsThreadObject::OnCleanupInThread()
|
|||
|
||||
// Waits for the GS to empty out the entire ring buffer contents.
|
||||
// Used primarily for plugin startup/shutdown.
|
||||
void mtgsThreadObject::WaitGS()
|
||||
void SysMtgsThread::WaitGS()
|
||||
{
|
||||
pxAssertDev( !IsSelf(), "This method is only allowed from threads *not* named MTGS." );
|
||||
|
||||
|
@ -453,27 +451,27 @@ void mtgsThreadObject::WaitGS()
|
|||
|
||||
// Sets the gsEvent flag and releases a timeslice.
|
||||
// For use in loops that wait on the GS thread to do certain things.
|
||||
void mtgsThreadObject::SetEvent()
|
||||
void SysMtgsThread::SetEvent()
|
||||
{
|
||||
m_sem_event.Post();
|
||||
m_CopyCommandTally = 0;
|
||||
m_CopyDataTally = 0;
|
||||
}
|
||||
|
||||
void mtgsThreadObject::PrepEventWait()
|
||||
void SysMtgsThread::PrepEventWait()
|
||||
{
|
||||
//Console.Warning( "MTGS Stall! EE waits for nothing! ... except your GPU sometimes." );
|
||||
SetEvent();
|
||||
Timeslice();
|
||||
}
|
||||
|
||||
u8* mtgsThreadObject::GetDataPacketPtr() const
|
||||
u8* SysMtgsThread::GetDataPacketPtr() const
|
||||
{
|
||||
return (u8*)&RingBuffer[m_packet_ringpos];
|
||||
}
|
||||
|
||||
// Closes the data packet send command, and initiates the gs thread (if needed).
|
||||
void mtgsThreadObject::SendDataPacket()
|
||||
void SysMtgsThread::SendDataPacket()
|
||||
{
|
||||
// make sure a previous copy block has been started somewhere.
|
||||
pxAssert( m_packet_size != 0 );
|
||||
|
@ -514,7 +512,7 @@ void mtgsThreadObject::SendDataPacket()
|
|||
//m_PacketLocker.Release();
|
||||
}
|
||||
|
||||
int mtgsThreadObject::PrepDataPacket( GIF_PATH pathidx, const u32* srcdata, u32 size )
|
||||
int SysMtgsThread::PrepDataPacket( GIF_PATH pathidx, const u32* srcdata, u32 size )
|
||||
{
|
||||
return PrepDataPacket( pathidx, (u8*)srcdata, size );
|
||||
}
|
||||
|
@ -534,7 +532,7 @@ static u32 ringtx_inf_s[32];
|
|||
// large for VU1 memory.
|
||||
// Parameters:
|
||||
// size - size of the packet data, in smd128's
|
||||
int mtgsThreadObject::PrepDataPacket( GIF_PATH pathidx, const u8* srcdata, u32 size )
|
||||
int SysMtgsThread::PrepDataPacket( GIF_PATH pathidx, const u8* srcdata, u32 size )
|
||||
{
|
||||
//m_PacketLocker.Acquire();
|
||||
|
||||
|
@ -684,7 +682,7 @@ int mtgsThreadObject::PrepDataPacket( GIF_PATH pathidx, const u8* srcdata, u32 s
|
|||
return m_packet_size;
|
||||
}
|
||||
|
||||
__forceinline uint mtgsThreadObject::_PrepForSimplePacket()
|
||||
__forceinline uint SysMtgsThread::_PrepForSimplePacket()
|
||||
{
|
||||
#ifdef RINGBUF_DEBUG_STACK
|
||||
m_lock_Stack.Lock();
|
||||
|
@ -710,7 +708,7 @@ __forceinline uint mtgsThreadObject::_PrepForSimplePacket()
|
|||
return future_writepos;
|
||||
}
|
||||
|
||||
__forceinline void mtgsThreadObject::_FinishSimplePacket( uint future_writepos )
|
||||
__forceinline void SysMtgsThread::_FinishSimplePacket( uint future_writepos )
|
||||
{
|
||||
pxAssert( future_writepos != volatize(m_RingPos) );
|
||||
m_WritePos = future_writepos;
|
||||
|
@ -723,7 +721,7 @@ __forceinline void mtgsThreadObject::_FinishSimplePacket( uint future_writepos )
|
|||
Semaphore m_sem_OnRingReset;
|
||||
u32 m_SignalRingReset;
|
||||
|
||||
void mtgsThreadObject::RestartRingbuffer()
|
||||
void SysMtgsThread::RestartRingbuffer()
|
||||
{
|
||||
if( m_WritePos == 0 ) return;
|
||||
const uint thefuture = 0;
|
||||
|
@ -777,7 +775,7 @@ void mtgsThreadObject::RestartRingbuffer()
|
|||
WaitGS();
|
||||
}
|
||||
|
||||
void mtgsThreadObject::SendSimplePacket( MTGS_RingCommand type, int data0, int data1, int data2 )
|
||||
void SysMtgsThread::SendSimplePacket( MTGS_RingCommand type, int data0, int data1, int data2 )
|
||||
{
|
||||
//ScopedLock locker( m_PacketLocker );
|
||||
|
||||
|
@ -792,7 +790,7 @@ void mtgsThreadObject::SendSimplePacket( MTGS_RingCommand type, int data0, int d
|
|||
_FinishSimplePacket( thefuture );
|
||||
}
|
||||
|
||||
void mtgsThreadObject::SendPointerPacket( MTGS_RingCommand type, u32 data0, void* data1 )
|
||||
void SysMtgsThread::SendPointerPacket( MTGS_RingCommand type, u32 data0, void* data1 )
|
||||
{
|
||||
//ScopedLock locker( m_PacketLocker );
|
||||
|
||||
|
@ -806,12 +804,12 @@ void mtgsThreadObject::SendPointerPacket( MTGS_RingCommand type, u32 data0, void
|
|||
_FinishSimplePacket( thefuture );
|
||||
}
|
||||
|
||||
void mtgsThreadObject::SendGameCRC( u32 crc )
|
||||
void SysMtgsThread::SendGameCRC( u32 crc )
|
||||
{
|
||||
SendSimplePacket( GS_RINGTYPE_CRC, crc, 0, 0 );
|
||||
}
|
||||
|
||||
void mtgsThreadObject::WaitForOpen()
|
||||
void SysMtgsThread::WaitForOpen()
|
||||
{
|
||||
if( m_PluginOpened ) return;
|
||||
Resume();
|
||||
|
@ -837,10 +835,10 @@ void mtgsThreadObject::WaitForOpen()
|
|||
}
|
||||
}
|
||||
|
||||
mtgsThread.RethrowException();
|
||||
RethrowException();
|
||||
}
|
||||
|
||||
void mtgsThreadObject::Freeze( int mode, MTGS_FreezeData& data )
|
||||
void SysMtgsThread::Freeze( int mode, MTGS_FreezeData& data )
|
||||
{
|
||||
SendPointerPacket( GS_RINGTYPE_FREEZE, mode, &data );
|
||||
Resume();
|
||||
|
|
|
@ -37,11 +37,30 @@ void TraceLogFilters::LoadSave( IniInterface& ini )
|
|||
}
|
||||
|
||||
// all speedhacks are disabled by default
|
||||
Pcsx2Config::SpeedhackOptions::SpeedhackOptions() :
|
||||
bitset( 0 )
|
||||
, EECycleRate( 0 )
|
||||
, VUCycleSteal( 0 )
|
||||
Pcsx2Config::SpeedhackOptions::SpeedhackOptions()
|
||||
{
|
||||
bitset = 0;
|
||||
EECycleRate = 0;
|
||||
VUCycleSteal = 0;
|
||||
}
|
||||
|
||||
ConsoleLogFilters::ConsoleLogFilters()
|
||||
{
|
||||
ELF = false;
|
||||
StdoutEE = true;
|
||||
StdoutIOP = true;
|
||||
Deci2 = true;
|
||||
}
|
||||
|
||||
void ConsoleLogFilters::LoadSave( IniInterface& ini )
|
||||
{
|
||||
ConsoleLogFilters defaults;
|
||||
IniScopedGroup path( ini, L"ConsoleLog" );
|
||||
|
||||
IniBitBool( ELF );
|
||||
IniBitBool( StdoutEE );
|
||||
IniBitBool( StdoutIOP );
|
||||
IniBitBool( Deci2 );
|
||||
}
|
||||
|
||||
void Pcsx2Config::SpeedhackOptions::LoadSave( IniInterface& ini )
|
||||
|
|
|
@ -859,7 +859,7 @@ extern void spu2Irq();
|
|||
|
||||
static bool OpenPlugin_GS()
|
||||
{
|
||||
mtgsThread.Resume();
|
||||
GetMTGS().Resume();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -942,10 +942,10 @@ void PluginManager::Open()
|
|||
// If GS doesn't support GSopen2, need to wait until call to GSopen
|
||||
// returns to populate pDsp. If it does, can initialize other plugins
|
||||
// at same time as GS, as long as GSopen2 does not subclass its window.
|
||||
if (pi->id == PluginId_GS && !GSopen2) mtgsThread.WaitForOpen();
|
||||
if (pi->id == PluginId_GS && !GSopen2) GetMTGS().WaitForOpen();
|
||||
} while( ++pi, pi->shortname != NULL );
|
||||
|
||||
if (GSopen2) mtgsThread.WaitForOpen();
|
||||
if (GSopen2) GetMTGS().WaitForOpen();
|
||||
|
||||
Console.WriteLn( Color_StrongBlue, "Plugins opened successfully." );
|
||||
}
|
||||
|
@ -959,7 +959,7 @@ void PluginManager::Close( PluginsEnum_t pid )
|
|||
{
|
||||
// force-close PAD before GS, because the PAD depends on the GS window.
|
||||
Close( PluginId_PAD );
|
||||
mtgsThread.Suspend();
|
||||
GetMTGS().Suspend();
|
||||
}
|
||||
else if( pid == PluginId_CDVD )
|
||||
DoCDVDclose();
|
||||
|
@ -1034,7 +1034,7 @@ void PluginManager::Init()
|
|||
//
|
||||
void PluginManager::Shutdown()
|
||||
{
|
||||
mtgsThread.Cancel(); // cancel it for speedier shutdown!
|
||||
GetMTGS().Cancel(); // cancel it for speedier shutdown!
|
||||
|
||||
Close();
|
||||
DbgCon.WriteLn( Color_StrongGreen, "Shutting down plugins..." );
|
||||
|
@ -1066,12 +1066,12 @@ void PluginManager::Shutdown()
|
|||
// Returns false if the plugin returned an error.
|
||||
bool PluginManager::DoFreeze( PluginsEnum_t pid, int mode, freezeData* data )
|
||||
{
|
||||
if( (pid == PluginId_GS) && !mtgsThread.IsSelf() )
|
||||
if( (pid == PluginId_GS) && !GetMTGS().IsSelf() )
|
||||
{
|
||||
// GS needs some thread safety love...
|
||||
|
||||
MTGS_FreezeData woot = { data, 0 };
|
||||
mtgsThread.Freeze( mode, woot );
|
||||
GetMTGS().Freeze( mode, woot );
|
||||
return woot.retval != -1;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -189,7 +189,7 @@ struct LegacyPluginAPI_Common
|
|||
};
|
||||
|
||||
class SaveStateBase;
|
||||
class mtgsThreadObject;
|
||||
class SysMtgsThread;
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// PluginBindings
|
||||
|
@ -323,7 +323,7 @@ protected:
|
|||
void BindRequired( PluginsEnum_t pid );
|
||||
void BindOptional( PluginsEnum_t pid );
|
||||
|
||||
friend class mtgsThreadObject;
|
||||
friend class SysMtgsThread;
|
||||
};
|
||||
|
||||
extern const PluginInfo tbl_PluginInfo[];
|
||||
|
|
|
@ -105,6 +105,8 @@ void __fastcall psxException(u32 code, u32 bd)
|
|||
|
||||
if (!CHECK_IOPREC)
|
||||
{
|
||||
// HLE Bios Handlers, enabled for interpreters only.
|
||||
|
||||
u32 call = psxRegs.GPR.n.t1 & 0xff;
|
||||
switch (psxRegs.pc & 0x1fffff) {
|
||||
case 0xa0:
|
||||
|
|
|
@ -49,8 +49,8 @@ R5900Exception::BaseExcept::~BaseExcept() throw (){}
|
|||
|
||||
void cpuReset()
|
||||
{
|
||||
if( mtgsThread.IsOpen() )
|
||||
mtgsThread.WaitGS(); // GS better be done processing before we reset the EE, just in case.
|
||||
if( GetMTGS().IsOpen() )
|
||||
GetMTGS().WaitGS(); // GS better be done processing before we reset the EE, just in case.
|
||||
|
||||
SysClearExecutionCache();
|
||||
|
||||
|
|
|
@ -742,6 +742,8 @@ char deci2buffer[256];
|
|||
|
||||
/*
|
||||
* int Deci2Call(int, u_int *);
|
||||
*
|
||||
* HLE implementation of the Deci2 interface.
|
||||
*/
|
||||
|
||||
int __Deci2Call(int call, u32 *addr)
|
||||
|
@ -790,7 +792,9 @@ int __Deci2Call(int call, u32 *addr)
|
|||
else
|
||||
pdeciaddr += (deci2addr[4]+0xc) % 16;
|
||||
memcpy(deci2buffer, pdeciaddr, deci2addr[1]-0xc);
|
||||
deci2buffer[deci2addr[1]-0xc>=255?255:deci2addr[1]-0xc]='\0';
|
||||
deci2buffer[(deci2addr[1]-0xc>=255) ? 255 : (deci2addr[1]-0xc)] = '\0';
|
||||
|
||||
if( EmuConfig.Log.Deci2 )
|
||||
Console.Write( ConColor_EE, L"%s", ShiftJIS_ConvertString(deci2buffer).c_str() );
|
||||
}
|
||||
deci2addr[3] = 0;
|
||||
|
@ -809,7 +813,7 @@ int __Deci2Call(int call, u32 *addr)
|
|||
return 1;
|
||||
|
||||
case 0x10://kputs
|
||||
if( addr != NULL )
|
||||
if( addr != NULL && EmuConfig.Log.Deci2 )
|
||||
Console.Write( ConColor_EE, L"%s", ShiftJIS_ConvertString((char*)PSM(*addr)).c_str() );
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -101,22 +101,42 @@ void SysCoreThread::SetElfOverride( const wxString& elf )
|
|||
m_elf_override = elf;
|
||||
}
|
||||
|
||||
ScopedCoreThreadSuspend::ScopedCoreThreadSuspend()
|
||||
{
|
||||
m_ResumeWhenDone = GetCoreThread().Suspend();
|
||||
}
|
||||
|
||||
// Resumes CoreThread execution, but *only* if it was in a running state when this object
|
||||
// was instanized. Subsequent calls to Resume() will be ignored.
|
||||
void ScopedCoreThreadSuspend::Resume()
|
||||
{
|
||||
if( m_ResumeWhenDone )
|
||||
GetCoreThread().Resume();
|
||||
m_ResumeWhenDone = false;
|
||||
}
|
||||
|
||||
ScopedCoreThreadSuspend::~ScopedCoreThreadSuspend() throw()
|
||||
{
|
||||
if( m_ResumeWhenDone )
|
||||
{
|
||||
Console.WriteLn( Color_Gray, "Scoped CoreThread suspend was not allowed to resume." );
|
||||
}
|
||||
}
|
||||
|
||||
// Applies a full suite of new settings, which will automatically facilitate the necessary
|
||||
// resets of the core and components (including plugins, if needed). The scope of resetting
|
||||
// is determined by comparing the current settings against the new settings.
|
||||
// is determined by comparing the current settings against the new settings, so that only
|
||||
// real differences are applied.
|
||||
void SysCoreThread::ApplySettings( const Pcsx2Config& src )
|
||||
{
|
||||
if( src == EmuConfig ) return;
|
||||
|
||||
const bool resumeWhenDone = Suspend();
|
||||
ScopedCoreThreadSuspend suspend_core;
|
||||
|
||||
m_resetRecompilers = ( src.Cpu != EmuConfig.Cpu ) || ( src.Gamefixes != EmuConfig.Gamefixes ) || ( src.Speedhacks != EmuConfig.Speedhacks );
|
||||
m_resetProfilers = (src.Profiler != EmuConfig.Profiler );
|
||||
|
||||
const_cast<Pcsx2Config&>(EmuConfig) = src;
|
||||
|
||||
if( resumeWhenDone ) Resume();
|
||||
}
|
||||
|
||||
void SysCoreThread::ChangeCdvdSource( CDVD_SourceType type )
|
||||
|
@ -143,7 +163,7 @@ SysCoreThread& SysCoreThread::Get()
|
|||
|
||||
bool SysCoreThread::HasPendingStateChangeRequest() const
|
||||
{
|
||||
return m_CoreCancelDamnit || mtgsThread.HasPendingException() || _parent::HasPendingStateChangeRequest();
|
||||
return m_CoreCancelDamnit || GetMTGS().HasPendingException() || _parent::HasPendingStateChangeRequest();
|
||||
}
|
||||
|
||||
struct ScopedBool_ClearOnError
|
||||
|
@ -220,7 +240,7 @@ void SysCoreThread::CpuInitializeMess()
|
|||
|
||||
void SysCoreThread::StateCheckInThread()
|
||||
{
|
||||
mtgsThread.RethrowException();
|
||||
GetMTGS().RethrowException();
|
||||
_parent::StateCheckInThread();
|
||||
if( !m_hasValidState )
|
||||
throw Exception::RuntimeError( "Invalid emulation state detected; Virtual machine threads have been cancelled." );
|
||||
|
|
|
@ -43,7 +43,7 @@ class ISysThread : public virtual IThread
|
|||
{
|
||||
public:
|
||||
ISysThread() {}
|
||||
virtual ~ISysThread() throw() {};
|
||||
virtual ~ISysThread() throw() {}
|
||||
|
||||
virtual bool Suspend( bool isBlocking = true ) { return false; }
|
||||
virtual bool Pause() { return false; }
|
||||
|
@ -58,7 +58,7 @@ class SysThreadBase : public PersistentThread, public virtual ISysThread
|
|||
{
|
||||
typedef PersistentThread _parent;
|
||||
|
||||
protected:
|
||||
public:
|
||||
// Important: The order of these enumerations matters. All "not-open" statuses must
|
||||
// be listed before ExecMode_Closed, since there are "optimized" tests that rely on the
|
||||
// assumption that "ExecMode <= ExecMode_Closed" equates to a closed thread status.
|
||||
|
@ -88,6 +88,7 @@ protected:
|
|||
ExecMode_Paused,
|
||||
};
|
||||
|
||||
protected:
|
||||
volatile ExecutionMode m_ExecMode;
|
||||
|
||||
// This lock is used to avoid simultaneous requests to Suspend/Resume/Pause from
|
||||
|
@ -176,8 +177,6 @@ protected:
|
|||
virtual void OnResumeInThread( bool isSuspended )=0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// SysCoreThread class
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -235,4 +234,33 @@ protected:
|
|||
void _StateCheckThrows();
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// ScopedCoreThreadSuspend
|
||||
// --------------------------------------------------------------------------------------
|
||||
// This class behaves a bit differently from other scoped classes due to the "standard"
|
||||
// assumption that we actually do *not* want to resume CoreThread operations when an
|
||||
// exception occurs. Because of this, the destructor of this class does *not* unroll the
|
||||
// suspend operation. Instead you must manually instruct the class to resume using a call
|
||||
// to the provisioned Resume() method.
|
||||
//
|
||||
// If the class leaves scope without having been resumed, a log is written to the console.
|
||||
// This can be useful for troubleshooting, and also allows the log a second line of info
|
||||
// indicating the status of CoreThread execution at the time of the exception.
|
||||
//
|
||||
struct ScopedCoreThreadSuspend
|
||||
{
|
||||
bool m_ResumeWhenDone;
|
||||
|
||||
ScopedCoreThreadSuspend();
|
||||
void Resume();
|
||||
virtual ~ScopedCoreThreadSuspend() throw();
|
||||
};
|
||||
|
||||
// GetCoreThread() is a required external implementation. This function is *NOT*
|
||||
// provided by the PCSX2 core library. It provides an interface for the linking User
|
||||
// Interface apps or DLLs to reference their own instance of SysCoreThread (also allowing
|
||||
// them to extend the class and override virtual methods).
|
||||
//
|
||||
extern SysCoreThread& GetCoreThread();
|
||||
|
||||
extern int sys_resume_lock;
|
||||
|
|
|
@ -2057,8 +2057,8 @@ void _vuXGKICK(VURegs * VU)
|
|||
|
||||
u8* data = ((u8*)VU->Mem + ((VU->VI[_Is_].US[0]*16) & 0x3fff));
|
||||
u32 size;
|
||||
size = mtgsThread.PrepDataPacket( GIF_PATH_1, data, (0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff)) >> 4);
|
||||
u8* pmem = mtgsThread.GetDataPacketPtr();
|
||||
size = GetMTGS().PrepDataPacket( GIF_PATH_1, data, (0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff)) >> 4);
|
||||
u8* pmem = GetMTGS().GetDataPacketPtr();
|
||||
|
||||
if((size << 4) > (u32)(0x4000-((VU->VI[_Is_].US[0]*16) & 0x3fff)))
|
||||
{
|
||||
|
@ -2072,7 +2072,7 @@ void _vuXGKICK(VURegs * VU)
|
|||
else {
|
||||
memcpy_aligned(pmem, (u8*)VU->Mem+((VU->VI[_Is_].US[0]*16) & 0x3fff), size<<4);
|
||||
}
|
||||
mtgsThread.SendDataPacket();
|
||||
GetMTGS().SendDataPacket();
|
||||
}
|
||||
|
||||
void _vuXTOP(VURegs * VU) {
|
||||
|
|
|
@ -266,12 +266,12 @@ static int __fastcall Vif1TransDirectHL(u32 *data)
|
|||
Registers::Freeze();
|
||||
// copy 16 bytes the fast way:
|
||||
const u64* src = (u64*)splittransfer[0];
|
||||
mtgsThread.PrepDataPacket(GIF_PATH_2, nloop0_packet, 1);
|
||||
u64* dst = (u64*)mtgsThread.GetDataPacketPtr();
|
||||
GetMTGS().PrepDataPacket(GIF_PATH_2, nloop0_packet, 1);
|
||||
u64* dst = (u64*)GetMTGS().GetDataPacketPtr();
|
||||
dst[0] = src[0];
|
||||
dst[1] = src[1];
|
||||
|
||||
mtgsThread.SendDataPacket();
|
||||
GetMTGS().SendDataPacket();
|
||||
Registers::Thaw();
|
||||
|
||||
if (vif1.tag.size == 0) vif1.cmd = 0;
|
||||
|
@ -308,9 +308,9 @@ static int __fastcall Vif1TransDirectHL(u32 *data)
|
|||
Registers::Freeze();
|
||||
|
||||
// Round ret up, just in case it's not 128bit aligned.
|
||||
const uint count = mtgsThread.PrepDataPacket(GIF_PATH_2, data, (ret + 3) >> 2);
|
||||
memcpy_fast(mtgsThread.GetDataPacketPtr(), data, count << 4);
|
||||
mtgsThread.SendDataPacket();
|
||||
const uint count = GetMTGS().PrepDataPacket(GIF_PATH_2, data, (ret + 3) >> 2);
|
||||
memcpy_fast(GetMTGS().GetDataPacketPtr(), data, count << 4);
|
||||
GetMTGS().SendDataPacket();
|
||||
|
||||
Registers::Thaw();
|
||||
|
||||
|
@ -730,7 +730,7 @@ void vif1TransferFromMemory()
|
|||
{
|
||||
if (size > 1)
|
||||
{
|
||||
mtgsThread.WaitGS();
|
||||
GetMTGS().WaitGS();
|
||||
GSreadFIFO((u64*)&PS2MEM_HW[0x5000]);
|
||||
}
|
||||
pMem[0] = psHu64(VIF1_FIFO);
|
||||
|
@ -740,7 +740,7 @@ void vif1TransferFromMemory()
|
|||
}
|
||||
else
|
||||
{
|
||||
mtgsThread.WaitGS();
|
||||
GetMTGS().WaitGS();
|
||||
GSreadFIFO2(pMem, vif1ch->qwc);
|
||||
|
||||
// set incase read
|
||||
|
|
|
@ -613,7 +613,7 @@ extern void UnloadPlugins();
|
|||
|
||||
extern void AppLoadSettings();
|
||||
extern void AppSaveSettings();
|
||||
extern void AppApplySettings( const AppConfig* oldconf=NULL, bool saveOnSuccess=false );
|
||||
extern void AppApplySettings( const AppConfig* oldconf=NULL );
|
||||
|
||||
extern bool SysHasValidState();
|
||||
extern void SysUpdateIsoSrcFile( const wxString& newIsoFile );
|
||||
|
@ -623,5 +623,7 @@ extern bool HasMainFrame();
|
|||
extern MainEmuFrame& GetMainFrame();
|
||||
extern MainEmuFrame* GetMainFramePtr();
|
||||
|
||||
extern AppCoreThread CoreThread;
|
||||
extern __aligned16 AppCoreThread CoreThread;
|
||||
extern __aligned16 SysMtgsThread mtgsThread;
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "Utilities/Threading.h"
|
||||
|
||||
#include "Utilities/wxGuiTools.h"
|
||||
#include "Utilities/wxHelpers.h"
|
||||
#include "Utilities/pxRadioPanel.h"
|
||||
#include "Utilities/pxCheckBox.h"
|
||||
#include "Utilities/pxStaticText.h"
|
||||
|
|
|
@ -17,10 +17,12 @@
|
|||
#include "MainFrame.h"
|
||||
#include "ps2/BiosTools.h"
|
||||
|
||||
AppCoreThread CoreThread;
|
||||
#include "GS.h"
|
||||
|
||||
__aligned16 SysMtgsThread mtgsThread;
|
||||
__aligned16 AppCoreThread CoreThread;
|
||||
|
||||
AppCoreThread::AppCoreThread() : SysCoreThread()
|
||||
, m_kevt()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -197,14 +199,12 @@ void AppCoreThread::StateCheckInThread()
|
|||
// suspended. If the thread has mot been suspended, this call will fail *silently*.
|
||||
void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
||||
{
|
||||
if( m_ExecMode != ExecMode_Closed ) return;
|
||||
//if( m_ExecMode != ExecMode_Closed ) return;
|
||||
|
||||
Pcsx2Config fixup( src );
|
||||
if( !g_Conf->EnableSpeedHacks )
|
||||
fixup.Speedhacks = Pcsx2Config::SpeedhackOptions();
|
||||
|
||||
if( fixup == EmuConfig ) return;
|
||||
|
||||
// Re-entry guard protects against cases where code wants to manually set core settings
|
||||
// which are not part of g_Conf. The subsequent call to apply g_Conf settings (which is
|
||||
// usually the desired behavior) will be ignored.
|
||||
|
@ -212,6 +212,7 @@ void AppCoreThread::ApplySettings( const Pcsx2Config& src )
|
|||
static int localc = 0;
|
||||
RecursionGuard guard( localc );
|
||||
if( guard.IsReentrant() ) return;
|
||||
if( fixup == EmuConfig ) return;
|
||||
_parent::ApplySettings( fixup );
|
||||
}
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ MainEmuFrame& Pcsx2App::GetMainFrame() const
|
|||
return *m_MainFrame;
|
||||
}
|
||||
|
||||
void AppApplySettings( const AppConfig* oldconf, bool saveOnSuccess )
|
||||
void AppApplySettings( const AppConfig* oldconf )
|
||||
{
|
||||
AllowFromMainThreadOnly();
|
||||
|
||||
|
@ -426,7 +426,7 @@ void AppApplySettings( const AppConfig* oldconf, bool saveOnSuccess )
|
|||
|
||||
RelocateLogfile();
|
||||
|
||||
bool resume = CoreThread.Suspend();
|
||||
ScopedCoreThreadSuspend suspend_core;
|
||||
|
||||
// Update the compression attribute on the Memcards folder.
|
||||
// Memcards generally compress very well via NTFS compression.
|
||||
|
@ -447,12 +447,6 @@ void AppApplySettings( const AppConfig* oldconf, bool saveOnSuccess )
|
|||
|
||||
int toSend = 0;
|
||||
sApp.Source_SettingsApplied().Dispatch( toSend );
|
||||
|
||||
if( resume )
|
||||
CoreThread.Resume();
|
||||
|
||||
if( saveOnSuccess )
|
||||
AppSaveSettings();
|
||||
}
|
||||
|
||||
static wxFileConfig _dud_config;
|
||||
|
@ -664,3 +658,13 @@ MainEmuFrame* GetMainFramePtr()
|
|||
{
|
||||
return wxTheApp ? wxGetApp().GetMainFramePtr() : NULL;
|
||||
}
|
||||
|
||||
SysCoreThread& GetCoreThread()
|
||||
{
|
||||
return CoreThread;
|
||||
}
|
||||
|
||||
SysMtgsThread& GetMTGS()
|
||||
{
|
||||
return mtgsThread;
|
||||
}
|
||||
|
|
|
@ -262,17 +262,17 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A
|
|||
m_TextCtrl.SetBackgroundColour( wxColor( 230, 235, 242 ) );
|
||||
m_TextCtrl.SetDefaultStyle( m_ColorTable[DefaultConsoleColor] );
|
||||
|
||||
wxMenu& menuLog (*new wxMenu());
|
||||
wxMenu& menuAppear (*new wxMenu());
|
||||
wxMenu& menuSources (*new wxMenu());
|
||||
wxMenu& menuFontSizes( menuAppear );
|
||||
|
||||
// create Log menu (contains most options)
|
||||
wxMenuBar *pMenuBar = new wxMenuBar();
|
||||
wxMenu& menuLog = *new wxMenu();
|
||||
menuLog.Append(wxID_SAVE, _("&Save..."), _("Save log contents to file"));
|
||||
menuLog.Append(wxID_CLEAR, _("C&lear"), _("Clear the log window contents"));
|
||||
menuLog.AppendSeparator();
|
||||
menuLog.Append(wxID_CLOSE, _("&Close"), _("Close this log window; contents are preserved"));
|
||||
SetMenuBar( pMenuBar );
|
||||
|
||||
// create Appearance menu and submenus
|
||||
|
||||
wxMenu& menuFontSizes = *new wxMenu();
|
||||
menuFontSizes.Append( MenuID_FontSize_Small, _("Small"), _("Fits a lot of log in a microcosmically small area."),
|
||||
wxITEM_RADIO )->Check( options.FontSize == 7 );
|
||||
menuFontSizes.Append( MenuID_FontSize_Normal, _("Normal"),_("It's what I use (the programmer guy)."),
|
||||
|
@ -282,14 +282,27 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A
|
|||
menuFontSizes.Append( MenuID_FontSize_Huge, _("Huge"), _("In case you have a really high res display."),
|
||||
wxITEM_RADIO )->Check( options.FontSize == 12 );
|
||||
|
||||
wxMenu& menuAppear = *new wxMenu();
|
||||
menuAppear.AppendSeparator();
|
||||
menuAppear.Append( wxID_ANY, _("Always on Top"),
|
||||
_("When checked the log window will be visible over other foreground windows."), wxITEM_CHECK );
|
||||
menuAppear.Append( wxID_ANY, _("Font Size"), &menuFontSizes );
|
||||
//menuAppear.Append( wxID_ANY, _("Font Size"), &menuFontSizes );
|
||||
|
||||
menuLog.Append(wxID_SAVE, _("&Save..."), _("Save log contents to file"));
|
||||
menuLog.Append(wxID_CLEAR, _("C&lear"), _("Clear the log window contents"));
|
||||
menuLog.AppendSeparator();
|
||||
menuLog.AppendSubMenu( &menuAppear, _("Appearance") );
|
||||
menuLog.Append(wxID_ANY, _("Show Legend"), _("Displays the console color legend.") );
|
||||
menuLog.AppendSeparator();
|
||||
menuLog.Append(wxID_CLOSE, _("&Close"), _("Close this log window; contents are preserved"));
|
||||
|
||||
// Source Selection/Toggle menu
|
||||
|
||||
m_item_Deci2 = menuSources.AppendCheckItem( wxID_ANY, _("EE Deci2"), _("Enables debug output from the EEcore.") );
|
||||
m_item_StdoutEE = menuSources.AppendCheckItem( wxID_ANY, _("EE StdOut"), _("Enables STDOUT from the EEcore.") );
|
||||
m_item_StdoutIOP= menuSources.AppendCheckItem( wxID_ANY, _("IOP StdOut"), _("Enables STDOUT from the IOP.") );
|
||||
|
||||
pMenuBar->Append(&menuLog, _("&Log"));
|
||||
pMenuBar->Append(&menuAppear, _("&Appearance"));
|
||||
SetMenuBar(pMenuBar);
|
||||
pMenuBar->Append(&menuSources, _("&Sources"));
|
||||
|
||||
// status bar for menu prompts
|
||||
CreateStatusBar();
|
||||
|
@ -306,15 +319,22 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A
|
|||
|
||||
Connect( MenuID_FontSize_Small, MenuID_FontSize_Huge, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnFontSize ) );
|
||||
|
||||
Connect( m_item_Deci2->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnLogSourceChanged ) );
|
||||
Connect( m_item_StdoutEE->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnLogSourceChanged ) );
|
||||
Connect( m_item_StdoutIOP->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ConsoleLogFrame::OnLogSourceChanged ) );
|
||||
|
||||
Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ConsoleLogFrame::OnCloseWindow) );
|
||||
Connect( wxEVT_MOVE, wxMoveEventHandler(ConsoleLogFrame::OnMoveAround) );
|
||||
Connect( wxEVT_SIZE, wxSizeEventHandler(ConsoleLogFrame::OnResize) );
|
||||
|
||||
Connect( wxEVT_SetTitleText, wxCommandEventHandler(ConsoleLogFrame::OnSetTitle) );
|
||||
Connect( wxEVT_DockConsole, wxCommandEventHandler(ConsoleLogFrame::OnDockedMove) );
|
||||
|
||||
Connect( wxEVT_FlushQueue, wxCommandEventHandler(ConsoleLogFrame::OnFlushEvent) );
|
||||
|
||||
m_item_Deci2 ->Check( g_Conf->EmuOptions.Log.Deci2 );
|
||||
m_item_StdoutEE ->Check( g_Conf->EmuOptions.Log.StdoutEE );
|
||||
m_item_StdoutIOP ->Check( g_Conf->EmuOptions.Log.StdoutIOP );
|
||||
|
||||
if( m_threadlogger != NULL )
|
||||
m_threadlogger->Start();
|
||||
}
|
||||
|
@ -500,6 +520,15 @@ void ConsoleLogFrame::OnClear(wxCommandEvent& WXUNUSED(event))
|
|||
m_TextCtrl.Clear();
|
||||
}
|
||||
|
||||
void ConsoleLogFrame::OnLogSourceChanged( wxCommandEvent& evt )
|
||||
{
|
||||
g_Conf->EmuOptions.Log.Deci2 = m_item_Deci2 ->IsChecked();
|
||||
g_Conf->EmuOptions.Log.StdoutEE = m_item_StdoutEE ->IsChecked();
|
||||
g_Conf->EmuOptions.Log.StdoutIOP= m_item_StdoutIOP ->IsChecked();
|
||||
|
||||
CoreThread.ApplySettings( g_Conf->EmuOptions );
|
||||
}
|
||||
|
||||
void ConsoleLogFrame::OnFontSize( wxCommandEvent& evt )
|
||||
{
|
||||
int ptsize = 8;
|
||||
|
|
|
@ -184,6 +184,14 @@ protected:
|
|||
// a similar effect)
|
||||
ScopedPtr<ConsoleTestThread> m_threadlogger;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Window and Menu Object Handles
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxMenuItem* m_item_Deci2;
|
||||
wxMenuItem* m_item_StdoutEE;
|
||||
wxMenuItem* m_item_StdoutIOP;
|
||||
|
||||
public:
|
||||
// ctor & dtor
|
||||
ConsoleLogFrame( MainEmuFrame *pParent, const wxString& szTitle, ConLogConfig& options );
|
||||
|
@ -206,6 +214,7 @@ protected:
|
|||
virtual void OnClear(wxCommandEvent& event);
|
||||
|
||||
void OnFontSize(wxCommandEvent& event);
|
||||
void OnLogSourceChanged(wxCommandEvent& event);
|
||||
|
||||
virtual void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#include <wx/mstream.h>
|
||||
#include <wx/hyperlink.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
namespace Dialogs
|
||||
{
|
||||
// Helper class for creating wxStaticText labels which are aligned to center.
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
# include <commctrl.h>
|
||||
#endif
|
||||
|
||||
using namespace wxHelpers;
|
||||
using namespace Panels;
|
||||
|
||||
// configure the orientation of the listbox based on the platform
|
||||
|
@ -119,7 +118,7 @@ Dialogs::ConfigurationDialog::~ConfigurationDialog() throw()
|
|||
|
||||
void Dialogs::ConfigurationDialog::OnOk_Click( wxCommandEvent& evt )
|
||||
{
|
||||
if( g_ApplyState.ApplyAll( false ) )
|
||||
if( g_ApplyState.ApplyAll() )
|
||||
{
|
||||
FindWindow( wxID_APPLY )->Disable();
|
||||
g_Conf->SettingsTabName = m_labels[m_listbook.GetSelection()];
|
||||
|
@ -138,7 +137,7 @@ void Dialogs::ConfigurationDialog::OnCancel_Click( wxCommandEvent& evt )
|
|||
|
||||
void Dialogs::ConfigurationDialog::OnApply_Click( wxCommandEvent& evt )
|
||||
{
|
||||
if( g_ApplyState.ApplyAll( false ) )
|
||||
if( g_ApplyState.ApplyAll() )
|
||||
FindWindow( wxID_APPLY )->Disable();
|
||||
|
||||
g_Conf->SettingsTabName = m_labels[m_listbook.GetSelection()];
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#include "ModalPopups.h"
|
||||
#include "Utilities/StringHelpers.h"
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
bool ConfButtons::Allows( wxWindowID id ) const
|
||||
{
|
||||
switch( id )
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "Panels/ConfigurationPanels.h"
|
||||
#include <wx/file.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
using namespace Panels;
|
||||
|
||||
template< typename T >
|
||||
|
@ -156,7 +155,7 @@ void FirstTimeWizard::OnPageChanging( wxWizardEvent& evt )
|
|||
|
||||
if( page >= 0 )
|
||||
{
|
||||
if( !g_ApplyState.ApplyPage( page, false ) )
|
||||
if( !g_ApplyState.ApplyPage( page ) )
|
||||
{
|
||||
evt.Veto();
|
||||
return;
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
|
||||
#include "ModalPopups.h"
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
|
||||
Dialogs::ImportSettingsDialog::ImportSettingsDialog( wxWindow* parent )
|
||||
: wxDialogWithHelpers( parent, wxID_ANY, _("Import Existing Settings?"), false )
|
||||
{
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <wx/statline.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
using namespace Panels;
|
||||
|
||||
Dialogs::LogOptionsDialog::LogOptionsDialog( wxWindow* parent, int id )
|
||||
|
@ -41,7 +40,7 @@ Dialogs::LogOptionsDialog::LogOptionsDialog( wxWindow* parent, int id )
|
|||
|
||||
void Dialogs::LogOptionsDialog::OnOk_Click( wxCommandEvent& evt )
|
||||
{
|
||||
if( g_ApplyState.ApplyAll( false ) )
|
||||
if( g_ApplyState.ApplyAll() )
|
||||
{
|
||||
FindWindow( wxID_APPLY )->Disable();
|
||||
AppSaveSettings();
|
||||
|
@ -53,7 +52,7 @@ void Dialogs::LogOptionsDialog::OnOk_Click( wxCommandEvent& evt )
|
|||
|
||||
void Dialogs::LogOptionsDialog::OnApply_Click( wxCommandEvent& evt )
|
||||
{
|
||||
if( g_ApplyState.ApplyAll( false ) )
|
||||
if( g_ApplyState.ApplyAll() )
|
||||
FindWindow( wxID_APPLY )->Disable();
|
||||
|
||||
AppSaveSettings();
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "App.h"
|
||||
|
||||
#include "Utilities/wxHelpers.h"
|
||||
#include "Utilities/wxGuiTools.h"
|
||||
#include "Utilities/CheckedStaticBox.h"
|
||||
#include "Utilities/HashMap.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
using namespace Panels;
|
||||
|
||||
Dialogs::PickUserModeDialog::PickUserModeDialog( wxWindow* parent, int id )
|
||||
|
|
|
@ -141,8 +141,8 @@ namespace Implementations
|
|||
{
|
||||
g_Pcsx2Recording ^= 1;
|
||||
|
||||
mtgsThread.WaitGS(); // make sure GS is in sync with the audio stream when we start.
|
||||
mtgsThread.SendSimplePacket(GS_RINGTYPE_RECORD, g_Pcsx2Recording, 0, 0);
|
||||
GetMTGS().WaitGS(); // make sure GS is in sync with the audio stream when we start.
|
||||
GetMTGS().SendSimplePacket(GS_RINGTYPE_RECORD, g_Pcsx2Recording, 0, 0);
|
||||
if( SPU2setupRecording != NULL ) SPU2setupRecording(g_Pcsx2Recording, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ wxString GetMsg_ConfirmSysReset()
|
|||
|
||||
bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames)
|
||||
{
|
||||
bool resume = CoreThread.Suspend();
|
||||
ScopedCoreThreadSuspend stopped_core;
|
||||
|
||||
if( filenames.GetCount() > 1 )
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
|
|||
sApp.SysExecute( g_Conf->CdvdSource, g_Conf->CurrentELF );
|
||||
}
|
||||
|
||||
if( resume ) CoreThread.Resume();
|
||||
stopped_core.Resume();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -132,6 +132,6 @@ bool IsoDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filen
|
|||
}
|
||||
|
||||
_closefile( iso.handle );
|
||||
if( resume ) CoreThread.Resume();
|
||||
stopped_core.Resume();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -102,8 +102,8 @@ namespace Panels
|
|||
|
||||
void StartBook( wxBookCtrlBase* book );
|
||||
void StartWizard();
|
||||
bool ApplyAll( bool saveOnSuccess=true );
|
||||
bool ApplyPage( int pageid, bool saveOnSuccess=true );
|
||||
bool ApplyAll();
|
||||
bool ApplyPage( int pageid );
|
||||
void DoCleanup() throw();
|
||||
};
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <wx/filepicker.h>
|
||||
#include <wx/listbox.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
Panels::BaseSelectorPanel::BaseSelectorPanel( wxWindow* parent )
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#include <wx/dir.h>
|
||||
#include <wx/filepicker.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
static wxString GetNormalizedConfigFolder( FoldersEnum_t folderId )
|
||||
{
|
||||
const bool isDefault = g_Conf->Folders.IsDefault( folderId );
|
||||
|
@ -121,7 +119,7 @@ Panels::DirPickerPanel::DirPickerPanel( wxWindow* parent, FoldersEnum_t folderid
|
|||
|
||||
Panels::DirPickerPanel& Panels::DirPickerPanel::SetStaticDesc( const wxString& msg )
|
||||
{
|
||||
InsertStaticTextAt( this, *GetSizer(), 0, msg );
|
||||
(new pxStaticText( this, msg ))->InsertAt( *GetSizer(), 0 );
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
#include "ConfigurationPanels.h"
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
|
||||
BaseApplicableConfigPanel( parent )
|
||||
{
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <wx/stdpaths.h>
|
||||
#include <wx/bookctrl.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
|
||||
Panels::StaticApplyState Panels::g_ApplyState;
|
||||
|
||||
|
@ -59,7 +58,7 @@ void Panels::StaticApplyState::StartWizard()
|
|||
// Returns false if one of the panels fails input validation (in which case dialogs
|
||||
// should not be closed, etc).
|
||||
//
|
||||
bool Panels::StaticApplyState::ApplyPage( int pageid, bool saveOnSuccess )
|
||||
bool Panels::StaticApplyState::ApplyPage( int pageid )
|
||||
{
|
||||
bool retval = true;
|
||||
|
||||
|
@ -87,7 +86,7 @@ bool Panels::StaticApplyState::ApplyPage( int pageid, bool saveOnSuccess )
|
|||
|
||||
// Note: apply first, then save -- in case the apply fails.
|
||||
|
||||
AppApplySettings( &confcopy, saveOnSuccess );
|
||||
AppApplySettings( &confcopy );
|
||||
}
|
||||
catch( Exception::CannotApplySettings& ex )
|
||||
{
|
||||
|
@ -121,9 +120,9 @@ bool Panels::StaticApplyState::ApplyPage( int pageid, bool saveOnSuccess )
|
|||
|
||||
// Returns false if one of the panels fails input validation (in which case dialogs
|
||||
// should not be closed, etc).
|
||||
bool Panels::StaticApplyState::ApplyAll( bool saveOnSuccess )
|
||||
bool Panels::StaticApplyState::ApplyAll()
|
||||
{
|
||||
return ApplyPage( -1, saveOnSuccess );
|
||||
return ApplyPage( -1 );
|
||||
}
|
||||
|
||||
void Panels::BaseApplicableConfigPanel::SetFocusToMe()
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <wx/stdpaths.h>
|
||||
|
||||
using namespace wxHelpers;
|
||||
static const int BetweenFolderSpace = 5;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
|
@ -31,7 +31,6 @@ static const bool DisableThreading =
|
|||
false;
|
||||
#endif
|
||||
|
||||
using namespace wxHelpers;
|
||||
using namespace pxSizerFlags;
|
||||
using namespace Threading;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include "System.h"
|
||||
|
||||
using namespace wxHelpers;
|
||||
using namespace pxSizerFlags;
|
||||
|
||||
static int pxGetTextHeight( const wxWindow* wind, int rows )
|
||||
|
|
|
@ -414,5 +414,5 @@ __forceinline void GIFPath_Clear( GIF_PATH pathidx )
|
|||
{
|
||||
memzero(s_gifPath.path[pathidx]);
|
||||
if( GSgifSoftReset == NULL ) return;
|
||||
mtgsThread.SendSimplePacket( GS_RINGTYPE_SOFTRESET, (1<<pathidx), 0, 0 );
|
||||
GetMTGS().SendSimplePacket( GS_RINGTYPE_SOFTRESET, (1<<pathidx), 0, 0 );
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ void __fastcall iopHwWrite8_Page3( u32 addr, mem8_t val )
|
|||
( val == '\n' && g_pbufi != 0 ) )
|
||||
{
|
||||
g_pbuf[g_pbufi] = 0;
|
||||
Console.WriteLn( ConColor_IOP, "%s", g_pbuf );
|
||||
Console.WriteLn( ConColor_IOP, L"%s", L"%s", ShiftJIS_ConvertString(g_pbuf).c_str() );
|
||||
g_pbufi = 0;
|
||||
}
|
||||
else if( val != '\n' )
|
||||
|
|
|
@ -1106,8 +1106,8 @@ void __fastcall mVU_XGKICK_(u32 addr) {
|
|||
addr &= 0x3ff;
|
||||
u8* data = microVU1.regs->Mem + (addr*16);
|
||||
u32 diff = 0x400 - addr;
|
||||
u32 size = mtgsThread.PrepDataPacket(GIF_PATH_1, data, diff);
|
||||
u8* pDest = mtgsThread.GetDataPacketPtr();
|
||||
u32 size = GetMTGS().PrepDataPacket(GIF_PATH_1, data, diff);
|
||||
u8* pDest = GetMTGS().GetDataPacketPtr();
|
||||
|
||||
if (size > diff) {
|
||||
// fixme: one of these days the following *16's will get cleaned up when we introduce
|
||||
|
@ -1121,7 +1121,7 @@ void __fastcall mVU_XGKICK_(u32 addr) {
|
|||
else {
|
||||
memcpy_aligned(pDest, microVU1.regs->Mem + (addr*16), size*16);
|
||||
}
|
||||
mtgsThread.SendDataPacket();
|
||||
GetMTGS().SendDataPacket();
|
||||
}
|
||||
|
||||
microVUt(void) mVU_XGKICK_DELAY(mV, bool memVI) {
|
||||
|
|
|
@ -1974,10 +1974,10 @@ void __fastcall VU1XGKICK_MTGSTransfer(u32 *pMem, u32 addr)
|
|||
u32 size;
|
||||
u8* data = ((u8*)pMem + (addr&0x3fff));
|
||||
|
||||
size = mtgsThread.PrepDataPacket(GIF_PATH_1, data, (0x4000-(addr&0x3fff)) / 16);
|
||||
size = GetMTGS().PrepDataPacket(GIF_PATH_1, data, (0x4000-(addr&0x3fff)) / 16);
|
||||
jASSUME( size > 0 );
|
||||
|
||||
u8* pmem = mtgsThread.GetDataPacketPtr();
|
||||
u8* pmem = GetMTGS().GetDataPacketPtr();
|
||||
|
||||
if((size << 4) > (0x4000-(addr&0x3fff)))
|
||||
{
|
||||
|
@ -1992,6 +1992,6 @@ void __fastcall VU1XGKICK_MTGSTransfer(u32 *pMem, u32 addr)
|
|||
memcpy_aligned(pmem, (u8*)pMem+addr, size<<4);
|
||||
}
|
||||
|
||||
mtgsThread.SendDataPacket();
|
||||
GetMTGS().SendDataPacket();
|
||||
}
|
||||
//------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue