add DSi-mode settings
This commit is contained in:
parent
b84edfb321
commit
d7b846619b
|
@ -32,11 +32,10 @@ char BIOS9Path[1024];
|
||||||
char BIOS7Path[1024];
|
char BIOS7Path[1024];
|
||||||
char FirmwarePath[1024];
|
char FirmwarePath[1024];
|
||||||
|
|
||||||
int _3DRenderer;
|
char DSiBIOS9Path[1024];
|
||||||
int Threaded3D;
|
char DSiBIOS7Path[1024];
|
||||||
|
char DSiFirmwarePath[1024];
|
||||||
int GL_ScaleFactor;
|
char DSiNANDPath[1024];
|
||||||
int GL_Antialias;
|
|
||||||
|
|
||||||
ConfigEntry ConfigFile[] =
|
ConfigEntry ConfigFile[] =
|
||||||
{
|
{
|
||||||
|
@ -44,11 +43,10 @@ ConfigEntry ConfigFile[] =
|
||||||
{"BIOS7Path", 1, BIOS7Path, 0, "", 1023},
|
{"BIOS7Path", 1, BIOS7Path, 0, "", 1023},
|
||||||
{"FirmwarePath", 1, FirmwarePath, 0, "", 1023},
|
{"FirmwarePath", 1, FirmwarePath, 0, "", 1023},
|
||||||
|
|
||||||
{"3DRenderer", 0, &_3DRenderer, 1, NULL, 0},
|
{"DSiBIOS9Path", 1, DSiBIOS9Path, 0, "", 1023},
|
||||||
{"Threaded3D", 0, &Threaded3D, 1, NULL, 0},
|
{"DSiBIOS7Path", 1, DSiBIOS7Path, 0, "", 1023},
|
||||||
|
{"DSiFirmwarePath", 1, DSiFirmwarePath, 0, "", 1023},
|
||||||
{"GL_ScaleFactor", 0, &GL_ScaleFactor, 1, NULL, 0},
|
{"DSiNANDPath", 1, DSiNANDPath, 0, "", 1023},
|
||||||
{"GL_Antialias", 0, &GL_Antialias, 0, NULL, 0},
|
|
||||||
|
|
||||||
{"", -1, NULL, 0, NULL, 0}
|
{"", -1, NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,11 +46,10 @@ extern char BIOS9Path[1024];
|
||||||
extern char BIOS7Path[1024];
|
extern char BIOS7Path[1024];
|
||||||
extern char FirmwarePath[1024];
|
extern char FirmwarePath[1024];
|
||||||
|
|
||||||
extern int _3DRenderer;
|
extern char DSiBIOS9Path[1024];
|
||||||
extern int Threaded3D;
|
extern char DSiBIOS7Path[1024];
|
||||||
|
extern char DSiFirmwarePath[1024];
|
||||||
extern int GL_ScaleFactor;
|
extern char DSiNANDPath[1024];
|
||||||
extern int GL_Antialias;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,16 @@ EmuSettingsDialog::EmuSettingsDialog(QWidget* parent) : QDialog(parent), ui(new
|
||||||
ui->txtBIOS9Path->setText(Config::BIOS9Path);
|
ui->txtBIOS9Path->setText(Config::BIOS9Path);
|
||||||
ui->txtBIOS7Path->setText(Config::BIOS7Path);
|
ui->txtBIOS7Path->setText(Config::BIOS7Path);
|
||||||
ui->txtFirmwarePath->setText(Config::FirmwarePath);
|
ui->txtFirmwarePath->setText(Config::FirmwarePath);
|
||||||
|
|
||||||
|
ui->txtDSiBIOS9Path->setText(Config::DSiBIOS9Path);
|
||||||
|
ui->txtDSiBIOS7Path->setText(Config::DSiBIOS7Path);
|
||||||
|
ui->txtDSiFirmwarePath->setText(Config::DSiFirmwarePath);
|
||||||
|
ui->txtDSiNANDPath->setText(Config::DSiNANDPath);
|
||||||
|
|
||||||
|
ui->cbxConsoleType->addItem("DS");
|
||||||
|
ui->cbxConsoleType->addItem("DSi");
|
||||||
|
ui->cbxConsoleType->setCurrentIndex(Config::ConsoleType);
|
||||||
|
|
||||||
ui->chkDirectBoot->setChecked(Config::DirectBoot != 0);
|
ui->chkDirectBoot->setChecked(Config::DirectBoot != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +109,15 @@ void EmuSettingsDialog::on_EmuSettingsDialog_accepted()
|
||||||
strncpy(Config::BIOS9Path, ui->txtBIOS9Path->text().toStdString().c_str(), 1023); Config::BIOS9Path[1023] = '\0';
|
strncpy(Config::BIOS9Path, ui->txtBIOS9Path->text().toStdString().c_str(), 1023); Config::BIOS9Path[1023] = '\0';
|
||||||
strncpy(Config::BIOS7Path, ui->txtBIOS7Path->text().toStdString().c_str(), 1023); Config::BIOS7Path[1023] = '\0';
|
strncpy(Config::BIOS7Path, ui->txtBIOS7Path->text().toStdString().c_str(), 1023); Config::BIOS7Path[1023] = '\0';
|
||||||
strncpy(Config::FirmwarePath, ui->txtFirmwarePath->text().toStdString().c_str(), 1023); Config::FirmwarePath[1023] = '\0';
|
strncpy(Config::FirmwarePath, ui->txtFirmwarePath->text().toStdString().c_str(), 1023); Config::FirmwarePath[1023] = '\0';
|
||||||
|
|
||||||
|
strncpy(Config::DSiBIOS9Path, ui->txtDSiBIOS9Path->text().toStdString().c_str(), 1023); Config::DSiBIOS9Path[1023] = '\0';
|
||||||
|
strncpy(Config::DSiBIOS7Path, ui->txtDSiBIOS7Path->text().toStdString().c_str(), 1023); Config::DSiBIOS7Path[1023] = '\0';
|
||||||
|
strncpy(Config::DSiFirmwarePath, ui->txtDSiFirmwarePath->text().toStdString().c_str(), 1023); Config::DSiFirmwarePath[1023] = '\0';
|
||||||
|
strncpy(Config::DSiNANDPath, ui->txtDSiNANDPath->text().toStdString().c_str(), 1023); Config::DSiNANDPath[1023] = '\0';
|
||||||
|
|
||||||
|
Config::ConsoleType = ui->cbxConsoleType->currentIndex();
|
||||||
Config::DirectBoot = ui->chkDirectBoot->isChecked() ? 1:0;
|
Config::DirectBoot = ui->chkDirectBoot->isChecked() ? 1:0;
|
||||||
|
|
||||||
Config::Save();
|
Config::Save();
|
||||||
|
|
||||||
closeDlg();
|
closeDlg();
|
||||||
|
@ -145,3 +163,51 @@ void EmuSettingsDialog::on_btnFirmwareBrowse_clicked()
|
||||||
|
|
||||||
ui->txtFirmwarePath->setText(file);
|
ui->txtFirmwarePath->setText(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EmuSettingsDialog::on_btnDSiBIOS9Browse_clicked()
|
||||||
|
{
|
||||||
|
QString file = QFileDialog::getOpenFileName(this,
|
||||||
|
"Select DSi-mode ARM9 BIOS...",
|
||||||
|
EmuDirectory,
|
||||||
|
"BIOS files (*.bin *.rom);;Any file (*.*)");
|
||||||
|
|
||||||
|
if (file.isEmpty()) return;
|
||||||
|
|
||||||
|
ui->txtDSiBIOS9Path->setText(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EmuSettingsDialog::on_btnDSiBIOS7Browse_clicked()
|
||||||
|
{
|
||||||
|
QString file = QFileDialog::getOpenFileName(this,
|
||||||
|
"Select DSi-mode ARM7 BIOS...",
|
||||||
|
EmuDirectory,
|
||||||
|
"BIOS files (*.bin *.rom);;Any file (*.*)");
|
||||||
|
|
||||||
|
if (file.isEmpty()) return;
|
||||||
|
|
||||||
|
ui->txtDSiBIOS7Path->setText(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EmuSettingsDialog::on_btnDSiFirmwareBrowse_clicked()
|
||||||
|
{
|
||||||
|
QString file = QFileDialog::getOpenFileName(this,
|
||||||
|
"Select DSi DS-mode firmware...",
|
||||||
|
EmuDirectory,
|
||||||
|
"Firmware files (*.bin *.rom);;Any file (*.*)");
|
||||||
|
|
||||||
|
if (file.isEmpty()) return;
|
||||||
|
|
||||||
|
ui->txtDSiFirmwarePath->setText(file);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EmuSettingsDialog::on_btnDSiNANDBrowse_clicked()
|
||||||
|
{
|
||||||
|
QString file = QFileDialog::getOpenFileName(this,
|
||||||
|
"Select DSi NAND...",
|
||||||
|
EmuDirectory,
|
||||||
|
"NAND files (*.bin *.rom);;Any file (*.*)");
|
||||||
|
|
||||||
|
if (file.isEmpty()) return;
|
||||||
|
|
||||||
|
ui->txtDSiNANDPath->setText(file);
|
||||||
|
}
|
||||||
|
|
|
@ -58,6 +58,11 @@ private slots:
|
||||||
void on_btnBIOS7Browse_clicked();
|
void on_btnBIOS7Browse_clicked();
|
||||||
void on_btnFirmwareBrowse_clicked();
|
void on_btnFirmwareBrowse_clicked();
|
||||||
|
|
||||||
|
void on_btnDSiBIOS9Browse_clicked();
|
||||||
|
void on_btnDSiBIOS7Browse_clicked();
|
||||||
|
void on_btnDSiFirmwareBrowse_clicked();
|
||||||
|
void on_btnDSiNANDBrowse_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void verifyFirmware();
|
void verifyFirmware();
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>490</width>
|
<width>490</width>
|
||||||
<height>217</height>
|
<height>392</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -119,13 +119,138 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="title">
|
||||||
|
<string>DSi mode</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="btnDSiBIOS9Browse">
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>DSi ARM9 BIOS:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QPushButton" name="btnDSiFirmwareBrowse">
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="txtDSiBIOS7Path">
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>DSi-mode ARM7 BIOS</p><p><br/></p><p>Size should be 64 KB</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="txtDSiFirmwarePath">
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>DSi-mode firmware (used for DS-mode backwards compatibility)</p><p><br/></p><p>Size should be 128 KB</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>DSi ARM7 BIOS:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>DSi firmware:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="btnDSiBIOS7Browse">
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="txtDSiBIOS9Path">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>DSi-mode ARM9 BIOS</p><p><br/></p><p>Size should be 64 KB</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="text">
|
||||||
|
<string>DSi NAND:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="txtDSiNANDPath">
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>DSi NAND dump</p><p><br/></p><p>Should have 'nocash footer' at the end</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QPushButton" name="btnDSiNANDBrowse">
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Startup</string>
|
<string>General</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Console type:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="cbxConsoleType">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>The type of console to emulate</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
<widget class="QCheckBox" name="chkDirectBoot">
|
<widget class="QCheckBox" name="chkDirectBoot">
|
||||||
<property name="whatsThis">
|
<property name="whatsThis">
|
||||||
<string><html><head/><body><p>When loading a ROM, completely skip the regular boot process (&quot;Nintendo DS&quot; screen) to boot the ROM directly.</p><p><br/></p><p>Note: if your firmware dump isn't bootable, the ROM will be booted directly regardless of this setting.</p></body></html></string>
|
<string><html><head/><body><p>When loading a ROM, completely skip the regular boot process (&quot;Nintendo DS&quot; screen) to boot the ROM directly.</p><p><br/></p><p>Note: if your firmware dump isn't bootable, the ROM will be booted directly regardless of this setting.</p></body></html></string>
|
||||||
|
|
|
@ -47,10 +47,17 @@ int ScreenUseGL;
|
||||||
int ScreenVSync;
|
int ScreenVSync;
|
||||||
int ScreenVSyncInterval;
|
int ScreenVSyncInterval;
|
||||||
|
|
||||||
|
int _3DRenderer;
|
||||||
|
int Threaded3D;
|
||||||
|
|
||||||
|
int GL_ScaleFactor;
|
||||||
|
int GL_Antialias;
|
||||||
|
|
||||||
int LimitFPS;
|
int LimitFPS;
|
||||||
int AudioSync;
|
int AudioSync;
|
||||||
int ShowOSD;
|
int ShowOSD;
|
||||||
|
|
||||||
|
int ConsoleType;
|
||||||
int DirectBoot;
|
int DirectBoot;
|
||||||
|
|
||||||
int SocketBindAnyAddr;
|
int SocketBindAnyAddr;
|
||||||
|
@ -129,10 +136,17 @@ ConfigEntry PlatformConfigFile[] =
|
||||||
{"ScreenVSync", 0, &ScreenVSync, 0, NULL, 0},
|
{"ScreenVSync", 0, &ScreenVSync, 0, NULL, 0},
|
||||||
{"ScreenVSyncInterval", 0, &ScreenVSyncInterval, 1, NULL, 0},
|
{"ScreenVSyncInterval", 0, &ScreenVSyncInterval, 1, NULL, 0},
|
||||||
|
|
||||||
|
{"3DRenderer", 0, &_3DRenderer, 1, NULL, 0},
|
||||||
|
{"Threaded3D", 0, &Threaded3D, 1, NULL, 0},
|
||||||
|
|
||||||
|
{"GL_ScaleFactor", 0, &GL_ScaleFactor, 1, NULL, 0},
|
||||||
|
{"GL_Antialias", 0, &GL_Antialias, 0, NULL, 0},
|
||||||
|
|
||||||
{"LimitFPS", 0, &LimitFPS, 0, NULL, 0},
|
{"LimitFPS", 0, &LimitFPS, 0, NULL, 0},
|
||||||
{"AudioSync", 0, &AudioSync, 1, NULL, 0},
|
{"AudioSync", 0, &AudioSync, 1, NULL, 0},
|
||||||
{"ShowOSD", 0, &ShowOSD, 1, NULL, 0},
|
{"ShowOSD", 0, &ShowOSD, 1, NULL, 0},
|
||||||
|
|
||||||
|
{"ConsoleType", 0, &ConsoleType, 0, NULL, 0},
|
||||||
{"DirectBoot", 0, &DirectBoot, 1, NULL, 0},
|
{"DirectBoot", 0, &DirectBoot, 1, NULL, 0},
|
||||||
|
|
||||||
{"SockBindAnyAddr", 0, &SocketBindAnyAddr, 0, NULL, 0},
|
{"SockBindAnyAddr", 0, &SocketBindAnyAddr, 0, NULL, 0},
|
||||||
|
|
|
@ -60,10 +60,17 @@ extern int ScreenUseGL;
|
||||||
extern int ScreenVSync;
|
extern int ScreenVSync;
|
||||||
extern int ScreenVSyncInterval;
|
extern int ScreenVSyncInterval;
|
||||||
|
|
||||||
|
extern int _3DRenderer;
|
||||||
|
extern int Threaded3D;
|
||||||
|
|
||||||
|
extern int GL_ScaleFactor;
|
||||||
|
extern int GL_Antialias;
|
||||||
|
|
||||||
extern int LimitFPS;
|
extern int LimitFPS;
|
||||||
extern int AudioSync;
|
extern int AudioSync;
|
||||||
extern int ShowOSD;
|
extern int ShowOSD;
|
||||||
|
|
||||||
|
extern int ConsoleType;
|
||||||
extern int DirectBoot;
|
extern int DirectBoot;
|
||||||
|
|
||||||
extern int SocketBindAnyAddr;
|
extern int SocketBindAnyAddr;
|
||||||
|
|
|
@ -1889,6 +1889,7 @@ int main(int argc, char** argv)
|
||||||
Config::Load();
|
Config::Load();
|
||||||
|
|
||||||
#define SANITIZE(var, min, max) { if (var < min) var = min; else if (var > max) var = max; }
|
#define SANITIZE(var, min, max) { if (var < min) var = min; else if (var > max) var = max; }
|
||||||
|
SANITIZE(Config::ConsoleType, 0, 1);
|
||||||
SANITIZE(Config::_3DRenderer, 0, 1);
|
SANITIZE(Config::_3DRenderer, 0, 1);
|
||||||
SANITIZE(Config::ScreenVSyncInterval, 1, 20);
|
SANITIZE(Config::ScreenVSyncInterval, 1, 20);
|
||||||
SANITIZE(Config::GL_ScaleFactor, 1, 16);
|
SANITIZE(Config::GL_ScaleFactor, 1, 16);
|
||||||
|
|
Loading…
Reference in New Issue