aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/citra_qt/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt/debugger')
-rw-r--r--src/citra_qt/debugger/callstack.cpp10
-rw-r--r--src/citra_qt/debugger/callstack.hxx4
-rw-r--r--src/citra_qt/debugger/callstack.ui2
-rw-r--r--src/citra_qt/debugger/disassembler.cpp4
-rw-r--r--src/citra_qt/debugger/disassembler.hxx4
-rw-r--r--src/citra_qt/debugger/graphics.cpp2
-rw-r--r--src/citra_qt/debugger/graphics_breakpoints.cpp2
-rw-r--r--src/citra_qt/debugger/graphics_cmdlists.cpp4
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.cpp28
-rw-r--r--src/citra_qt/debugger/graphics_framebuffer.hxx4
-rw-r--r--src/citra_qt/debugger/ramview.cpp4
-rw-r--r--src/citra_qt/debugger/ramview.hxx4
-rw-r--r--src/citra_qt/debugger/registers.cpp4
-rw-r--r--src/citra_qt/debugger/registers.hxx4
-rw-r--r--src/citra_qt/debugger/registers.ui2
15 files changed, 58 insertions, 24 deletions
diff --git a/src/citra_qt/debugger/callstack.cpp b/src/citra_qt/debugger/callstack.cpp
index a9ec2f7f..4a47ad46 100644
--- a/src/citra_qt/debugger/callstack.cpp
+++ b/src/citra_qt/debugger/callstack.cpp
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include <QStandardItemModel>
#include "callstack.hxx"
@@ -14,9 +18,9 @@ CallstackWidget::CallstackWidget(QWidget* parent): QDockWidget(parent)
callstack_model = new QStandardItemModel(this);
callstack_model->setColumnCount(4);
- callstack_model->setHeaderData(0, Qt::Horizontal, "Stack pointer");
- callstack_model->setHeaderData(2, Qt::Horizontal, "Return address");
- callstack_model->setHeaderData(1, Qt::Horizontal, "Call address");
+ callstack_model->setHeaderData(0, Qt::Horizontal, "Stack Pointer");
+ callstack_model->setHeaderData(2, Qt::Horizontal, "Return Address");
+ callstack_model->setHeaderData(1, Qt::Horizontal, "Call Address");
callstack_model->setHeaderData(3, Qt::Horizontal, "Function");
ui.treeView->setModel(callstack_model);
}
diff --git a/src/citra_qt/debugger/callstack.hxx b/src/citra_qt/debugger/callstack.hxx
index 680a73b6..4f4f7482 100644
--- a/src/citra_qt/debugger/callstack.hxx
+++ b/src/citra_qt/debugger/callstack.hxx
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include <QDockWidget>
#include "ui_callstack.h"
diff --git a/src/citra_qt/debugger/callstack.ui b/src/citra_qt/debugger/callstack.ui
index b3c4db63..b0e31120 100644
--- a/src/citra_qt/debugger/callstack.ui
+++ b/src/citra_qt/debugger/callstack.ui
@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
- <string>Call stack</string>
+ <string>Call Stack</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">
diff --git a/src/citra_qt/debugger/disassembler.cpp b/src/citra_qt/debugger/disassembler.cpp
index 14745f3b..636a0f18 100644
--- a/src/citra_qt/debugger/disassembler.cpp
+++ b/src/citra_qt/debugger/disassembler.cpp
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include "disassembler.hxx"
#include "../bootmanager.hxx"
diff --git a/src/citra_qt/debugger/disassembler.hxx b/src/citra_qt/debugger/disassembler.hxx
index a842da95..6d3cef10 100644
--- a/src/citra_qt/debugger/disassembler.hxx
+++ b/src/citra_qt/debugger/disassembler.hxx
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include <QAbstractItemModel>
#include <QDockWidget>
#include "ui_disassembler.h"
diff --git a/src/citra_qt/debugger/graphics.cpp b/src/citra_qt/debugger/graphics.cpp
index 6ff4c290..9633d367 100644
--- a/src/citra_qt/debugger/graphics.cpp
+++ b/src/citra_qt/debugger/graphics.cpp
@@ -72,7 +72,7 @@ void GPUCommandStreamItemModel::OnGXCommandFinishedInternal(int total_command_co
GPUCommandStreamWidget::GPUCommandStreamWidget(QWidget* parent) : QDockWidget(tr("Graphics Debugger"), parent)
{
- // TODO: set objectName!
+ setObjectName("GraphicsDebugger");
GPUCommandStreamItemModel* command_model = new GPUCommandStreamItemModel(this);
g_debugger.RegisterObserver(command_model);
diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp
index 9486f06c..170aa736 100644
--- a/src/citra_qt/debugger/graphics_breakpoints.cpp
+++ b/src/citra_qt/debugger/graphics_breakpoints.cpp
@@ -44,7 +44,7 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const
{ Pica::DebugContext::Event::CommandProcessed, tr("Pica command processed") },
{ Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch") },
{ Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch") },
- { Pica::DebugContext::Event::VertexLoaded, tr("Vertex Loaded") }
+ { Pica::DebugContext::Event::VertexLoaded, tr("Vertex loaded") }
};
_dbg_assert_(Debug_GPU, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents));
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp
index 753cc25d..708b805a 100644
--- a/src/citra_qt/debugger/graphics_cmdlists.cpp
+++ b/src/citra_qt/debugger/graphics_cmdlists.cpp
@@ -229,7 +229,7 @@ void GPUCommandListModel::OnPicaTraceFinished(const Pica::DebugUtils::PicaTrace&
cmd_id < PICA_REG_INDEX(reg_name) + sizeof(decltype(Pica::registers.reg_name)) / 4)
void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
- const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt();
+ const unsigned int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt();
if (COMMAND_IN_RANGE(command_id, texture0) ||
COMMAND_IN_RANGE(command_id, texture1) ||
COMMAND_IN_RANGE(command_id, texture2)) {
@@ -255,7 +255,7 @@ void GPUCommandListWidget::OnCommandDoubleClicked(const QModelIndex& index) {
void GPUCommandListWidget::SetCommandInfo(const QModelIndex& index) {
QWidget* new_info_widget;
- const int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toInt();
+ const unsigned int command_id = list_widget->model()->data(index, GPUCommandListModel::CommandIdRole).toUInt();
if (COMMAND_IN_RANGE(command_id, texture0) ||
COMMAND_IN_RANGE(command_id, texture1) ||
COMMAND_IN_RANGE(command_id, texture2)) {
diff --git a/src/citra_qt/debugger/graphics_framebuffer.cpp b/src/citra_qt/debugger/graphics_framebuffer.cpp
index dd41c388..7ef699f3 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.cpp
+++ b/src/citra_qt/debugger/graphics_framebuffer.cpp
@@ -10,6 +10,7 @@
#include <QPushButton>
#include <QSpinBox>
+#include "video_core/color.h"
#include "video_core/pica.h"
#include "graphics_framebuffer.hxx"
@@ -157,7 +158,7 @@ void GraphicsFramebufferWidget::OnFramebufferAddressChanged(qint64 new_value)
}
}
-void GraphicsFramebufferWidget::OnFramebufferWidthChanged(int new_value)
+void GraphicsFramebufferWidget::OnFramebufferWidthChanged(unsigned int new_value)
{
if (framebuffer_width != new_value) {
framebuffer_width = new_value;
@@ -167,7 +168,7 @@ void GraphicsFramebufferWidget::OnFramebufferWidthChanged(int new_value)
}
}
-void GraphicsFramebufferWidget::OnFramebufferHeightChanged(int new_value)
+void GraphicsFramebufferWidget::OnFramebufferHeightChanged(unsigned int new_value)
{
if (framebuffer_height != new_value) {
framebuffer_height = new_value;
@@ -202,7 +203,8 @@ void GraphicsFramebufferWidget::OnUpdate()
framebuffer_address = framebuffer.GetColorBufferPhysicalAddress();
framebuffer_width = framebuffer.GetWidth();
framebuffer_height = framebuffer.GetHeight();
- framebuffer_format = static_cast<Format>(framebuffer.color_format);
+ // TODO: It's unknown how this format is actually specified
+ framebuffer_format = Format::RGBA8;
break;
}
@@ -225,8 +227,8 @@ void GraphicsFramebufferWidget::OnUpdate()
{
QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32);
u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address));
- for (unsigned y = 0; y < framebuffer_height; ++y) {
- for (unsigned x = 0; x < framebuffer_width; ++x) {
+ for (unsigned int y = 0; y < framebuffer_height; ++y) {
+ for (unsigned int x = 0; x < framebuffer_width; ++x) {
u32 value = *(color_buffer + x + y * framebuffer_width);
decoded_image.setPixel(x, y, qRgba((value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF, 255/*value >> 24*/));
@@ -240,8 +242,8 @@ void GraphicsFramebufferWidget::OnUpdate()
{
QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32);
u8* color_buffer = Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address));
- for (unsigned y = 0; y < framebuffer_height; ++y) {
- for (unsigned x = 0; x < framebuffer_width; ++x) {
+ for (unsigned int y = 0; y < framebuffer_height; ++y) {
+ for (unsigned int x = 0; x < framebuffer_width; ++x) {
u8* pixel_pointer = color_buffer + x * 3 + y * 3 * framebuffer_width;
decoded_image.setPixel(x, y, qRgba(pixel_pointer[0], pixel_pointer[1], pixel_pointer[2], 255/*value >> 24*/));
@@ -255,13 +257,13 @@ void GraphicsFramebufferWidget::OnUpdate()
{
QImage decoded_image(framebuffer_width, framebuffer_height, QImage::Format_ARGB32);
u32* color_buffer = (u32*)Memory::GetPointer(Pica::PAddrToVAddr(framebuffer_address));
- for (unsigned y = 0; y < framebuffer_height; ++y) {
- for (unsigned x = 0; x < framebuffer_width; ++x) {
+ for (unsigned int y = 0; y < framebuffer_height; ++y) {
+ for (unsigned int x = 0; x < framebuffer_width; ++x) {
u16 value = *(u16*)(((u8*)color_buffer) + x * 2 + y * framebuffer_width * 2);
- u8 r = (value >> 11) & 0x1F;
- u8 g = (value >> 6) & 0x1F;
- u8 b = (value >> 1) & 0x1F;
- u8 a = value & 1;
+ u8 r = Color::Convert5To8((value >> 11) & 0x1F);
+ u8 g = Color::Convert5To8((value >> 6) & 0x1F);
+ u8 b = Color::Convert5To8((value >> 1) & 0x1F);
+ u8 a = Color::Convert1To8(value & 1);
decoded_image.setPixel(x, y, qRgba(r, g, b, 255/*a*/));
}
diff --git a/src/citra_qt/debugger/graphics_framebuffer.hxx b/src/citra_qt/debugger/graphics_framebuffer.hxx
index 56215761..02813525 100644
--- a/src/citra_qt/debugger/graphics_framebuffer.hxx
+++ b/src/citra_qt/debugger/graphics_framebuffer.hxx
@@ -62,8 +62,8 @@ public:
public slots:
void OnFramebufferSourceChanged(int new_value);
void OnFramebufferAddressChanged(qint64 new_value);
- void OnFramebufferWidthChanged(int new_value);
- void OnFramebufferHeightChanged(int new_value);
+ void OnFramebufferWidthChanged(unsigned int new_value);
+ void OnFramebufferHeightChanged(unsigned int new_value);
void OnFramebufferFormatChanged(int new_value);
void OnUpdate();
diff --git a/src/citra_qt/debugger/ramview.cpp b/src/citra_qt/debugger/ramview.cpp
index 3f899b95..d3ff69a6 100644
--- a/src/citra_qt/debugger/ramview.cpp
+++ b/src/citra_qt/debugger/ramview.cpp
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include "ramview.hxx"
#include "common/common.h"
diff --git a/src/citra_qt/debugger/ramview.hxx b/src/citra_qt/debugger/ramview.hxx
index 1db1546a..18423036 100644
--- a/src/citra_qt/debugger/ramview.hxx
+++ b/src/citra_qt/debugger/ramview.hxx
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include "qhexedit.h"
class GRamView : public QHexEdit
diff --git a/src/citra_qt/debugger/registers.cpp b/src/citra_qt/debugger/registers.cpp
index ed17ee4b..f798495b 100644
--- a/src/citra_qt/debugger/registers.cpp
+++ b/src/citra_qt/debugger/registers.cpp
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include "registers.hxx"
#include "core/core.h"
diff --git a/src/citra_qt/debugger/registers.hxx b/src/citra_qt/debugger/registers.hxx
index 4cca957c..ac8429f2 100644
--- a/src/citra_qt/debugger/registers.hxx
+++ b/src/citra_qt/debugger/registers.hxx
@@ -1,3 +1,7 @@
+// Copyright 2014 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
#include "ui_registers.h"
#include <QDockWidget>
diff --git a/src/citra_qt/debugger/registers.ui b/src/citra_qt/debugger/registers.ui
index 6537c9cd..c81ae03f 100644
--- a/src/citra_qt/debugger/registers.ui
+++ b/src/citra_qt/debugger/registers.ui
@@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
- <string>ARM registers</string>
+ <string>ARM Registers</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout">