From 5431c469c3b3444d4ae0dc7677bb3a0588c5f88f Mon Sep 17 00:00:00 2001 From: Arisotura Date: Thu, 3 Sep 2020 20:28:07 +0200 Subject: actually add DLDI. bahahahhh --- src/frontend/qt_sdl/EmuSettingsDialog.cpp | 20 ++ src/frontend/qt_sdl/EmuSettingsDialog.h | 1 + src/frontend/qt_sdl/EmuSettingsDialog.ui | 522 ++++++++++++++++-------------- 3 files changed, 299 insertions(+), 244 deletions(-) (limited to 'src/frontend/qt_sdl') diff --git a/src/frontend/qt_sdl/EmuSettingsDialog.cpp b/src/frontend/qt_sdl/EmuSettingsDialog.cpp index 483ce34..79ce5ed 100644 --- a/src/frontend/qt_sdl/EmuSettingsDialog.cpp +++ b/src/frontend/qt_sdl/EmuSettingsDialog.cpp @@ -44,6 +44,8 @@ EmuSettingsDialog::EmuSettingsDialog(QWidget* parent) : QDialog(parent), ui(new ui->txtBIOS9Path->setText(Config::BIOS9Path); ui->txtBIOS7Path->setText(Config::BIOS7Path); ui->txtFirmwarePath->setText(Config::FirmwarePath); + ui->cbDLDIEnable->setChecked(Config::DLDIEnable != 0); + ui->txtDLDISDPath->setText(Config::DLDISDPath); ui->txtDSiBIOS9Path->setText(Config::DSiBIOS9Path); ui->txtDSiBIOS7Path->setText(Config::DSiBIOS7Path); @@ -143,6 +145,8 @@ void EmuSettingsDialog::done(int r) std::string bios9Path = ui->txtBIOS9Path->text().toStdString(); std::string bios7Path = ui->txtBIOS7Path->text().toStdString(); std::string firmwarePath = ui->txtFirmwarePath->text().toStdString(); + int dldiEnable = ui->cbDLDIEnable->isChecked() ? 1:0; + std::string dldiSDPath = ui->txtDLDISDPath->text().toStdString(); std::string dsiBios9Path = ui->txtDSiBIOS9Path->text().toStdString(); std::string dsiBios7Path = ui->txtDSiBIOS7Path->text().toStdString(); std::string dsiFirmwarePath = ui->txtDSiFirmwarePath->text().toStdString(); @@ -162,6 +166,8 @@ void EmuSettingsDialog::done(int r) || strcmp(Config::BIOS9Path, bios9Path.c_str()) != 0 || strcmp(Config::BIOS7Path, bios7Path.c_str()) != 0 || strcmp(Config::FirmwarePath, firmwarePath.c_str()) != 0 + || dldiEnable != Config::DLDIEnable + || strcmp(Config::DLDISDPath, dldiSDPath.c_str()) != 0 || strcmp(Config::DSiBIOS9Path, dsiBios9Path.c_str()) != 0 || strcmp(Config::DSiBIOS7Path, dsiBios7Path.c_str()) != 0 || strcmp(Config::DSiFirmwarePath, dsiFirmwarePath.c_str()) != 0 @@ -178,6 +184,8 @@ void EmuSettingsDialog::done(int r) strncpy(Config::BIOS9Path, bios9Path.c_str(), 1023); Config::BIOS9Path[1023] = '\0'; strncpy(Config::BIOS7Path, bios7Path.c_str(), 1023); Config::BIOS7Path[1023] = '\0'; strncpy(Config::FirmwarePath, firmwarePath.c_str(), 1023); Config::FirmwarePath[1023] = '\0'; + Config::DLDIEnable = dldiEnable; + strncpy(Config::DLDISDPath, dldiSDPath.c_str(), 1023); Config::DLDISDPath[1023] = '\0'; strncpy(Config::DSiBIOS9Path, dsiBios9Path.c_str(), 1023); Config::DSiBIOS9Path[1023] = '\0'; strncpy(Config::DSiBIOS7Path, dsiBios7Path.c_str(), 1023); Config::DSiBIOS7Path[1023] = '\0'; @@ -268,6 +276,18 @@ void EmuSettingsDialog::on_btnDSiBIOS7Browse_clicked() ui->txtDSiBIOS7Path->setText(file); } +void EmuSettingsDialog::on_btnDLDISDBrowse_clicked() +{ + QString file = QFileDialog::getOpenFileName(this, + "Select DLDI SD image...", + EmuDirectory, + "Image files (*.bin *.rom *.img);;Any file (*.*)"); + + if (file.isEmpty()) return; + + ui->txtDLDISDPath->setText(file); +} + void EmuSettingsDialog::on_btnDSiFirmwareBrowse_clicked() { QString file = QFileDialog::getOpenFileName(this, diff --git a/src/frontend/qt_sdl/EmuSettingsDialog.h b/src/frontend/qt_sdl/EmuSettingsDialog.h index 5814141..158793c 100644 --- a/src/frontend/qt_sdl/EmuSettingsDialog.h +++ b/src/frontend/qt_sdl/EmuSettingsDialog.h @@ -58,6 +58,7 @@ private slots: void on_btnBIOS9Browse_clicked(); void on_btnBIOS7Browse_clicked(); void on_btnFirmwareBrowse_clicked(); + void on_btnDLDISDBrowse_clicked(); void on_btnDSiBIOS9Browse_clicked(); void on_btnDSiBIOS7Browse_clicked(); diff --git a/src/frontend/qt_sdl/EmuSettingsDialog.ui b/src/frontend/qt_sdl/EmuSettingsDialog.ui index 5b1bed5..ac5506f 100644 --- a/src/frontend/qt_sdl/EmuSettingsDialog.ui +++ b/src/frontend/qt_sdl/EmuSettingsDialog.ui @@ -6,8 +6,8 @@ 0 0 - 514 - 407 + 575 + 254 @@ -86,240 +86,242 @@ - BIOS Files + DS-mode - - - - - DS mode - - - - - - DS firmware: - - - - - - - <html><head/><body><p>DS-mode firmware</p><p><br/></p><p>Possible firmwares:</p><p>* 128 KB: DS-mode firmware from a DSi or 3DS. Not bootable.</p><p>* 256 KB: regular DS firmware.</p><p>* 512 KB: iQue DS firmware.</p></body></html> - - - - - - - <html><head/><body><p>DS-mode ARM7 BIOS</p><p>Size should be 16 KB</p></body></html> - - - - - - - - 0 - 0 - - - - Browse... - - - true - - - - - - - Browse... - - - - - - - DS ARM7 BIOS: - - - - - - - DS ARM9 BIOS: - - - - - - - Browse... - - - - - - - - 0 - 0 - - - - - 290 - 0 - - - - - - - <html><head/><body><p>DS-mode ARM9 BIOS</p><p>Size should be 4 KB</p></body></html> - - - - - - - - - - DSi mode - - - - - - DSi NAND: - - - - - - - - 0 - 0 - - - - <html><head/><body><p>DSi-mode ARM9 BIOS</p><p><br/></p><p>Size should be 64 KB</p></body></html> - - - - - - - Browse... - - - - - - - <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> - - - - - - - <html><head/><body><p>DSi-mode ARM7 BIOS</p><p><br/></p><p>Size should be 64 KB</p></body></html> - - - - - - - DSi ARM9 BIOS: - - - - - - - Browse... - - - - - - - <html><head/><body><p>DSi NAND dump</p><p><br/></p><p>Should have 'nocash footer' at the end</p></body></html> - - - - - - - DSi SD card: - - - - - - - DSi ARM7 BIOS: - - - - - - - Browse... - - - - - - - Browse... - - - - - - - DSi firmware: - - - - - - - <html><head/><body><p>Simulate a SD card being inserted in the DSi's SD slot. Requires a SD card image.</p></body></html> - - - Enable DSi SD card - - - - - - - <html><head/><body><p>SD image file for emulating the DSi's SD card</p></body></html> - - - - - - - Browse... - - - - + + + + + <html><head/><body><p>DS-mode ARM7 BIOS</p><p>Size should be 16 KB</p></body></html> + + + + + + + <html><head/><body><p>DS-mode firmware</p><p><br/></p><p>Possible firmwares:</p><p>* 128 KB: DS-mode firmware from a DSi or 3DS. Not bootable.</p><p>* 256 KB: regular DS firmware.</p><p>* 512 KB: iQue DS firmware.</p></body></html> + + + + + + + DS firmware: + + + + + + + DS ARM7 BIOS: + + + + + + + Browse... + + + + + + + Browse... + + + + + + + + 0 + 0 + + + + Browse... + + + true + + + + + + + DS ARM9 BIOS: + + + + + + + + 0 + 0 + + + + + 290 + 0 + + + + + + + <html><head/><body><p>DS-mode ARM9 BIOS</p><p>Size should be 4 KB</p></body></html> + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + DSi-mode + + + + + + <html><head/><body><p>DSi-mode ARM7 BIOS</p><p><br/></p><p>Size should be 64 KB</p></body></html> + + + + + + + Browse... + + + + + + + DSi NAND: + + + + + + + Browse... + + + + + + + DSi ARM7 BIOS: + + + + + + + Browse... + + + + + + + <html><head/><body><p>DSi NAND dump</p><p><br/></p><p>Should have 'nocash footer' at the end</p></body></html> + + + + + + + Browse... + + + + + + + DSi SD card: + + + + + + + + 0 + 0 + + + + <html><head/><body><p>DSi-mode ARM9 BIOS</p><p><br/></p><p>Size should be 64 KB</p></body></html> + + + + + + + DSi firmware: + + + + + + + DSi ARM9 BIOS: + + + + + + + <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> + + + + + + + <html><head/><body><p>SD image file for emulating the DSi's SD card</p></body></html> + + + + + + + <html><head/><body><p>Simulate a SD card being inserted in the DSi's SD slot. Requires a SD card image.</p></body></html> + + + Enable DSi SD card + + + + + + + Browse... + - CPU Emulation + CPU emulation @@ -385,6 +387,53 @@ + + + DLDI + + + + + + <html><head/><body><p>Enable the built-in DLDI driver, to let homebrew access files from a given SD image.</p></body></html> + + + Enable DLDI (for homebrew) + + + + + + + Browse... + + + + + + + + + + DLDI SD card: + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + @@ -400,23 +449,8 @@ - tabWidget cbxConsoleType chkDirectBoot - txtBIOS9Path - txtBIOS7Path - txtFirmwarePath - txtDSiBIOS9Path - txtDSiBIOS7Path - txtDSiFirmwarePath - txtDSiNANDPath - btnBIOS9Browse - btnBIOS7Browse - btnFirmwareBrowse - btnDSiBIOS9Browse - btnDSiBIOS7Browse - btnDSiFirmwareBrowse - btnDSiNANDBrowse chkEnableJIT spnJITMaximumBlockSize -- cgit v1.2.3