RSX Debugger, Mem. Viewer and module improvements

* Small cleanup in cellJpgDec and cellPngDec.
* cellPamf added to the project and a few test lines added to
cellPamfGetHeaderSize(2).
* Improved speed of the Raw Image Preview on the the Memory Viewer.
* Now you can click on the shown buffers / textures in the RSX Debugger
in order to see them in full size. More settings added to the tabs.
* Fixed cellFsStat in order to fix the crash aused by opening
directiories. The solution is really *really* ugly. Once vfsDir is
ready, I will replace it with something better.
This commit is contained in:
Alexandro Sánchez Bach 2014-01-05 00:45:44 +01:00
parent 1a43fe5ceb
commit aa9b0d0a31
10 changed files with 173 additions and 105 deletions

View File

@ -126,21 +126,16 @@ int cellJpgDecDestroy(u32 mainHandle)
return CELL_OK;
}
int cellJpgDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, mem_ptr_t<CellJpgDecOpnInfo> openInfo)
int cellJpgDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellJpgDecSrc> src, mem_ptr_t<CellJpgDecOpnInfo> openInfo)
{
//u32 srcSelect = Memory.Read32(src_addr);
u32 fileName = Memory.Read32(src_addr+4);
//u32 fileOffset = Memory.Read32(src_addr+8);
//u32 fileSize = Memory.Read32(src_addr+12);
//u32 streamPtr = Memory.Read32(src_addr+16);
//u32 streamSize = Memory.Read32(src_addr+20);
//u32 spuThreadEnable = Memory.Read32(src_addr+24);
cellJpgDec.Warning("cellJpgDecOpen(mainHandle=0x%x, subHandle=0x%x, src_addr=0x%x, openInfo=0x%x)",
mainHandle, subHandle.GetAddr(), src.GetAddr(), openInfo);
CellJpgDecSubHandle *current_subHandle = new CellJpgDecSubHandle;
// Get file descriptor
MemoryAllocator<be_t<u32>> fd;
int ret = cellFsOpen(fileName, 0, fd, NULL, 0);
int ret = cellFsOpen(src->fileName, 0, fd, NULL, 0);
current_subHandle->fd = fd->ToLE();
if(ret != CELL_OK) return CELL_JPGDEC_ERROR_OPEN_FILE;

View File

@ -17,15 +17,21 @@ enum
CELL_PAMF_ERROR_EP_NOT_FOUND = 0x80610507,
};
int cellPamfGetHeaderSize()
int cellPamfGetHeaderSize(mem8_ptr_t pAddr, u64 fileSize, mem64_t pSize)
{
UNIMPLEMENTED_FUNC(cellPamf);
cellPamf.Warning("cellPamfGetHeaderSize(pAddr=0x%x, fileSize=%d, pSize_addr=0x%x)",
pAddr.GetAddr(), fileSize, pSize.GetAddr());
pSize = 2048; // PAMF headers seem to be always 2048 bytes in size
return CELL_OK;
}
int cellPamfGetHeaderSize2()
int cellPamfGetHeaderSize2(mem8_ptr_t pAddr, u64 fileSize, u32 attribute, mem64_t pSize)
{
UNIMPLEMENTED_FUNC(cellPamf);
cellPamf.Warning("cellPamfGetHeaderSize2(pAddr=0x%x, fileSize=%d, attribute=%d, pSize_addr=0x%x)",
pAddr.GetAddr(), fileSize, attribute, pSize.GetAddr());
pSize = 2048; // PAMF headers seem to be always 2048 bytes in size
return CELL_OK;
}

View File

