]> Shamusworld >> Repos - virtualjaguar/commitdiff
Miscellaneous fixes, plus extra whitespace munging for good effect.
authorShamus Hammons <jlhamm@acm.org>
Tue, 21 Oct 2014 01:02:42 +0000 (20:02 -0500)
committerShamus Hammons <jlhamm@acm.org>
Tue, 21 Oct 2014 01:02:42 +0000 (20:02 -0500)
Fixed a bug in the TOM 16 bit LUTs, the red value mask was wrong. Fixed
a typo in jaguar.cpp. Added feedback to user if they tried to pass in a
filename to a piece of software that wasn't found. And some whitespace
futzing, because that's how we roll. :-)

res/vj-ico.o [deleted file]
src/gui/app.cpp
src/gui/mainwin.h
src/jaguar.cpp
src/tom.cpp

diff --git a/res/vj-ico.o b/res/vj-ico.o
deleted file mode 100644 (file)
index d8d5bf8..0000000
Binary files a/res/vj-ico.o and /dev/null differ
index c0e434d15b692de90912f06d7596a6fcb63f13e8..8cf3f1ea36159d02ac15ea9cf61dfd763b0249f5 100644 (file)
@@ -61,11 +61,11 @@ int main(int argc, char * argv[])
        if (AttachConsole != NULL && AttachConsole(((DWORD)-1)))
        {
                if (_fileno(stdout) == -1)
-                       freopen("CONOUT$","wb",stdout);
+                       freopen("CONOUT$", "wb", stdout);
                if (_fileno(stderr) == -1)
-                       freopen("CONOUT$","wb",stderr);
+                       freopen("CONOUT$", "wb", stderr);
                if (_fileno(stdin) == -1)
-                       freopen("CONIN$","rb",stdin);
+                       freopen("CONIN$", "rb", stdin);
 
                // Fix C++
                std::ios::sync_with_stdio();
@@ -123,7 +123,8 @@ int main(int argc, char * argv[])
        fclose(ctt);
 #endif
 #endif
-       LogDone();                                                                      // Close logfile
+       // Close logfile
+       LogDone();
        return retVal;
 }
 
@@ -136,12 +137,18 @@ App::App(int & argc, char * argv[]): QApplication(argc, argv)
 
        mainWindow = new MainWin(loadAndGo);
        mainWindow->plzDontKillMyComputer = noUntunedTankPlease;
-       ParseOptions(argc, argv);                                       // Override defaults with command line (if any)
+       // Override defaults with command line (if any)
+       ParseOptions(argc, argv);
        mainWindow->SyncUI();
 
        if (loadAndGo)
+       {
                mainWindow->LoadFile(filename);
 
+               if (!mainWindow->cartridgeLoaded)
+                       printf("Could not load file \"%s\"!\n", filename.toAscii().data());
+       }
+
        mainWindow->show();
 }
 
@@ -337,3 +344,4 @@ void ParseOptions(int argc, char * argv[])
        char alpineROMPath[MAX_PATH];
        char absROMPath[MAX_PATH];
 #endif
+
index a87289d47ace2bd0e8873259f635634aefff4a46..4263cb1cb2ad48e6607c58535cb59b1345128000 100644 (file)
@@ -92,7 +92,9 @@ class MainWin: public QMainWindow
                int zoomLevel;
                bool powerButtonOn;
                bool showUntunedTankCircuit;
+       public:
                bool cartridgeLoaded;
+       private:
                bool allowUnknownSoftware;
                bool CDActive;
 //             bool alpineLoadSuccessful;
index c717431a88b546cf332acc4863a87c3c4b0e5843..ac8a4308e72dc9f22183cf3606e79da7d0dd6396 100644 (file)
@@ -182,7 +182,7 @@ if (inRoutine)
 
        if (m68kPC & 0x01)              // Oops! We're fetching an odd address!
        {
-               WriteLog("M68K: Attempted to execute from an odd adress!\n\nBacktrace:\n\n");
+               WriteLog("M68K: Attempted to execute from an odd address!\n\nBacktrace:\n\n");
 
                static char buffer[2048];
                for(int i=0; i<0x400; i++)
index 34d7696f6fc6c9cd9241050dfa0d73d33ed54884..dc44995443b6888e1ca29a9f29942247474e0f14 100644 (file)
@@ -576,7 +576,8 @@ void TOMFillLookupTables(void)
 //                     | ((i & 0x07C0) << 13) | ((i & 0x0700) << 8)
 //                     | ((i & 0x003F) << 10) | ((i & 0x0030) << 4);
                RGB16ToRGB32[i] = 0x000000FF
-                       | ((i & 0xF100) << 16)                                  // Red
+//                     | ((i & 0xF100) << 16)                                  // Red
+                       | ((i & 0xF800) << 16)                                  // Red
                        | ((i & 0x003F) << 18)                                  // Green
                        | ((i & 0x07C0) << 5);                                  // Blue