Merge pull request #56 from elisha464/master

changed RSXThread to use the IO Memory

The datatype args didn't work for a certain part of RSXThread, because it tried to read from memory directly, but I needed it to you se read32 of the memorybase so it can reach the virtual memory block and in the end the real address.
This commit is contained in:
Alexandro Sánchez Bach 2014-01-23 16:35:47 -08:00
commit 09387879a0
2 changed files with 200 additions and 198 deletions

File diff suppressed because it is too large Load diff

View file

@ -307,7 +307,7 @@ void RSXDebugger::GoToGet(wxCommandEvent& event)
{ {
if (!RSXReady()) return; if (!RSXReady()) return;
CellGcmControl* ctrl = (CellGcmControl*)&Memory[Emu.GetGSManager().GetRender().m_ctrlAddress]; CellGcmControl* ctrl = (CellGcmControl*)&Memory[Emu.GetGSManager().GetRender().m_ctrlAddress];
m_addr = Emu.GetGSManager().GetRender().m_ioAddress + re(ctrl->get); m_addr = Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + re(ctrl->get));
t_addr->SetValue(wxString::Format("%08x", m_addr)); t_addr->SetValue(wxString::Format("%08x", m_addr));
UpdateInformation(); UpdateInformation();
event.Skip(); event.Skip();
@ -317,7 +317,7 @@ void RSXDebugger::GoToPut(wxCommandEvent& event)
{ {
if (!RSXReady()) return; if (!RSXReady()) return;
CellGcmControl* ctrl = (CellGcmControl*)&Memory[Emu.GetGSManager().GetRender().m_ctrlAddress]; CellGcmControl* ctrl = (CellGcmControl*)&Memory[Emu.GetGSManager().GetRender().m_ctrlAddress];
m_addr = Emu.GetGSManager().GetRender().m_ioAddress + re(ctrl->put); m_addr = Memory.RSXIOMem.getRealAddr(Memory.RSXIOMem.GetStartAddr() + re(ctrl->put));
t_addr->SetValue(wxString::Format("%08x", m_addr)); t_addr->SetValue(wxString::Format("%08x", m_addr));
UpdateInformation(); UpdateInformation();
event.Skip(); event.Skip();
@ -340,7 +340,7 @@ void RSXDebugger::GetMemory()
for(u32 i=0; i<m_item_count; i++) for(u32 i=0; i<m_item_count; i++)
m_list_commands->SetItem(i, 2, wxEmptyString); m_list_commands->SetItem(i, 2, wxEmptyString);
u32 ioAddr = RSXReady() ? Emu.GetGSManager().GetRender().m_ioAddress : 0; u32 ioAddr = RSXReady() ? Memory.RSXIOMem.GetStartAddr() : 0;
// Write information // Write information
for(u32 i=0, addr = m_addr; i<m_item_count; i++, addr += 4) for(u32 i=0, addr = m_addr; i<m_item_count; i++, addr += 4)