rpcsx/rpcs3/Emu/ARMv7/ARMv7Thread.cpp
Alexandro Sánchez Bach 5e1a958ee6 New debugging features, cellGame & minor changes
Two cellGame functions partially implemented:
- cellGameGetParamInt
- cellGameGetParamString

New debugging features:
- Call Stack viewer added
- Memory Viewer rewritten (Not finished yet)

Modified definition of UNIMPLEMENTED_FUNC to improve compatibility with
other compilers: Thanks @krofna

Replaced the "Compiler" menu entry with "Tools" and "Memory Viewer"
entry added.

NOTE: To "quickly" browse the memory using the Memory Viewer you can use
the scrollbar. Notice the irony of the word 'quickly' since the memory
viewer is actually slow as fuck. I will fix that soon. As you can see,
I'd like to add a Raw image viewer in the future in order to "see"
textures directly from memory.
2013-11-23 05:47:19 +01:00

96 lines
1.5 KiB
C++

#include "stdafx.h"
#include "ARMv7Thread.h"
#include "ARMv7Decoder.h"
#include "ARMv7DisAsm.h"
#include "ARMv7Interpreter.h"
ARMv7Thread::ARMv7Thread() : CPUThread(CPU_THREAD_ARMv7)
{
}
void ARMv7Thread::InitRegs()
{
memset(GPR, 0, sizeof(GPR[0]) * 15);
APSR.APSR = 0;
IPSR.IPSR = 0;
SP = m_stack_point;
}
void ARMv7Thread::InitStack()
{
if(!m_stack_addr)
{
m_stack_size = 0x10000;
m_stack_addr = Memory.Alloc(0x10000, 1);
}
m_stack_point = m_stack_addr + m_stack_size;
}
u64 ARMv7Thread::GetFreeStackSize() const
{
return SP - GetStackAddr();
}
void ARMv7Thread::SetArg(const uint pos, const u64 arg)
{
assert(0);
}
wxString ARMv7Thread::RegsToString()
{
wxString result = "Registers:\n=========\n";
for(int i=0; i<15; ++i)
{
result += wxString::Format("%s\t= 0x%08x\n", g_arm_reg_name[i], GPR[i]);
}
result += wxString::Format("APSR\t= 0x%08x [N: %d, Z: %d, C: %d, V: %d, Q: %d]\n", APSR.APSR, APSR.N, APSR.Z, APSR.C, APSR.V, APSR.Q);
return result;
}
wxString ARMv7Thread::ReadRegString(wxString reg)
{
return wxEmptyString;
}
bool ARMv7Thread::WriteRegString(wxString reg, wxString value)
{
return true;
}
void ARMv7Thread::DoReset()
{
}
void ARMv7Thread::DoRun()
{
switch(Ini.CPUDecoderMode.GetValue())
{
case 0:
//m_dec = new ARMv7Decoder(*new ARMv7DisAsm());
break;
case 1:
case 2:
m_dec = new ARMv7Decoder(*new ARMv7Interpreter(*this));
break;
}
}
void ARMv7Thread::DoPause()
{
}
void ARMv7Thread::DoResume()
{
}
void ARMv7Thread::DoStop()
{
}
void ARMv7Thread::DoCode()
{
}