Add card read DMA

Add card read DMA
This commit is contained in:
Kei 2025-01-30 21:41:45 +00:00
parent 307d11777a
commit 935497e4a0
4 changed files with 18 additions and 4 deletions

View File

@ -40,6 +40,7 @@ cGlobalSettings::cGlobalSettings() {
saveExt = true;
saveDir = false;
nightly = false;
cardDma = true;
safeMode = false;
show12hrClock = false;
autorunWithLastRom = false;
@ -71,6 +72,7 @@ void cGlobalSettings::loadSettings() {
saveDir = ini.GetInt("system", "savedir", saveDir);
nightly = ini.GetInt("system", "nightly", nightly);
dma = ini.GetInt("system", "dma", dma);
cardDma = ini.GetInt("system", "carddma", cardDma);
sdsave = ini.GetInt("system", "sdsave", sdsave);
safeMode = ini.GetInt("system", "safemode", safeMode);
show12hrClock = ini.GetInt("system", "Show12hrClock", show12hrClock);
@ -119,6 +121,7 @@ void cGlobalSettings::saveSettings() {
ini.SetInt("system", "cheats", cheats);
ini.SetInt("system", "softreset", softreset);
ini.SetInt("system", "dma", dma);
ini.SetInt("system", "carddma", cardDma);
ini.SetInt("system", "sdsave", sdsave);
ini.SetInt("system", "safemode", safeMode);
ini.SetInt("system", "savedir", saveDir);

View File

@ -53,13 +53,14 @@ class cGlobalSettings {
bool Animation;
bool cheats;
bool softreset;
bool dma;
bool cardDma;
bool sdsave;
bool cheatDB;
int slot2mode;
bool saveExt;
bool saveDir;
bool nightly;
bool dma;
bool safeMode;
bool show12hrClock;
bool autorunWithLastRom;

View File

@ -69,6 +69,12 @@ bool NdsBootstrapLauncher::prepareIni() {
CIniFile ini;
ini.SetString("NDS-BOOTSTRAP", "NDS_PATH", mRomPath);
ini.SetString("NDS-BOOTSTRAP", "SAV_PATH", mSavePath);
if(gs().cardDma){
ini.SetInt("NDS-BOOTSTRAP", "CARD_READ_DMA", 1);
}
else{
ini.SetInt("NDS-BOOTSTRAP", "CARD_READ_DMA", 0);
}
ini.SaveIniFile("/_nds/nds-bootstrap.ini");
return true;

View File

@ -550,6 +550,10 @@ void cMainWnd::setParam(void) {
_values.push_back(LANG("switches", "Disable"));
_values.push_back(LANG("switches", "Enable"));
settingWnd.addSettingItem(LANG("patches", "cheating system"), _values, gs().cheats);
_values.clear();
_values.push_back(LANG("switches", "Disable"));
_values.push_back(LANG("switches", "Enable"));
settingWnd.addSettingItem(LANG("patches", "carddma"), _values, gs().cardDma);
#ifdef __KERNEL_LAUNCHER_SUPPORT__
_values.clear();
_values.push_back("Kernel");
@ -603,9 +607,9 @@ void cMainWnd::setParam(void) {
// page 4: patches
gs().cheats = settingWnd.getItemSelection(3, 0);
gs().softreset = settingWnd.getItemSelection(3, 1);
gs().homebrewreset = settingWnd.getItemSelection(3, 2);
gs().romLauncher = settingWnd.getItemSelection(3, 3);
gs().cardDma = settingWnd.getItemSelection(3, 1);
gs().softreset = settingWnd.getItemSelection(3, 2);
gs().homebrewreset = settingWnd.getItemSelection(3, 3);
// page 5: gba
gs().gbaSleepHack = settingWnd.getItemSelection(4, 0);