<ClInclude Include="..\..\src\memory.h" />\r
<ClInclude Include="..\..\src\memtrack.h" />\r
<ClInclude Include="..\..\src\mmu.h" />\r
+ <ClInclude Include="..\..\src\modelsBIOS.h" />\r
<ClInclude Include="..\..\src\op.h" />\r
<ClInclude Include="..\..\src\state.h" />\r
<ClInclude Include="..\..\src\tom.h" />\r
<ClCompile Include="..\..\src\memory.cpp" />\r
<ClCompile Include="..\..\src\memtrack.cpp" />\r
<ClCompile Include="..\..\src\mmu.cpp" />\r
+ <ClCompile Include="..\..\src\modelsBIOS.cpp" />\r
<ClCompile Include="..\..\src\op.cpp" />\r
<ClCompile Include="..\..\src\state.cpp" />\r
<ClCompile Include="..\..\src\tom.cpp" />\r
<ClInclude Include="..\..\src\wavetable.h">\r
<Filter>Header Files</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\src\modelsBIOS.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
</ItemGroup>\r
<ItemGroup>\r
<ClCompile Include="..\..\src\blitter.cpp">\r
<ClCompile Include="..\..\src\wavetable.cpp">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\src\modelsBIOS.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
</Project>
\ No newline at end of file
<ClCompile Include="..\src\debugger\VideoWin.cpp" />\r
<ClCompile Include="..\src\file.cpp" />\r
<ClCompile Include="..\src\gui\keybindingstab.cpp" />\r
+ <ClCompile Include="..\src\gui\modelsbiostab.cpp" />\r
<ClCompile Include="..\src\log.cpp" />\r
<ClCompile Include="..\src\settings.cpp" />\r
<ClCompile Include="..\src\unzip.cpp" />\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="GeneratedFiles\Debug\moc_modelsbiostab.cpp">\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="GeneratedFiles\Debug\moc_opbrowser.cpp">\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
</ClCompile>\r
+ <ClCompile Include="GeneratedFiles\Release\moc_modelsbiostab.cpp">\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
+ </ClCompile>\r
<ClCompile Include="GeneratedFiles\Release\moc_opbrowser.cpp">\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
</CustomBuild>\r
+ <CustomBuild Include="..\src\gui\modelsbiostab.h">\r
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</Message>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-IC:\SDK\SDL-1.2.15\include" "-IC:\SDK\mesa-11.2.0-rc4\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>\r
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_OPENGL_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_UNICODE "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.8\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-IC:\SDK\OpenGL\include"</Command>\r
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</Message>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_OPENGL_LIB "-I." "-I.\..\src" "-I.\..\src\gui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtOpenGL" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtWidgets" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtGui" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtANGLE" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\include\QtCore" "-I.\..\..\..\Qt\Qt5.5.1\msvc2015_64\mkspecs\win32-msvc2015" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>\r
+ <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>\r
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing %(Identity)...</Message>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -D__GCCWIN32__ -DQT_NO_DEBUG -DQT_OPENGL_LIB -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -D_UNICODE "-I." "-I.\..\src" "-I.\..\src\gui" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtOpenGL" "-IC:\SDK\OpenGL\include" "-IC:\SDK\SDL\SDL-1.2.15\include" "-IC:\SDK\DWARF\libdwarf-VS2015\include" "-IC:\SDK\Elf\libelf-0.8.13\include" "-IC:\SDK\zlib\zlib-1.2.11\include" "-I.\GeneratedFiles\$(ConfigurationName)\."</Command>\r
+ </CustomBuild>\r
<ClInclude Include="..\src\log.h" />\r
<ClInclude Include="..\src\settings.h" />\r
<ClInclude Include="..\src\unzip.h" />\r
<ClCompile Include="..\src\debugger\callstackbrowser.cpp">\r
<Filter>Source Files\debugger</Filter>\r
</ClCompile>\r
+ <ClCompile Include="GeneratedFiles\Debug\moc_modelsbiostab.cpp">\r
+ <Filter>Generated Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="GeneratedFiles\Release\moc_modelsbiostab.cpp">\r
+ <Filter>Generated Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\src\gui\modelsbiostab.cpp">\r
+ <Filter>Source Files\gui\tab</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<ClInclude Include="..\src\debugger\DWARFManager.h">\r
<CustomBuild Include="..\src\debugger\callstackbrowser.h">\r
<Filter>Header Files\debugger</Filter>\r
</CustomBuild>\r
+ <CustomBuild Include="..\src\gui\modelsbiostab.h">\r
+ <Filter>Header Files\gui\tab</Filter>\r
+ </CustomBuild>\r
</ItemGroup>\r
<ItemGroup>\r
<ResourceCompile Include="..\res\vj.rc">\r
// --- ---------- ------------------------------------------------------------\r
// JPM 06/19/2016 Created this file\r
// JPM 06/19/2016 Soft debugger support\r
+//\r
\r
#include "debuggertab.h"\r
#include "settings.h"\r
// JLH 10/14/2011 Fixed possibly missing final slash in paths
// JPM 06/06/2016 Visual Studio support
// JPM 06/19/2016 Soft debugger support
-// JPM 09/ /2017 Added the Keybindings tab
+// JPM 09/ /2017 Added a Keybindings tab
+// JPM 09/03/2018 Added a Models & Bios tab
//
#include "configdialog.h"
#include "controllertab.h"
#include "controllerwidget.h"
#include "generaltab.h"
+#include "modelsbiostab.h"
#include "KeyBindingsTab.h"
#include "settings.h"
ConfigDialog::ConfigDialog(QWidget * parent/*= 0*/) : QDialog(parent),
tabWidget(new QTabWidget),
generalTab(new GeneralTab(this)),
+#ifdef NEWMODELSBIOSHANDLER
+modelsbiosTab(new ModelsBiosTab),
+#endif
controllerTab1(new ControllerTab(this)),
keybindingsTab(new KeyBindingsTab(this))
{
// alpineTab = new AlpineTab(this);
tabWidget->addTab(generalTab, tr("General"));
+#ifdef NEWMODELSBIOSHANDLER
+ tabWidget->addTab(modelsbiosTab, tr("Models and Bios"));
+#endif
tabWidget->addTab(controllerTab1, tr("Controllers"));
// tabWidget->addTab(controllerTab2, tr("Controller #2"));
tabWidget->addTab(keybindingsTab, tr("Keybindings"));
}
-// Load / Update the tabs dialog from the settings
+// Load & Update the tabs dialog from the settings
void ConfigDialog::LoadDialogFromSettings(void)
{
// General & Keybindings tab settings
generalTab->GetSettings();
keybindingsTab->GetSettings();
+#ifdef NEWMODELSBIOSHANDLER
+ modelsbiosTab->GetSettings();
+#endif
// Alpine tab settings (also needed by the Debugger)
if (vjs.hardwareTypeAlpine || vjs.softTypeDebugger)
}
-// Save / Update the settings from the tabs dialog
+// Save & Update the settings from the tabs dialog
void ConfigDialog::UpdateVJSettings(void)
{
generalTab->SetSettings();
keybindingsTab->SetSettings();
+#ifdef NEWMODELSBIOSHANDLER
+ modelsbiosTab->SetSettings();
+#endif
if (vjs.hardwareTypeAlpine || vjs.softTypeDebugger)
{
// Who When What\r
// --- ---------- ------------------------------------------------------------\r
// JPM 06/19/2016 Soft debugger support\r
+// JPM 09/03/2018 Added a Models & Bios tab\r
//\r
\r
#ifndef __CONFIGDIALOG_H__\r
#define __CONFIGDIALOG_H__\r
\r
+#define NEWMODELSBIOSHANDLER // New Jaguar models and bios usage handler\r
+\r
#include <QtWidgets>\r
\r
class GeneralTab;\r
+#ifdef NEWMODELSBIOSHANDLER\r
+class ModelsBiosTab;\r
+#endif\r
class ControllerTab;\r
class AlpineTab;\r
class DebuggerTab;\r
class KeyBindingsTab;\r
\r
+\r
class ConfigDialog: public QDialog\r
{\r
Q_OBJECT\r
\r
private:\r
void LoadDialogFromSettings(void);\r
- QString CheckForTrailingSlash(QString);\r
\r
private:\r
- QTabWidget * tabWidget;\r
- QDialogButtonBox * buttonBox;\r
+ QTabWidget *tabWidget;\r
+ QDialogButtonBox *buttonBox;\r
\r
public:\r
- GeneralTab * generalTab;\r
- ControllerTab * controllerTab1;\r
-// ControllerTab * controllerTab2;\r
+ GeneralTab *generalTab;\r
+#ifdef NEWMODELSBIOSHANDLER\r
+ ModelsBiosTab *modelsbiosTab;\r
+#endif\r
+ ControllerTab *controllerTab1;\r
+// ControllerTab *controllerTab2;\r
KeyBindingsTab *keybindingsTab;\r
- AlpineTab * alpineTab;\r
- DebuggerTab * debuggerTab;\r
+ AlpineTab *alpineTab;\r
+ DebuggerTab *debuggerTab;\r
};\r
\r
#endif // __CONFIGDIALOG_H__\r
// See the README and GPLv3 files for licensing and warranty information
//
// JLH = James Hammons <jlhamm@acm.org>
+// JPM = Jean-Paul Mari <djipi.mari@gmail.com>
//
// WHO WHEN WHAT
// --- ---------- ------------------------------------------------------------
// JLH 06/23/2011 Created this file
+// JPM 09/03/2018 Added a Models & Bios tab
+// JPM 09/03/2018 Depend the platform transform slashes or backslashes
+//
+#include "configdialog.h"
#include "generaltab.h"
#include "settings.h"
+//
GeneralTab::GeneralTab(QWidget * parent/*= 0*/): QWidget(parent)
{
// I'm thinking we should scan the bios folder for the 5 known BIOSes, and
layout4->addLayout(layout3);
// Checkboxes...
+#ifndef NEWMODELSBIOSHANDLER
useBIOS = new QCheckBox(tr("Enable Jaguar BIOS"));
+#endif
useGPU = new QCheckBox(tr("Enable GPU"));
useDSP = new QCheckBox(tr("Enable DSP"));
useFullScreen = new QCheckBox(tr("Start Virtual Jaguar in full screen"));
useUnknownSoftware = new QCheckBox(tr("Show all files in file chooser"));
useFastBlitter = new QCheckBox(tr("Use fast blitter"));
+#ifndef NEWMODELSBIOSHANDLER
layout4->addWidget(useBIOS);
+#endif
layout4->addWidget(useGPU);
layout4->addWidget(useDSP);
layout4->addWidget(useFullScreen);
}
+//
GeneralTab::~GeneralTab()
{
}
// generalTab->edit2->setText(vjs.CDBootPath);
edit3->setText(vjs.EEPROMPath);
edit4->setText(vjs.ROMPath);
+#ifndef NEWMODELSBIOSHANDLER
useBIOS->setChecked(vjs.useJaguarBIOS);
+#endif
useGPU->setChecked(vjs.GPUEnabled);
useDSP->setChecked(vjs.DSPEnabled);
useFullScreen->setChecked(vjs.fullscreen);
}
-// Save / Update the settings from the tabs dialog
+// Save & Update the settings from the tabs dialog
void GeneralTab::SetSettings(void)
{
// strcpy(vjs.jagBootPath, generalTab->edit1->text().toAscii().data());
strcpy(vjs.EEPROMPath, CheckForTrailingSlash(edit3->text()).toUtf8().data());
strcpy(vjs.ROMPath, CheckForTrailingSlash(edit4->text()).toUtf8().data());
+#ifndef NEWMODELSBIOSHANDLER
vjs.useJaguarBIOS = useBIOS->isChecked();
+#endif
vjs.GPUEnabled = useGPU->isChecked();
vjs.DSPEnabled = useDSP->isChecked();
vjs.fullscreen = useFullScreen->isChecked();
// Append a slash or a backslash at the end of the string
+// Depend the platform transform slashes or backslashes
QString GeneralTab::CheckForTrailingSlash(QString s)
{
if (!s.endsWith('/') && !s.endsWith('\\'))
+ {
s.append('/');
-
+ }
+#ifdef _WIN32
+ s.replace(QString("/"), QString("\\"));
+#else
+ s.replace(QString("\\"), QString("/"));
+#endif
return s;
}
QLineEdit *edit2;\r
QLineEdit *edit3;\r
QLineEdit *edit4;\r
-\r
+#ifndef NEWMODELSBIOSHANDLER\r
QCheckBox *useBIOS;\r
+#endif\r
QCheckBox *useGPU;\r
QCheckBox *useDSP;\r
// QCheckBox *useHostAudio;\r
--- /dev/null
+//
+// modelsbiostab.cpp: Models & Bios tab on the settings dialog
+//
+// Part of the Virtual Jaguar Project
+/// See the README and GPLv3 files for licensing and warranty information
+//
+// JPM = Jean-Paul Mari <djipi.mari@gmail.com>
+//
+// WHO WHEN WHAT
+// --- ---------- ------------------------------------------------------------
+// JPM 09/03/2018 Created this file
+//
+
+#include "configdialog.h"
+#include "modelsbiostab.h"
+#include "settings.h"
+
+
+//
+ModelsBiosTab::ModelsBiosTab(QWidget * parent/*= 0*/): QWidget(parent),
+listJaguarModel(new QComboBox()),
+listRetailBIOS(new QComboBox()),
+listDevBIOS(new QComboBox()),
+JaguarModel(JAG_NULL_SERIES),
+UseRetailBIOS(0),
+UseDevBIOS(0),
+BIOSValue(BT_NULL)
+{
+#ifdef NEWMODELSBIOSHANDLER
+ // Jaguar model
+ QLabel *labelModel = new QLabel("Jaguar model");
+ QHBoxLayout *layoutModel = new QHBoxLayout;
+ layoutModel->addWidget(labelModel);
+ listJaguarModel->addItem("Model K", QVariant(JAG_K_SERIES));
+ listJaguarModel->addItem("Model M", QVariant(JAG_M_SERIES));
+ layoutModel->addWidget(listJaguarModel);
+ QVBoxLayout *layout1 = new QVBoxLayout;
+ layout1->addLayout(layoutModel);
+
+ // Retail BIOS select
+ QHBoxLayout *layoutRetailBIOS = new QHBoxLayout;
+ useRetailBIOS = new QCheckBox(tr("Retail BIOS"));
+ layoutRetailBIOS->addWidget(useRetailBIOS);
+ QVBoxLayout *layout2 = new QVBoxLayout;
+ layout2->addLayout(layoutRetailBIOS);
+ // BIOS selection
+ layoutRetailBIOS->addWidget(listRetailBIOS);
+
+ // Developer BIOS select
+ QHBoxLayout *layoutDevBIOS = new QHBoxLayout;
+ useDevBIOS = new QCheckBox(tr("Developer BIOS"));
+ layoutDevBIOS->addWidget(useDevBIOS);
+ QVBoxLayout *layout3 = new QVBoxLayout;
+ layout3->addLayout(layoutDevBIOS);
+ // BIOS selection
+ listDevBIOS->hide();
+ listDevBIOS->addItem("Stubulator '93", QVariant(BT_STUBULATOR_1));
+ listDevBIOS->addItem("Stubulator '94", QVariant(BT_STUBULATOR_2));
+ layoutDevBIOS->addWidget(listDevBIOS);
+
+ // Set layouts
+ layout1->addLayout(layout2);
+ layout1->addLayout(layout3);
+ setLayout(layout1);
+
+ // Connections
+ connect(useRetailBIOS, SIGNAL(stateChanged(int)), this, SLOT(stateChangedUseRetailBIOS(int)));
+ connect(useDevBIOS, SIGNAL(stateChanged(int)), this, SLOT(stateChangedUseDevBIOS(int)));
+ connect(listJaguarModel, SIGNAL(currentIndexChanged(int)), this, SLOT(CurrentIndexJaguarModel(int)));
+ connect(listDevBIOS, SIGNAL(currentIndexChanged(int)), this, SLOT(CurrentIndexDevBIOS(int)));
+#endif
+}
+
+
+//
+void ModelsBiosTab::stateChangedUseDevBIOS(int usedevbios)
+{
+#ifdef NEWMODELSBIOSHANDLER
+ if ((UseDevBIOS = usedevbios))
+ {
+ stateChangedUseRetailBIOS(0);
+ BIOSValue = listDevBIOS->itemData(listDevBIOS->currentIndex()).toInt();
+ listDevBIOS->show();
+ }
+ else
+ {
+ useDevBIOS->setChecked(false);
+ listDevBIOS->hide();
+ }
+#endif
+}
+
+
+//
+void ModelsBiosTab::stateChangedUseRetailBIOS(int useretailbios)
+{
+#ifdef NEWMODELSBIOSHANDLER
+ if ((UseRetailBIOS = useretailbios))
+ {
+ stateChangedUseDevBIOS(0);
+
+ switch (JaguarModel)
+ {
+ case JAG_K_SERIES:
+ listRetailBIOS->clear();
+ listRetailBIOS->addItem("Model K", QVariant(BT_K_SERIES));
+ BIOSValue = BT_K_SERIES;
+ break;
+
+ case JAG_M_SERIES:
+ listRetailBIOS->clear();
+ listRetailBIOS->addItem("Model M", QVariant(BT_M_SERIES));
+ BIOSValue = BT_M_SERIES;
+ break;
+
+ default:
+ break;
+ }
+
+ listRetailBIOS->show();
+ }
+ else
+ {
+ useRetailBIOS->setChecked(false);
+ listRetailBIOS->hide();
+ }
+#endif
+}
+
+
+// Get the index from the Jaguar models list
+void ModelsBiosTab::CurrentIndexJaguarModel(int index)
+{
+#ifdef NEWMODELSBIOSHANDLER
+ JaguarModel = listJaguarModel->itemData(index).toInt();
+ stateChangedUseRetailBIOS(UseRetailBIOS);
+#endif
+}
+
+
+// Get the index from the developer BIOS list
+void ModelsBiosTab::CurrentIndexDevBIOS(int index)
+{
+#ifdef NEWMODELSBIOSHANDLER
+ BIOSValue = listDevBIOS->itemData(index).toInt();
+#endif
+}
+
+
+//
+ModelsBiosTab::~ModelsBiosTab()
+{
+#ifdef NEWMODELSBIOSHANDLER
+#endif
+}
+
+
+// Load & Update the tabs dialog from the settings
+void ModelsBiosTab::GetSettings(void)
+{
+#ifdef NEWMODELSBIOSHANDLER
+ listJaguarModel->setCurrentIndex(listJaguarModel->findData((JaguarModel = vjs.jaguarModel)));
+ listDevBIOS->setCurrentIndex(listDevBIOS->findData((BIOSValue = vjs.biosType)));
+ useRetailBIOS->setChecked((UseRetailBIOS = vjs.useRetailBIOS));
+ useDevBIOS->setChecked((UseDevBIOS = vjs.useDevBIOS));
+#endif
+}
+
+
+// Save & Update the settings from the tabs dialog
+void ModelsBiosTab::SetSettings(void)
+{
+#ifdef NEWMODELSBIOSHANDLER
+ vjs.jaguarModel = JaguarModel;
+ if (!(vjs.useJaguarBIOS = (UseRetailBIOS | UseDevBIOS)))
+ {
+ vjs.biosType = 0;
+ }
+ else
+ {
+ vjs.biosType = BIOSValue;
+ }
+ vjs.useRetailBIOS = UseRetailBIOS;
+ vjs.useDevBIOS = UseDevBIOS;
+#endif
+}
--- /dev/null
+#ifndef __MODELSBIOSTAB_H__
+#define __MODELSBIOSTAB_H__
+
+#include <QtWidgets>
+
+class ModelsBiosTab: public QWidget
+{
+ Q_OBJECT
+
+ public:
+ ModelsBiosTab(QWidget * parent = 0);
+ ~ModelsBiosTab();
+ void GetSettings(void);
+ void SetSettings(void);
+
+ protected slots:
+ void CurrentIndexJaguarModel(int index);
+ void stateChangedUseRetailBIOS(int useretailbios);
+ void stateChangedUseDevBIOS(int usedevbios);
+ void CurrentIndexDevBIOS(int index);
+
+ private:
+ int JaguarModel;
+ int UseRetailBIOS;
+ int UseDevBIOS;
+ int BIOSValue;
+ QComboBox *listJaguarModel;
+ QComboBox *listRetailBIOS;
+ QCheckBox *useRetailBIOS;
+ QComboBox *listDevBIOS;
+ QCheckBox *useDevBIOS;
+
+ public:
+};
+
+#endif // __MODELSBIOSTAB_H__
--- /dev/null
+//
+// modelsBIOS.cpp - Models and BIOS handler
+//
+// by Jean-Paul Mari
+//
+// JPM = Jean-Paul Mari <djipi.mari@gmail.com>
+//
+// Who When What
+// --- ---------- -----------------------------------------------------------
+// JPM 09/04/2018 Created this file
+//
+
+
+#include "string.h"
+#include "settings.h"
+#include "jagbios.h"
+#include "jagbios2.h"
+#include "jagcdbios.h"
+#include "jagstub1bios.h"
+#include "jagstub2bios.h"
+#include "memory.h"
+
+
+typedef struct InfosBIOS
+{
+ void *ptrBIOS;
+ size_t sizeBIOS;
+ size_t intBIOS;
+}
+S_InfosBIOS;
+
+
+S_InfosBIOS TabInfosBIOS[] =
+{
+ { NULL, 0, BT_NULL },
+ { jaguarBootROM, 0x20000, BT_K_SERIES },
+ { jaguarBootROM2, 0x20000, BT_M_SERIES },
+ { jaguarDevBootROM1, 0x20000, BT_STUBULATOR_1 },
+ { jaguarDevBootROM2, 0x20000, BT_STUBULATOR_2 }
+};
+
+
+// Select a BIOS
+// A valid default BIOS will be selected in case of no valid BIOS has been requested
+bool SelectBIOS(int indexbios)
+{
+ int IndexBIOS;
+
+#if 1
+ // Get the BIOS selected in the configuration tab
+ if (!indexbios)
+ {
+ indexbios = vjs.biosType;
+ }
+#else
+ indexbios = 10;
+#endif
+
+ // Check if a default BIOS is required
+ if (!indexbios)
+ {
+ // Get default BIOS based on the Jaguar model
+ switch (vjs.jaguarModel)
+ {
+ case JAG_K_SERIES:
+ indexbios = BT_K_SERIES;
+ break;
+
+ case JAG_M_SERIES:
+ indexbios = BT_M_SERIES;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ // look for the requested BIOS
+ IndexBIOS = (sizeof(TabInfosBIOS) / sizeof(S_InfosBIOS));
+ while (TabInfosBIOS[--IndexBIOS].intBIOS && (TabInfosBIOS[IndexBIOS].intBIOS != indexbios));
+
+ // Put BIOS in memory or return if no BIOS exist (but it should never happen)
+ if (IndexBIOS)
+ {
+ memcpy(jagMemSpace + 0xE00000, TabInfosBIOS[IndexBIOS].ptrBIOS, TabInfosBIOS[IndexBIOS].sizeBIOS);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
+
+//
+bool SetBIOS(void)
+{
+ memcpy(jaguarMainRAM, jagMemSpace + 0xE00000, 8);
+ return true;
+}
+
--- /dev/null
+#ifndef __MODELSBIOS_H__
+#define __MODELSBIOS_H__
+
+
+extern bool SetBIOS(void);
+extern bool SelectBIOS(int indexbios);
+
+
+#endif // __MODELSBIOS_H__
bool useJoystick;\r
int32_t joyport; // Joystick port\r
bool hardwareTypeNTSC; // Set to false for PAL, otherwise it is NTSC\r
- bool useJaguarBIOS;\r
+ bool useJaguarBIOS; // Use of any Jaguar BIOS\r
+ bool useRetailBIOS; // Use of Retail BIOS\r
+ bool useDevBIOS; // Use of Development BIOS\r
bool GPUEnabled;\r
bool DSPEnabled;\r
bool usePipelinedDSP;\r
uint32_t renderType;\r
uint32_t refresh;\r
bool allowWritesToROM;\r
- uint32_t biosType;\r
+ uint32_t biosType; // Bios type used\r
+ uint32_t jaguarModel; // Jaguar model\r
size_t nbrdisasmlines; // Number of lines to show in the M68K tracing window\r
bool disasmopcodes;\r
bool displayHWlabels;\r
// Render types\r
enum { RT_NORMAL = 0, RT_TV = 1 };\r
\r
+// Jaguar models\r
+enum { JAG_NULL_SERIES, JAG_K_SERIES, JAG_M_SERIES };\r
+\r
// BIOS types\r
-enum { BT_K_SERIES, BT_M_SERIES, BT_STUBULATOR_1, BT_STUBULATOR_2 };\r
+enum { BT_NULL, BT_K_SERIES, BT_M_SERIES, BT_STUBULATOR_1, BT_STUBULATOR_2 };\r
\r
// Exported variables\r
extern VJSettings vjs;\r
src/gui/filethread.h \\r
src/gui/gamepad.h \\r
src/gui/generaltab.h \\r
+ src/gui/modelsbiostab.h \ \r
src/gui/keybindingstab.h \\r
src/gui/glwidget.h \\r
src/gui/help.h \\r
src/unzip.h \\r
src/crc32.h \\r
src/settings.h \\r
+ src/modelsBIOS.h \\r
src/file.h\r
\r
SOURCES = \\r
src/gui/filethread.cpp \\r
src/gui/gamepad.cpp \\r
src/gui/generaltab.cpp \\r
+ src/gui/modelsbiostab.cpp \\r
src/gui/keybindingstab.cpp \\r
src/gui/glwidget.cpp \\r
src/gui/help.cpp \\r
src/unzip.cpp \\r
src/crc32.cpp \\r
src/settings.cpp \\r
+ src/modelsBIOS.cpp \ \r
src/file.cpp\r
\ No newline at end of file