X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fdebug%2Fcpubrowser.cpp;h=daabbf30be9ecb33f3c08648de8f05756e066aa6;hb=7228359373eb7602c26f7b098d6b2271ff5727a1;hp=62d6d0a250ebe8a958806d7443069db2113a0a84;hpb=f7b2692b338aaf37470be0a1d0e5ae42c82e0c65;p=virtualjaguar diff --git a/src/gui/debug/cpubrowser.cpp b/src/gui/debug/cpubrowser.cpp index 62d6d0a..daabbf3 100644 --- a/src/gui/debug/cpubrowser.cpp +++ b/src/gui/debug/cpubrowser.cpp @@ -32,7 +32,9 @@ CPUBrowserWindow::CPUBrowserWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt: // Need to set the size as well... // resize(560, 480); - QFont fixedFont("Lucida Console", 8, QFont::Normal); +// QFont fixedFont("Lucida Console", 8, QFont::Normal); + QFont fixedFont("", 8, QFont::Normal); + fixedFont.setStyleHint(QFont::TypeWriter); text->setFont(fixedFont); //// layout->setSizeConstraint(QLayout::SetFixedSize); setLayout(layout); @@ -54,6 +56,21 @@ void CPUBrowserWindow::RefreshContents(void) uint32_t m68kSR = m68k_get_reg(NULL, M68K_REG_SR); sprintf(string, "PC: %06X  SR: %04X

", m68kPC, m68kSR); s += QString(string); +/* +SR format: ++--+--+--+--+ +--+--+--+--+ +--+--+--+--+ +--+--+--+--+ +|T1|T0| S| M| |--|I2|I1|I0| |--|--|--| X| | N| Z| V| C| ++--+--+--+--+ +--+--+--+--+ +--+--+--+--+ +--+--+--+--+ + T - Trace (T1 only in 68K, T0 = 0) + S - Supervisor flag + M - Master/Interrupt flag (= 0 in 68K) + I - Interrupt level mask + X - Extend flag + N - Negative flag + Z - Zero flag + V - Overflow flag + C - Carry flag +*/ uint32_t m68kA0 = m68k_get_reg(NULL, M68K_REG_A0); uint32_t m68kA1 = m68k_get_reg(NULL, M68K_REG_A1); @@ -84,8 +101,30 @@ void CPUBrowserWindow::RefreshContents(void) s += QString(string); // GPU - sprintf(string, "GPU PC: %06X  FLAGS: %08X

", GPUReadLong(0xF02010), GPUReadLong(0xF02000)); + sprintf(string, "GPU PC: %06X  FLAGS: %04X  SR: %04X

", GPUReadLong(0xF02110, DEBUG), GPUReadLong(0xF02100, DEBUG), GPUReadLong(0xF02114, DEBUG)); s += QString(string); +/* +GPU Flags: +0 - Zero flag +1 - Carry flag +2 - Negative flag +3 - IMASK (writing 0 clears, 1 has no effect) +4-8 - IRQ enable 0 - 4 +9-13 - IRQ latch clear 0 - 4 +14 - REGPAGE +15 - DMAEN + +GPU Control: +0 - GPU Go +1 - CPUINT +2 - GPUINT0 +3 - Single Step +4 - Single step go +5 - Unused +6-10 - IRQ Latch 0 - 4 +11 - Bus Hog +12-15 - Version +*/ sprintf(string, "Bank 0:
" "R00: %08X  R01: %08X  R02: %08X  R03: %08X
" @@ -126,8 +165,33 @@ void CPUBrowserWindow::RefreshContents(void) s += QString(string); // DSP - sprintf(string, "DSP PC: %06X  FLAGS: %08X

", DSPReadLong(0xF1A110), DSPReadLong(0xF1A100)); + sprintf(string, "DSP PC: %06X  FLAGS: %05X  SR: %05X

", DSPReadLong(0xF1A110, DEBUG), DSPReadLong(0xF1A100, DEBUG), DSPReadLong(0xF1A114, DEBUG)); s += QString(string); +/* +DSP Flags: +0 - Zero flag +1 - Carry flag +2 - Negative flag +3 - IMASK (writing 0 clears, 1 has no effect) +4-8 - IRQ enable 0 - 4 +9-13 - IRQ latch clear 0 - 4 +14 - REGPAGE +15 - DMAEN +16 - IRQ enable 5 +17 - IRQ latch clear 5 + +DSP Control: +0 - DSP Go +1 - CPUINT +2 - DSPINT0 +3 - Single Step +4 - Single step go +5 - Unused +6-10 - IRQ Latch 0 - 4 +11 - Bus Hog +12-15 - Version +16 - IRQ Latch 5 +*/ sprintf(string, "Bank 0:
" "R00: %08X  R01: %08X  R02: %08X  R03: %08X
"