(assorted cleanup and reindent that didn't belong in the quantizer change)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4855 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2010-01-16 19:01:00 +00:00
parent 1848e93790
commit 901316e61b
4 changed files with 1245 additions and 1257 deletions

File diff suppressed because it is too large Load Diff

View File

@ -458,6 +458,11 @@ public:
// SSE/SSE2: Useful alternative to shuffle in some cases. // SSE/SSE2: Useful alternative to shuffle in some cases.
void MOVDDUP(X64Reg regOp, OpArg arg); void MOVDDUP(X64Reg regOp, OpArg arg);
// THESE TWO ARE NEW AND UNTESTED
void UNPCKLPS(X64Reg dest, OpArg src);
void UNPCKHPS(X64Reg dest, OpArg src);
// These are OK.
void UNPCKLPD(X64Reg dest, OpArg src); void UNPCKLPD(X64Reg dest, OpArg src);
void UNPCKHPD(X64Reg dest, OpArg src); void UNPCKHPD(X64Reg dest, OpArg src);

View File

@ -44,13 +44,13 @@ public:
const std::string& GetDeviceName() const { return m_Name; } const std::string& GetDeviceName() const { return m_Name; }
u32 GetDeviceID() const { return m_DeviceID; } u32 GetDeviceID() const { return m_DeviceID; }
virtual bool Open(u32 _CommandAddress, u32 _Mode) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Open()", m_Name.c_str()); m_Active = true; return true; } virtual bool Open(u32 _CommandAddress, u32 _Mode) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s does not support Open()", m_Name.c_str()); m_Active = true; return true; }
virtual bool Close(u32 _CommandAddress, bool _bForce = false) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Close()", m_Name.c_str()); m_Active = false; return true; } virtual bool Close(u32 _CommandAddress, bool _bForce = false) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s does not support Close()", m_Name.c_str()); m_Active = false; return true; }
virtual bool Seek(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Seek()", m_Name.c_str()); return true; } virtual bool Seek(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s does not support Seek()", m_Name.c_str()); return true; }
virtual bool Read(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Read()", m_Name.c_str()); return true; } virtual bool Read(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s does not support Read()", m_Name.c_str()); return true; }
virtual bool Write(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Write()", m_Name.c_str()); return true; } virtual bool Write(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s does not support Write()", m_Name.c_str()); return true; }
virtual bool IOCtl(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run IOCtl()", m_Name.c_str()); return true; } virtual bool IOCtl(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s does not support IOCtl()", m_Name.c_str()); return true; }
virtual bool IOCtlV(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run IOCtlV()", m_Name.c_str()); return true; } virtual bool IOCtlV(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s does not support IOCtlV()", m_Name.c_str()); return true; }
virtual u32 Update() { return 0; } virtual u32 Update() { return 0; }
@ -160,7 +160,6 @@ protected:
GENERIC_LOG(LogType, Verbosity, "======= DumpAsync ======"); GENERIC_LOG(LogType, Verbosity, "======= DumpAsync ======");
u32 BufferOffset = BufferVector; u32 BufferOffset = BufferVector;
for (u32 i = 0; i < NumberInBuffer; i++) for (u32 i = 0; i < NumberInBuffer; i++)
{ {
u32 InBuffer = Memory::Read_U32(BufferOffset); BufferOffset += 4; u32 InBuffer = Memory::Read_U32(BufferOffset); BufferOffset += 4;

View File

@ -40,7 +40,6 @@
// ugly that this lib included code from the main // ugly that this lib included code from the main
#include "../../DolphinWX/Src/Globals.h" #include "../../DolphinWX/Src/Globals.h"
enum enum
{ {
IDM_MEM_ADDRBOX = 350, IDM_MEM_ADDRBOX = 350,
@ -57,22 +56,22 @@ enum
}; };
BEGIN_EVENT_TABLE(CMemoryWindow, wxPanel) BEGIN_EVENT_TABLE(CMemoryWindow, wxPanel)
EVT_TEXT(IDM_MEM_ADDRBOX, CMemoryWindow::OnAddrBoxChange) EVT_TEXT(IDM_MEM_ADDRBOX, CMemoryWindow::OnAddrBoxChange)
EVT_LISTBOX(IDM_SYMBOLLIST, CMemoryWindow::OnSymbolListChange) EVT_LISTBOX(IDM_SYMBOLLIST, CMemoryWindow::OnSymbolListChange)
EVT_HOST_COMMAND(wxID_ANY, CMemoryWindow::OnHostMessage) EVT_HOST_COMMAND(wxID_ANY, CMemoryWindow::OnHostMessage)
EVT_BUTTON(IDM_SETVALBUTTON, CMemoryWindow::SetMemoryValue) EVT_BUTTON(IDM_SETVALBUTTON, CMemoryWindow::SetMemoryValue)
EVT_BUTTON(IDM_DUMP_MEMORY, CMemoryWindow::OnDumpMemory) EVT_BUTTON(IDM_DUMP_MEMORY, CMemoryWindow::OnDumpMemory)
EVT_CHECKBOX(IDM_U8 , CMemoryWindow::U8) EVT_CHECKBOX(IDM_U8 , CMemoryWindow::U8)
EVT_CHECKBOX(IDM_U16 , CMemoryWindow::U16) EVT_CHECKBOX(IDM_U16 , CMemoryWindow::U16)
EVT_CHECKBOX(IDM_U32 , CMemoryWindow::U32) EVT_CHECKBOX(IDM_U32 , CMemoryWindow::U32)
EVT_BUTTON(IDM_SEARCH , CMemoryWindow::onSearch) EVT_BUTTON(IDM_SEARCH , CMemoryWindow::onSearch)
EVT_CHECKBOX(IDM_ASCII , CMemoryWindow::onAscii) EVT_CHECKBOX(IDM_ASCII , CMemoryWindow::onAscii)
EVT_CHECKBOX(IDM_HEX , CMemoryWindow::onHex) EVT_CHECKBOX(IDM_HEX , CMemoryWindow::onHex)
END_EVENT_TABLE() END_EVENT_TABLE()
CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id, CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
const wxString& title, const wxPoint& pos, const wxSize& size, long style) const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxPanel(parent, id, pos, size, style) : wxPanel(parent, id, pos, size, style)
{ {
wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* sizerBig = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sizerRight = new wxBoxSizer(wxVERTICAL);
@ -199,7 +198,7 @@ void CMemoryWindow::NotifyMapLoaded()
symbols->Show(false); // hide it for faster filling symbols->Show(false); // hide it for faster filling
symbols->Clear(); symbols->Clear();
/* /*
#ifdef _WIN32 #ifdef _WIN32
const FunctionDB::XFuncMap &syms = g_symbolDB.Symbols(); const FunctionDB::XFuncMap &syms = g_symbolDB.Symbols();
for (FuntionDB::XFuncMap::iterator iter = syms.begin(); iter != syms.end(); ++iter) for (FuntionDB::XFuncMap::iterator iter = syms.begin(); iter != syms.end(); ++iter)
{ {
@ -208,8 +207,8 @@ void CMemoryWindow::NotifyMapLoaded()
} }
// //
#endif #endif
*/ */
symbols->Show(true); symbols->Show(true);
Update(); Update();
} }
@ -274,58 +273,46 @@ void CMemoryWindow::OnDumpMemory( wxCommandEvent& event )
} }
void CMemoryWindow::U8(wxCommandEvent& event){ void CMemoryWindow::U8(wxCommandEvent& event) {
chk16->SetValue(0); chk16->SetValue(0);
chk32->SetValue(0); chk32->SetValue(0);
memview->dataType =0; memview->dataType = 0;
memview->Refresh(); memview->Refresh();
} }
void CMemoryWindow::U16(wxCommandEvent& event){ void CMemoryWindow::U16(wxCommandEvent& event) {
chk8->SetValue(0); chk8->SetValue(0);
chk32->SetValue(0); chk32->SetValue(0);
memview->dataType =1; memview->dataType = 1;
memview->Refresh(); memview->Refresh();
} }
void CMemoryWindow::U32(wxCommandEvent& event){ void CMemoryWindow::U32(wxCommandEvent& event) {
chk16->SetValue(0); chk16->SetValue(0);
chk8->SetValue(0); chk8->SetValue(0);
memview->dataType =2; memview->dataType = 2;
memview->Refresh(); memview->Refresh();
} }
void CMemoryWindow::onSearch(wxCommandEvent& event){ void CMemoryWindow::onSearch(wxCommandEvent& event) {
u8* TheRAM=0; u8* TheRAM=0;
u32 szRAM=0; u32 szRAM=0;
switch (memview->GetMemoryType()) switch (memview->GetMemoryType())
{ {
case 0: case 0:
default: default:
{
if (Memory::m_pRAM) if (Memory::m_pRAM)
{ {
TheRAM=Memory::m_pRAM; TheRAM=Memory::m_pRAM;
szRAM=Memory::REALRAM_SIZE; szRAM=Memory::REALRAM_SIZE;
}
} }
break; break;
case 1: case 1:
{ {
u8* aram = DSP::GetARAMPtr(); u8* aram = DSP::GetARAMPtr();
if (aram) if (aram)
{ {
TheRAM=aram; TheRAM=aram;
szRAM=DSP::ARAM_SIZE; szRAM=DSP::ARAM_SIZE;
} }
} }
break; break;
} }
@ -342,20 +329,20 @@ void CMemoryWindow::onSearch(wxCommandEvent& event){
long newsize=0; long newsize=0;
unsigned char *tmp2=0; unsigned char *tmp2=0;
char* tmpstr=0; char* tmpstr=0;
switch(chkHex->GetValue()){ switch (chkHex->GetValue()){
case 1://We are looking for hex case 1://We are looking for hex
//If it's uneven //If it's uneven
size=(rawData.size()/2) + pad; size=(rawData.size()/2) + pad;
Dest.resize(size+32); Dest.resize(size+32);
newsize=rawData.size(); newsize=rawData.size();
if(pad){ if (pad) {
tmpstr=new char[newsize+2]; tmpstr = new char[newsize + 2];
memset(tmpstr,0,newsize+2); memset(tmpstr, 0, newsize + 2);
tmpstr[0]='0'; tmpstr[0]='0';
}else{ } else {
tmpstr=new char[newsize+1]; tmpstr = new char[newsize + 1];
memset(tmpstr,0,newsize+1); memset(tmpstr, 0, newsize + 1);
} }
//sprintf(tmpstr,"%s%s",tmpstr,rawData.c_str()); //sprintf(tmpstr,"%s%s",tmpstr,rawData.c_str());
//strcpy(&tmpstr[1],rawData.ToAscii()); //strcpy(&tmpstr[1],rawData.ToAscii());
@ -393,14 +380,11 @@ void CMemoryWindow::onSearch(wxCommandEvent& event){
unsigned char* pnt=&Dest.front(); unsigned char* pnt=&Dest.front();
unsigned int k=0; unsigned int k=0;
//grab //grab
wxString txt = addrbox->GetValue(); wxString txt = addrbox->GetValue();
u32 addr=0; u32 addr=0;
if (txt.size()) if (txt.size())
{ {
sscanf(txt.mb_str(), "%08x", &addr); sscanf(txt.mb_str(), "%08x", &addr);
} }
i=addr+4; i=addr+4;
for(;szRAM;i++){ for(;szRAM;i++){
@ -411,8 +395,6 @@ void CMemoryWindow::onSearch(wxCommandEvent& event){
k=0; k=0;
break; break;
} }
} }
if(k==size){ if(k==size){
//Match was found //Match was found
@ -426,20 +408,15 @@ void CMemoryWindow::onSearch(wxCommandEvent& event){
OnAddrBoxChange(event); OnAddrBoxChange(event);
return; return;
} }
} }
wxMessageBox(_T("No match was found.")); wxMessageBox(_T("No match was found."));
} }
} }
void CMemoryWindow::onAscii(wxCommandEvent& event){
chkHex->SetValue(0);
void CMemoryWindow::onAscii(wxCommandEvent& event) {
chkHex->SetValue(0);
} }
void CMemoryWindow::onHex(wxCommandEvent& event){
chkAscii->SetValue(0);
void CMemoryWindow::onHex(wxCommandEvent& event) {
chkAscii->SetValue(0);
} }