DSi: add option to boot the full boot ROMs (#1581)

* DSi: add option to boot the full boot ROMs

added a config option for this so that this can be enabled or disabled

also added IO regs for DSi GPIO, but those don't do anything yet.

* reset GPIO regs on reset
This commit is contained in:
PoroCYon 2023-07-16 02:40:50 +02:00 committed by GitHub
parent cf7375f9ea
commit fbb41bd73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 435 additions and 288 deletions

View File

@ -82,6 +82,14 @@ DSi_SDHost* SDIO;
u64 ConsoleID; u64 ConsoleID;
u8 eMMC_CID[16]; u8 eMMC_CID[16];
// FIXME: these currently have no effect (and aren't stored in a savestate)
// ... not that they matter all that much
u8 GPIO_Data;
u8 GPIO_Dir;
u8 GPIO_IEdgeSel;
u8 GPIO_IE;
u8 GPIO_WiFi;
void Set_SCFG_Clock9(u16 val); void Set_SCFG_Clock9(u16 val);
void Set_SCFG_MC(u32 val); void Set_SCFG_MC(u32 val);
@ -159,7 +167,14 @@ void Reset()
DSi_AES::Reset(); DSi_AES::Reset();
SCFG_BIOS = 0x0101; // TODO: should be zero when booting from BIOS if (Platform::GetConfigBool(Platform::DSi_FullBIOSBoot))
{
SCFG_BIOS = 0x0000;
}
else
{
SCFG_BIOS = 0x0101;
}
SCFG_Clock9 = 0x0187; // CHECKME SCFG_Clock9 = 0x0187; // CHECKME
SCFG_Clock7 = 0x0187; SCFG_Clock7 = 0x0187;
SCFG_EXT[0] = 0x8307F100; SCFG_EXT[0] = 0x8307F100;
@ -169,6 +184,12 @@ void Reset()
DSi_DSP::SetRstLine(false); DSi_DSP::SetRstLine(false);
GPIO_Data = 0xff; // these actually initialize to high after reset
GPIO_Dir = 0x80; // enable sound out, all others input
GPIO_IEdgeSel = 0;
GPIO_IE = 0;
GPIO_WiFi = 0;
// LCD init flag // LCD init flag
GPU::DispStat[0] |= (1<<6); GPU::DispStat[0] |= (1<<6);
GPU::DispStat[1] |= (1<<6); GPU::DispStat[1] |= (1<<6);
@ -673,7 +694,14 @@ void SoftReset()
DSi_AES::Reset(); DSi_AES::Reset();
SCFG_BIOS = 0x0101; // TODO: should be zero when booting from BIOS if (Platform::GetConfigBool(Platform::DSi_FullBIOSBoot))
{
SCFG_BIOS = 0x0000;
}
else
{
SCFG_BIOS = 0x0101;
}
SCFG_Clock9 = 0x0187; // CHECKME SCFG_Clock9 = 0x0187; // CHECKME
SCFG_Clock7 = 0x0187; SCFG_Clock7 = 0x0187;
SCFG_EXT[0] = 0x8307F100; SCFG_EXT[0] = 0x8307F100;
@ -733,12 +761,16 @@ bool LoadBIOS()
fclose(f); fclose(f);
} }
if (!Platform::GetConfigBool(Platform::DSi_FullBIOSBoot))
{
// herp // herp
*(u32*)&ARM9iBIOS[0] = 0xEAFFFFFE; *(u32*)&ARM9iBIOS[0] = 0xEAFFFFFE;
*(u32*)&ARM7iBIOS[0] = 0xEAFFFFFE; *(u32*)&ARM7iBIOS[0] = 0xEAFFFFFE;
// TODO!!!! // TODO!!!!
// hax the upper 32K out of the goddamn DSi // hax the upper 32K out of the goddamn DSi
// done that :) -pcy
}
return true; return true;
} }
@ -775,6 +807,28 @@ bool LoadNAND()
memset(NWRAMMask, 0, sizeof(NWRAMMask)); memset(NWRAMMask, 0, sizeof(NWRAMMask));
u32 bootparams[8]; u32 bootparams[8];
if (Platform::GetConfigBool(Platform::DSi_FullBIOSBoot))
{
// TODO: figure out default MBK mapping
// MBK1..5: disable mappings
for (int i = 0; i < 8; ++i)
{
if (i < 4)
MapNWRAM_A(i, 0);
MapNWRAM_B(i, 0);
MapNWRAM_C(i, 0);
}
// MBK6..8: address mappings: nothing mapped
for (int i = 0; i < 6; ++i)
{
MapNWRAMRange(i & 1, i >> 1, 0);
}
// MBK9: ARM9 allowed to write
MBK[0][8] = 0;
MBK[1][8] = 0;
}
else
{
fseek(nand, 0x220, SEEK_SET); fseek(nand, 0x220, SEEK_SET);
fread(bootparams, 4, 8, nand); fread(bootparams, 4, 8, nand);
@ -885,6 +939,7 @@ bool LoadNAND()
ARM7Write32(dstaddr, *(u32*)&data[8]); dstaddr += 4; ARM7Write32(dstaddr, *(u32*)&data[8]); dstaddr += 4;
ARM7Write32(dstaddr, *(u32*)&data[12]); dstaddr += 4; ARM7Write32(dstaddr, *(u32*)&data[12]); dstaddr += 4;
} }
}
#define printhex(str, size) { for (int z = 0; z < (size); z++) printf("%02X", (str)[z]); printf("\n"); } #define printhex(str, size) { for (int z = 0; z < (size); z++) printf("%02X", (str)[z]); printf("\n"); }
#define printhex_rev(str, size) { for (int z = (size)-1; z >= 0; z--) printf("%02X", (str)[z]); printf("\n"); } #define printhex_rev(str, size) { for (int z = (size)-1; z >= 0; z--) printf("%02X", (str)[z]); printf("\n"); }
@ -894,6 +949,14 @@ bool LoadNAND()
Log(LogLevel::Debug, "eMMC CID: "); printhex(eMMC_CID, 16); Log(LogLevel::Debug, "eMMC CID: "); printhex(eMMC_CID, 16);
Log(LogLevel::Debug, "Console ID: %" PRIx64 "\n", ConsoleID); Log(LogLevel::Debug, "Console ID: %" PRIx64 "\n", ConsoleID);
if (Platform::GetConfigBool(Platform::DSi_FullBIOSBoot))
{
// point CPUs to boot ROM reset vectors
NDS::ARM9->JumpTo(0xFFFF0000);
NDS::ARM7->JumpTo(0x00000000);
}
else
{
u32 eaddr = 0x03FFE6E4; u32 eaddr = 0x03FFE6E4;
ARM7Write32(eaddr+0x00, *(u32*)&eMMC_CID[0]); ARM7Write32(eaddr+0x00, *(u32*)&eMMC_CID[0]);
ARM7Write32(eaddr+0x04, *(u32*)&eMMC_CID[4]); ARM7Write32(eaddr+0x04, *(u32*)&eMMC_CID[4]);
@ -923,6 +986,7 @@ bool LoadNAND()
// repoint the CPUs to the boot2 binaries // repoint the CPUs to the boot2 binaries
NDS::ARM9->JumpTo(bootparams[2]); NDS::ARM9->JumpTo(bootparams[2]);
NDS::ARM7->JumpTo(bootparams[6]); NDS::ARM7->JumpTo(bootparams[6]);
}
DSi_NAND::PatchUserData(); DSi_NAND::PatchUserData();
@ -2680,6 +2744,7 @@ u8 ARM7IORead8(u32 addr)
case 0x04004000: case 0x04004000:
return SCFG_BIOS & 0xFF; return SCFG_BIOS & 0xFF;
case 0x04004001: return SCFG_BIOS >> 8; case 0x04004001: return SCFG_BIOS >> 8;
case 0x04004002: return 0; // SCFG_ROMWE, always 0
CASE_READ8_32BIT(0x04004040, MBK[1][0]) CASE_READ8_32BIT(0x04004040, MBK[1][0])
CASE_READ8_32BIT(0x04004044, MBK[1][1]) CASE_READ8_32BIT(0x04004044, MBK[1][1])
@ -2706,6 +2771,13 @@ u8 ARM7IORead8(u32 addr)
case 0x4004700: return DSi_DSP::SNDExCnt; case 0x4004700: return DSi_DSP::SNDExCnt;
case 0x4004701: return DSi_DSP::SNDExCnt >> 8; case 0x4004701: return DSi_DSP::SNDExCnt >> 8;
case 0x04004C00: return GPIO_Data;
case 0x04004C01: return GPIO_Dir;
case 0x04004C02: return GPIO_IEdgeSel;
case 0x04004C03: return GPIO_IE;
case 0x04004C04: return GPIO_WiFi & 0xff;
case 0x04004C05: return GPIO_WiFi >> 8;
} }
return NDS::ARM7IORead8(addr); return NDS::ARM7IORead8(addr);
@ -2719,6 +2791,7 @@ u16 ARM7IORead16(u32 addr)
case 0x0400021C: return NDS::IF2; case 0x0400021C: return NDS::IF2;
case 0x04004000: return SCFG_BIOS; case 0x04004000: return SCFG_BIOS;
case 0x04004002: return 0; // SCFG_ROMWE, always 0
case 0x04004004: return SCFG_Clock7; case 0x04004004: return SCFG_Clock7;
case 0x04004006: return 0; // JTAG register case 0x04004006: return 0; // JTAG register
case 0x04004010: return SCFG_MC & 0xFFFF; case 0x04004010: return SCFG_MC & 0xFFFF;
@ -2740,6 +2813,10 @@ u16 ARM7IORead16(u32 addr)
case 0x04004D08: return 0; case 0x04004D08: return 0;
case 0x4004700: return DSi_DSP::SNDExCnt; case 0x4004700: return DSi_DSP::SNDExCnt;
case 0x04004C00: return GPIO_Data | ((u16)GPIO_Dir << 8);
case 0x04004C02: return GPIO_IEdgeSel | ((u16)GPIO_IE << 8);
case 0x04004C04: return GPIO_WiFi;
} }
if (addr >= 0x04004800 && addr < 0x04004A00) if (addr >= 0x04004800 && addr < 0x04004A00)
@ -2845,6 +2922,9 @@ void ARM7IOWrite8(u32 addr, u8 val)
return; return;
SCFG_BIOS |= ((val & 0x07) << 8); SCFG_BIOS |= ((val & 0x07) << 8);
return; return;
case 0x04004002:
// SCFG_ROMWE. ignored, as it always reads as 0
return;
case 0x04004060: case 0x04004060:
case 0x04004061: case 0x04004061:
case 0x04004062: case 0x04004062:
@ -2869,6 +2949,22 @@ void ARM7IOWrite8(u32 addr, u8 val)
case 0x4004701: case 0x4004701:
DSi_DSP::WriteSNDExCnt(((u16)val << 8) | (DSi_DSP::SNDExCnt & 0x00FF)); DSi_DSP::WriteSNDExCnt(((u16)val << 8) | (DSi_DSP::SNDExCnt & 0x00FF));
return; return;
case 0x04004C00:
GPIO_Data = val;
return;
case 0x04004C01:
GPIO_Dir = val;
return;
case 0x04004C02:
GPIO_IEdgeSel = val;
return;
case 0x04004C03:
GPIO_IE = val;
return;
case 0x04004C04:
GPIO_WiFi = val | (GPIO_WiFi & 0xff00);
return;
} }
if (addr >= 0x04004420 && addr < 0x04004430) if (addr >= 0x04004420 && addr < 0x04004430)
@ -2919,6 +3015,9 @@ void ARM7IOWrite16(u32 addr, u16 val)
return; return;
SCFG_BIOS |= (val & 0x0703); SCFG_BIOS |= (val & 0x0703);
return; return;
case 0x04004002:
// SCFG_ROMWE. ignored, as it always reads as 0
return;
case 0x04004004: case 0x04004004:
if (!(SCFG_EXT[1] & (1 << 31))) /* no access to SCFG Registers if disabled*/ if (!(SCFG_EXT[1] & (1 << 31))) /* no access to SCFG Registers if disabled*/
return; return;
@ -2942,9 +3041,25 @@ void ARM7IOWrite16(u32 addr, u16 val)
} }
return; return;
case 0x04004406:
DSi_AES::WriteBlkCnt(val<<16);
return;
case 0x4004700: case 0x4004700:
DSi_DSP::WriteSNDExCnt(val); DSi_DSP::WriteSNDExCnt(val);
return; return;
case 0x04004C00:
GPIO_Data = val & 0xff;
GPIO_Dir = val >> 8;
return;
case 0x04004C02:
GPIO_IEdgeSel = val & 0xff;
GPIO_IE = val >> 8;
return;
case 0x04004C04:
GPIO_WiFi = val;
return;
} }
if (addr >= 0x04004420 && addr < 0x04004430) if (addr >= 0x04004420 && addr < 0x04004430)

