]> Shamusworld >> Repos - virtualjaguar/commitdiff
Fixes for compilation against GCC 6.
authorShamus Hammons <jlhamm@acm.org>
Wed, 18 May 2016 00:31:26 +0000 (00:31 +0000)
committerShamus Hammons <jlhamm@acm.org>
Wed, 18 May 2016 00:31:26 +0000 (00:31 +0000)
So Debian decides to be more rice than Gentoo, and makes the jump to GCC
6 for some unknown reason. Thus, in order to prevent VJ from getting
dumped out of Debian for incompatibility with GCC 6, we have the
following update. Thanks to John Paul Adrian Glaubitz for the report, and
to Teemu Hukkanen for Debian chroot advice. :-)

18 files changed:
Makefile
src/blitter.cpp
src/gui/about.cpp
src/gui/controllerwidget.cpp
src/gui/mainwin.cpp
src/jagbios.cpp
src/jagbios.h
src/jagbios2.cpp
src/jagbios2.h
src/jagcdbios.cpp
src/jagcdbios.h
src/jagdevcdbios.cpp
src/jagdevcdbios.h
src/jagstub1bios.cpp
src/jagstub1bios.h
src/jagstub2bios.cpp
src/jagstub2bios.h
src/joystick.cpp

index 4fd8eaeaad15a26065f12ceecddb7717c4272779..29f5f498e36aa7437da84eb90cfcbef689244361 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,7 @@ virtualjaguar: sources libs makefile-qt
 
 makefile-qt: virtualjaguar.pro
        @echo -e "\033[01;33m***\033[00;32m Creating Qt makefile...\033[00m"
-       $(Q)$(CROSS)qmake $(QMAKE_EXTRA) virtualjaguar.pro -o makefile-qt
+       $(Q)$(CROSS)qmake -qt=5 $(QMAKE_EXTRA) virtualjaguar.pro -o makefile-qt
 
 libs: obj/libm68k.a obj/libjaguarcore.a
        @echo -e "\033[01;33m***\033[00;32m Libraries successfully made.\033[00m"
index 588e6c2b8b27f870932d0858407d719a4cf9d014..7193daf19ca1cbaa26ebf80007a8b54dbfd6d83c 100644 (file)
@@ -5387,7 +5387,7 @@ Addq_x            := JOIN (addq_x, addq_x[0..5], addqt_x[6..15]);
 Addq_y         := JOIN (addq_y, addq_y[0..15]);*/
 
 ////////////////////////////////////// C++ CODE //////////////////////////////////////
-       int16_t mask[8] = { 0xFFFF, 0xFFFE, 0xFFFC, 0xFFF8, 0xFFF0, 0xFFE0, 0xFFC0, 0x0000 };
+       uint16_t mask[8] = { 0xFFFF, 0xFFFE, 0xFFFC, 0xFFF8, 0xFFF0, 0xFFE0, 0xFFC0, 0x0000 };
        addq_x = addqt_x & mask[modx];
        addq_y = addqt_y & 0xFFFF;
 //////////////////////////////////////////////////////////////////////////////////////
index 1b3df54f035bb6575b9dfc52f101d19ba0863f06..71cec73ffad216747b191aa4fcc8b5c835f2d35d 100644 (file)
@@ -51,9 +51,8 @@ AboutWindow::AboutWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
                "<b>Ryan C. Gordon</b> for Virtual Jaguar's web presence<br>"
                "<b>Curt Vendel</b> for various Jaguar & other goodies<br>"
                "<b>Reboot</b> for reasons too numerous to mention<br>"
-               "<b>The Free Jaguar Project</b> (you know why) ;-)<br>"
                "The guys over at <b>Atari Age</b> :-)<br>"
-               "<b>byuu</b> for BSNES and showing us what was possible"
+               "<b>byuu</b> for <s>BSNES</s> Higan and showing us what was possible"
        ));
        text = new QLabel(s);
        layout->addWidget(text);
