From: Shamus Hammons Date: Thu, 9 Oct 2014 19:31:15 +0000 (-0500) Subject: Added region specific test pattern for correctness' sake. ;-) X-Git-Tag: 2.1.2~2 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=e310c1d53915d306d8aa9a1bed9bac489bd30b03;p=virtualjaguar Added region specific test pattern for correctness' sake. ;-) --- diff --git a/res/test-pattern-pal.jpg b/res/test-pattern-pal.jpg new file mode 100644 index 0000000..cde6f04 Binary files /dev/null and b/res/test-pattern-pal.jpg differ diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 713ec11..cc5dab1 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -330,7 +330,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), // Do this in case original size isn't correct (mostly for the first-run case) ResizeMainWindow(); - // Create our test pattern bitmap + // Create our test pattern bitmaps QImage tempImg(":/res/test-pattern.jpg"); QImage tempImgScaled = tempImg.scaled(VIRTUAL_SCREEN_WIDTH, VIRTUAL_SCREEN_HEIGHT_PAL, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); @@ -345,6 +345,20 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), } } + QImage tempImg2(":/res/test-pattern-pal"); + QImage tempImgScaled2 = tempImg2.scaled(VIRTUAL_SCREEN_WIDTH, VIRTUAL_SCREEN_HEIGHT_PAL, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); + + for(uint32_t y=0; yrasterHeight; y++) { - memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + if (vjs.hardwareTypeNTSC) + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + else + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern2 + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); } } } @@ -1084,7 +1101,10 @@ void MainWin::ResizeMainWindow(void) { for(uint32_t y=0; yrasterHeight; y++) { - memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + if (vjs.hardwareTypeNTSC) + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); + else + memcpy(videoWidget->buffer + (y * videoWidget->textureWidth), testPattern2 + (y * VIRTUAL_SCREEN_WIDTH), VIRTUAL_SCREEN_WIDTH * sizeof(uint32_t)); } } @@ -1191,7 +1211,7 @@ WriteLog("Pipelined DSP = %s\n", (vjs.usePipelinedDSP ? "ON" : "off")); ReadProfiles(&settings); } - + void MainWin::WriteSettings(void) { QSettings settings("Underground Software", "Virtual Jaguar"); diff --git a/src/gui/mainwin.h b/src/gui/mainwin.h index e5dc8e2..a87289d 100644 --- a/src/gui/mainwin.h +++ b/src/gui/mainwin.h @@ -145,6 +145,7 @@ class MainWin: public QMainWindow QIcon powerGreen; QIcon powerRed; uint32_t testPattern[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL]; + uint32_t testPattern2[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL]; }; #endif // __MAINWIN_H__ diff --git a/src/gui/virtualjaguar.qrc b/src/gui/virtualjaguar.qrc index 19e99ed..5d43c4a 100644 --- a/src/gui/virtualjaguar.qrc +++ b/src/gui/virtualjaguar.qrc @@ -35,6 +35,7 @@ ../../res/homebrew-file.png ../../res/unknown-file.png ../../res/test-pattern.jpg + ../../res/test-pattern-pal.jpg ../../res/help.html