From: Jean-Paul Mari Date: Sat, 1 Sep 2018 20:49:01 +0000 (-0400) Subject: Show DRAM size in the emulator status X-Git-Tag: v2.1.3-R4~42 X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/commitdiff_plain/d259f61f080f2388a00f36766240aac016970dd2 Show DRAM size in the emulator status --- diff --git a/src/gui/emustatus.cpp b/src/gui/emustatus.cpp index 769df25..73f5b81 100644 --- a/src/gui/emustatus.cpp +++ b/src/gui/emustatus.cpp @@ -2,7 +2,6 @@ // emustatus.cpp - Jaguar emulator status // // by Jean-Paul Mari -// (C) 2012 Underground Software // // JPM = Jean-Paul Mari // @@ -19,50 +18,27 @@ #include "gpu.h" #include "m68000/m68kinterface.h" #include "jaguar.h" +#include "settings.h" +// EmuStatusWindow::EmuStatusWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog), -// layout(new QVBoxLayout), text(new QTextBrowser), layout(new QVBoxLayout), text(new QLabel), - //refresh(new QPushButton(tr("Refresh"))), - //address(new QLineEdit), - //go(new QPushButton(tr("Go"))), GPURunning(GPUIsRunning()) { setWindowTitle(tr("Emulator status")); -/* - address->setInputMask("hhhhhh"); - QHBoxLayout * hbox1 = new QHBoxLayout; - hbox1->addWidget(refresh); - hbox1->addWidget(address); - hbox1->addWidget(go); -*/ - - // Need to set the size as well... -// resize(560, 480); - 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); layout->addWidget(text); -// layout->addWidget(refresh); -/* - layout->addLayout(hbox1); -*/ - -/* - connect(refresh, SIGNAL(clicked()), this, SLOT(RefreshContents())); - connect(go, SIGNAL(clicked()), this, SLOT(GoToAddress())); -*/ } +// void EmuStatusWindow::RefreshContents(void) { char string[1024]; @@ -78,7 +54,9 @@ void EmuStatusWindow::RefreshContents(void) M68000DebugHaltStatus = M68KDebugHaltStatus(); sprintf(string, "M68K debugger status | %s\n", (M68000DebugHaltStatus ? "Halt" : "Run")); emuStatusDump += QString(string); - sprintf(string, " M68K tracing | %s", (startM68KTracing ? "On" : "Off")); + sprintf(string, " M68K tracing | %s\n", (startM68KTracing ? "On" : "Off")); + emuStatusDump += QString(string); + sprintf(string, " DRAM | %i KB", (vjs.DRAM_size / 1024)); emuStatusDump += QString(string); text->setText(emuStatusDump); @@ -86,57 +64,11 @@ void EmuStatusWindow::RefreshContents(void) } -/* +// void EmuStatusWindow::keyPressEvent(QKeyEvent * e) { if (e->key() == Qt::Key_Escape) - hide(); - else if (e->key() == Qt::Key_PageUp) - { - memBase -= 480; - - if (memBase < 0) - memBase = 0; - - RefreshContents(); - } - else if (e->key() == Qt::Key_PageDown) - { - memBase += 480; - - if (memBase > (0x200000 - 480)) - memBase = 0x200000 - 480; - - RefreshContents(); - } - else if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Minus) - { - memBase -= 16; - - if (memBase < 0) - memBase = 0; - - RefreshContents(); - } - else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Equal) { - memBase += 16; - - if (memBase > (0x200000 - 480)) - memBase = 0x200000 - 480; - - RefreshContents(); + hide(); } } -*/ - - -/* -void EmuStatusWindow::GoToAddress(void) -{ - bool ok; - QString newAddress = address->text(); - memBase = newAddress.toUInt(&ok, 16); - RefreshContents(); -} -*/ diff --git a/src/gui/emustatus.h b/src/gui/emustatus.h index 7e0cf73..6552e89 100644 --- a/src/gui/emustatus.h +++ b/src/gui/emustatus.h @@ -2,7 +2,6 @@ // emustatus.h: Jaguar emulator status // // by Jean-Paul Mari -// (C) 2012 Underground Software // #ifndef __EMUSTATUS_H__ @@ -18,23 +17,15 @@ class EmuStatusWindow : public QWidget public: EmuStatusWindow(QWidget * parent = 0); - public slots: -// void DefineAllKeys(void); void RefreshContents(void); - //void GoToAddress(void); protected: - //void keyPressEvent(QKeyEvent *); + void keyPressEvent(QKeyEvent *); private: QVBoxLayout * layout; -// QTextBrowser * text; QLabel * text; - //QPushButton * refresh; - //QLineEdit * address; - //QPushButton * go; - bool GPURunning; bool M68000DebugHaltStatus; };