]> Shamusworld >> Repos - virtualjaguar/commitdiff
Minor fix to IRQ subsystem. Should fix games that expected DSP IRQs masked.
authorShamus Hammons <jlhamm@acm.org>
Wed, 3 Aug 2011 12:10:48 +0000 (12:10 +0000)
committerShamus Hammons <jlhamm@acm.org>
Wed, 3 Aug 2011 12:10:48 +0000 (12:10 +0000)
src/filedb.cpp
src/gui/about.h
src/gui/help.cpp [new file with mode: 0644]
src/gui/help.h [new file with mode: 0644]
src/gui/mainwin.cpp
src/gui/mainwin.h
src/jerry.cpp
virtualjaguar.pro

index 2e808188fdb5882b47936ca0bdc8de8df2ebf0d5..e4e9e1fa28b25333c7daa222cab88be757d7e526 100644 (file)
@@ -61,6 +61,7 @@ RomIdentifier romList[] = {
        { 0x4471BFA0, "Skyhammer (World)", FF_ALPINE | FF_VERIFIED },
        { 0x47EBC158, "Theme Park (World)", FF_ROM | FF_VERIFIED },
        { 0x4899628F, "Hover Strike (World)", FF_ROM | FF_VERIFIED },
+       { 0x4A08A2BD, "SuperCross 3D (World)", FF_ROM | FF_BAD_DUMP },
        { 0x55A0669C, "[BIOS] Atari Jaguar Developer CD (World)", FF_BIOS },
        { 0x58272540, "Syndicate (World)", FF_ROM | FF_VERIFIED },
        { 0x5A101212, "Sensible Soccer - International Edition (World)", FF_ROM | FF_VERIFIED },
index 7397e3b8a9679f185eac1b6ad909d248627f0dac..854ebc88f5073ddaaa43be2a3e8194ce5f29b20b 100644 (file)
@@ -22,21 +22,3 @@ class AboutWindow: public QWidget
 };
 
 #endif // __ABOUT_H__
-
-
-#if 0
-class AboutWindow : public QbWindow {
-  Q_OBJECT
-
-public:
-  QVBoxLayout *layout;
-  struct Logo : public QWidget {
-    void paintEvent(QPaintEvent*);
-  } *logo;
-  QLabel *info;
-
-  AboutWindow();
-};
-
-extern AboutWindow *aboutWindow;
-#endif
diff --git a/src/gui/help.cpp b/src/gui/help.cpp
new file mode 100644 (file)
index 0000000..cb4f2eb
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// help.cpp - Help file
+//
+// by James L. Hammons
+// (C) 2011 Underground Software
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// Who  When        What
+// ---  ----------  -------------------------------------------------------------
+// JLH  08/01/2011  Created this file
+//
+
+// STILL TO DO:
+//
+
+#include "help.h"
+
+HelpWindow::HelpWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
+{
+       setWindowTitle(tr("Virtual Jaguar Help"));
+
+       // Need to set the size as well...
+//  resize(560, 480);
+       resize(560, 480);
+
+       layout = new QVBoxLayout();
+       layout->setSizeConstraint(QLayout::SetFixedSize);
+       setLayout(layout);
+
+//     image = new QLabel();
+//     image->setAlignment(Qt::AlignRight);
+//     image->setPixmap(QPixmap(":/res/vj_title_small.png"));
+//     layout->addWidget(image);
+
+//     QString s = QString(tr("SVN %1<br>")).arg(__DATE__);
+       QString s;// = QString("");
+       s.append(tr(
+               "<h1>Virtual Jaguar Documentation</h1>"
+               "<br><br>"
+               "<b><i>Coming soon!</i></b>"
+       ));
+       text = new QTextBrowser;
+       text->setHtml(s);
+       layout->addWidget(text);
+}
+
+
+#if 0
+#include "htmlviewer.moc"
+HtmlViewerWindow *htmlViewerWindow;
+
+HtmlViewerWindow::HtmlViewerWindow() {
+  setObjectName("html-window");
+  resize(560, 480);
+  setGeometryString(&config().geometry.htmlViewerWindow);
+  application.windowList.add(this);
+
+  layout = new QVBoxLayout;
+  layout->setMargin(Style::WindowMargin);
+  layout->setSpacing(0);
+  setLayout(layout);
+
+  document = new QTextBrowser;
+  layout->addWidget(document);
+}
+
+void HtmlViewerWindow::show(const char *title, const char *htmlData) {
+  document->setHtml(string() << htmlData);
+  setWindowTitle(title);
+  Window::show();
+}
+#endif
diff --git a/src/gui/help.h b/src/gui/help.h
new file mode 100644 (file)
index 0000000..7b4b48e
--- /dev/null
@@ -0,0 +1,25 @@
+//
+// help.h: Built-in help system
+//
+// by James L. Hammons
+// (C) 2011 Underground Software
+//
+
+#ifndef __HELP_H__
+#define __HELP_H__
+
+#include <QtGui>
+
+class HelpWindow: public QWidget
+{
+       public:
+               HelpWindow(QWidget * parent = 0);
+
+       private:
+               QVBoxLayout * layout;
+               QTextBrowser * text;
+//             QLabel * text;
+//             QLabel * image;
+};
+
+#endif // __HELP_H__
index 3ff3ded3283fe0dab0fc07f9640773ccac40aee1..48411906dec629ebe3ede9591305b07a8a4c41f5 100644 (file)
@@ -35,6 +35,7 @@
 #include "SDL.h"
 #include "glwidget.h"
 #include "about.h"
