From 3740ccdd55b8f6fc2f16cd23f16e8b7a2fd117df Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Mon, 30 Apr 2018 17:31:27 -0700 Subject: [PATCH] Remove attempted graphics viewer, I can just take a hex dump and view it on rawpixels.net --- libretroBuildSystem/libretro.c | 1 - qtBuildSystem/Mu/hexviewer.cpp | 5 - qtBuildSystem/Mu/hexviewer.ui | 463 ++++++++++---------------------- qtBuildSystem/Mu/mainwindow.cpp | 27 +- qtBuildSystem/Mu/mainwindow.h | 1 + src/sed1376.c | 5 +- 6 files changed, 166 insertions(+), 336 deletions(-) diff --git a/libretroBuildSystem/libretro.c b/libretroBuildSystem/libretro.c index c8f555b..ec5197b 100644 --- a/libretroBuildSystem/libretro.c +++ b/libretroBuildSystem/libretro.c @@ -201,7 +201,6 @@ bool retro_load_game(const struct retro_game_info *info) strncat(palmRomPath, "palmos41-en-m515.rom", PATH_MAX_LENGTH - strlen(palmRomPath)); romFile = fopen(palmRomPath, "rb"); - if(romFile == NULL) return false; diff --git a/qtBuildSystem/Mu/hexviewer.cpp b/qtBuildSystem/Mu/hexviewer.cpp index 6e1fd9a..7ff9f5b 100644 --- a/qtBuildSystem/Mu/hexviewer.cpp +++ b/qtBuildSystem/Mu/hexviewer.cpp @@ -44,11 +44,6 @@ HexViewer::HexViewer(QWidget *parent) : ui(new Ui::HexViewer){ ui->setupUi(this); - ui->tabWidget->setCurrentIndex(0); - - ui->tabWidget->setTabText(0, "Hex"); - ui->tabWidget->setTabText(1, "Graphics"); - bitsPerEntry = 8; hexRadioButtonHandler(); } diff --git a/qtBuildSystem/Mu/hexviewer.ui b/qtBuildSystem/Mu/hexviewer.ui index 98d91f6..52267ce 100644 --- a/qtBuildSystem/Mu/hexviewer.ui +++ b/qtBuildSystem/Mu/hexviewer.ui @@ -6,8 +6,8 @@ 0 0 - 482 - 385 + 467 + 350 @@ -19,12 +19,6 @@ Hex Viewer - - Qt::LeftToRight - - - false - @@ -46,327 +40,156 @@ - + 0 0 - - 0 - - - - - 0 - 0 - + + + + 320 + 250 + 113 + 32 + + + + Update - - Tab 1 - - - - - 320 - 250 - 113 - 32 - - - - Update - - - - - - 270 - 30 - 113 - 21 - - - - - - - 270 - 10 - 60 - 16 - - - - Address - - - - - - 260 - 60 - 51 - 20 - - - - 8bit - - - - - - 320 - 60 - 51 - 20 - - - - 16bit - - - - - - 380 - 60 - 61 - 20 - - - - 32bit - - - - - - 270 - 110 - 113 - 21 - - - - - - - 270 - 90 - 60 - 16 - - - - Length - - - - - - 0 - 0 - 251 - 281 - - - - - - - 272 - 180 - 161 - 32 - - - - Dump - - - - - - 272 - 160 - 161 - 21 - - - - - - - 270 - 140 - 60 - 16 - - - - File Path - - - - - - 0 - 0 - + + + + 270 + 30 + 113 + 21 + + + + + + + 270 + 10 + 60 + 16 + + + + Address + + + + + + 260 + 60 + 51 + 20 + + + + 8bit + + + + + + 320 + 60 + 51 + 20 + + + + 16bit + + + + + + 380 + 60 + 61 + 20 + + + + 32bit + + + + + + 270 + 110 + 113 + 21 + + + + + + + 270 + 90 + 60 + 16 + + + + Length + + + + + + 0 + 0 + 251 + 281 + + + + + + + 272 + 180 + 161 + 32 + + + + Dump + + + + + + 272 + 160 + 161 + 21 + + + + + + + 270 + 140 + 60 + 16 + + + + File Path - - Tab 2 - - - - - 190 - 10 - 241 - 231 - - - - - 0 - 0 - - - - - - - QFrame::WinPanel - - - QFrame::Raised - - - - - - - - - 260 - 250 - 171 - 32 - - - - Update - - - - - - 10 - 60 - 60 - 16 - - - - Width - - - - - - 10 - 30 - 91 - 21 - - - - - - - 10 - 80 - 91 - 21 - - - - - - - 10 - 10 - 60 - 16 - - - - Address - - - - - - 110 - 10 - 60 - 16 - - - - BPP - - - - - - 110 - 30 - 41 - 21 - - - - - - - 110 - 60 - 61 - 20 - - - - Color - - - - - - 10 - 110 - 60 - 16 - - - - Height - - - - - - 10 - 130 - 91 - 21 - - - diff --git a/qtBuildSystem/Mu/mainwindow.cpp b/qtBuildSystem/Mu/mainwindow.cpp index d2a91a6..3a7da03 100644 --- a/qtBuildSystem/Mu/mainwindow.cpp +++ b/qtBuildSystem/Mu/mainwindow.cpp @@ -68,7 +68,7 @@ void emuThreadRun(){ } static inline void waitForEmuPaused(){ - while(!emuPaused){ + while(!emuPaused && emuInited){ std::this_thread::sleep_for(std::chrono::milliseconds(1)); } } @@ -141,7 +141,11 @@ MainWindow::~MainWindow(){ } void MainWindow::popupErrorDialog(QString error){ - QMessageBox::information(this, "Mu", error, QMessageBox::Ok); + QMessageBox::critical(this, "Mu", error, QMessageBox::Ok); +} + +void MainWindow::popupInformationDialog(QString info){ + QMessageBox::information(this, "Mu", info, QMessageBox::Ok); } bool MainWindow::eventFilter(QObject *object, QEvent *event){ @@ -306,14 +310,19 @@ void MainWindow::on_ctrlBtn_clicked(){ } void MainWindow::on_hexViewer_clicked(){ - if(emuOn){ - emuOn = false; - ui->ctrlBtn->setIcon(QIcon(":/buttons/images/play.png")); + if(emuInited){ + if(emuOn){ + emuOn = false; + ui->ctrlBtn->setIcon(QIcon(":/buttons/images/play.png")); + } + + waitForEmuPaused(); + + emuStateBrowser->exec(); + } + else{ + popupInformationDialog("Cant open hex viewer, emulator not running."); } - - waitForEmuPaused(); - - emuStateBrowser->exec(); } void MainWindow::on_screenshot_clicked(){ diff --git a/qtBuildSystem/Mu/mainwindow.h b/qtBuildSystem/Mu/mainwindow.h index e630a70..0db8909 100644 --- a/qtBuildSystem/Mu/mainwindow.h +++ b/qtBuildSystem/Mu/mainwindow.h @@ -22,6 +22,7 @@ public: private slots: void popupErrorDialog(QString error); + void popupInformationDialog(QString info); bool eventFilter(QObject *object, QEvent *event); void selectHomePath(); void on_install_pressed(); diff --git a/src/sed1376.c b/src/sed1376.c index 93033e8..1897815 100644 --- a/src/sed1376.c +++ b/src/sed1376.c @@ -130,6 +130,9 @@ uint8_t sed1376GetRegister(uint8_t address){ case PWR_SAVE_CFG: case SPECIAL_EFFECT: + case DISP_MODE: + case LINE_SIZE_0: + case LINE_SIZE_1: case PIP_ADDR_0: case PIP_ADDR_1: case PIP_ADDR_2: @@ -325,7 +328,7 @@ void sed1376Render(){ } //rotation - //later + //later, unemulated //software display inversion if((sed1376Registers[DISP_MODE] & 0x30) == 0x10)