index f7ea8d03ce1746b0b8546290256e0e9f88c5ff9b..38ce4150b4a7cca3b8918259c2ec6b4c166e1bc5 100644 (file)
@@ -47,8 +47,8 @@ char ControllerWidget::hatName[4][16] = { "Up", "Rt", "Dn", "Lf" };
 char ControllerWidget::axisName[2][8] = { "+", "-" };
 
 // This is hard-coded crap. It's crap-tastic!
-// These are the positions to draw the button names at, ordered by the BUTTON_* sequence
-// found in joystick.h.
+// These are the positions to draw the button names at, ordered by the BUTTON_*
+// sequence found in joystick.h.
 int ControllerWidget::buttonPos[21][2] = { { 74, 32 }, { 71, 67 }, { 53, 49 }, { 93, 49 },
        { 110, 200 }, { 110, 175 }, { 110, 151 }, { 110, 126 },
        { 148, 200 }, { 148, 175 }, { 148, 151 }, { 148, 126 },
@@ -239,7 +239,8 @@ void ControllerWidget::mouseMoveEvent(QMouseEvent * event)
 
        for(int i=BUTTON_FIRST; i<=BUTTON_LAST; i++)
        {
-               // We loop through the button text positions, to see which one is closest.
+               // We loop through the button text positions, to see which one is
+               // closest.
                double distX = (double)(event->x() - buttonPos[i][0]);
                double distY = (double)(event->y() - buttonPos[i][1]);
                double currentDistance = sqrt((distX * distX) + (distY * distY));
@@ -265,7 +266,8 @@ void ControllerWidget::leaveEvent(QEvent * /*event*/)
 
 void ControllerWidget::DrawBorderedText(QPainter & painter, int x, int y, QString text)
 {
-       // Text is drawn centered at (x, y) as well, using a bounding rect for the purpose.
+       // Text is drawn centered at (x, y) as well, using a bounding rect for the
+       // purpose.
        QRect rect(0, 0, 60, 30);
        QPen oldPen = painter.pen();
        painter.setPen(QColor(0, 0, 0, 255));           // This is R,G,B,A
index 9f64c625a64ba3368494bb1186bbb735c3094f5f..cb01b029eb66f5035c0ea3fd0fb7a4851183500f 100644 (file)
@@ -964,7 +964,7 @@ void MainWin::LoadSoftware(QString file)
        running = false;                                                        // Prevent bad things(TM) from happening...
        pauseForFileSelector = false;                           // Reset the file selector pause flag
 
-       char * biosPointer = jaguarBootROM;
+       uint8_t * biosPointer = jaguarBootROM;
 
        if (vjs.hardwareTypeAlpine)
                biosPointer = jaguarDevBootROM2;
index 8c03e6f68024514a2dc7062f8012571097b92503..7951524884c5d26c0b7ee2dd87505713457c0286 100644 (file)
@@ -4,7 +4,9 @@
 // NOTE: This is the Jaguar Series K boot ROM
 //
 
-char jaguarBootROM[0x20000] = {
+#include "jagbios.h"
+
+uint8_t jaguarBootROM[0x20000] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x08, 0x41, 0xF9, 0x00, 0xF0, 0x00, 0x00, 0x30, 0xBC, 0x18, 0x61, 0x32, 0x3C, 0x35, 0xCC, 0x30, 0x39, 0x00, 0xF1, 0x40, 0x02, 0x08, 0x00, 0x00, 0x05, 
        0x66, 0x04, 0x32, 0x3C, 0x35, 0xDD, 0x31, 0x41, 0x00, 0x02, 0x46, 0xFC, 0x27, 0x00, 0x2E, 0x7C, 0x00, 0x00, 0x40, 0x00, 0x31, 0x7C, 0x00, 0x00, 0x00, 0x58, 0x21, 0x7C, 0x00, 0x00, 0x00, 0x00, 
        0x00, 0x2A, 0x33, 0xFC, 0x00, 0x04, 0x00, 0xF1, 0x00, 0x14, 0x08, 0x00, 0x00, 0x04, 0x67, 0x00, 0x00, 0x74, 0x33, 0xFC, 0x00, 0xB5, 0x00, 0xF1, 0x00, 0x12, 0x31, 0x7C, 0x03, 0x4C, 0x00, 0x2E, 
index 3f6ae5e22b862761aca0a692f61467610aab64c8..9e9a383866d0cba47f8d52fd23eb84bbd40045ca 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __JAGBIOS_H__
 #define __JAGBIOS_H__
 
-extern char jaguarBootROM[];
+#include <stdint.h>
+
+extern uint8_t jaguarBootROM[];
 
 #endif // __JAGBIOS_H__
index 413e5e65e45dc81a516d93b1a356056208456397..50764050880e27565634f44f8128928d3b63d162 100644 (file)
@@ -4,7 +4,9 @@
 // NOTE: This is the Jaguar Series M boot ROM
 //
 
-char jaguarBootROM2[0x20000] = {
+#include "jagbios2.h"
+
+uint8_t jaguarBootROM2[0x20000] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x08, 0x41, 0xF9, 0x00, 0xF0, 0x00, 0x00, 0x30, 0xBC, 0x18, 0x61, 0x70, 0xFF, 0x51, 0xC8, 0xFF, 0xFE, 0x32, 0x3C, 0x35, 0xCC, 0x30, 0x39, 0x00, 0xF1, 
        0x40, 0x02, 0x08, 0x00, 0x00, 0x05, 0x66, 0x04, 0x32, 0x3C, 0x35, 0xDD, 0x31, 0x41, 0x00, 0x02, 0x46, 0xFC, 0x27, 0x00, 0x2E, 0x7C, 0x00, 0x00, 0x40, 0x00, 0x31, 0x7C, 0x00, 0x00, 0x00, 0x58, 
        0x21, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x23, 0xFC, 0x00, 0x07, 0x00, 0x07, 0x00, 0xF1, 0xA1, 0x0C, 0x23, 0xFC, 0x00, 0x07, 0x00, 0x07, 0x00, 0xF0, 0x21, 0x0C, 0x23, 0xFC, 0x00, 0x00, 
index 9944947edb8926c09d4381889287e6d83651641d..961e585cf7c41b4f75325389de1f9596d13f602b 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __JAGBIOS2_H__
 #define __JAGBIOS2_H__
 
-extern char jaguarBootROM2[];
+#include <stdint.h>
+
+extern uint8_t jaguarBootROM2[];
 
 #endif // __JAGBIOS2_H__
index eea4cf0c1ca379476155de60baae586a0f37cf68..a4c407a3569ff388c3339be3c7d3e8805bc24bdd 100644 (file)
@@ -2,7 +2,9 @@
 // This file was automagically generated by bin2c (by James Hammons)
 //
 
-char jaguarCDBootROM[0x40000] = {
+#include "jagcdbios.h"
+
+uint8_t jaguarCDBootROM[0x40000] = {
        0xF6, 0x1A, 0x8C, 0x5F, 0xF0, 0x28, 0xD5, 0xC2, 0xDE, 0xE7, 0xB6, 0x87, 0xD6, 0xEA, 0x4A, 0x42, 0x9A, 0x9B, 0x2E, 0xCB, 0xE7, 0x35, 0x3C, 0x3B, 0xA2, 0xA6, 0x74, 0xF9, 0xC9, 0x86, 0xE2, 0xD7, 
        0x67, 0xC0, 0x9A, 0xFB, 0x61, 0x37, 0x37, 0x89, 0x70, 0x3B, 0xE0, 0x84, 0x97, 0x0A, 0xD2, 0xC5, 0x9F, 0xC1, 0x62, 0xB5, 0x2E, 0xD1, 0x26, 0x02, 0x44, 0xC3, 0xE1, 0xD4, 0xD6, 0xC2, 0xE7, 0x6A, 
        0x56, 0x27, 0x2E, 0x60, 0x74, 0xE9, 0x05, 0xCE, 0x65, 0xB9, 0x87, 0x74, 0x64, 0x65, 0xF2, 0xB2, 0x00, 0xF7, 0xFB, 0xBC, 0xB9, 0xA2, 0x2D, 0x73, 0xC1, 0x75, 0xF5, 0xD1, 0xF3, 0xDB, 0xB5, 0x17, 
index 2fb0861abd7e739aead35defcf6deb3a557927ae..23e5abecdd6322fca9afe8957bf96b5ccd8dd055 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __JAGCDBIOS_H__
 #define __JAGCDBIOS_H__
 
-extern char jaguarCDBootROM[];
+#include <stdint.h>
+
+extern uint8_t jaguarCDBootROM[];
 
 #endif // __JAGCDBIOS_H__
index 85dbe91de883eaa7faf681b5063f66de18b8e212..e4ce4b4dbc28accade8c8c4132a40ac9778ff7c6 100644 (file)
@@ -2,7 +2,9 @@
 // This file was automagically generated by bin2c (by James Hammons)
 //
 
-char jaguarDevCDBootROM[0x40000] = {
+#include "jagdevcdbios.h"
+
+uint8_t jaguarDevCDBootROM[0x40000] = {
        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
index 432e48cb663aa8f7a67dac0ebd553dafc76b5f12..fe6ae8cfa190132fc846810f888c4ff54fb2cb18 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __JAGDEVCDBIOS_H__
 #define __JAGDEVCDBIOS_H__
 
-extern char jaguarDevCDBootROM[];
+#include <stdint.h>
+
+extern uint8_t jaguarDevCDBootROM[];
 
 #endif // __JAGDEVCDBIOS_H__
index 80fdd43fc12becd18c54e772cb8a91e21e6b662a..7fb85d5ff2fe066fcb1c12b9ca035110a5c68dad 100644 (file)
@@ -2,7 +2,9 @@
 // This file was automagically generated by bin2c (by James Hammons)
 //
 
-char jaguarDevBootROM1[0x20000] = {
+#include "jagstub1bios.h"
+
+uint8_t jaguarDevBootROM1[0x20000] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x08, 0x4D, 0xF9, 0x00, 0xF0, 0x00, 0x00, 0x49, 0xF9, 0x00, 0xF1, 0x40, 0x00, 0x3C, 0xFC, 0x18, 0x61, 0x3C, 0xBC, 0x35, 0xCC, 0x46, 0xFC, 0x27, 0x00, 
        0x4F, 0xF8, 0x03, 0x00, 0x70, 0xFF, 0x74, 0x02, 0x51, 0xC8, 0xFF, 0xFC, 0x38, 0xBC, 0x80, 0x0D, 0xC4, 0x6C, 0x00, 0x02, 0x66, 0x06, 0x4E, 0xF9, 0x00, 0xE0, 0x1B, 0xFA, 0x41, 0xF9, 0x00, 0xE0, 
        0x00, 0x00, 0x47, 0xF8, 0x04, 0x00, 0x30, 0x3C, 0x06, 0xFF, 0x26, 0xD8, 0x51, 0xC8, 0xFF, 0xFC, 0x30, 0x3C, 0x06, 0xFF, 0x24, 0x23, 0xB4, 0xA0, 0x67, 0x04, 0x60, 0x00, 0x12, 0x1A, 0x51, 0xC8, 
index a4b6f72380640f68b746f33c1fbca1cf45a21afb..200e84bd21bcb1885ec31647daab496e7544121a 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __JAGSTUB1BIOS_H__
 #define __JAGSTUB1BIOS_H__
 
-extern char jaguarDevBootROM1[];
+#include <stdint.h>
+
+extern uint8_t jaguarDevBootROM1[];
 
 #endif // __JAGSTUB1BIOS_H__
index 884680af7fa10a0367ce66ad315760d6c5449475..41d55c4e8fac6cccbfa05b60b23c7912d26b085d 100644 (file)
@@ -2,7 +2,9 @@
 // This file was automagically generated by bin2c (by James Hammons)
 //
 
-char jaguarDevBootROM2[0x20000] = {
+#include "jagstub2bios.h"
+
+uint8_t jaguarDevBootROM2[0x20000] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x08, 0x4D, 0xF9, 0x00, 0xF0, 0x00, 0x00, 0x49, 0xF9, 0x00, 0xF1, 0x40, 0x00, 0x3C, 0xFC, 0x18, 0x61, 0x3C, 0xBC, 0x35, 0xCC, 0x46, 0xFC, 0x27, 0x00, 
        0x4F, 0xF8, 0x03, 0x00, 0x70, 0xFF, 0x76, 0x02, 0x51, 0xC8, 0xFF, 0xFC, 0x41, 0xF9, 0x00, 0xE0, 0x00, 0x00, 0x47, 0xF8, 0x04, 0x00, 0x30, 0x3C, 0x06, 0xFF, 0x26, 0xD8, 0x51, 0xC8, 0xFF, 0xFC, 
        0x30, 0x3C, 0x06, 0xFF, 0x24, 0x23, 0xB4, 0xA0, 0x66, 0x00, 0x12, 0x34, 0x51, 0xC8, 0xFF, 0xF6, 0x48, 0x79, 0x00, 0x00, 0x04, 0x64, 0x45, 0xF9, 0x00, 0xE0, 0x15, 0x94, 0x95, 0xFC, 0x00, 0xDF, 
index fcec2e36e8d4e5b16420f5e027fe489b7d53cf40..c80d98d65a5beeef6aea17883315ed6377b20c05 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __JAGSTUB2BIOS_H__
 #define __JAGSTUB2BIOS_H__
 
-extern char jaguarDevBootROM2[];
+#include <stdint.h>
+
+extern uint8_t jaguarDevBootROM2[];
 
 #endif // __JAGSTUB1BIOS_H__
index 4b2549384fc9d9fa311edf254399782381f5fbf4..25aef85b2a23e1a72c14d2853c4988649a7ca864 100644 (file)
@@ -137,7 +137,7 @@ uint16_t JoystickReadWord(uint32_t offset)
                if (offset0 != 0xFF)
                {
                        offset0 /= 4;   // Make index 0, 1, 2, 3 instead of 0, 4, 8, 12
-                       uint8_t mask[4][2] = { { BUTTON_A, BUTTON_PAUSE }, { BUTTON_B, -1 }, { BUTTON_C, -1 }, { BUTTON_OPTION, -1 } };
+                       uint8_t mask[4][2] = { { BUTTON_A, BUTTON_PAUSE }, { BUTTON_B, 0xFF }, { BUTTON_C, 0xFF }, { BUTTON_OPTION, 0xFF } };
                        data &= (joypad0Buttons[mask[offset0][0]] ? 0xFFFD : 0xFFFF);
 
                        if (mask[offset0][1] != -1)
@@ -147,7 +147,7 @@ uint16_t JoystickReadWord(uint32_t offset)
                if (offset1 != 0xFF)
                {
                        offset1 /= 4;   // Make index 0, 1, 2, 3 instead of 0, 4, 8, 12
-                       uint8_t mask[4][2] = { { BUTTON_A, BUTTON_PAUSE }, { BUTTON_B, -1 }, { BUTTON_C, -1 }, { BUTTON_OPTION, -1 } };
+                       uint8_t mask[4][2] = { { BUTTON_A, BUTTON_PAUSE }, { BUTTON_B, 0xFF }, { BUTTON_C, 0xFF }, { BUTTON_OPTION, 0xFF } };
                        data &= (joypad1Buttons[mask[offset1][0]] ? 0xFFF7 : 0xFFFF);
 
                        if (mask[offset1][1] != -1)