Skip to content

Commit

Permalink
Comment out unused GBA ROM & save cluster & size
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Sep 23, 2024
1 parent b9de695 commit 3310aa0
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 51 deletions.
12 changes: 6 additions & 6 deletions retail/arm9/include/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ typedef struct configuration {
char* donorTwlPath;
char* donorTwlOnly0Path;
char* donorTwlOnlyPath;
//char* cleanDonorPath;
char* gbaPath;
char* gbaSavPath;
// char* cleanDonorPath;
// char* gbaPath;
// char* gbaSavPath;
char* apPatchPath;
u32 donorFileSize;
u32 donorFileOffset;
u32 romSize;
u32 saveSize;
u32 gbaRomSize;
u32 gbaSaveSize;
// u32 gbaRomSize;
// u32 gbaSaveSize;
u32 wideCheatSize;
u32 apPatchSize;
u32 cheatSize;
Expand All @@ -52,7 +52,7 @@ typedef struct configuration {
u8 patchMpuRegion;
u32 patchMpuSize;
u8 consoleModel;
//int colorMode;
// int colorMode;
u8 romRead_LED;
u8 dmaRomRead_LED;
bool asyncCardRead;
Expand Down
2 changes: 1 addition & 1 deletion retail/arm9/include/nds_loader_arm9.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C"

//#define LOAD_DEFAULT_NDS 0

int runNds(u32 cluster, u32 saveCluster, u32 donorTwlCluster, u32 gbaCluster, u32 gbaSavCluster, u32 wideCheatCluster, u32 apPatchCluster, u32 cheatCluster, u32 patchOffsetCacheCluster, u32 ramDumpCluster, u32 srParamsCluster, u32 screenshotCluster, u32 apFixOverlaysCluster, u32 musicCluster, u32 pageFileCluster, u32 manualCluster, u32 sharedFontCluster, configuration* conf);
int runNds(u32 cluster, u32 saveCluster, u32 donorTwlCluster, /* u32 gbaCluster, u32 gbaSavCluster, */ u32 wideCheatCluster, u32 apPatchCluster, u32 cheatCluster, u32 patchOffsetCacheCluster, u32 ramDumpCluster, u32 srParamsCluster, u32 screenshotCluster, u32 apFixOverlaysCluster, u32 musicCluster, u32 pageFileCluster, u32 manualCluster, u32 sharedFontCluster, configuration* conf);

#ifdef __cplusplus
}
Expand Down
8 changes: 4 additions & 4 deletions retail/arm9/source/conf_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ static void load_conf(configuration* conf, const char* fn) {
conf->donorTwlOnlyPath = strdup(config_file.fetch("NDS-BOOTSTRAP", "DONORTWLONLY_NDS_PATH").c_str());

// GBA path
conf->gbaPath = strdup(config_file.fetch("NDS-BOOTSTRAP", "GBA_PATH").c_str());
// conf->gbaPath = strdup(config_file.fetch("NDS-BOOTSTRAP", "GBA_PATH").c_str());

// GBA SAV path
conf->gbaSavPath = strdup(config_file.fetch("NDS-BOOTSTRAP", "GBA_SAV_PATH").c_str());
// conf->gbaSavPath = strdup(config_file.fetch("NDS-BOOTSTRAP", "GBA_SAV_PATH").c_str());

// AP-patch path
conf->apPatchPath = strdup(config_file.fetch("NDS-BOOTSTRAP", "AP_FIX_PATH").c_str());
Expand Down Expand Up @@ -1574,8 +1574,8 @@ int loadFromSD(configuration* conf, const char *bootstrapPath) {
}

conf->saveSize = getFileSize(conf->savPath);
conf->gbaRomSize = getFileSize(conf->gbaPath);
conf->gbaSaveSize = getFileSize(conf->gbaSavPath);
// conf->gbaRomSize = getFileSize(conf->gbaPath);
// conf->gbaSaveSize = getFileSize(conf->gbaSavPath);
conf->wideCheatSize = getFileSize(wideCheatFilePath.c_str());
conf->apPatchSize = getFileSize(conf->apPatchPath);
conf->cheatSize = getFileSize(cheatFilePath.c_str());
Expand Down
14 changes: 7 additions & 7 deletions retail/arm9/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ static int runNdsFile(configuration* conf) {
struct stat stDonor0;
struct stat stDonor5;
struct stat stDonor5Alt;
struct stat stGba;
struct stat stGbaSav;
// struct stat stGba;
// struct stat stGbaSav;
struct stat stWideCheat;
struct stat stApPatch;
struct stat stCheat;
Expand All @@ -421,8 +421,8 @@ static int runNdsFile(configuration* conf) {
struct stat stTwlFont;
u32 clusterSav = 0;
u32 clusterDonor = 0;
u32 clusterGba = 0;
u32 clusterGbaSav = 0;
// u32 clusterGba = 0;
// u32 clusterGbaSav = 0;
u32 clusterWideCheat = 0;
u32 clusterApPatch = 0;
u32 clusterCheat = 0;
Expand Down Expand Up @@ -491,13 +491,13 @@ static int runNdsFile(configuration* conf) {
}

if (dsiFeatures() && !conf->b4dsMode) {
if (stat(conf->gbaPath, &stGba) >= 0) {
/* if (stat(conf->gbaPath, &stGba) >= 0) {
clusterGba = stGba.st_ino;
}
if (stat(conf->gbaSavPath, &stGbaSav) >= 0) {
clusterGbaSav = stGbaSav.st_ino;
}
} */

if (stat(wideCheatFilePath.c_str(), &stWideCheat) >= 0) {
clusterWideCheat = stWideCheat.st_ino;
Expand Down Expand Up @@ -532,7 +532,7 @@ static int runNdsFile(configuration* conf) {
clusterTwlFont = stTwlFont.st_ino;
}

return runNds(st.st_ino, clusterSav, clusterDonor, clusterGba, clusterGbaSav, clusterWideCheat, clusterApPatch, clusterCheat, clusterPatchOffsetCache, clusterRamDump, clusterSrParams, clusterScreenshot, apFixOverlaysCluster, musicCluster, clusterPageFile, clusterManual, clusterTwlFont, conf);
return runNds(st.st_ino, clusterSav, clusterDonor, /* clusterGba, clusterGbaSav, */ clusterWideCheat, clusterApPatch, clusterCheat, clusterPatchOffsetCache, clusterRamDump, clusterSrParams, clusterScreenshot, apFixOverlaysCluster, musicCluster, clusterPageFile, clusterManual, clusterTwlFont, conf);
}

int main(int argc, char** argv) {
Expand Down
10 changes: 5 additions & 5 deletions retail/arm9/source/nds_loader_arm9.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static bool dldiPatchLoader (data_t *binData, u32 binSize, bool clearBSS)
return true;
}

int runNds(u32 cluster, u32 saveCluster, u32 donorTwlCluster, u32 gbaCluster, u32 gbaSavCluster, u32 wideCheatCluster, u32 apPatchCluster, u32 cheatCluster, u32 patchOffsetCacheCluster, u32 ramDumpCluster, u32 srParamsCluster, u32 screenshotCluster, u32 apFixOverlaysCluster, u32 musicCluster, u32 pageFileCluster, u32 manualCluster, u32 sharedFontCluster, configuration* conf) {
int runNds(u32 cluster, u32 saveCluster, u32 donorTwlCluster, /* u32 gbaCluster, u32 gbaSavCluster, */ u32 wideCheatCluster, u32 apPatchCluster, u32 cheatCluster, u32 patchOffsetCacheCluster, u32 ramDumpCluster, u32 srParamsCluster, u32 screenshotCluster, u32 apFixOverlaysCluster, u32 musicCluster, u32 pageFileCluster, u32 manualCluster, u32 sharedFontCluster, configuration* conf) {
nocashMessage("runNds");

// Load bootloader binary
Expand Down Expand Up @@ -262,12 +262,12 @@ int runNds(u32 cluster, u32 saveCluster, u32 donorTwlCluster, u32 gbaCluster, u3
loader->donorFileCluster = donorTwlCluster;
loader->donorFileSize = conf->donorFileSize;
loader->donorFileOffset = conf->donorFileOffset;
loader->gbaFileCluster = gbaCluster;
loader->gbaSaveFileCluster = gbaSavCluster;
// loader->gbaFileCluster = gbaCluster;
// loader->gbaSaveFileCluster = gbaSavCluster;
loader->romSize = conf->romSize;
loader->saveSize = conf->saveSize;
loader->gbaRomSize = conf->gbaRomSize;
loader->gbaSaveSize = conf->gbaSaveSize;
// loader->gbaRomSize = conf->gbaRomSize;
// loader->gbaSaveSize = conf->gbaSaveSize;
loader->dataToPreloadAddr[0] = conf->dataToPreloadAddr[0];
loader->dataToPreloadAddr[1] = conf->dataToPreloadAddr[1];
loader->dataToPreloadSize[0] = conf->dataToPreloadSize[0];
Expand Down
24 changes: 12 additions & 12 deletions retail/bootloader/source/arm7/load_crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
.global donorFileCluster
.global donorFileSize
.global donorFileOffset
.global gbaFileCluster
.global gbaSaveFileCluster
@ .global gbaFileCluster
@ .global gbaSaveFileCluster
.global romSize
.global saveSize
.global gbaRomSize
.global gbaSaveSize
@ .global gbaRomSize
@ .global gbaSaveSize
.global dataToPreloadAddr
.global dataToPreloadSize
.global wideCheatFileCluster
Expand Down Expand Up @@ -106,18 +106,18 @@ donorFileSize:
.word 0x00000000 @ SDK5 donor .nds file size
donorFileOffset:
.word 0x00000000 @ SDK5 donor .nds file offset
gbaFileCluster:
.word 0x00000000 @ .gba file
gbaSaveFileCluster:
.word 0x00000000 @ .GBA .sav file
@gbaFileCluster:
@ .word 0x00000000 @ .gba file
@gbaSaveFileCluster:
@ .word 0x00000000 @ .GBA .sav file
romSize:
.word 0x00000000 @ .nds file size
saveSize:
.word 0x00000000 @ .sav file size
gbaRomSize:
.word 0x00000000 @ .gba file size
gbaSaveSize:
.word 0x00000000 @ GBA .sav file size
@gbaRomSize:
@ .word 0x00000000 @ .gba file size
@gbaSaveSize:
@ .word 0x00000000 @ GBA .sav file size
dataToPreloadAddr:
.word 0x00000000
.word 0x00000000
Expand Down
24 changes: 12 additions & 12 deletions retail/bootloaderi/source/arm7/load_crt0.s
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
.global donorFileCluster
.global donorFileSize
.global donorFileOffset
.global gbaFileCluster
.global gbaSaveFileCluster
@ .global gbaFileCluster
@ .global gbaSaveFileCluster
.global romSize
.global saveSize
.global gbaRomSize
.global gbaSaveSize
@ .global gbaRomSize
@ .global gbaSaveSize
.global dataToPreloadAddr
.global dataToPreloadSize
.global wideCheatFileCluster
Expand Down Expand Up @@ -106,18 +106,18 @@ donorFileSize:
.word 0x00000000 @ SDK5 donor .nds file size
donorFileOffset:
.word 0x00000000 @ SDK5 donor .nds file offset
gbaFileCluster:
.word 0x00000000 @ .gba file
gbaSaveFileCluster:
.word 0x00000000 @ .GBA .sav file
@gbaFileCluster:
@ .word 0x00000000 @ .gba file
@gbaSaveFileCluster:
@ .word 0x00000000 @ .GBA .sav file
romSize:
.word 0x00000000 @ .nds file size
saveSize:
.word 0x00000000 @ .sav file size
gbaRomSize:
.word 0x00000000 @ .gba file size
gbaSaveSize:
.word 0x00000000 @ GBA .sav file size
@gbaRomSize:
@ .word 0x00000000 @ .gba file size
@gbaSaveSize:
@ .word 0x00000000 @ GBA .sav file size
dataToPreloadAddr:
.word 0x00000000
.word 0x00000000
Expand Down
4 changes: 2 additions & 2 deletions retail/bootloaderi/source/arm7/main.arm7.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ extern u32 gbaFileCluster;
extern u32 gbaSaveFileCluster;
extern u32 romSize;
extern u32 saveSize;
extern u32 gbaRomSize;
extern u32 gbaSaveSize;
// extern u32 gbaRomSize;
// extern u32 gbaSaveSize;
extern u32 dataToPreloadAddr[2];
extern u32 dataToPreloadSize[2];
extern u32 wideCheatFileCluster;
Expand Down
4 changes: 2 additions & 2 deletions retail/common/include/load_crt0.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ typedef struct loadCrt0 {
u32 gbaSaveFileCluster;
u32 romSize;
u32 saveSize;
u32 gbaRomSize;
u32 gbaSaveSize;
// u32 gbaRomSize;
// u32 gbaSaveSize;
u32 dataToPreloadAddr[2];
u32 dataToPreloadSize[2];
u32 wideCheatFileCluster;
Expand Down

0 comments on commit 3310aa0

Please sign in to comment.