@ -123,13 +123,10 @@ int cellPngDecDestroy(u32 mainHandle)
return CELL_OK;
}
int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, u32 src_addr, u32 openInfo)
int cellPngDecOpen(u32 mainHandle, mem32_t subHandle, mem_ptr_t<CellPngDecSrc> src, u32 openInfo)
{
cellPngDec.Warning("cellPngDecOpen(mainHandle=0x%x,subHandle=0x%x,src_addr=0x%x,openInfo=0x%x)", mainHandle, subHandle.GetAddr(), src_addr, openInfo);
CellPngDecSrc* src;
src = (CellPngDecSrc*)Memory.GetMemFromAddr(src_addr);
cellPngDec.Warning("cellPngDecOpen(mainHandle=0x%x, subHandle=0x%x, src_addr=0x%x, openInfo=0x%x)",
mainHandle, subHandle.GetAddr(), src.GetAddr(), openInfo);
CellPngDecSubHandle *current_subHandle = new CellPngDecSubHandle;

View File

@ -177,7 +177,7 @@ int cellFsClosedir(u32 fd)
int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb)
{
const wxString& path = Memory.ReadString(path_addr);
sys_fs.Log("cellFsFstat(path: %s, sb_addr: 0x%x)", path.mb_str(), sb.GetAddr());
sys_fs.Log("cellFsStat(path: %s, sb_addr: 0x%x)", path.mb_str(), sb.GetAddr());
sb->st_mode =
CELL_FS_S_IRUSR | CELL_FS_S_IWUSR | CELL_FS_S_IXUSR |
@ -196,23 +196,35 @@ int cellFsStat(const u32 path_addr, mem_ptr_t<CellFsStat> sb)
{
if(path.CmpNoCase(Emu.GetVFS().m_devices[i].GetPs3Path().RemoveLast(1)) == 0)
{
sys_fs.Log("cellFsFstat: '%s' is a mount point.", path.mb_str());
sys_fs.Log("cellFsStat: '%s' is a mount point.", path.mb_str());
sb->st_mode |= CELL_FS_S_IFDIR;
return CELL_OK;
}
}
vfsFile f(path);
if(!f.IsOpened())
// TODO: Temporary solution until vfsDir is implemented
wxString real_path;
Emu.GetVFS().GetDevice(path, real_path);
struct stat s;
if(stat(real_path.c_str(), &s) == 0)
{
sys_fs.Warning("cellFsFstat: '%s' not found.", path.mb_str());
if(s.st_mode & S_IFDIR)
{
sb->st_mode |= CELL_FS_S_IFDIR;
}
else if(s.st_mode & S_IFREG)
{
vfsFile f(path);
sb->st_mode |= CELL_FS_S_IFREG;
sb->st_size = f.GetSize();
}
}
else
{
sys_fs.Warning("cellFsStat: '%s' not found.", path.mb_str());
return CELL_ENOENT;
}
sb->st_mode |= CELL_FS_S_IFREG; //TODO: dir CELL_FS_S_IFDIR
sb->st_size = f.GetSize();
return CELL_OK;
}

View File

