diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 24a7ecf0..8839fc28 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,6 +33,7 @@ add_library(core STATIC GPU3D_OpenGL.cpp GPU3D_OpenGL_shaders.h GPU3D_Soft.cpp + melonDLDI.h NDS.cpp NDSCart.cpp OpenGLSupport.cpp diff --git a/src/Config.cpp b/src/Config.cpp index ea8dec75..2c5fd2c1 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -31,6 +31,8 @@ const char* kConfigFile = "melonDS.ini"; char BIOS9Path[1024]; char BIOS7Path[1024]; char FirmwarePath[1024]; +int DLDIEnable; +char DLDISDPath[1024]; char DSiBIOS9Path[1024]; char DSiBIOS7Path[1024]; @@ -54,6 +56,8 @@ ConfigEntry ConfigFile[] = {"BIOS9Path", 1, BIOS9Path, 0, "", 1023}, {"BIOS7Path", 1, BIOS7Path, 0, "", 1023}, {"FirmwarePath", 1, FirmwarePath, 0, "", 1023}, + {"DLDIEnable", 0, &DLDIEnable, 0, NULL, 0}, + {"DLDISDPath", 1, DLDISDPath, 0, "", 1023}, {"DSiBIOS9Path", 1, DSiBIOS9Path, 0, "", 1023}, {"DSiBIOS7Path", 1, DSiBIOS7Path, 0, "", 1023}, diff --git a/src/Config.h b/src/Config.h index 23db6476..9fd7488b 100644 --- a/src/Config.h +++ b/src/Config.h @@ -45,6 +45,8 @@ void Save(); extern char BIOS9Path[1024]; extern char BIOS7Path[1024]; extern char FirmwarePath[1024]; +extern int DLDIEnable; +extern char DLDISDPath[1024]; extern char DSiBIOS9Path[1024]; extern char DSiBIOS7Path[1024]; diff --git a/src/NDS.cpp b/src/NDS.cpp index a23772c5..f9263998 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -2537,7 +2537,8 @@ void ARM7Write8(u32 addr, u8 val) return; } - printf("unknown arm7 write8 %08X %02X @ %08X\n", addr, val, ARM7->R[15]); + if (ARM7->R[15] > 0x00002F30) // ARM7 BIOS bug + printf("unknown arm7 write8 %08X %02X @ %08X\n", addr, val, ARM7->R[15]); } void ARM7Write16(u32 addr, u16 val) @@ -3455,6 +3456,10 @@ void ARM9IOWrite32(u32 addr, u32 val) PowerControl9 = val & 0x820F; GPU::SetPowerCnt(PowerControl9); return; + + case 0x04100010: + NDSCart::WriteROMData(val); + return; } if (addr >= 0x04000000 && addr < 0x04000060) diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp index a5e0f41f..6abfc7c3 100644 --- a/src/NDSCart.cpp +++ b/src/NDSCart.cpp @@ -25,7 +25,9 @@ #include "CRC32.h" #include "DSi_AES.h" #include "Platform.h" +#include "Config.h" #include "ROMList.h" +#include "melonDLDI.h" namespace NDSCart_SRAM @@ -464,11 +466,13 @@ u16 SPICnt; u32 ROMCnt; u8 ROMCommand[8]; -u32 ROMDataOut; +u32 ROMData; -u8 DataOut[0x4000]; -u32 DataOutPos; -u32 DataOutLen; +u8 TransferData[0x4000]; +u32 TransferPos; +u32 TransferLen; +u32 TransferDir; +u8 TransferCmd[8]; bool CartInserted; u8* CartROM; @@ -478,6 +482,8 @@ u32 CartID; bool CartIsHomebrew; bool CartIsDSi; +FILE* CartSD; + u32 CmdEncMode; u32 DataEncMode; @@ -489,6 +495,7 @@ u64 Key2_Y; void ROMCommand_Retail(u8* cmd); void ROMCommand_RetailNAND(u8* cmd); +void ROMCommand_Homebrew(u8* cmd); void (*ROMCommandHandler)(u8* cmd); @@ -615,6 +622,8 @@ bool Init() CartROM = NULL; + CartSD = NULL; + return true; } @@ -622,6 +631,8 @@ void DeInit() { if (CartROM) delete[] CartROM; + if (CartSD) fclose(CartSD); + NDSCart_SRAM::DeInit(); } @@ -635,6 +646,9 @@ void Reset() CartIsHomebrew = false; CartIsDSi = false; + if (CartSD) fclose(CartSD); + CartSD = NULL; + ROMCommandHandler = NULL; NDSCart_SRAM::Reset(); @@ -650,11 +664,13 @@ void DoSavestate(Savestate* file) file->Var32(&ROMCnt); file->VarArray(ROMCommand, 8); - file->Var32(&ROMDataOut); + file->Var32(&ROMData); - file->VarArray(DataOut, 0x4000); - file->Var32(&DataOutPos); - file->Var32(&DataOutLen); + file->VarArray(TransferData, 0x4000); + file->Var32(&TransferPos); + file->Var32(&TransferLen); + file->Var32(&TransferDir); + file->VarArray(TransferCmd, 8); // cart inserted/len/ROM/etc should be already populated // savestate should be loaded after the right game is loaded @@ -670,10 +686,8 @@ void DoSavestate(Savestate* file) } -void ApplyDLDIPatch() +void ApplyDLDIPatch(const u8* patch, u32 len) { - // TODO: embed patches? let the user choose? default to some builtin driver? - u32 offset = *(u32*)&CartROM[0x20]; u32 size = *(u32*)&CartROM[0x2C]; @@ -696,23 +710,7 @@ void ApplyDLDIPatch() return; } - printf("DLDI shit found at %08X (%08X)\n", dldioffset, offset+dldioffset); - - FILE* f = fopen("dldi.bin", "rb"); - if (!f) - { - printf("no DLDI patch available. oh well\n"); - return; - } - - u32 dldisize; - fseek(f, 0, SEEK_END); - dldisize = ftell(f); - fseek(f, 0, SEEK_SET); - - u8* patch = new u8[dldisize]; - fread(patch, dldisize, 1, f); - fclose(f); + printf("DLDI structure found at %08X (%08X)\n", dldioffset, offset+dldioffset); if (*(u32*)&patch[0] != 0xBF8DA5ED || *(u32*)&patch[4] != 0x69684320 || @@ -743,7 +741,7 @@ void ApplyDLDIPatch() u32 patchsize = 1 << patch[0x0D]; u32 patchend = patchbase + patchsize; - memcpy(&binary[dldioffset], patch, dldisize); + memcpy(&binary[dldioffset], patch, len); *(u32*)&binary[dldioffset+0x40] += delta; *(u32*)&binary[dldioffset+0x44] += delta; @@ -807,7 +805,6 @@ void ApplyDLDIPatch() memset(&binary[dldioffset+fixstart], 0, fixend-fixstart); } - delete[] patch; printf("applied DLDI patch\n"); } @@ -987,11 +984,13 @@ bool LoadROM(const char* path, const char* sram, bool direct) Key1_Encrypt((u32*)&CartROM[arm9base]); } } - else - { - CartIsHomebrew = true; - //ApplyDLDIPatch(); - } + } + + if ((arm9base < 0x4000) || (gamecode == 0x23232323)) + { + CartIsHomebrew = true; + if (Config::DLDIEnable) + ApplyDLDIPatch(melonDLDI, sizeof(melonDLDI)); } if (direct) @@ -1005,7 +1004,9 @@ bool LoadROM(const char* path, const char* sram, bool direct) CartInserted = true; // TODO: support more fancy cart types (homebrew?, flashcarts, etc) - if (CartID & 0x08000000) + if (CartIsHomebrew) + ROMCommandHandler = ROMCommand_Homebrew; + else if (CartID & 0x08000000) ROMCommandHandler = ROMCommand_RetailNAND; else ROMCommandHandler = ROMCommand_Retail; @@ -1017,6 +1018,13 @@ bool LoadROM(const char* path, const char* sram, bool direct) printf("Save file: %s\n", sram); NDSCart_SRAM::LoadSave(sram, romparams.SaveMemType); + if (CartIsHomebrew && Config::DLDIEnable) + { + CartSD = Platform::OpenLocalFile(Config::DLDISDPath, "r+b"); + } + else + CartSD = NULL; + return true; } @@ -1034,14 +1042,17 @@ void ResetCart() ROMCnt = 0; memset(ROMCommand, 0, 8); - ROMDataOut = 0; + ROMData = 0; Key2_X = 0; Key2_Y = 0; - memset(DataOut, 0, 0x4000); - DataOutPos = 0; - DataOutLen = 0; + memset(TransferData, 0, 0x4000); + TransferPos = 0; + TransferLen = 0; + TransferDir = 0; + memset(TransferCmd, 0, 8); + TransferCmd[0] = 0xFF; CmdEncMode = 0; DataEncMode = 0; @@ -1055,7 +1066,7 @@ void ReadROM(u32 addr, u32 len, u32 offset) if ((addr+len) > CartROMSize) len = CartROMSize - addr; - memcpy(DataOut+offset, CartROM+addr, len); + memcpy(TransferData+offset, CartROM+addr, len); } void ReadROM_B7(u32 addr, u32 len, u32 offset) @@ -1069,7 +1080,7 @@ void ReadROM_B7(u32 addr, u32 len, u32 offset) addr = 0x8000 + (addr & 0x1FF); } - memcpy(DataOut+offset, CartROM+addr, len); + memcpy(TransferData+offset, CartROM+addr, len); } @@ -1079,16 +1090,41 @@ void ROMEndTransfer(u32 param) if (SPICnt & (1<<14)) NDS::SetIRQ((NDS::ExMemCnt[0]>>11)&0x1, NDS::IRQ_CartSendDone); + + if (TransferDir == 1) + { + // finish a write + + u8* cmd = TransferCmd; + switch (cmd[0]) + { + case 0xC1: + { + u32 sector = (cmd[1]<<24) | (cmd[2]<<16) | (cmd[3]<<8) | cmd[4]; + u64 addr = sector * 0x200ULL; + + if (CartSD) + { + fseek(CartSD, addr, SEEK_SET); + fwrite(TransferData, TransferLen, 1, CartSD); + } + } + break; + } + } } void ROMPrepareData(u32 param) { - if (DataOutPos >= DataOutLen) - ROMDataOut = 0; - else - ROMDataOut = *(u32*)&DataOut[DataOutPos]; + if (TransferDir == 0) + { + if (TransferPos >= TransferLen) + ROMData = 0; + else + ROMData = *(u32*)&TransferData[TransferPos]; - DataOutPos += 4; + TransferPos += 4; + } ROMCnt |= (1<<23); @@ -1106,16 +1142,16 @@ void ROMCommand_Retail(u8* cmd) case 0xB7: { u32 addr = (cmd[1]<<24) | (cmd[2]<<16) | (cmd[3]<<8) | cmd[4]; - memset(DataOut, 0, DataOutLen); + memset(TransferData, 0, TransferLen); - if (((addr + DataOutLen - 1) >> 12) != (addr >> 12)) + if (((addr + TransferLen - 1) >> 12) != (addr >> 12)) { u32 len1 = 0x1000 - (addr & 0xFFF); ReadROM_B7(addr, len1, 0); - ReadROM_B7(addr+len1, DataOutLen-len1, len1); + ReadROM_B7(addr+len1, TransferLen-len1, len1); } else - ReadROM_B7(addr, DataOutLen, 0); + ReadROM_B7(addr, TransferLen, 0); } break; @@ -1136,8 +1172,8 @@ void ROMCommand_RetailNAND(u8* cmd) // Jam with the Band stores words 6-9 of this at 0x02131BB0 // it doesn't seem to use those anywhere later - for (u32 pos = 0; pos < DataOutLen; pos += 4) - *(u32*)&DataOut[pos] = 0; + for (u32 pos = 0; pos < TransferLen; pos += 4) + *(u32*)&TransferData[pos] = 0; } break; @@ -1150,16 +1186,16 @@ void ROMCommand_RetailNAND(u8* cmd) case 0xB7: { u32 addr = (cmd[1]<<24) | (cmd[2]<<16) | (cmd[3]<<8) | cmd[4]; - memset(DataOut, 0, DataOutLen); + memset(TransferData, 0, TransferLen); - if (((addr + DataOutLen - 1) >> 12) != (addr >> 12)) + if (((addr + TransferLen - 1) >> 12) != (addr >> 12)) { u32 len1 = 0x1000 - (addr & 0xFFF); ReadROM_B7(addr, len1, 0); - ReadROM_B7(addr+len1, DataOutLen-len1, len1); + ReadROM_B7(addr+len1, TransferLen-len1, len1); } else - ReadROM_B7(addr, DataOutLen, 0); + ReadROM_B7(addr, TransferLen, 0); } break; @@ -1169,13 +1205,59 @@ void ROMCommand_RetailNAND(u8* cmd) // * bit7: busy? error? // * bit5: accessing savemem - for (u32 pos = 0; pos < DataOutLen; pos += 4) - *(u32*)&DataOut[pos] = NDSCart_SRAM::StatusReg * 0x01010101; + for (u32 pos = 0; pos < TransferLen; pos += 4) + *(u32*)&TransferData[pos] = NDSCart_SRAM::StatusReg * 0x01010101; } break; default: - printf("unknown NAND command %02X %04Xn", cmd[0], DataOutLen); + printf("unknown NAND command %02X %04Xn", cmd[0], TransferLen); + break; + } +} + +void ROMCommand_Homebrew(u8* cmd) +{ + switch (cmd[0]) + { + case 0xB7: + { + u32 addr = (cmd[1]<<24) | (cmd[2]<<16) | (cmd[3]<<8) | cmd[4]; + memset(TransferData, 0, TransferLen); + + if (((addr + TransferLen - 1) >> 12) != (addr >> 12)) + { + u32 len1 = 0x1000 - (addr & 0xFFF); + ReadROM_B7(addr, len1, 0); + ReadROM_B7(addr+len1, TransferLen-len1, len1); + } + else + ReadROM_B7(addr, TransferLen, 0); + } + break; + + case 0xC0: // SD read + { + u32 sector = (cmd[1]<<24) | (cmd[2]<<16) | (cmd[3]<<8) | cmd[4]; + u64 addr = sector * 0x200ULL; + + if (CartSD) + { + fseek(CartSD, addr, SEEK_SET); + fread(TransferData, TransferLen, 1, CartSD); + } + } + break; + + case 0xC1: // SD write + { + TransferDir = 1; + memcpy(TransferCmd, cmd, 8); + } + break; + + default: + printf("unknown homebrew cart command %02X\n", cmd[0]); break; } } @@ -1215,8 +1297,8 @@ void WriteROMCnt(u32 val) else if (datasize > 0) datasize = 0x100 << datasize; - DataOutPos = 0; - DataOutLen = datasize; + TransferPos = 0; + TransferLen = datasize; // handle KEY1 encryption as needed. // KEY2 encryption is implemented in hardware and doesn't need to be handled. @@ -1242,28 +1324,32 @@ void WriteROMCnt(u32 val) cmd[4], cmd[5], cmd[6], cmd[7], datasize);*/ + // default is read + // commands that do writes will change this + TransferDir = 0; + switch (cmd[0]) { case 0x9F: - memset(DataOut, 0xFF, DataOutLen); + memset(TransferData, 0xFF, TransferLen); break; case 0x00: - memset(DataOut, 0, DataOutLen); - if (DataOutLen > 0x1000) + memset(TransferData, 0, TransferLen); + if (TransferLen > 0x1000) { ReadROM(0, 0x1000, 0); - for (u32 pos = 0x1000; pos < DataOutLen; pos += 0x1000) - memcpy(DataOut+pos, DataOut, 0x1000); + for (u32 pos = 0x1000; pos < TransferLen; pos += 0x1000) + memcpy(TransferData+pos, TransferData, 0x1000); } else - ReadROM(0, DataOutLen, 0); + ReadROM(0, TransferLen, 0); break; case 0x90: case 0xB8: - for (u32 pos = 0; pos < DataOutLen; pos += 4) - *(u32*)&DataOut[pos] = CartID; + for (u32 pos = 0; pos < TransferLen; pos += 4) + *(u32*)&TransferData[pos] = CartID; break; case 0x3C: @@ -1292,8 +1378,8 @@ void WriteROMCnt(u32 val) break; case 0x10: - for (u32 pos = 0; pos < DataOutLen; pos += 4) - *(u32*)&DataOut[pos] = CartID; + for (u32 pos = 0; pos < TransferLen; pos += 4) + *(u32*)&TransferData[pos] = CartID; break; case 0x20: @@ -1343,29 +1429,52 @@ void WriteROMCnt(u32 val) NDS::ScheduleEvent(NDS::Event_ROMTransfer, false, xfercycle*(cmddelay+4), ROMPrepareData, 0); } +void AdvanceROMTransfer() +{ + ROMCnt &= ~(1<<23); + + if (TransferPos < TransferLen) + { + u32 xfercycle = (ROMCnt & (1<<27)) ? 8 : 5; + u32 delay = 4; + if (!(ROMCnt & (1<<30))) + { + if (!(TransferPos & 0x1FF)) + delay += ((ROMCnt >> 16) & 0x3F); + } + + NDS::ScheduleEvent(NDS::Event_ROMTransfer, false, xfercycle*delay, ROMPrepareData, 0); + } + else + ROMEndTransfer(0); +} + u32 ReadROMData() { if (ROMCnt & (1<<23)) { - ROMCnt &= ~(1<<23); - - if (DataOutPos < DataOutLen) - { - u32 xfercycle = (ROMCnt & (1<<27)) ? 8 : 5; - u32 delay = 4; - if (!(ROMCnt & (1<<30))) - { - if (!(DataOutPos & 0x1FF)) - delay += ((ROMCnt >> 16) & 0x3F); - } - - NDS::ScheduleEvent(NDS::Event_ROMTransfer, false, xfercycle*delay, ROMPrepareData, 0); - } - else - ROMEndTransfer(0); + AdvanceROMTransfer(); } - return ROMDataOut; + return ROMData; +} + +void WriteROMData(u32 val) +{ + ROMData = val; + + if (ROMCnt & (1<<23)) + { + if (TransferDir == 1) + { + if (TransferPos < TransferLen) + *(u32*)&TransferData[TransferPos] = ROMData; + + TransferPos += 4; + } + + AdvanceROMTransfer(); + } } diff --git a/src/NDSCart.h b/src/NDSCart.h index adc821ff..a759c15a 100644 --- a/src/NDSCart.h +++ b/src/NDSCart.h @@ -52,6 +52,7 @@ void ResetCart(); void WriteROMCnt(u32 val); u32 ReadROMData(); +void WriteROMData(u32 val); void WriteSPICnt(u16 val); u8 ReadSPIData(); diff --git a/src/frontend/qt_sdl/EmuSettingsDialog.cpp b/src/frontend/qt_sdl/EmuSettingsDialog.cpp index 483ce341..79ce5ed0 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 58141418..158793cf 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 5b1bed5a..ac5506ff 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 + + + + + <html><head/><body><p>DS-mode ARM7 BIOS</p><p>Size should be 16 KB</p></body></html> - - - - - 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 + + + + <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... - - - - - 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... - - - - - 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