+#include "help.h"
 #include "settings.h"
 #include "filepicker.h"
 #include "configdialog.h"
@@ -95,6 +96,7 @@ MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit
        setWindowTitle(title);
 
        aboutWin = new AboutWindow(this);
+       helpWin = new HelpWindow(this);
        filePickWin = new FilePickerWindow(this);
 
     videoWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -161,6 +163,10 @@ MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit
        aboutAct->setStatusTip(tr("Blatant self-promotion"));
        connect(aboutAct, SIGNAL(triggered()), this, SLOT(ShowAboutWin()));
 
+       helpAct = new QAction(QIcon(":/res/vj-icon.png"), tr("&Contents..."), this);
+       helpAct->setStatusTip(tr("Help is available, if you should need it"));
+       connect(helpAct, SIGNAL(triggered()), this, SLOT(ShowHelpWin()));
+
        filePickAct = new QAction(QIcon(":/res/software.png"), tr("&Insert Cartridge..."), this);
        filePickAct->setStatusTip(tr("Insert a cartridge into Virtual Jaguar"));
        filePickAct->setShortcut(QKeySequence(tr("Ctrl+i")));
@@ -192,6 +198,7 @@ MainWin::MainWin(): running(false), powerButtonOn(false), showUntunedTankCircuit
        fileMenu->addAction(quitAppAct);
 
        helpMenu = menuBar()->addMenu(tr("&Help"));
+       helpMenu->addAction(helpAct);
        helpMenu->addAction(aboutAct);
 
        toolbar = addToolBar(tr("Stuff"));
@@ -548,6 +555,11 @@ void MainWin::ShowAboutWin(void)
        aboutWin->show();
 }
 
+void MainWin::ShowHelpWin(void)
+{
+       helpWin->show();
+}
+
 void MainWin::InsertCart(void)
 {
        // If the emulator is running, we pause it here and unpause it later
index e53515af86316729dd414cc448ac9ba2d1e30b7c..cc7d160cb9097e828fdda2e5ae0d59fd02c6f583 100644 (file)
@@ -14,6 +14,7 @@
 // Forward declarations
 class GLWidget;
 class AboutWindow;
+class HelpWindow;
 class FilePickerWindow;
 
 class MainWin: public QMainWindow
@@ -42,6 +43,7 @@ class MainWin: public QMainWindow
                void SetPAL(void);
                void ToggleBlur(void);
                void ShowAboutWin(void);
+               void ShowHelpWin(void);
                void InsertCart(void);
                void Unpause(void);
                void LoadSoftware(QString);
@@ -56,6 +58,7 @@ class MainWin: public QMainWindow
 //     public:
                GLWidget * videoWidget;
                AboutWindow * aboutWin;
+               HelpWindow * helpWin;
                FilePickerWindow * filePickWin;
                QTimer * timer;
                bool running;
@@ -85,6 +88,7 @@ class MainWin: public QMainWindow
                QAction * palAct;
                QAction * blurAct;
                QAction * aboutAct;
+               QAction * helpAct;
                QAction * filePickAct;
                QAction * configAct;
                QAction * useCDAct;
index 2212cf285b8b4914567691817ba967e6ee3d9cdb..4b052366efab2adafbc937d6023c2e2f5b50816e 100644 (file)
 #include "joystick.h"
 #include "log.h"
 #include "m68k.h"
+#include "tom.h"
 //#include "memory.h"
 #include "wavetable.h"
 
@@ -352,16 +353,24 @@ void JERRYResetPIT2(void)
 #endif
 }
 
