From: Shamus Hammons Date: Thu, 20 Oct 2011 16:25:13 +0000 (+0000) Subject: Minor fixes to the OP, small enhancements to icons. X-Git-Tag: 2.0.2~13 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8edf7ac06469707cc221b2cdaa8bea0ed4e2f898;p=virtualjaguar Minor fixes to the OP, small enhancements to icons. --- diff --git a/Makefile b/Makefile index 0fcad72..d1cb758 100644 --- 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" diff --git a/docs/INSTALL b/docs/INSTALL index 36ea778..a5a7b57 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -1,5 +1,5 @@ ---------------------------------------- -Virtual Jaguar v2.0.0 Qt release INSTALL +Virtual Jaguar v2.0.2 Qt release INSTALL ---------------------------------------- diff --git a/docs/README b/docs/README index 1f2f3b3..5e5d3b1 100644 --- a/docs/README +++ b/docs/README @@ -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 diff --git a/docs/WHATSNEW b/docs/WHATSNEW index 4a6c48f..72625b0 100644 --- a/docs/WHATSNEW +++ b/docs/WHATSNEW @@ -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 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 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 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 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 index 0000000..8b52797 Binary files /dev/null and b/res/power-on-green.png differ diff --git a/res/power.png b/res/power-on-red.png similarity index 100% rename from res/power.png rename to res/power-on-red.png diff --git a/src/gui/about.cpp b/src/gui/about.cpp index db688f4..c9588ea 100644 --- a/src/gui/about.cpp +++ b/src/gui/about.cpp @@ -41,7 +41,7 @@ AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog) "" "Coders: James L. Hammons (shamus)
Niels Wagenaar (nwagenaar)
Carwin Jones (Caz)
Adam Green" "Testers: Cyrano Jones, Robert R, TheUMan, Dissection,
overridex, geormetal" - "Build Team: ggn (win32)
goldenegg (MacOS)" + "Build Team: ggn (win32)
LinkoVitch, goldenegg (MacOS)" "Homepage: http://icculus.org/virtualjaguar/" "" "

" diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 37f9f24..7abc8c7 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -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(); diff --git a/src/gui/mainwin.h b/src/gui/mainwin.h index cc7d160..c69c478 100644 --- a/src/gui/mainwin.h +++ b/src/gui/mainwin.h @@ -92,6 +92,9 @@ class MainWin: public QMainWindow QAction * filePickAct; QAction * configAct; QAction * useCDAct; + + QIcon powerGreen; + QIcon powerRed; }; #endif // __MAINWIN_H__ diff --git a/src/gui/virtualjaguar.qrc b/src/gui/virtualjaguar.qrc index 1c60900..ebd31b4 100644 --- a/src/gui/virtualjaguar.qrc +++ b/src/gui/virtualjaguar.qrc @@ -1,8 +1,11 @@ ../../res/vj-icon.png - ../../res/power.png - ../../res/pause.png + ../../res/power-off.png + ../../res/power-on-red.png + ../../res/power-on-green.png + ../../res/pause-off.png + ../../res/pause-on.png ../../res/zoom100.png ../../res/zoom200.png ../../res/zoom300.png diff --git a/src/op.cpp b/src/op.cpp index 9da791b..73fc330 100644 --- a/src/op.cpp +++ b/src/op.cpp @@ -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(" 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] diff --git a/virtualjaguar.pro b/virtualjaguar.pro index 334f4b8..1b286b0 100644 --- a/virtualjaguar.pro +++ b/virtualjaguar.pro @@ -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