mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 19:34:39 +01:00
commit
4f9b5652eb
17 files changed
+627
-819
No files matched your search
+26
-40
@@ -33,26 +33,15 @@ void CtrlDisAsmView::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
int page=(rect().bottom()/rowHeight)/2-1;
|
||||
|
||||
if(e->key() == Qt::Key_Down)
|
||||
switch (e->key())
|
||||
{
|
||||
curAddress += align;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_Up)
|
||||
{
|
||||
curAddress -= align;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_PageDown)
|
||||
{
|
||||
curAddress += page*align;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_PageUp)
|
||||
{
|
||||
curAddress -= page*align;
|
||||
e->accept();
|
||||
case Qt::Key_Down: curAddress += align; break;
|
||||
case Qt::Key_Up: curAddress -= align; break;
|
||||
case Qt::Key_PageDown: curAddress += page*align; break;
|
||||
case Qt::Key_PageUp: curAddress -= page*align; break;
|
||||
default: QWidget::keyPressEvent(e); break;
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -68,7 +57,6 @@ void CtrlDisAsmView::mousePressEvent(QMouseEvent *e)
|
||||
selecting=true;
|
||||
if (!oldselecting || (selection!=oldSelection))
|
||||
redraw();
|
||||
e->accept();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -77,7 +65,6 @@ void CtrlDisAsmView::mousePressEvent(QMouseEvent *e)
|
||||
EmuThread_LockDraw(false);
|
||||
parentWindow->Update();
|
||||
redraw();
|
||||
e->accept();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,12 +72,11 @@ void CtrlDisAsmView::wheelEvent(QWheelEvent* e)
|
||||
{
|
||||
int numDegrees = e->delta() / 8;
|
||||
int numSteps = numDegrees / 15;
|
||||
if (e->orientation() == Qt::Horizontal) {
|
||||
} else {
|
||||
if (e->orientation() == Qt::Vertical)
|
||||
{
|
||||
curAddress -= numSteps*align;
|
||||
e->accept();
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CtrlDisAsmView::redraw()
|
||||
@@ -243,7 +229,7 @@ void CtrlDisAsmView::RenameFunction()
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this,"Warning","No symbol selected",QMessageBox::Ok);
|
||||
QMessageBox::information(this,tr("Warning"),tr("No symbol selected"),QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,20 +251,20 @@ void CtrlDisAsmView::paintEvent(QPaintEvent *)
|
||||
int width = rect().width();
|
||||
int numRows=(rect().height()/rowHeight)/2+1;
|
||||
|
||||
QColor bgColor = QColor(0xFFFFFFFF);
|
||||
QPen nullPen= QPen(bgColor);
|
||||
QPen currentPen=QPen(QColor(0,0,0));
|
||||
QPen selPen=QPen(QColor(0xFF808080));
|
||||
QPen condPen=QPen(QColor(0xFFFF3020));
|
||||
QColor bgColor(0xFFFFFFFF);
|
||||
QPen nullPen(bgColor);
|
||||
QPen currentPen(QColor(0,0,0));
|
||||
QPen selPen(QColor(0xFF808080));
|
||||
QPen condPen(QColor(0xFFFF3020));
|
||||
|
||||
QBrush lbr;
|
||||
lbr.setColor(bgColor);
|
||||
QBrush currentBrush=QBrush(QColor(0xFFFFEfE8));
|
||||
QBrush pcBrush=QBrush(QColor(0xFF70FF70));
|
||||
QBrush currentBrush(QColor(0xFFFFEfE8));
|
||||
QBrush pcBrush(QColor(0xFF70FF70));
|
||||
|
||||
QFont normalFont = QFont("Arial", 10);
|
||||
QFont boldFont = QFont("Arial", 10);
|
||||
QFont alignedFont = QFont("Monospace", 10);
|
||||
QFont normalFont("Arial", 10);
|
||||
QFont boldFont("Arial", 10);
|
||||
QFont alignedFont("Monospace", 10);
|
||||
boldFont.setBold(true);
|
||||
painter.setFont(normalFont);
|
||||
|
||||
@@ -295,17 +281,17 @@ void CtrlDisAsmView::paintEvent(QPaintEvent *)
|
||||
int rowY1 = rect().bottom()/2 + rowHeight*i - rowHeight/2;
|
||||
int rowY2 = rect().bottom()/2 + rowHeight*i + rowHeight/2 - 1;
|
||||
|
||||
lbr.setColor(marker==address?QColor(0xFFFFEEE0):QColor(debugger->getColor(address)));
|
||||
lbr.setColor((unsigned int)marker == address ? QColor(0xFFFFEEE0) : QColor(debugger->getColor(address)));
|
||||
QColor bg = lbr.color();
|
||||
painter.setPen(nullPen);
|
||||
painter.drawRect(0,rowY1,16-1,rowY2-rowY1);
|
||||
|
||||
if (selecting && address == selection)
|
||||
if (selecting && address == (unsigned int)selection)
|
||||
painter.setPen(selPen);
|
||||
else
|
||||
painter.setPen(i==0 ? currentPen : nullPen);
|
||||
|
||||
QBrush mojsBrush=QBrush(lbr.color());
|
||||
QBrush mojsBrush(lbr.color());
|
||||
painter.setBrush(mojsBrush);
|
||||
|
||||
if (address == debugger->getPC())
|
||||
@@ -315,7 +301,7 @@ void CtrlDisAsmView::paintEvent(QPaintEvent *)
|
||||
|
||||
painter.drawRect(16,rowY1,width-16-1,rowY2-rowY1);
|
||||
painter.setBrush(currentBrush);
|
||||
QPen textPen = QPen(QColor(halfAndHalf(bg.rgba(),0)));
|
||||
QPen textPen(QColor(halfAndHalf(bg.rgba(),0)));
|
||||
painter.setPen(textPen);
|
||||
painter.setFont(alignedFont);
|
||||
painter.drawText(17,rowY1-3+rowHeight,QString("%1").arg(address,8,16,QChar('0')));
|
||||
@@ -412,7 +398,7 @@ void CtrlDisAsmView::paintEvent(QPaintEvent *)
|
||||
{
|
||||
painter.setPen(branches[i].conditional ? condPen : currentPen);
|
||||
int x=280+(branches[i].srcAddr%9)*8;
|
||||
QPoint curPos = QPoint(x-2,branches[i].src);
|
||||
QPoint curPos(x-2,branches[i].src);
|
||||
|
||||
if (branches[i].dst<rect().bottom()+200 && branches[i].dst>-200)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,6 @@ class CtrlDisAsmView : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CtrlDisAsmView(QWidget *parent = 0);
|
||||
|
||||
|
||||
void redraw();
|
||||
void setAlign(int l)
|
||||
@@ -73,7 +72,6 @@ protected:
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void wheelEvent(QWheelEvent *e);
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void CopyAddress();
|
||||
|
||||
+21
-35
@@ -15,7 +15,6 @@
|
||||
CtrlMemView::CtrlMemView(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
|
||||
curAddress=0;
|
||||
rowHeight=14;
|
||||
align=4;
|
||||
@@ -32,44 +31,30 @@ void CtrlMemView::redraw()
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void CtrlMemView::wheelEvent(QWheelEvent* e)
|
||||
{
|
||||
int numDegrees = e->delta() / 8;
|
||||
int numSteps = numDegrees / 15;
|
||||
if (e->orientation() == Qt::Horizontal) {
|
||||
} else {
|
||||
if (e->orientation() == Qt::Vertical)
|
||||
{
|
||||
curAddress -= numSteps*align*alignMul;
|
||||
e->accept();
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CtrlMemView::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
int page=(rect().bottom()/rowHeight)/2-1;
|
||||
|
||||
if(e->key() == Qt::Key_Up)
|
||||
switch (e->key())
|
||||
{
|
||||
curAddress-=align*alignMul;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_Down)
|
||||
{
|
||||
curAddress+=align*alignMul;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_PageUp)
|
||||
{
|
||||
curAddress-=page*align*alignMul;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_PageDown)
|
||||
{
|
||||
curAddress+=page*align*alignMul;
|
||||
e->accept();
|
||||
case Qt::Key_Up: curAddress -= align*alignMul; break;
|
||||
case Qt::Key_Down: curAddress += align*alignMul; break;
|
||||
case Qt::Key_PageUp: curAddress -= page*align*alignMul; break;
|
||||
case Qt::Key_PageDown: curAddress += page*align*alignMul; break;
|
||||
default: QWidget::keyPressEvent(e); break;
|
||||
}
|
||||
|
||||
redraw();
|
||||
}
|
||||
|
||||
@@ -86,17 +71,17 @@ void CtrlMemView::paintEvent(QPaintEvent *)
|
||||
int width = rect().width();
|
||||
int numRows=(rect().bottom()/rowHeight)/2+1;
|
||||
|
||||
QPen nullPen=QPen(0xFFFFFF);
|
||||
QPen currentPen=QPen(0xFF000000);
|
||||
QPen selPen=QPen(0x808080);
|
||||
QBrush lbr = QBrush(0xFFFFFF);
|
||||
QBrush nullBrush=QBrush(0xFFFFFF);
|
||||
QBrush currentBrush=QBrush(0xFFEfE8);
|
||||
QBrush pcBrush=QBrush(0x70FF70);
|
||||
QPen nullPen(0xFFFFFF);
|
||||
QPen currentPen(0xFF000000);
|
||||
QPen selPen(0x808080);
|
||||
QBrush lbr(0xFFFFFF);
|
||||
QBrush nullBrush(0xFFFFFF);
|
||||
QBrush currentBrush(0xFFEFE8);
|
||||
QBrush pcBrush(0x70FF70);
|
||||
QPen textPen;
|
||||
|
||||
QFont normalFont = QFont("Arial", 10);
|
||||
QFont alignedFont = QFont("Monospace", 10);
|
||||
QFont normalFont("Arial", 10);
|
||||
QFont alignedFont("Monospace", 10);
|
||||
painter.setFont(normalFont);
|
||||
|
||||
int i;
|
||||
@@ -112,7 +97,7 @@ void CtrlMemView::paintEvent(QPaintEvent *)
|
||||
|
||||
painter.setBrush(currentBrush);
|
||||
|
||||
if (selecting && address == selection)
|
||||
if (selecting && address == (unsigned int)selection)
|
||||
painter.setPen(selPen);
|
||||
else
|
||||
painter.setPen(i==0 ? currentPen : nullPen);
|
||||
@@ -188,6 +173,7 @@ void CtrlMemView::paintEvent(QPaintEvent *)
|
||||
painter.drawText(85,rowY1 - 2 + rowHeight, temp);
|
||||
break;
|
||||
}
|
||||
case MV_MAX: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ protected:
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void wheelEvent(QWheelEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void CopyValue();
|
||||
|
||||
+18
-31
@@ -68,26 +68,15 @@ void CtrlRegisterList::scrollChanged(int action)
|
||||
|
||||
void CtrlRegisterList::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
if(e->key() == Qt::Key_Down)
|
||||
switch (e->key())
|
||||
{
|
||||
selection += 1;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_Up)
|
||||
{
|
||||
selection -= 1;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_PageDown)
|
||||
{
|
||||
selection += 4;
|
||||
e->accept();
|
||||
}
|
||||
else if(e->key() == Qt::Key_PageUp)
|
||||
{
|
||||
selection -= 4;
|
||||
e->accept();
|
||||
case Qt::Key_Down: selection += 1; break;
|
||||
case Qt::Key_Up: selection -= 1; break;
|
||||
case Qt::Key_PageDown: selection += 4; break;
|
||||
case Qt::Key_PageUp: selection -= 4; break;
|
||||
default: QWidget::keyPressEvent(e); break;
|
||||
}
|
||||
|
||||
int maxRowsDisplay =rect().bottom()/rowHeight - 1;
|
||||
curVertOffset = std::min(std::max(curVertOffset, selection-maxRowsDisplay),selection);
|
||||
update();
|
||||
@@ -127,19 +116,17 @@ void CtrlRegisterList::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
redraw();
|
||||
}
|
||||
e->accept();
|
||||
}
|
||||
|
||||
void CtrlRegisterList::wheelEvent(QWheelEvent* e)
|
||||
{
|
||||
int numDegrees = e->delta() / 8;
|
||||
int numSteps = numDegrees / 15;
|
||||
if (e->orientation() == Qt::Horizontal) {
|
||||
} else {
|
||||
if (e->orientation() == Qt::Vertical)
|
||||
{
|
||||
curVertOffset -= numSteps;
|
||||
e->accept();
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -175,17 +162,17 @@ void CtrlRegisterList::paintEvent(QPaintEvent *)
|
||||
|
||||
int width = rect().width();
|
||||
|
||||
QColor bgColor = QColor(0xffffff);
|
||||
QPen nullPen=QPen(bgColor);
|
||||
QPen currentPen=QPen(QColor(0xFF000000));
|
||||
QPen selPen=QPen(0x808080);
|
||||
QColor bgColor(0xffffff);
|
||||
QPen nullPen(bgColor);
|
||||
QPen currentPen(QColor(0xFF000000));
|
||||
QPen selPen(0x808080);
|
||||
QPen textPen;
|
||||
|
||||
QBrush lbr;
|
||||
lbr.setColor(bgColor);
|
||||
QBrush nullBrush=QBrush(bgColor);
|
||||
QBrush currentBrush=QBrush(0xFFEfE8);
|
||||
QBrush pcBrush=QBrush(0x70FF70);
|
||||
QBrush nullBrush(bgColor);
|
||||
QBrush currentBrush(0xFFEfE8);
|
||||
QBrush pcBrush(0x70FF70);
|
||||
|
||||
int nc = cpu->GetNumCategories();
|
||||
for (int i=0; i<nc; i++)
|
||||
@@ -216,7 +203,7 @@ void CtrlRegisterList::paintEvent(QPaintEvent *)
|
||||
else
|
||||
painter.setPen(nullPen);
|
||||
|
||||
QBrush mojsBrush=QBrush(lbr.color());
|
||||
QBrush mojsBrush(lbr.color());
|
||||
painter.setBrush(mojsBrush);
|
||||
|
||||
painter.drawRect(16,rowY1,width-16-1,rowY2-rowY1);
|
||||
|
||||
+3
-3
@@ -25,11 +25,11 @@ void CtrlVfpuView::paintEvent(QPaintEvent *)
|
||||
if (!cpu)
|
||||
return;
|
||||
|
||||
QFont normalFont = QFont("Arial", 10);
|
||||
QFont normalFont("Arial", 10);
|
||||
painter.setFont(normalFont);
|
||||
|
||||
QPen currentPen=QPen(0xFF000000);
|
||||
QBrush nullBrush=QBrush(0xFFEfE8);
|
||||
QPen currentPen(0xFF000000);
|
||||
QBrush nullBrush(0xFFEfE8);
|
||||
painter.setPen(currentPen);
|
||||
painter.setBrush(nullBrush);
|
||||
|
||||
|
||||
+1
-5
@@ -27,13 +27,9 @@ public:
|
||||
void setMode(int newMode);
|
||||
void redraw();
|
||||
protected:
|
||||
|
||||
void paintEvent(QPaintEvent *);
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
private:
|
||||
|
||||
private:
|
||||
DebugInterface *cpu;
|
||||
Debugger_Vfpu* parentWindow;
|
||||
int mode;
|
||||
|
||||
@@ -346,7 +346,7 @@ void Debugger_Disasm::FillFunctions()
|
||||
if(symbolMap.GetSymbolType(i) & ST_FUNCTION)
|
||||
{
|
||||
QListWidgetItem* item = new QListWidgetItem();
|
||||
item->setText(QString(symbolMap.GetSymbolName(i)) + " ("+ QString::number(symbolMap.GetSymbolSize(i)) +")");
|
||||
item->setText(QString("%1 (%2)").arg(symbolMap.GetSymbolName(i)).arg(symbolMap.GetSymbolSize(i)));
|
||||
item->setData(Qt::UserRole, symbolMap.GetAddress(i));
|
||||
ui->FuncList->addItem(item);
|
||||
}
|
||||
@@ -431,7 +431,7 @@ void Debugger_Disasm::UpdateThreadGUI()
|
||||
std::vector<DebugThreadInfo> threads = GetThreadsInfo();
|
||||
EmuThread_LockDraw(false);
|
||||
|
||||
for(int i = 0; i < threads.size(); i++)
|
||||
for(size_t i = 0; i < threads.size(); i++)
|
||||
{
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem();
|
||||
item->setText(0,QString::number(threads[i].id));
|
||||
@@ -480,7 +480,7 @@ void Debugger_Disasm::on_threadList_customContextMenuRequested(const QPoint &pos
|
||||
connect(gotoEntryPoint, SIGNAL(triggered()), this, SLOT(GotoThreadEntryPoint()));
|
||||
menu.addAction(gotoEntryPoint);
|
||||
|
||||
QMenu* changeStatus = menu.addMenu("Change status");
|
||||
QMenu* changeStatus = menu.addMenu(tr("Change status"));
|
||||
|
||||
QAction *statusRunning = new QAction(tr("Running"), this);
|
||||
connect(statusRunning, SIGNAL(triggered()), this, SLOT(SetThreadStatusRun()));
|
||||
@@ -566,7 +566,7 @@ void Debugger_Disasm::UpdateDisplayListGUI()
|
||||
item->setText(3,QString("%1").arg(dl->pc,8,16,QChar('0')));
|
||||
item->setData(3, Qt::UserRole, dl->pc);
|
||||
ui->displayList->addTopLevelItem(item);
|
||||
if(curDlId == dl->id)
|
||||
if(curDlId == (u32)dl->id)
|
||||
{
|
||||
ui->displayList->setCurrentItem(item);
|
||||
displayListRowSelected = item;
|
||||
@@ -595,7 +595,7 @@ void Debugger_Disasm::UpdateDisplayListGUI()
|
||||
item->setText(3,QString("%1").arg(it->pc,8,16,QChar('0')));
|
||||
item->setData(3, Qt::UserRole, it->pc);
|
||||
ui->displayList->addTopLevelItem(item);
|
||||
if(curDlId == it->id)
|
||||
if(curDlId == (u32)it->id)
|
||||
{
|
||||
ui->displayList->setCurrentItem(item);
|
||||
displayListRowSelected = item;
|
||||
|
||||
+1
-19
@@ -58,49 +58,31 @@ private slots:
|
||||
void UpdateThreadGUI();
|
||||
|
||||
void on_GotoPc_clicked();
|
||||
|
||||
void on_Go_clicked();
|
||||
|
||||
void on_Stop_clicked();
|
||||
|
||||
void on_StepInto_clicked();
|
||||
|
||||
void on_StepOver_clicked();
|
||||
|
||||
void on_Skip_clicked();
|
||||
|
||||
void on_NextHLE_clicked();
|
||||
|
||||
void on_GotoLr_clicked();
|
||||
|
||||
void on_GotoInt_currentIndexChanged(int index);
|
||||
|
||||
void on_Address_textChanged(const QString &arg1);
|
||||
|
||||
void on_DisasmView_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void releaseLock();
|
||||
void on_RegList_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void on_vfpu_clicked();
|
||||
|
||||
void on_FuncList_itemClicked(QListWidgetItem *item);
|
||||
|
||||
void on_breakpointsList_itemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_breakpointsList_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void on_clearAllBP_clicked();
|
||||
|
||||
void on_threadList_itemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_threadList_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void SetThreadStatusRun();
|
||||
void SetThreadStatusWait();
|
||||
void SetThreadStatusSuspend();
|
||||
void on_displayList_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void releaseLock();
|
||||
|
||||
private:
|
||||
void SetThreadStatus(ThreadStatus status);
|
||||
|
||||
+17
-41
@@ -13,7 +13,6 @@
|
||||
#include "base/display.h"
|
||||
#include "mainwindow.h"
|
||||
#include "GPU/GLES/VertexDecoder.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
Debugger_DisplayList::Debugger_DisplayList(DebugInterface *_cpu, MainWindow* mainWindow_, QWidget *parent) :
|
||||
@@ -78,39 +77,8 @@ void Debugger_DisplayList::UpdateDisplayListGUI()
|
||||
EmuThread_LockDraw(true);
|
||||
const std::deque<DisplayList>& dlQueue = gpu->GetDisplayLists();
|
||||
|
||||
DisplayList* dl = gpu->GetCurrentDisplayList();
|
||||
if(dl)
|
||||
{
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem();
|
||||
item->setText(0,QString::number(dl->id));
|
||||
item->setData(0, Qt::UserRole, dl->id);
|
||||
switch(dl->status)
|
||||
{
|
||||
case PSP_GE_LIST_DONE: item->setText(1,"Done"); break;
|
||||
case PSP_GE_LIST_QUEUED: item->setText(1,"Queued"); break;
|
||||
case PSP_GE_LIST_DRAWING: item->setText(1,"Drawing"); break;
|
||||
case PSP_GE_LIST_STALL_REACHED: item->setText(1,"Stall Reached"); break;
|
||||
case PSP_GE_LIST_END_REACHED: item->setText(1,"End Reached"); break;
|
||||
case PSP_GE_LIST_CANCEL_DONE: item->setText(1,"Cancel Done"); break;
|
||||
default: break;
|
||||
}
|
||||
item->setText(2,QString("%1").arg(dl->startpc,8,16,QChar('0')));
|
||||
item->setData(2, Qt::UserRole, dl->startpc);
|
||||
item->setText(3,QString("%1").arg(dl->pc,8,16,QChar('0')));
|
||||
item->setData(3, Qt::UserRole, dl->pc);
|
||||
ui->displayList->addTopLevelItem(item);
|
||||
if(curDlId == dl->id)
|
||||
{
|
||||
ui->displayList->setCurrentItem(item);
|
||||
displayListRowSelected = item;
|
||||
ShowDLCode();
|
||||
}
|
||||
}
|
||||
|
||||
for(auto it = dlQueue.begin(); it != dlQueue.end(); ++it)
|
||||
{
|
||||
if(dl && it->id == dl->id)
|
||||
continue;
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem();
|
||||
item->setText(0,QString::number(it->id));
|
||||
item->setData(0, Qt::UserRole, it->id);
|
||||
@@ -129,7 +97,7 @@ void Debugger_DisplayList::UpdateDisplayListGUI()
|
||||
item->setText(3,QString("%1").arg(it->pc,8,16,QChar('0')));
|
||||
item->setData(3, Qt::UserRole, it->pc);
|
||||
ui->displayList->addTopLevelItem(item);
|
||||
if(curDlId == it->id)
|
||||
if(curDlId == (u32)it->id)
|
||||
{
|
||||
ui->displayList->setCurrentItem(item);
|
||||
displayListRowSelected = item;
|
||||
@@ -138,6 +106,14 @@ void Debugger_DisplayList::UpdateDisplayListGUI()
|
||||
}
|
||||
for(int i = 0; i < ui->displayList->columnCount(); i++)
|
||||
ui->displayList->resizeColumnToContents(i);
|
||||
|
||||
if (ui->displayList->selectedItems().size() == 0 && ui->displayList->topLevelItemCount() != 0)
|
||||
{
|
||||
ui->displayList->setCurrentItem(ui->displayList->topLevelItem(0));
|
||||
displayListRowSelected = ui->displayList->topLevelItem(0);
|
||||
ShowDLCode();
|
||||
}
|
||||
|
||||
EmuThread_LockDraw(false);
|
||||
}
|
||||
|
||||
@@ -171,7 +147,7 @@ void Debugger_DisplayList::ShowDLCode()
|
||||
item->setText(1,QString("%1").arg(it->second.cmd,2,16,QChar('0')));
|
||||
item->setText(2,QString("%1").arg(it->second.data,6,16,QChar('0')));
|
||||
item->setText(3,it->second.comment);
|
||||
if(curPc == it->first)
|
||||
if(curPc == (u32)it->first)
|
||||
{
|
||||
curTexAddr = it->second.texAddr;
|
||||
curVtxAddr = it->second.vtxAddr;
|
||||
@@ -187,7 +163,7 @@ void Debugger_DisplayList::ShowDLCode()
|
||||
}
|
||||
ui->displayListData->addTopLevelItem(item);
|
||||
|
||||
if(curPc == it->first)
|
||||
if(curPc == (u32)it->first)
|
||||
{
|
||||
ui->displayListData->setCurrentItem(item);
|
||||
}
|
||||
@@ -209,7 +185,7 @@ void Debugger_DisplayList::ShowDLCode()
|
||||
// Textures
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem();
|
||||
u32 texaddr = (drawGPUState[i].texaddr[0] & 0xFFFFF0) | ((drawGPUState[i].texbufwidth[0]<<8) & 0x0F000000);
|
||||
if(!(usedTexAddr.find(texaddr) != usedTexAddr.end() || !Memory::IsValidAddress(texaddr)))
|
||||
if(usedTexAddr.find(texaddr) == usedTexAddr.end() && Memory::IsValidAddress(texaddr))
|
||||
{
|
||||
u32 format = drawGPUState[i].texformat & 0xF;
|
||||
int w = 1 << (drawGPUState[i].texsize[0] & 0xf);
|
||||
@@ -234,7 +210,7 @@ void Debugger_DisplayList::ShowDLCode()
|
||||
QTreeWidgetItem* vertexItem = new QTreeWidgetItem();
|
||||
u32 baseExtended = ((drawGPUState[i].base & 0x0F0000) << 8) | (drawGPUState[i].vaddr & 0xFFFFFF);
|
||||
u32 vaddr = ((drawGPUState[i].offsetAddr & 0xFFFFFF) + baseExtended) & 0x0FFFFFFF;
|
||||
if(!((drawGPUState[i].vaddr) == 0 || !Memory::IsValidAddress(vaddr) || usedVtxAddr.find(vaddr) != usedVtxAddr.end()))
|
||||
if(drawGPUState[i].vaddr != 0 && Memory::IsValidAddress(vaddr) && usedVtxAddr.find(vaddr) == usedVtxAddr.end())
|
||||
{
|
||||
vertexItem->setText(0, QString("%1").arg(vaddr,8,16,QChar('0')));
|
||||
vertexItem->setData(0,Qt::UserRole, i);
|
||||
@@ -296,7 +272,7 @@ void Debugger_DisplayList::ShowDLCode()
|
||||
QTreeWidgetItem* indexItem = new QTreeWidgetItem();
|
||||
baseExtended = ((drawGPUState[i].base & 0x0F0000) << 8) | (drawGPUState[i].iaddr & 0xFFFFFF);
|
||||
u32 iaddr = ((drawGPUState[i].offsetAddr & 0xFFFFFF) + baseExtended) & 0x0FFFFFFF;
|
||||
if(!((drawGPUState[i].iaddr & 0xFFFFFF) == 0 || !Memory::IsValidAddress(iaddr) || usedIdxAddr.find(iaddr) != usedIdxAddr.end()))
|
||||
if((drawGPUState[i].iaddr & 0xFFFFFF) != 0 && Memory::IsValidAddress(iaddr) && usedIdxAddr.find(iaddr) == usedIdxAddr.end())
|
||||
{
|
||||
indexItem->setText(0, QString("%1").arg(iaddr,8,16,QChar('0')));
|
||||
indexItem->setData(0,Qt::UserRole, i);
|
||||
@@ -1573,7 +1549,7 @@ void Debugger_DisplayList::on_gotoPCBtn_clicked()
|
||||
|
||||
for(int i = 0; i < ui->displayListData->topLevelItemCount(); i++)
|
||||
{
|
||||
if(ui->displayListData->topLevelItem(i)->data(0, Qt::UserRole).toInt() == currentPC)
|
||||
if((u32)ui->displayListData->topLevelItem(i)->data(0, Qt::UserRole).toInt() == currentPC)
|
||||
{
|
||||
ui->displayListData->setCurrentItem(ui->displayListData->topLevelItem(i));
|
||||
}
|
||||
@@ -1610,7 +1586,7 @@ void Debugger_DisplayList::UpdateRenderBufferListGUI()
|
||||
|
||||
std::vector<FramebufferInfo> fboList = gpu->GetFramebufferList();
|
||||
|
||||
for(int i = 0; i < fboList.size(); i++)
|
||||
for(size_t i = 0; i < fboList.size(); i++)
|
||||
{
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem();
|
||||
item->setText(0,QString("%1").arg(fboList[i].fb_address,8,16,QChar('0')));
|
||||
@@ -1643,7 +1619,7 @@ void Debugger_DisplayList::setCurrentFBO(u32 addr)
|
||||
{
|
||||
for(int i = 0; i < ui->fboList->topLevelItemCount(); i++)
|
||||
{
|
||||
if(ui->fboList->topLevelItem(i)->data(0,Qt::UserRole+1).toInt() == addr)
|
||||
if((u32)ui->fboList->topLevelItem(i)->data(0,Qt::UserRole+1).toInt() == addr)
|
||||
{
|
||||
for(int j = 0; j < ui->fboList->colorCount(); j++)
|
||||
ui->fboList->topLevelItem(i)->setTextColor(j,Qt::green);
|
||||
|
||||
@@ -63,40 +63,23 @@ private slots:
|
||||
void releaseLock();
|
||||
|
||||
void on_displayList_itemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_stepBtn_clicked();
|
||||
|
||||
void on_runBtn_clicked();
|
||||
|
||||
void on_stopBtn_clicked();
|
||||
|
||||
void on_nextDrawBtn_clicked();
|
||||
|
||||
void on_gotoPCBtn_clicked();
|
||||
|
||||
void on_texturesList_itemDoubleClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_comboBox_currentIndexChanged(int index);
|
||||
|
||||
void on_fboList_itemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_nextDLBtn_clicked();
|
||||
void setCurrentFBO(u32 addr);
|
||||
|
||||
void on_zoommBtn_clicked();
|
||||
|
||||
void on_zoompBtn_clicked();
|
||||
|
||||
void on_vertexList_itemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
void on_nextIdx_clicked();
|
||||
|
||||
void on_indexList_itemClicked(QTreeWidgetItem *item, int column);
|
||||
|
||||
void on_displayListData_customContextMenuRequested(const QPoint &pos);
|
||||
|
||||
void on_texturesList_customContextMenuRequested(const QPoint &pos);
|
||||
void RunToDLPC();
|
||||
void RunToDrawTex();
|
||||
|
||||
@@ -12,7 +12,7 @@ Debugger_VFPU::Debugger_VFPU(DebugInterface *_cpu, MainWindow* mainWindow_, QWid
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowTitle(QString("VFPU - ")+cpu->GetName());
|
||||
setWindowTitle(QString("VFPU - %1").arg(cpu->GetName()));
|
||||
|
||||
ui->vfpu->setCPU(_cpu);
|
||||
}
|
||||
|
||||
@@ -44,10 +44,10 @@ const int configOffset = 200;
|
||||
GamePadDialog::GamePadDialog(InputState* state, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::GamePadDialog),
|
||||
m_inputState(state),
|
||||
#if QT_HAS_SDL
|
||||
m_joystick(0),
|
||||
#endif
|
||||
m_inputState(state),
|
||||
m_isInit(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -108,15 +108,10 @@ void GamePadDialog::showEvent(QShowEvent *)
|
||||
|
||||
void GamePadDialog::changeEvent(QEvent *event)
|
||||
{
|
||||
QDialog::changeEvent(event);
|
||||
|
||||
if (0 != event)
|
||||
if (event->type() == QEvent::LanguageChange)
|
||||
{
|
||||
if (event->type() == QEvent::LanguageChange)
|
||||
{
|
||||
ui->retranslateUi(this);
|
||||
on_refreshListBtn_clicked();
|
||||
}
|
||||
ui->retranslateUi(this);
|
||||
on_refreshListBtn_clicked();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,23 +21,16 @@ public:
|
||||
~GamePadDialog();
|
||||
|
||||
void SetViewMode();
|
||||
void SetCalibMode();
|
||||
void CalibNextButton();
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
void changeEvent(QEvent *);
|
||||
private slots:
|
||||
void releaseLock();
|
||||
void on_refreshListBtn_clicked();
|
||||
|
||||
void on_SelectPadBtn_clicked();
|
||||
|
||||
void pollJoystick();
|
||||
|
||||
void on_AssignBtn_clicked();
|
||||
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
private:
|
||||
int GetIntFromMapping(int inputId, int type, int sign);
|
||||
void GetMappingFromInt(int value, int &inputId, int &type, int &sign);
|
||||
|
||||
+443
-485
File diff suppressed because it is too large.
Load diff
+75
-115
@@ -24,182 +24,142 @@ class MainWindow : public QMainWindow
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
void UpdateMenus();
|
||||
void SetZoom(float zoom);
|
||||
void Create(int argc, const char *argv[], const char *savegame_directory, const char *external_directory, const char *installID);
|
||||
void BrowseAndBoot();
|
||||
void SetNextState(CoreState state);
|
||||
void SetGameTitle(QString text);
|
||||
~MainWindow();
|
||||
|
||||
Debugger_Disasm* GetDialogDisasm() { return dialogDisasm; }
|
||||
Debugger_Memory* GetDialogMemory() { return memoryWindow; }
|
||||
Debugger_MemoryTex* GetDialogMemoryTex() { return memoryTexWindow; }
|
||||
Debugger_DisplayList* GetDialogDisplaylist() { return displaylistWindow; }
|
||||
CoreState GetNextState() { return nextState; }
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void keyReleaseEvent(QKeyEvent *e);
|
||||
|
||||
void ShowMemory(u32 addr);
|
||||
void Update();
|
||||
public slots:
|
||||
void UpdateMenus();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
void closeEvent(QCloseEvent *);
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void keyReleaseEvent(QKeyEvent *e);
|
||||
|
||||
public slots:
|
||||
void Boot();
|
||||
void CoreEmitWait(bool);
|
||||
|
||||
private slots:
|
||||
// File
|
||||
void on_action_FileLoad_triggered();
|
||||
|
||||
void on_action_EmulationRun_triggered();
|
||||
|
||||
void on_action_EmulationStop_triggered();
|
||||
|
||||
void on_action_EmulationPause_triggered();
|
||||
|
||||
void on_action_FileLoadStateFile_triggered();
|
||||
|
||||
void on_action_FileSaveStateFile_triggered();
|
||||
|
||||
void on_action_FileClose_triggered();
|
||||
void on_action_FileQuickloadState_triggered();
|
||||
|
||||
void on_action_FileQuickSaveState_triggered();
|
||||
|
||||
void on_action_OptionsScreen1x_triggered();
|
||||
|
||||
void on_action_OptionsScreen2x_triggered();
|
||||
|
||||
void on_action_OptionsScreen3x_triggered();
|
||||
|
||||
void on_action_OptionsScreen4x_triggered();
|
||||
|
||||
void on_action_OptionsBufferedRendering_triggered();
|
||||
|
||||
void on_action_OptionsShowDebugStatistics_triggered();
|
||||
|
||||
void on_action_OptionsHardwareTransform_triggered();
|
||||
|
||||
void on_action_FileLoadStateFile_triggered();
|
||||
void on_action_FileSaveStateFile_triggered();
|
||||
void on_action_FileExit_triggered();
|
||||
|
||||
void on_action_CPUDynarec_triggered();
|
||||
|
||||
void on_action_CPUInterpreter_triggered();
|
||||
// Emulation
|
||||
void on_action_EmulationRun_triggered();
|
||||
void on_action_EmulationPause_triggered();
|
||||
void on_action_EmulationReset_triggered();
|
||||
void on_action_EmulationRunLoad_triggered();
|
||||
|
||||
// Debug
|
||||
void on_action_DebugLoadMapFile_triggered();
|
||||
|
||||
void on_action_DebugSaveMapFile_triggered();
|
||||
|
||||
void on_action_DebugResetSymbolTable_triggered();
|
||||
|
||||
void on_action_DebugDumpFrame_triggered();
|
||||
void on_action_DebugDisassembly_triggered();
|
||||
|
||||
void on_action_DebugMemoryView_triggered();
|
||||
|
||||
void on_action_DebugDisplayList_triggered();
|
||||
void on_action_DebugLog_triggered();
|
||||
void on_action_DebugMemoryView_triggered();
|
||||
void on_action_DebugMemoryViewTexture_triggered();
|
||||
|
||||
// Options
|
||||
// Core
|
||||
void on_action_CPUDynarec_triggered();
|
||||
void on_action_CPUInterpreter_triggered();
|
||||
void on_action_OptionsFastMemory_triggered();
|
||||
void on_action_OptionsIgnoreIllegalReadsWrites_triggered();
|
||||
|
||||
void on_action_OptionsFullScreen_triggered();
|
||||
|
||||
void on_action_OptionsWireframe_triggered();
|
||||
|
||||
void on_action_OptionsDisplayRawFramebuffer_triggered();
|
||||
|
||||
void on_action_OptionsFastMemory_triggered();
|
||||
|
||||
void on_action_OptionsLinearFiltering_triggered();
|
||||
|
||||
// Controls
|
||||
void on_action_OptionsControls_triggered();
|
||||
void on_action_OptionsGamePadControls_triggered();
|
||||
|
||||
void on_action_HelpOpenWebsite_triggered();
|
||||
// Video
|
||||
void on_action_AFOff_triggered();
|
||||
void on_action_AF2x_triggered();
|
||||
void on_action_AF4x_triggered();
|
||||
void on_action_AF8x_triggered();
|
||||
void on_action_AF16x_triggered();
|
||||
|
||||
void on_action_HelpAbout_triggered();
|
||||
void on_action_OptionsBufferedRendering_triggered();
|
||||
void on_action_OptionsLinearFiltering_triggered();
|
||||
void on_action_Simple_2xAA_triggered();
|
||||
|
||||
void on_MainWindow_destroyed();
|
||||
void on_action_OptionsScreen1x_triggered();
|
||||
void on_action_OptionsScreen2x_triggered();
|
||||
void on_action_OptionsScreen3x_triggered();
|
||||
void on_action_OptionsScreen4x_triggered();
|
||||
|
||||
void on_action_Stretch_to_display_triggered();
|
||||
void on_action_OptionsHardwareTransform_triggered();
|
||||
void on_action_OptionsUseVBO_triggered();
|
||||
void on_action_OptionsVertexCache_triggered();
|
||||
void on_action_OptionsWireframe_triggered();
|
||||
void on_action_OptionsDisplayRawFramebuffer_triggered();
|
||||
void on_actionFrameskip_triggered();
|
||||
|
||||
// Sound
|
||||
void on_action_Sound_triggered();
|
||||
|
||||
void on_action_OptionsFullScreen_triggered();
|
||||
void on_action_OptionsShowDebugStatistics_triggered();
|
||||
void on_action_Show_FPS_counter_triggered();
|
||||
|
||||
// Logs
|
||||
void on_actionLogDefDebug_triggered();
|
||||
void on_actionLogDefWarning_triggered();
|
||||
void on_actionLogDefInfo_triggered();
|
||||
void on_actionLogDefError_triggered();
|
||||
|
||||
void on_actionLogG3DDebug_triggered();
|
||||
|
||||
void on_actionLogG3DWarning_triggered();
|
||||
|
||||
void on_actionLogG3DError_triggered();
|
||||
|
||||
void on_actionLogG3DInfo_triggered();
|
||||
|
||||
void on_actionLogHLEDebug_triggered();
|
||||
|
||||
void on_actionLogHLEWarning_triggered();
|
||||
|
||||
void on_actionLogHLEInfo_triggered();
|
||||
|
||||
void on_actionLogHLEError_triggered();
|
||||
|
||||
void on_actionLogDefDebug_triggered();
|
||||
|
||||
void on_actionLogDefWarning_triggered();
|
||||
|
||||
void on_actionLogDefInfo_triggered();
|
||||
|
||||
void on_actionLogDefError_triggered();
|
||||
|
||||
void on_action_OptionsGamePadControls_triggered();
|
||||
// Help
|
||||
void on_action_HelpOpenWebsite_triggered();
|
||||
void on_action_HelpAbout_triggered();
|
||||
|
||||
// Others
|
||||
void on_language_changed(QAction *action);
|
||||
|
||||
void on_action_EmulationReset_triggered();
|
||||
|
||||
void on_action_DebugDumpFrame_triggered();
|
||||
|
||||
void on_action_EmulationRunLoad_triggered();
|
||||
|
||||
void on_action_OptionsVertexCache_triggered();
|
||||
|
||||
void on_action_OptionsUseVBO_triggered();
|
||||
|
||||
void on_action_Simple_2xAA_triggered();
|
||||
|
||||
void on_action_AFOff_triggered();
|
||||
|
||||
void on_action_AF2x_triggered();
|
||||
|
||||
void on_action_AF4x_triggered();
|
||||
|
||||
void on_action_AF8x_triggered();
|
||||
|
||||
void on_action_AF16x_triggered();
|
||||
|
||||
void on_action_Show_FPS_counter_triggered();
|
||||
|
||||
void on_action_Stretch_to_display_triggered();
|
||||
|
||||
void on_action_Sound_triggered();
|
||||
|
||||
void on_action_DebugMemoryViewTexture_triggered();
|
||||
|
||||
void on_action_DebugDisplayList_triggered();
|
||||
|
||||
private:
|
||||
void SetZoom(float zoom);
|
||||
void SetGameTitle(QString text);
|
||||
void loadLanguage(const QString &language);
|
||||
void createLanguageMenu();
|
||||
void changeEvent(QEvent *);
|
||||
void notifyMapsLoaded();
|
||||
|
||||
QTranslator translator;
|
||||
QTranslator qtTranslator;
|
||||
QString currentLanguage;
|
||||
QString languagePath;
|
||||
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
QtEmuGL* emugl;
|
||||
QtEmuGL *emugl;
|
||||
CoreState nextState;
|
||||
|
||||
InputState input_state;
|
||||
|
||||
Debugger_Disasm *dialogDisasm;
|
||||
Debugger_Memory *memoryWindow;
|
||||
Debugger_MemoryTex *memoryTexWindow;
|
||||
Debugger_DisplayList *displaylistWindow;
|
||||
Controls* controls;
|
||||
GamePadDialog* gamePadDlg;
|
||||
Controls *controls;
|
||||
GamePadDialog *gamePadDlg;
|
||||
|
||||
QSet<int> pressedKeys;
|
||||
};
|
||||
|
||||
+12
-3
@@ -44,7 +44,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>23</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_File">
|
||||
@@ -52,7 +52,7 @@
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<addaction name="action_FileLoad"/>
|
||||
<addaction name="action_EmulationStop"/>
|
||||
<addaction name="action_FileClose"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="action_FileQuickloadState"/>
|
||||
<addaction name="action_FileQuickSaveState"/>
|
||||
@@ -169,6 +169,7 @@
|
||||
<addaction name="action_OptionsVertexCache"/>
|
||||
<addaction name="action_OptionsWireframe"/>
|
||||
<addaction name="action_OptionsDisplayRawFramebuffer"/>
|
||||
<addaction name="actionFrameskip"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuControls">
|
||||
<property name="title">
|
||||
@@ -220,7 +221,7 @@
|
||||
<string>&Open...</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_EmulationStop">
|
||||
<action name="action_FileClose">
|
||||
<property name="text">
|
||||
<string>&Close</string>
|
||||
</property>
|
||||
@@ -695,6 +696,14 @@
|
||||
<string>&Sound emulation</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFrameskip">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Frameskip</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
Reference in new issue
Block a user