+// This is the cause of the regressions in Cybermorph and Missile Command 3D...
+// Solution: Probably have to check the DSP enable bit before sending these thru.
+//#define JERRY_NO_IRQS
 void JERRYPIT1Callback(void)
 {
+#ifndef JERRY_NO_IRQS
 //WriteLog("JERRY: In PIT1 callback, IRQM=$%04X\n", jerryInterruptMask);
-       if (jerryInterruptMask & IRQ2_TIMER1)           // CPU Timer 1 IRQ
+       if (TOMIRQEnabled(IRQ_DSP))
        {
+               if (jerryInterruptMask & IRQ2_TIMER1)           // CPU Timer 1 IRQ
+               {
 // Not sure, but I think we don't generate another IRQ if one's already going...
 // But this seems to work... :-/
-               jerryPendingInterrupt |= IRQ2_TIMER1;
-               m68k_set_irq(2);                                                // Generate 68K IPL 2
+                       jerryPendingInterrupt |= IRQ2_TIMER1;
+                       m68k_set_irq(2);                                                // Generate 68K IPL 2
+               }
        }
+#endif
 
        DSPSetIRQLine(DSPIRQ_TIMER0, ASSERT_LINE);      // This does the 'IRQ enabled' checking...
        JERRYResetPIT1();
@@ -369,12 +378,17 @@ void JERRYPIT1Callback(void)
 
 void JERRYPIT2Callback(void)
 {
-//WriteLog("JERRY: In PIT2 callback, IRQM=$%04X\n", jerryInterruptMask);
-       if (jerryInterruptMask & IRQ2_TIMER2)           // CPU Timer 2 IRQ
+#ifndef JERRY_NO_IRQS
+       if (TOMIRQEnabled(IRQ_DSP))
        {
-               jerryPendingInterrupt |= IRQ2_TIMER2;
-               m68k_set_irq(2);                                                // Generate 68K IPL 2
+//WriteLog("JERRY: In PIT2 callback, IRQM=$%04X\n", jerryInterruptMask);
+               if (jerryInterruptMask & IRQ2_TIMER2)           // CPU Timer 2 IRQ
+               {
+                       jerryPendingInterrupt |= IRQ2_TIMER2;
+                       m68k_set_irq(2);                                                // Generate 68K IPL 2
+               }
        }
+#endif
 
        DSPSetIRQLine(DSPIRQ_TIMER1, ASSERT_LINE);      // This does the 'IRQ enabled' checking...
        JERRYResetPIT2();
index abc4e7f9b776b91cd18c72daa74b0f2a9cc21b69..492b568d56e7f0ca5067d8c9b4a291a3bcaf386e 100644 (file)
@@ -63,6 +63,7 @@ HEADERS = \
        src/gui/filethread.h \
        src/gui/generaltab.h \
        src/gui/glwidget.h \
+       src/gui/help.h \
        src/gui/imagedelegate.h \
        src/gui/keygrabber.h \
        src/gui/mainwin.h
@@ -79,6 +80,7 @@ SOURCES = \
        src/gui/filethread.cpp \
        src/gui/generaltab.cpp \
        src/gui/glwidget.cpp \
+       src/gui/help.cpp \
        src/gui/imagedelegate.cpp \
        src/gui/keygrabber.cpp \
        src/gui/mainwin.cpp