]> Shamusworld >> Repos - virtualjaguar/commitdiff
Minor fixes to the OP, small enhancements to icons.
authorShamus Hammons <jlhamm@acm.org>
Thu, 20 Oct 2011 16:25:13 +0000 (16:25 +0000)
committerShamus Hammons <jlhamm@acm.org>
Thu, 20 Oct 2011 16:25:13 +0000 (16:25 +0000)
16 files changed:
Makefile
docs/INSTALL
docs/README
docs/WHATSNEW
res/pause-off.png [new file with mode: 0644]
res/pause-on.png [new file with mode: 0644]
res/pause.png [deleted file]
res/power-off.png [new file with mode: 0644]
res/power-on-green.png [new file with mode: 0644]
res/power-on-red.png [moved from res/power.png with 100% similarity]
src/gui/about.cpp
src/gui/mainwin.cpp
src/gui/mainwin.h
src/gui/virtualjaguar.qrc
src/op.cpp
virtualjaguar.pro

index 0fcad72aae842d2d4465f13035487509e5447252..d1cb758d830425b3fb0d6da19f6aacae331d0448 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,10 +23,10 @@ all: prepare virtualjaguar
 
 prepare:
        @echo -e "\033[01;33m***\033[00;32m Preparing to compile Virtual Jaguar...\033[00m"
-#      @echo "#define VJ_RELEASE_VERSION \"v2.0.1\"" > src/version.h
+#      @echo "#define VJ_RELEASE_VERSION \"v2.0.2\"" > src/version.h
 #      @echo "#define VJ_RELEASE_SUBVERSION \"Final\"" >> src/version.h
        @echo "#define VJ_RELEASE_VERSION \"SVN `svn info | grep -i revision`\"" > src/version.h