@ -61,6 +61,7 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
cbox_img_mode->Append("RGB");
cbox_img_mode->Append("ARGB");
cbox_img_mode->Append("RGBA");
cbox_img_mode->Append("ABGR");
cbox_img_mode->Select(1); //ARGB
s_tools_img_mode.Add(cbox_img_mode);
@ -119,7 +120,6 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
SetSizerAndFit(&s_panel);
//Events
//Connect( wxEVT_SIZE, wxSizeEventHandler(MemoryViewerPanel::OnResize) );
Connect(t_addr->GetId(), wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MemoryViewerPanel::OnChangeToolsAddr) );
Connect(sc_bytes->GetId(), wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(MemoryViewerPanel::OnChangeToolsBytes) );
Connect(sc_bytes->GetId(), wxEVT_COMMAND_SPINCTRL_UPDATED, wxCommandEventHandler(MemoryViewerPanel::OnChangeToolsBytes) );
@ -128,7 +128,7 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
Connect(b_next->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryViewerPanel::Next));
Connect(b_fprev->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryViewerPanel::fPrev));
Connect(b_fnext->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryViewerPanel::fNext));
Connect(b_img->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryViewerPanel::ShowImage));
Connect(b_img->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MemoryViewerPanel::OnShowImage));
t_mem_addr ->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(MemoryViewerPanel::OnScrollMemory), NULL, this);
t_mem_hex ->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(MemoryViewerPanel::OnScrollMemory), NULL, this);
@ -138,15 +138,6 @@ MemoryViewerPanel::MemoryViewerPanel(wxWindow* parent)
ShowMemory();
};
/*void MemoryViewerPanel::OnResize(wxSizeEvent& event)
{
const wxSize size(GetClientSize());
hex_wind->SetSize( size.GetWidth(), size.GetHeight() - 25);
hex_wind->SetColumnWidth(COL_COUNT, size.GetWidth() - m_colcount - 4);
event.Skip();
}*/
void MemoryViewerPanel::OnChangeToolsAddr(wxCommandEvent& event)
{
t_addr->GetValue().ToULong((unsigned long *)&m_addr, 16);
@ -179,6 +170,15 @@ void MemoryViewerPanel::OnScrollMemory(wxMouseEvent& event)
event.Skip();
}
void MemoryViewerPanel::OnShowImage(wxCommandEvent& WXUNUSED(event))
{
u32 addr = m_addr;
int mode = cbox_img_mode->GetSelection();
int sizex = sc_img_size_x->GetValue();
int sizey = sc_img_size_y->GetValue();
ShowImage(this, m_addr, mode, sizex, sizey, false);
}
void MemoryViewerPanel::ShowMemory()
{
wxString t_mem_addr_str;
@ -211,58 +211,70 @@ void MemoryViewerPanel::ShowMemory()
t_mem_ascii->SetValue(t_mem_ascii_str);
}
void MemoryViewerPanel::ShowImage(wxCommandEvent& WXUNUSED(event))
void MemoryViewerPanel::ShowImage(wxWindow* parent, u32 addr, int mode, int width, int height, bool flipv)
{
wxString title = wxString::Format("Raw Image @ 0x%x", m_addr);
int mode = cbox_img_mode->GetSelection();
int sizex = sc_img_size_x->GetValue();
int sizey = sc_img_size_y->GetValue();
wxFrame* f_image_viewer = new wxFrame(this, wxID_ANY, title, wxDefaultPosition, wxDefaultSize,
wxString title = wxString::Format("Raw Image @ 0x%x", addr);
wxFrame* f_image_viewer = new wxFrame(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize,
wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX | wxCAPTION | wxCLIP_CHILDREN);
f_image_viewer->SetBackgroundColour(wxColour(240,240,240)); //This fix the ugly background color under Windows
f_image_viewer->SetAutoLayout(true);
f_image_viewer->SetClientSize(wxSize(sizex,sizey));
f_image_viewer->SetClientSize(wxSize(width, height));
f_image_viewer->Show();
wxClientDC dc_canvas(f_image_viewer);
u32 addr = m_addr;
for(int y = 0; y < sizex; y++)
unsigned char* originalBuffer = (unsigned char*)Memory.VirtualToRealAddr(addr);
unsigned char* convertedBuffer = (unsigned char*)malloc(width * height * 3);
switch(mode)
{
for(int x = 0; x < sizey; x++)
{
char R,G,B;
switch(mode)
{
case(0): //RGB
R = Memory.IsGoodAddr(addr+0) ? Memory.Read8(addr+0) : 0;
G = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
B = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
dc_canvas.SetPen(wxPen(wxColour(R,G,B), 3));
dc_canvas.DrawPoint(x,y);
addr += 3;
break;
case(1): //ARGB
//A = Memory.IsGoodAddr(addr+0) ? Memory.Read8(addr+0) : 0;
R = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
G = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
B = Memory.IsGoodAddr(addr+3) ? Memory.Read8(addr+3) : 0;
dc_canvas.SetPen(wxPen(wxColour(R,G,B), 3));
dc_canvas.DrawPoint(x,y);
addr += 4;
break;
case(2): //RGBA
R = Memory.IsGoodAddr(addr+0) ? Memory.Read8(addr+0) : 0;
G = Memory.IsGoodAddr(addr+1) ? Memory.Read8(addr+1) : 0;
B = Memory.IsGoodAddr(addr+2) ? Memory.Read8(addr+2) : 0;
//A = Memory.IsGoodAddr(addr+3) ? Memory.Read8(addr+3) : 0;
dc_canvas.SetPen(wxPen(wxColour(R,G,B), 3));
dc_canvas.DrawPoint(x,y);
addr += 4;
break;
case(0): // RGB
memcpy(convertedBuffer, originalBuffer, width * height * 3);
break;
case(1): // ARGB
for (u32 y=0; y<height; y++){
for (u32 i=0, j=0; j<width*4; i+=3, j+=4){
convertedBuffer[i+0 + y*width*3] = originalBuffer[j+1 + y*width*4];
convertedBuffer[i+1 + y*width*3] = originalBuffer[j+2 + y*width*4];
convertedBuffer[i+2 + y*width*3] = originalBuffer[j+3 + y*width*4];
}
}
break;
case(2): // RGBA
for (u32 y=0; y<height; y++){
for (u32 i=0, j=0; j<width*4; i+=3, j+=4){
convertedBuffer[i+0 + y*width*3] = originalBuffer[j+0 + y*width*4];
convertedBuffer[i+1 + y*width*3] = originalBuffer[j+1 + y*width*4];
convertedBuffer[i+2 + y*width*3] = originalBuffer[j+2 + y*width*4];
}
}
break;
case(3): // ABGR
for (u32 y=0; y<height; y++){
for (u32 i=0, j=0; j<width*4; i+=3, j+=4){
convertedBuffer[i+0 + y*width*3] = originalBuffer[j+3 + y*width*4];
convertedBuffer[i+1 + y*width*3] = originalBuffer[j+2 + y*width*4];
convertedBuffer[i+2 + y*width*3] = originalBuffer[j+1 + y*width*4];
}
}
break;
}
// Flip vertically
if (flipv){
for (u32 y=0; y<height/2; y++){
for (u32 x=0; x<width*3; x++){
const u8 t = convertedBuffer[x + y*width*3];
convertedBuffer[x + y*width*3] = convertedBuffer[x + (height-y-1)*width*3];
convertedBuffer[x + (height-y-1)*width*3] = t;
}
}
}
wxImage img(width, height, convertedBuffer);
dc_canvas.DrawBitmap(img, 0, 0, false);
}
void MemoryViewerPanel::Next (wxCommandEvent& WXUNUSED(event)) { m_addr += m_colcount; ShowMemory(); }

View File

@ -4,13 +4,9 @@
class MemoryViewerPanel : public wxFrame
{
//static const uint LINE_COUNT = 50;
//static const uint COL_COUNT = 17;
u32 m_addr;
u32 m_colcount;
u32 m_rowcount;
//wxListView* hex_wind;
wxTextCtrl* t_addr;
wxSpinCtrl* sc_bytes;
@ -31,10 +27,10 @@ public:
exit = true;
}
//virtual void OnResize(wxSizeEvent& event);
virtual void OnChangeToolsAddr(wxCommandEvent& event);
virtual void OnChangeToolsBytes(wxCommandEvent& event);
virtual void OnScrollMemory(wxMouseEvent& event);
virtual void OnShowImage(wxCommandEvent& WXUNUSED(event));
virtual void Next(wxCommandEvent& event);
virtual void Prev(wxCommandEvent& event);
@ -42,7 +38,8 @@ public:
virtual void fPrev(wxCommandEvent& event);
virtual void ShowMemory();
virtual void ShowImage(wxCommandEvent& WXUNUSED(event));
void SetPC(const uint pc) { m_addr = pc; }
};
//Static methods
static void ShowImage(wxWindow* parent, u32 addr, int mode, int sizex, int sizey, bool flipv);
};

View File

@ -4,10 +4,12 @@
#include "Emu/GS/sysutil_video.h"
#include "Emu/GS/GCM.h"
#include "MemoryViewer.h"
enum GCMEnumTypes
{
CELL_GCM,
CELL_GCM_PRIMITIVE,
CELL_GCM_ENUM,
CELL_GCM_PRIMITIVE_ENUM,
};
RSXDebugger::RSXDebugger(wxWindow* parent)
@ -95,14 +97,14 @@ RSXDebugger::RSXDebugger(wxWindow* parent)
m_list_commands->InsertColumn(1, "Value", 0, 80);
m_list_commands->InsertColumn(2, "Command", 0, 250);
m_list_commands->InsertColumn(3, "Count", 0, 40);
m_list_flags->InsertColumn(0, "Name", 0, 150);
m_list_flags->InsertColumn(1, "Value", 0, 300);
m_list_lightning->InsertColumn(0, "Name", 0, 150);
m_list_lightning->InsertColumn(1, "Value", 0, 300);
m_list_texture->InsertColumn(0, "Name", 0, 150);
m_list_texture->InsertColumn(1, "Value", 0, 300);
m_list_settings->InsertColumn(0, "Name", 0, 150);
m_list_settings->InsertColumn(1, "Value", 0, 300);
m_list_flags->InsertColumn(0, "Name", 0, 170);
m_list_flags->InsertColumn(1, "Value", 0, 270);
m_list_lightning->InsertColumn(0, "Name", 0, 170);
m_list_lightning->InsertColumn(1, "Value", 0, 270);
m_list_texture->InsertColumn(0, "Name", 0, 170);
m_list_texture->InsertColumn(1, "Value", 0, 270);
m_list_settings->InsertColumn(0, "Name", 0, 170);
m_list_settings->InsertColumn(1, "Value", 0, 270);
// Fill list
for(u32 i=0; i<m_item_count; i++)
@ -186,6 +188,14 @@ RSXDebugger::RSXDebugger(wxWindow* parent)
Connect(b_goto_get->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::GoToGet));
Connect(b_goto_put->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::GoToPut));
p_buffer_colorA->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), NULL, this);
p_buffer_colorB->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), NULL, this);
p_buffer_colorC->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), NULL, this);
p_buffer_colorD->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), NULL, this);
//Connect(p_buffer_depth->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::OnClickBuffer));
//Connect(p_buffer_stencil->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RSXDebugger::OnClickBuffer));
p_buffer_tex->Connect(wxID_ANY, wxEVT_LEFT_DOWN, wxMouseEventHandler(RSXDebugger::OnClickBuffer), NULL, this);
m_list_commands->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(RSXDebugger::OnScrollMemory), NULL, this);
m_list_flags->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler(RSXDebugger::SetFlags), NULL, this);
@ -217,6 +227,32 @@ void RSXDebugger::OnScrollMemory(wxMouseEvent& event)
event.Skip();
}
void RSXDebugger::OnClickBuffer(wxMouseEvent& event)
{
if (!RSXReady()) return;
const GSRender& render = Emu.GetGSManager().GetRender();
const mem_ptr_t<gcmBuffer> buffers = render.m_gcm_buffers_addr;
// TODO: Is there any better way to choose the color buffers
#define SHOW_BUFFER(id) \
MemoryViewerPanel::ShowImage(this, render.m_local_mem_addr + re(buffers[id].offset), \
3, re(buffers[id].width), re(buffers[id].height), true);
if (event.GetId() == p_buffer_colorA->GetId()) SHOW_BUFFER(0);
if (event.GetId() == p_buffer_colorB->GetId()) SHOW_BUFFER(1);
if (event.GetId() == p_buffer_colorC->GetId()) SHOW_BUFFER(2);
if (event.GetId() == p_buffer_colorD->GetId()) SHOW_BUFFER(3);
if (event.GetId() == p_buffer_tex->GetId())
{
MemoryViewerPanel::ShowImage(this,
render.m_textures[0].m_offset, 0,
render.m_textures[0].m_width,
render.m_textures[0].m_height, false);
}
#undef SHOW_BUFFER
}
void RSXDebugger::GoToGet(wxCommandEvent& event)
{
if (!RSXReady()) return;
@ -391,6 +427,13 @@ void RSXDebugger::GetTexture()
m_list_texture->InsertItem(i, name); m_list_texture->SetItem(i, 1, value); i++;
LIST_TEXTURE_ADD("Texture #0 Address:", wxString::Format("0x%x", render.m_textures[0].m_offset));
LIST_TEXTURE_ADD("Texture #0 Cubemap:", render.m_textures[0].m_cubemap ? "True" : "False");
LIST_TEXTURE_ADD("Texture #0 Depth:", wxString::Format("0x%x", render.m_textures[0].m_depth));
LIST_TEXTURE_ADD("Texture #0 Dimension:", wxString::Format("0x%x", render.m_textures[0].m_dimension));
LIST_TEXTURE_ADD("Texture #0 Enabled:", render.m_textures[0].m_enabled ? "True" : "False");
LIST_TEXTURE_ADD("Texture #0 Format:", wxString::Format("0x%x", render.m_textures[0].m_format));
LIST_TEXTURE_ADD("Texture #0 Mipmap:", wxString::Format("0x%x", render.m_textures[0].m_mipmap));
LIST_TEXTURE_ADD("Texture #0 Pitch:", wxString::Format("0x%x", render.m_textures[0].m_pitch));
LIST_TEXTURE_ADD("Texture #0 Size:", wxString::Format("%d x %d",
render.m_textures[0].m_width,
render.m_textures[0].m_height));
@ -410,7 +453,7 @@ void RSXDebugger::GetSettings()
LIST_SETTINGS_ADD("Alpha func", !(render.m_set_alpha_func) ? "(none)" : wxString::Format("0x%x (%s)",
render.m_alpha_func,
ParseGCMEnum(render.m_alpha_func, CELL_GCM)));
ParseGCMEnum(render.m_alpha_func, CELL_GCM_ENUM)));
LIST_SETTINGS_ADD("Blend color", !(render.m_set_blend_color) ? "(none)" : wxString::Format("R:%d, G:%d, B:%d, A:%d",
render.m_blend_color_r,
render.m_blend_color_g,
@ -427,12 +470,13 @@ void RSXDebugger::GetSettings()
LIST_SETTINGS_ADD("Context DMA Color C", wxString::Format("0x%x", render.m_context_dma_color_c));
LIST_SETTINGS_ADD("Context DMA Color D", wxString::Format("0x%x", render.m_context_dma_color_d));
LIST_SETTINGS_ADD("Context DMA Zeta", wxString::Format("0x%x", render.m_context_dma_z));
LIST_SETTINGS_ADD("Depth bounds", wxString::Format("Min:%f, Max:%f", render.m_depth_bounds_min, render.m_depth_bounds_max));
LIST_SETTINGS_ADD("Depth func", !(render.m_set_depth_func) ? "(none)" : wxString::Format("0x%x (%s)",
render.m_depth_func,
ParseGCMEnum(render.m_depth_func, CELL_GCM)));
ParseGCMEnum(render.m_depth_func, CELL_GCM_ENUM)));
LIST_SETTINGS_ADD("Draw mode", wxString::Format("%d (%s)",
render.m_draw_mode,
ParseGCMEnum(render.m_draw_mode, CELL_GCM_PRIMITIVE)));
ParseGCMEnum(render.m_draw_mode, CELL_GCM_PRIMITIVE_ENUM)));
LIST_SETTINGS_ADD("Scissor", wxString::Format("X:%d, Y:%d, W:%d, H:%d",
render.m_scissor_x,
render.m_scissor_y,
@ -440,7 +484,7 @@ void RSXDebugger::GetSettings()
render.m_scissor_h));
LIST_SETTINGS_ADD("Stencil func", !(render.m_set_stencil_func) ? "(none)" : wxString::Format("0x%x (%s)",
render.m_stencil_func,
ParseGCMEnum(render.m_stencil_func, CELL_GCM)));
ParseGCMEnum(render.m_stencil_func, CELL_GCM_ENUM)));
LIST_SETTINGS_ADD("Surface Pitch A", wxString::Format("0x%x", render.m_surface_pitch_a));
LIST_SETTINGS_ADD("Surface Pitch B", wxString::Format("0x%x", render.m_surface_pitch_b));
LIST_SETTINGS_ADD("Surface Pitch C", wxString::Format("0x%x", render.m_surface_pitch_c));
@ -487,7 +531,7 @@ wxString RSXDebugger::ParseGCMEnum(u32 value, u32 type)
{
switch(type)
{
case CELL_GCM:
case CELL_GCM_ENUM:
{
switch(value)
{
@ -528,7 +572,7 @@ wxString RSXDebugger::ParseGCMEnum(u32 value, u32 type)
default: return "Wrong Value!";
}
}
case CELL_GCM_PRIMITIVE:
case CELL_GCM_PRIMITIVE_ENUM:
{
switch(value)
{

View File

@ -39,6 +39,7 @@ public:
virtual void OnKeyDown(wxKeyEvent& event);
virtual void OnChangeToolsAddr(wxCommandEvent& event);
virtual void OnScrollMemory(wxMouseEvent& event);
virtual void OnClickBuffer(wxMouseEvent& event);
virtual void GoToGet(wxCommandEvent& event);
virtual void GoToPut(wxCommandEvent& event);

View File

@ -273,6 +273,7 @@
<ClCompile Include="Emu\SysCalls\Modules\cellGcmSys.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGifDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellJpgDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellPamf.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellPngDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellResc.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellRtc.cpp" />

View File

@ -361,6 +361,9 @@
<ClCompile Include="Gui\RSXDebugger.cpp">
<Filter>Gui</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellPamf.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="rpcs3.rc" />