]> Shamusworld >> Repos - virtualjaguar/commitdiff
Stretched the virtual screen slightly.
authorShamus Hammons <jlhamm@acm.org>
Fri, 12 Oct 2012 00:48:49 +0000 (19:48 -0500)
committerShamus Hammons <jlhamm@acm.org>
Fri, 12 Oct 2012 00:48:49 +0000 (19:48 -0500)
src/gui/glwidget.cpp
src/gui/mainwin.cpp
src/jaguar.h
src/tom.cpp

index 747370791df7084fbe09f23e51f5eb76f42897c6..56fcd0ed824de8490a95cf8e3440b935310dbe8a 100644 (file)
@@ -23,7 +23,7 @@
 #endif
 
 GLWidget::GLWidget(QWidget * parent/*= 0*/): QGLWidget(parent), texture(0),
-       textureWidth(0), textureHeight(0), buffer(0), rasterWidth(320), rasterHeight(240)
+       textureWidth(0), textureHeight(0), buffer(0), rasterWidth(340), rasterHeight(240)
 {
        // Screen pitch has to be the texture width (in 32-bit pixels)...
        JaguarSetScreenPitch(1024);
@@ -52,7 +52,7 @@ void GLWidget::initializeGL()
 void GLWidget::paintGL()
 {
 //kludge
-rasterHeight = (vjs.hardwareTypeNTSC ? 240 : 256);
+rasterHeight = (vjs.hardwareTypeNTSC ? VIRTUAL_SCREEN_HEIGHT_NTSC : VIRTUAL_SCREEN_HEIGHT_PAL);
 
        unsigned outputWidth  = width();
        unsigned outputHeight = height();
index 22c211b17d8f6173ff7025fb8730b99f0331368a..cfd3ab9b1a1c90120c9a653a6d5b2542d5e735b5 100644 (file)
@@ -815,7 +815,9 @@ void MainWin::SetFullScreen(bool state/*= true*/)
                statusBar()->hide();
                showFullScreen();
                QRect r = QApplication::desktop()->availableGeometry();
-               double targetWidth = 320.0, targetHeight = (vjs.hardwareTypeNTSC ? 240.0 : 256.0);
+//             double targetWidth = 320.0, targetHeight = (vjs.hardwareTypeNTSC ? 240.0 : 256.0);
+               double targetWidth = (double)VIRTUAL_SCREEN_WIDTH,
+                       targetHeight = (double)(vjs.hardwareTypeNTSC ? VIRTUAL_SCREEN_HEIGHT_NTSC : VIRTUAL_SCREEN_HEIGHT_PAL);
                double aspectRatio = targetWidth / targetHeight;
                // NOTE: Really should check here to see which dimension constrains the other.
                //       Right now, we assume that height is the constraint.
@@ -861,7 +863,9 @@ void MainWin::ShowCPUBrowserWin(void)
 
 void MainWin::ResizeMainWindow(void)
 {
-       videoWidget->setFixedSize(zoomLevel * 320, zoomLevel * (vjs.hardwareTypeNTSC ? 240 : 256));
+//     videoWidget->setFixedSize(zoomLevel * 320, zoomLevel * (vjs.hardwareTypeNTSC ? 240 : 256));
+       videoWidget->setFixedSize(zoomLevel * VIRTUAL_SCREEN_WIDTH,
+               zoomLevel * (vjs.hardwareTypeNTSC ? VIRTUAL_SCREEN_HEIGHT_NTSC : VIRTUAL_SCREEN_HEIGHT_PAL));
        show();
 
        for(int i=0; i<2; i++)
index 4d33afc34b6b5594132c424901a1c343a7a61fc5..c0cc1b36db605923398b891f87a8bd4bc60e99c9 100644 (file)
@@ -45,7 +45,9 @@ extern bool jaguarCartInserted;
 
 // Video stuff (should go in tom.h?)
 
-#define VIRTUAL_SCREEN_WIDTH            320
+// NB: This virtual width is for PWIDTH = 4
+//#define VIRTUAL_SCREEN_WIDTH            320
+#define VIRTUAL_SCREEN_WIDTH            340
 #define VIRTUAL_SCREEN_HEIGHT_NTSC      240
 #define VIRTUAL_SCREEN_HEIGHT_PAL       256
 
index 88223c2e6dc639416e7cc4b6b50c013ba8970d57..c9d0f3f04b1574784217a5fef3c0cb30ad08ffe1 100644 (file)
 //#define LEFT_VISIBLE_HC                      (208 - 32)
 //#define RIGHT_VISIBLE_HC             (1488 - 32)
 // Split the difference? (Seems to be OK for the most part...)
-#define LEFT_VISIBLE_HC                        (208 - 16)
-#define RIGHT_VISIBLE_HC               (1488 - 16)
+
+// (-8 +8)*4 is for opening up the display by 16 pixels (may go to 20). Need to change VIRTUAL_SCREEN_WIDTH to match this as well (went from 320 to 336; this is 4 HCs per one of those pixels). <-- actually, not true. This is only place referenced.
+#define LEFT_VISIBLE_HC                        (208 - 16 - (10 * 4))
+//#define RIGHT_VISIBLE_HC             (1488 - 16 + (10 * 4))
+#define RIGHT_VISIBLE_HC               (LEFT_VISIBLE_HC + (VIRTUAL_SCREEN_WIDTH * 4))
 //#define TOP_VISIBLE_VC               25
 //#define BOTTOM_VISIBLE_VC            503
 #define TOP_VISIBLE_VC                 31
 //Are these PAL horizontals correct?
 //They seem to be for the most part, but there are some games that seem to be
 //shifted over to the right from this "window".
-#define LEFT_VISIBLE_HC_PAL            (208 - 16)
-#define RIGHT_VISIBLE_HC_PAL   (1488 - 16)
+#define LEFT_VISIBLE_HC_PAL            (208 - 16 - (10 * 4))
+//#define RIGHT_VISIBLE_HC_PAL (1488 - 16 + (10 * 4))
+#define RIGHT_VISIBLE_HC_PAL   (LEFT_VISIBLE_HC_PAL + (VIRTUAL_SCREEN_WIDTH * 4))
 #define TOP_VISIBLE_VC_PAL             67
 #define BOTTOM_VISIBLE_VC_PAL  579