-       @echo "#define VJ_RELEASE_SUBVERSION \"2.0.1 Prerelease\"" >> src/version.h
+       @echo "#define VJ_RELEASE_SUBVERSION \"2.0.2 Prerelease\"" >> src/version.h
 
 virtualjaguar: sources libs makefile-qt
        @echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar GUI...\033[00m"
index 36ea778ef00a4bb2fb413bc75a8c76dc48b4f8c7..a5a7b5750137f1dbc3fa401adeb599bb7d670d40 100644 (file)
@@ -1,5 +1,5 @@
 ----------------------------------------
-Virtual Jaguar v2.0.0 Qt release INSTALL
+Virtual Jaguar v2.0.2 Qt release INSTALL
 ----------------------------------------
 
 
index 1f2f3b3669ce766b8c1b7f125256b4c4408c73c9..5e5d3b17ee7ce9ed9277192002a3b861a056d773 100644 (file)
@@ -1,5 +1,5 @@
 -------------------------------------------
-Virtual Jaguar v2.0.0 GCC/Qt release README
+Virtual Jaguar v2.0.2 GCC/Qt release README
 -------------------------------------------
 
 --------------
@@ -15,10 +15,10 @@ software requirements.
 
 The use of this software is entirely at your own risk. While it won't rape
 your dog, it might do other nasty things. We can't be held responsible for
-damage done to you hardware and/or software. You have been warned! You may only
-use the ROM images if you own the cartridges itself. The use of Commercial ROMs
-without owning the original cartridge is illegal in most countries and could
-result in fines and/or legal actions.
+damage done to you hardware and/or software. You may only use the ROM images if
+you own the cartridges itself. The use of Commercial ROMs without owning the
+original cartridge is illegal in most countries and could result in fines
+and/or legal actions.
 
 This software is released under the GPL v3 or later. For more information I
 direct you to the GPLv3 file. You may hack/change the code anyway you like. You
index 4a6c48f3c9a763ec60eb45c5ac17278111517e7e..72625b0a57e8a52540324344758a7dfa1885cc70 100644 (file)
@@ -1,3 +1,19 @@
+Virtual Jaguar v2.0.2 GCC/Qt
+----------------------------
+
+* Fixed problem on OP with 24BPP bitmaps. [Shamus]
+* Cosmetic GUI fixes. [Shamus]
+
+Virtual Jaguar v2.0.1 GCC/Qt
+----------------------------
+
+* Fixed NTSC timings; they were hardwired to PAL rates. [Shamus]
+* Fixed possible missing trailing slash on path fields input by user. [Shamus]
+* Fixed exit hotkey to work on Win32. [Shamus]
+* Changed PAL/NTSC switch to only work when virtual machine is powered off.
+  [Shamus]
+* Miscellaneous documentation fixes. [Shamus]
+
 Virtual Jaguar v2.0.0 GCC/Qt
 ----------------------------
 
diff --git a/res/pause-off.png b/res/pause-off.png
new file mode 100644 (file)
index 0000000..5933445
Binary files /dev/null and b/res/pause-off.png differ
diff --git a/res/pause-on.png b/res/pause-on.png
new file mode 100644 (file)
index 0000000..ef3b4cc
Binary files /dev/null and b/res/pause-on.png differ
diff --git a/res/pause.png b/res/pause.png
deleted file mode 100644 (file)
index 7b03a0d..0000000
Binary files a/res/pause.png and /dev/null differ
diff --git a/res/power-off.png b/res/power-off.png
new file mode 100644 (file)
index 0000000..869b153
Binary files /dev/null and b/res/power-off.png differ
diff --git a/res/power-on-green.png b/res/power-on-green.png
new file mode 100644 (file)
index 0000000..8b52797
Binary files /dev/null and b/res/power-on-green.png differ
similarity index 100%
rename from res/power.png
rename to res/power-on-red.png
index db688f47f18798e33e434a54b36c7e93c0d6e973..c9588ead7f43b3500530cd6477b1b5b753dcb906 100644 (file)
@@ -41,7 +41,7 @@ AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
                "</td></tr>"
                "<tr><td align='right'><b>Coders: </b></td><td>James L. Hammons (shamus)<br>Niels Wagenaar (nwagenaar)<br>Carwin Jones (Caz)<br>Adam Green</td></tr>"
                "<tr><td align='right'><b>Testers: </b></td><td>Cyrano Jones, Robert R, TheUMan, Dissection,<br>overridex, geormetal</td></tr>"
-               "<tr><td align='right'><b>Build Team: </b></td><td>ggn (win32)<br>goldenegg (MacOS)</td></tr>"
+               "<tr><td align='right'><b>Build Team: </b></td><td>ggn (win32)<br>LinkoVitch, goldenegg (MacOS)</td></tr>"
                "<tr><td align='right'><b>Homepage: </b></td><td>http://icculus.org/virtualjaguar/</td></tr>"
                "</table>"
                "<br><br>"
index 37f9f242b2573061166b513d7f2a4fe7eb8291f6..7abc8c75509405412af2f2e2f8b606c159aeee30 100644 (file)
@@ -103,14 +103,24 @@ MainWin::MainWin(): running(true), powerButtonOn(false), showUntunedTankCircuit(
        quitAppAct->setStatusTip(tr("Quit Virtual Jaguar"));
        connect(quitAppAct, SIGNAL(triggered()), this, SLOT(close()));
 
-       powerAct = new QAction(QIcon(":/res/power.png"), tr("&Power"), this);
+       powerGreen.addFile(":/res/power-off.png", QSize(), QIcon::Normal, QIcon::Off);
+       powerGreen.addFile(":/res/power-on-green.png", QSize(), QIcon::Normal, QIcon::On);
+       powerRed.addFile(":/res/power-off.png", QSize(), QIcon::Normal, QIcon::Off);
+       powerRed.addFile(":/res/power-on-red.png", QSize(), QIcon::Normal, QIcon::On);
+
+//     powerAct = new QAction(QIcon(":/res/power.png"), tr("&Power"), this);
+       powerAct = new QAction(powerGreen, tr("&Power"), this);
        powerAct->setStatusTip(tr("Powers Jaguar on/off"));
        powerAct->setCheckable(true);
        powerAct->setChecked(false);
 //     powerAct->setDisabled(true);
        connect(powerAct, SIGNAL(triggered()), this, SLOT(TogglePowerState()));
 
-       pauseAct = new QAction(QIcon(":/res/pause.png"), tr("Pause"), this);
+       QIcon pauseIcon;
+       pauseIcon.addFile(":/res/pause-off", QSize(), QIcon::Normal, QIcon::Off);
+       pauseIcon.addFile(":/res/pause-on", QSize(), QIcon::Normal, QIcon::On);
+//     pauseAct = new QAction(QIcon(":/res/pause.png"), tr("Pause"), this);
+       pauseAct = new QAction(pauseIcon, tr("Pause"), this);
        pauseAct->setStatusTip(tr("Toggles the running state"));
        pauseAct->setCheckable(true);
        pauseAct->setDisabled(true);
@@ -221,6 +231,7 @@ MainWin::MainWin(): running(true), powerButtonOn(false), showUntunedTankCircuit(
 //     running = powerAct->isChecked();
        ntscAct->setChecked(vjs.hardwareTypeNTSC);
        palAct->setChecked(!vjs.hardwareTypeNTSC);
+       powerAct->setIcon(vjs.hardwareTypeNTSC ? powerRed : powerGreen);
 
        // Do this in case original size isn't correct (mostly for the first-run case)
        ResizeMainWindow();
@@ -528,6 +539,7 @@ void MainWin::SetZoom300(void)
 
 void MainWin::SetNTSC(void)
 {
+       powerAct->setIcon(powerRed);
        timer->setInterval(16);
        vjs.hardwareTypeNTSC = true;
        ResizeMainWindow();
@@ -535,6 +547,7 @@ void MainWin::SetNTSC(void)
 
 void MainWin::SetPAL(void)
 {
+       powerAct->setIcon(powerGreen);
        timer->setInterval(20);
        vjs.hardwareTypeNTSC = false;
        ResizeMainWindow();
index cc7d160cb9097e828fdda2e5ae0d59fd02c6f583..c69c4780d2c14178f5f0d32926bed96060bcfa9a 100644 (file)
@@ -92,6 +92,9 @@ class MainWin: public QMainWindow
                QAction * filePickAct;
                QAction * configAct;
                QAction * useCDAct;
+               
+               QIcon powerGreen;
+               QIcon powerRed;
 };
 
 #endif // __MAINWIN_H__
index 1c60900511812985533d9db0b1d39ecafc4d78e2..ebd31b410272a5cbb76a7827b10c05eec68f792a 100644 (file)
@@ -1,8 +1,11 @@
 <!DOCTYPE RCC><RCC version="1.0">
 <qresource>
        <file>../../res/vj-icon.png</file>
-       <file>../../res/power.png</file>
-       <file>../../res/pause.png</file>
+       <file>../../res/power-off.png</file>
+       <file>../../res/power-on-red.png</file>
+       <file>../../res/power-on-green.png</file>
+       <file>../../res/pause-off.png</file>
+       <file>../../res/pause-on.png</file>
        <file>../../res/zoom100.png</file>
        <file>../../res/zoom200.png</file>
        <file>../../res/zoom300.png</file>
index 9da791b4214565cc8103c9645bb73074b9323f99..73fc330010dced9a3a83a71f345d33dbbc54369c 100644 (file)
@@ -782,6 +782,15 @@ void OPProcessFixedBitmap(uint64 p0, uint64 p1, bool render)
        if (!render || iwidth == 0)
                return;
 
+//OK, so we know the position in the line buffer is correct. It's the clipping in
+//24bpp mode that's wrong!
+#if 0
+//This is a total kludge, based upon the fact that 24BPP mode puts *4* bytes
+//into the line buffer for each pixel.
+if (depth == 5)        // i.e., 24bpp mode...
+       xpos >>= 1;     // Cut it in half...
+#endif
+
 //#define OP_DEBUG_BMP
 //#ifdef OP_DEBUG_BMP
 //     WriteLog("bitmap %ix%i %ibpp at %i,%i firstpix=%i data=0x%.8x pitch %i hflipped=%s dwidth=%i (linked to 0x%.8x) Transluency=%s\n",
@@ -797,8 +806,12 @@ void OPProcessFixedBitmap(uint64 p0, uint64 p1, bool render)
        // Not sure if this is Jaguar Two only location or what...
        // From the docs, it is... If we want to limit here we should think of something else.
 //     int32 limit = GET16(tom_ram_8, 0x0008);                 // LIMIT
+//     int32 limit = 720;
+//     int32 lbufWidth = (!in24BPPMode ? limit - 1 : (limit / 2) - 1); // Zero based limit...
+//printf("[OP:xpos=%i,spos=%i,epos=%i>", xpos, startPos, endPos);
+       // This is correct, the OP line buffer is a constant size... 
        int32 limit = 720;
-       int32 lbufWidth = (!in24BPPMode ? limit - 1 : (limit / 2) - 1); // Zero based limit...
+       int32 lbufWidth = 719;
 
        // If the image is completely to the left or right of the line buffer, then bail.
 //If in REFLECT mode, then these values are swapped! !!! FIX !!! [DONE]
@@ -875,6 +888,7 @@ if (depth > 5)
                clippedWidth = startPos - lbufWidth,
                dataClippedWidth = phraseClippedWidth = clippedWidth / phraseWidthToPixels[depth],
                startPos = lbufWidth + (clippedWidth % phraseWidthToPixels[depth]);
+//printf("<OP:spos=%i,epos=%i]", startPos, endPos);
 
        // If the image is sitting on the line buffer left or right edge, we need to compensate
        // by decreasing the image phrase width accordingly.
@@ -890,7 +904,11 @@ if (depth > 5)
 //     uint32 lbufAddress = 0x1800 + (!in24BPPMode ? leftMargin * 2 : leftMargin * 4);
 //Why does this work right when multiplying startPos by 2 (instead of 4) for 24 BPP mode?
 //Is this a bug in the OP?
-       uint32 lbufAddress = 0x1800 + (!in24BPPMode ? startPos * 2 : startPos * 2);
+//It's because in 24bpp mode, each pixel takes *4* bytes, instead of the usual 2.
+//Though it looks like we're doing it here no matter what...
+//     uint32 lbufAddress = 0x1800 + (!in24BPPMode ? startPos * 2 : startPos * 2);
+//Let's try this:
+       uint32 lbufAddress = 0x1800 + (startPos * 2);
        uint8 * currentLineBuffer = &tomRam8[lbufAddress];
 
        // Render.
@@ -1241,7 +1259,8 @@ if (start_logging)
        // From the docs, it is... If we want to limit here we should think of something else.
 //     int32 limit = GET16(tom_ram_8, 0x0008);                 // LIMIT
        int32 limit = 720;
-       int32 lbufWidth = (!in24BPPMode ? limit - 1 : (limit / 2) - 1); // Zero based limit...
+//     int32 lbufWidth = (!in24BPPMode ? limit - 1 : (limit / 2) - 1); // Zero based limit...
+       int32 lbufWidth = 719;  // Zero based limit...
 
        // If the image is completely to the left or right of the line buffer, then bail.
 //If in REFLECT mode, then these values are swapped! !!! FIX !!! [DONE]
index 334f4b81176c8398aa6c83ea0819fbc6e26341ec..1b286b08e9f99258ff4766761b3c7ae638237268 100644 (file)
@@ -66,7 +66,8 @@ HEADERS = \
        src/gui/help.h \
        src/gui/imagedelegate.h \
        src/gui/keygrabber.h \
-       src/gui/mainwin.h
+       src/gui/mainwin.h \
+       src/gui/sdljoystick.h
 
 SOURCES = \
        src/gui/about.cpp \
@@ -83,4 +84,5 @@ SOURCES = \
        src/gui/help.cpp \
        src/gui/imagedelegate.cpp \
        src/gui/keygrabber.cpp \
-       src/gui/mainwin.cpp
+       src/gui/mainwin.cpp \
+       src/gui/sdljoystick.cpp