From 3bfba0b6be74e6eff2854c779bdb9a958385068e Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Sun, 15 Jul 2012 23:10:40 -0500 Subject: [PATCH] Fixed DSP/audio options to be unambiguous and consistent. The DSP is now running in the host audio IRQ, so turning it off will turn off the host audio IRQ as well. Also fixed DAC to reflect this change. Added a few minor fixups to a few files as well. --- .gitignore | 6 ++++++ cross-compile | 2 +- src/dac.cpp | 5 +++-- src/gui/configdialog.cpp | 4 ++-- src/gui/generaltab.cpp | 16 ++++++++-------- src/gui/mainwin.cpp | 9 ++++++--- src/op.cpp | 1 + 7 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 23d2d3a..9d442ad 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,9 @@ obj/ src/m68000/obj/ src/version.h virtualjaguar +virtualjaguar.log +src/*~ +src/m68000/*~ +eeproms/*.eep +software/ +*~ diff --git a/cross-compile b/cross-compile index ef4b690..896ef11 100755 --- a/cross-compile +++ b/cross-compile @@ -10,5 +10,5 @@ export PATH=/opt/mxe/usr/bin:$PATH rm makefile-qt make CROSS=i686-pc-mingw32- #rel=`svn info | grep Revision | cut -f 2 -d ' '` -#rel=`git log -1 --pretty=format:%ci | cut -d ' ' -f 1 | tr -d -` +rel=`git log -1 --pretty=format:%ci | cut -d ' ' -f 1 | tr -d -` cd release && upx -9v virtualjaguar.exe && zip -9v vj-$rel.zip virtualjaguar.exe diff --git a/src/dac.cpp b/src/dac.cpp index 6f9b5a8..7cc3740 100644 --- a/src/dac.cpp +++ b/src/dac.cpp @@ -97,9 +97,10 @@ void DACInit(void) { SDLSoundInitialized = false; - if (!vjs.audioEnabled) +// if (!vjs.audioEnabled) + if (!vjs.DSPEnabled) { - WriteLog("DAC: Host audio playback disabled.\n"); + WriteLog("DAC: DSP/host audio playback disabled.\n"); return; } diff --git a/src/gui/configdialog.cpp b/src/gui/configdialog.cpp index 709940c..1fd8be4 100644 --- a/src/gui/configdialog.cpp +++ b/src/gui/configdialog.cpp @@ -70,7 +70,7 @@ void ConfigDialog::LoadDialogFromSettings(void) generalTab->useBIOS->setChecked(vjs.useJaguarBIOS); generalTab->useGPU->setChecked(vjs.GPUEnabled); generalTab->useDSP->setChecked(vjs.DSPEnabled); - generalTab->useHostAudio->setChecked(vjs.audioEnabled); +// generalTab->useHostAudio->setChecked(vjs.audioEnabled); if (vjs.hardwareTypeAlpine) { @@ -98,7 +98,7 @@ void ConfigDialog::UpdateVJSettings(void) vjs.useJaguarBIOS = generalTab->useBIOS->isChecked(); vjs.GPUEnabled = generalTab->useGPU->isChecked(); vjs.DSPEnabled = generalTab->useDSP->isChecked(); - vjs.audioEnabled = generalTab->useHostAudio->isChecked(); +// vjs.audioEnabled = generalTab->useHostAudio->isChecked(); if (vjs.hardwareTypeAlpine) { diff --git a/src/gui/generaltab.cpp b/src/gui/generaltab.cpp index c71b1c3..050cfff 100644 --- a/src/gui/generaltab.cpp +++ b/src/gui/generaltab.cpp @@ -19,17 +19,17 @@ GeneralTab::GeneralTab(QWidget * parent/*= 0*/): QWidget(parent) // I'm thinking we should scan the bios folder for the 5 known BIOSes, and // just present a radio button to choose between them... // (BIOS is built-in now...) - QLabel * label1 = new QLabel("Boot ROM:"); - QLabel * label2 = new QLabel("CD Boot ROM:"); +// QLabel * label1 = new QLabel("Boot ROM:"); +// QLabel * label2 = new QLabel("CD Boot ROM:"); QLabel * label3 = new QLabel("EEPROMs:"); QLabel * label4 = new QLabel("Software:"); - edit1 = new QLineEdit(""); - edit2 = new QLineEdit(""); +// edit1 = new QLineEdit(""); +// edit2 = new QLineEdit(""); edit3 = new QLineEdit(""); edit4 = new QLineEdit(""); - edit1->setPlaceholderText("Boot ROM location"); - edit2->setPlaceholderText("CD Boot ROM location"); +// edit1->setPlaceholderText("Boot ROM location"); +// edit2->setPlaceholderText("CD Boot ROM location"); edit3->setPlaceholderText("EEPROM path"); edit4->setPlaceholderText("Software path"); @@ -56,13 +56,13 @@ GeneralTab::GeneralTab(QWidget * parent/*= 0*/): QWidget(parent) useBIOS = new QCheckBox(tr("Enable Jaguar BIOS")); useGPU = new QCheckBox(tr("Enable GPU")); useDSP = new QCheckBox(tr("Enable DSP")); - useHostAudio = new QCheckBox(tr("Enable audio playback (requires DSP)")); +// useHostAudio = new QCheckBox(tr("Enable audio playback (requires DSP)")); useUnknownSoftware = new QCheckBox(tr("Show all files in file chooser")); layout4->addWidget(useBIOS); layout4->addWidget(useGPU); layout4->addWidget(useDSP); - layout4->addWidget(useHostAudio); +// layout4->addWidget(useHostAudio); layout4->addWidget(useUnknownSoftware); setLayout(layout4); diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index c0a0f46..4399688 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -455,12 +455,14 @@ void MainWin::Configure(void) QString before = vjs.ROMPath; QString alpineBefore = vjs.alpineROMPath; QString absBefore = vjs.absROMPath; - bool audioBefore = vjs.audioEnabled; +// bool audioBefore = vjs.audioEnabled; + bool audioBefore = vjs.DSPEnabled; dlg.UpdateVJSettings(); QString after = vjs.ROMPath; QString alpineAfter = vjs.alpineROMPath; QString absAfter = vjs.absROMPath; - bool audioAfter = vjs.audioEnabled; +// bool audioAfter = vjs.audioEnabled; + bool audioAfter = vjs.DSPEnabled; bool allowOld = allowUnknownSoftware; //ick. @@ -497,7 +499,8 @@ void MainWin::Configure(void) } } - // If the "Enable audio" checkbox changed, then we have to re-init the DAC... + // If the "Enable DSP" checkbox changed, then we have to re-init the DAC, + // since it's running in the host audio IRQ... if (audioBefore != audioAfter) { DACDone(); diff --git a/src/op.cpp b/src/op.cpp index 8ae2eb5..8708d9b 100644 --- a/src/op.cpp +++ b/src/op.cpp @@ -180,6 +180,7 @@ void OPDone(void) WriteLog("\n"); #else +#warning "!!! Fix lockup in OPDiscoverObjects() !!!" //temp, to keep the following function from locking up on bad/weird OLs return; -- 2.37.2