View File

@ -83,6 +83,8 @@ enum ConfigEntry
Firm_MAC, Firm_MAC,
AudioBitDepth, AudioBitDepth,
DSi_FullBIOSBoot
}; };
int GetConfigInt(ConfigEntry entry); int GetConfigInt(ConfigEntry entry);

View File

@ -119,6 +119,8 @@ u32 FixFirmwareLength(u32 originalLength)
void LoadDefaultFirmware() void LoadDefaultFirmware()
{ {
Log(LogLevel::Debug, "Using default firmware image...\n");
FirmwareLength = 0x20000; FirmwareLength = 0x20000;
Firmware = new u8[FirmwareLength]; Firmware = new u8[FirmwareLength];
memset(Firmware, 0xFF, FirmwareLength); memset(Firmware, 0xFF, FirmwareLength);
@ -132,6 +134,10 @@ void LoadDefaultFirmware()
Firmware[0x2F] = 0x0F; Firmware[0x2F] = 0x0F;
Firmware[0x1FD] = 0x01; Firmware[0x1FD] = 0x01;
Firmware[0x1FE] = 0x20; Firmware[0x1FE] = 0x20;
Firmware[0x2FF] = 0x80; // boot0: use NAND as stage2 medium
// these need to be zero (part of the stage2 firmware signature!)
memset(&Firmware[0x22], 0, 8);
} }
else else
{ {
@ -338,6 +344,8 @@ void Reset()
else else
FirmwarePath = Platform::GetConfigString(Platform::FirmwarePath); FirmwarePath = Platform::GetConfigString(Platform::FirmwarePath);
Log(LogLevel::Debug, "SPI firmware: loading from file %s\n", FirmwarePath.c_str());
bool makecopy = false; bool makecopy = false;
std::string origpath = FirmwarePath; std::string origpath = FirmwarePath;
FirmwarePath += Platform::InstanceFileSuffix(); FirmwarePath += Platform::InstanceFileSuffix();

View File

@ -143,6 +143,8 @@ bool DSBatteryLevelOkay;
int DSiBatteryLevel; int DSiBatteryLevel;
bool DSiBatteryCharging; bool DSiBatteryCharging;
bool DSiFullBIOSBoot;
CameraConfig Camera[2]; CameraConfig Camera[2];
@ -332,6 +334,8 @@ ConfigEntry ConfigFile[] =
{"DSiBatteryLevel", 0, &DSiBatteryLevel, 0xF, true}, {"DSiBatteryLevel", 0, &DSiBatteryLevel, 0xF, true},
{"DSiBatteryCharging", 1, &DSiBatteryCharging, true, true}, {"DSiBatteryCharging", 1, &DSiBatteryCharging, true, true},
{"DSiFullBIOSBoot", 1, &DSiFullBIOSBoot, false, true},
// TODO!! // TODO!!
// we need a more elegant way to deal with this // we need a more elegant way to deal with this
{"Camera0_InputType", 0, &Camera[0].InputType, 0, false}, {"Camera0_InputType", 0, &Camera[0].InputType, 0, false},

View File

@ -199,6 +199,8 @@ extern bool DSBatteryLevelOkay;
extern int DSiBatteryLevel; extern int DSiBatteryLevel;
extern bool DSiBatteryCharging; extern bool DSiBatteryCharging;
extern bool DSiFullBIOSBoot;
extern CameraConfig Camera[2]; extern CameraConfig Camera[2];

View File

@ -122,6 +122,8 @@ EmuSettingsDialog::EmuSettingsDialog(QWidget* parent) : QDialog(parent), ui(new
ui->txtDLDIFolder->setText(QString::fromStdString(Config::DLDIFolderPath)); ui->txtDLDIFolder->setText(QString::fromStdString(Config::DLDIFolderPath));
on_cbDLDIEnable_toggled(); on_cbDLDIEnable_toggled();
ui->cbDSiFullBIOSBoot->setChecked(Config::DSiFullBIOSBoot);
ui->cbDSiSDEnable->setChecked(Config::DSiSDEnable); ui->cbDSiSDEnable->setChecked(Config::DSiSDEnable);
ui->txtDSiSDPath->setText(QString::fromStdString(Config::DSiSDPath)); ui->txtDSiSDPath->setText(QString::fromStdString(Config::DSiSDPath));
ui->cbxDSiSDSize->setCurrentIndex(Config::DSiSDSize); ui->cbxDSiSDSize->setCurrentIndex(Config::DSiSDSize);
@ -211,6 +213,7 @@ void EmuSettingsDialog::done(int r)
std::string dsiBios7Path = ui->txtDSiBIOS7Path->text().toStdString(); std::string dsiBios7Path = ui->txtDSiBIOS7Path->text().toStdString();
std::string dsiFirmwarePath = ui->txtDSiFirmwarePath->text().toStdString(); std::string dsiFirmwarePath = ui->txtDSiFirmwarePath->text().toStdString();
std::string dsiNANDPath = ui->txtDSiNANDPath->text().toStdString(); std::string dsiNANDPath = ui->txtDSiNANDPath->text().toStdString();
bool dsiFullBiosBoot = ui->cbDSiFullBIOSBoot->isChecked();
bool dsiSDEnable = ui->cbDSiSDEnable->isChecked(); bool dsiSDEnable = ui->cbDSiSDEnable->isChecked();
std::string dsiSDPath = ui->txtDSiSDPath->text().toStdString(); std::string dsiSDPath = ui->txtDSiSDPath->text().toStdString();
@ -242,6 +245,7 @@ void EmuSettingsDialog::done(int r)
|| dsiBios7Path != Config::DSiBIOS7Path || dsiBios7Path != Config::DSiBIOS7Path
|| dsiFirmwarePath != Config::DSiFirmwarePath || dsiFirmwarePath != Config::DSiFirmwarePath
|| dsiNANDPath != Config::DSiNANDPath || dsiNANDPath != Config::DSiNANDPath
|| dsiFullBiosBoot != Config::DSiFullBIOSBoot
|| dsiSDEnable != Config::DSiSDEnable || dsiSDEnable != Config::DSiSDEnable
|| dsiSDPath != Config::DSiSDPath || dsiSDPath != Config::DSiSDPath
|| dsiSDSize != Config::DSiSDSize || dsiSDSize != Config::DSiSDSize
@ -271,6 +275,7 @@ void EmuSettingsDialog::done(int r)
Config::DSiBIOS7Path = dsiBios7Path; Config::DSiBIOS7Path = dsiBios7Path;
Config::DSiFirmwarePath = dsiFirmwarePath; Config::DSiFirmwarePath = dsiFirmwarePath;
Config::DSiNANDPath = dsiNANDPath; Config::DSiNANDPath = dsiNANDPath;
Config::DSiFullBIOSBoot = dsiFullBiosBoot;
Config::DSiSDEnable = dsiSDEnable; Config::DSiSDEnable = dsiSDEnable;
Config::DSiSDPath = dsiSDPath; Config::DSiSDPath = dsiSDPath;

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>575</width> <width>575</width>
<height>370</height> <height>416</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -206,155 +206,6 @@
<string>DSi-mode</string> <string>DSi-mode</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="9" column="0">
<widget class="QCheckBox" name="cbDSiSDReadOnly">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Make the emulated SD card read-only.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Read-only SD</string>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QPushButton" name="btnDSiSDFolderBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QLabel" name="label_14">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="cbDSiSDFolder">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sync the emulated SD card to the given folder. The folder's contents will be copied to the SD image, and any change made to the SD image will be reflected to the folder.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sync SD to folder:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="cbxDSiSDSize">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Size of the SD image.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;If set to Auto:&lt;/p&gt;&lt;p&gt;* if an image file exists, the volume size will be that of the image file&lt;/p&gt;&lt;p&gt;* if no image file exists and folder sync is enabled, the volume size will be determined from the synced folder's contents&lt;/p&gt;&lt;p&gt;* otherwise, the volume size will default to 512 MB&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLineEdit" name="txtDSiSDFolder">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sync the emulated SD card to the given folder. The folder's contents will be copied to the SD image, and any change made to the SD image will be reflected to the folder.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>DSi firmware:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="btnDSiFirmwareBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>DSi ARM7 BIOS:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPathInput" name="txtDSiNANDPath">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DSi NAND dump&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Should have 'nocash footer' at the end&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QPathInput" name="txtDSiSDPath">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;SD image file for emulating the DSi's SD card. A blank image file will be created if it doesn't already exist.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPathInput" name="txtDSiFirmwarePath">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DSi-mode firmware (used for DS-mode backwards compatibility)&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Size should be 128 KB&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>DSi ARM9 BIOS:</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Image size:</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="3">
<widget class="QCheckBox" name="cbDSiSDEnable">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Simulate a SD card being inserted in the DSi's SD slot.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable DSi SD card</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QPushButton" name="btnDSiSDBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="btnDSiBIOS7Browse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPathInput" name="txtDSiBIOS7Path">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DSi-mode ARM7 BIOS&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Size should be 64 KB&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>SD card image:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="btnDSiBIOS9Browse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
<property name="text"> <property name="text">
@ -375,13 +226,51 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="2"> <item row="12" column="1">
<widget class="QPushButton" name="btnDSiNANDBrowse"> <widget class="QLineEdit" name="txtDSiSDFolder">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sync the emulated SD card to the given folder. The folder's contents will be copied to the SD image, and any change made to the SD image will be reflected to the folder.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QCheckBox" name="cbDSiSDFolder">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sync the emulated SD card to the given folder. The folder's contents will be copied to the SD image, and any change made to the SD image will be reflected to the folder.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sync SD to folder:</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="QLabel" name="label_14">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>DSi ARM9 BIOS:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="btnDSiBIOS9Browse">
<property name="text"> <property name="text">
<string>Browse...</string> <string>Browse...</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1">
<widget class="QPathInput" name="txtDSiBIOS7Path">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DSi-mode ARM7 BIOS&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Size should be 64 KB&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3"> <item row="0" column="0" colspan="3">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_15">
<property name="text"> <property name="text">
@ -389,6 +278,127 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>Image size:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>DSi ARM7 BIOS:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="btnDSiBIOS7Browse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QPushButton" name="btnDSiSDBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>DSi firmware:</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QCheckBox" name="cbDSiSDReadOnly">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Make the emulated SD card read-only.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Read-only SD</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="3">
<widget class="QCheckBox" name="cbDSiSDEnable">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Simulate a SD card being inserted in the DSi's SD slot.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Enable DSi SD card</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="btnDSiFirmwareBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="btnDSiNANDBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QPathInput" name="txtDSiSDPath">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;SD image file for emulating the DSi's SD card. A blank image file will be created if it doesn't already exist.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPathInput" name="txtDSiFirmwarePath">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DSi-mode firmware (used for DS-mode backwards compatibility)&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Size should be 128 KB&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPathInput" name="txtDSiNANDPath">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;DSi NAND dump&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Should have 'nocash footer' at the end&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QComboBox" name="cbxDSiSDSize">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Size of the SD image.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;If set to Auto:&lt;/p&gt;&lt;p&gt;* if an image file exists, the volume size will be that of the image file&lt;/p&gt;&lt;p&gt;* if no image file exists and folder sync is enabled, the volume size will be determined from the synced folder's contents&lt;/p&gt;&lt;p&gt;* otherwise, the volume size will default to 512 MB&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>SD card image:</string>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QPushButton" name="btnDSiSDFolderBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QCheckBox" name="cbDSiFullBIOSBoot">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Boot the system from scratch by running the full boot ROMs, instead of starting with the second-stage loader. Requires a full BIOS/bootROM dump.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Full BIOS boot</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_3"> <widget class="QWidget" name="tab_3">

View File

@ -219,6 +219,7 @@ bool GetConfigBool(ConfigEntry entry)
case DSiSD_FolderSync: return Config::DSiSDFolderSync != 0; case DSiSD_FolderSync: return Config::DSiSDFolderSync != 0;
case Firm_OverrideSettings: return Config::FirmwareOverrideSettings != 0; case Firm_OverrideSettings: return Config::FirmwareOverrideSettings != 0;
case DSi_FullBIOSBoot: return Config::DSiFullBIOSBoot != 0;
} }
return false; return false;