2 // DSPDasmWin.cpp - Jaguar DSP disassembly window
6 // JPM = Jean-Paul Mari <djipi.mari@gmail.com>
9 // --- ---------- -------------------------------------------------------------
10 // JPM 02/02/2017 Created this file
16 #include "DSPDasmWin.h"
23 DSPDasmWindow::DSPDasmWindow(QWidget
* parent
/*= 0*/): QWidget(parent
, Qt::Dialog
),
24 layout(new QVBoxLayout
), text(new QLabel
),
25 memBase(DSPReadLong(0xF1A110, DEBUG
))
27 QFont
fixedFont("Lucida Console", 8, QFont::Normal
);
28 fixedFont
.setStyleHint(QFont::TypeWriter
);
29 text
->setFont(fixedFont
);
32 layout
->addWidget(text
);
36 void DSPDasmWindow::RefreshContents(void)
41 int pc
= memBase
, oldpc
;
42 uint32_t DSPPC
= DSPReadLong(0xF1A110, DEBUG
);
43 bool DSPPCShow
= false;
47 for(uint32_t i
=0; i
<vjs
.nbrdisasmlines
; i
++)
50 pc
+= dasmjag(JAGUAR_DSP
, buffer
, pc
);
54 sprintf(string
, "=> %06X: %s<br>", oldpc
, buffer
);
59 sprintf(string
, " %06X: %s<br>", oldpc
, buffer
);
62 buffer
[0] = 0; // Clear string
63 char singleCharString
[2] = { 0, 0 };
65 for(uint j
=0; j
<strlen(string
); j
++)
68 strcat(buffer
, " ");
71 singleCharString
[0] = string
[j
];
72 strcat(buffer
, singleCharString
);
91 // Set mem base PC address using the 68K pc current address
92 void DSPDasmWindow::UseDSPPCAddress(void)
94 memBase
= DSPReadLong(0xF1A110, DEBUG
);