Skip to content

Commit

Permalink
Remove ce9i binary specific to DLP
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Dec 22, 2024
1 parent 25e28bd commit a40bd83
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 377 deletions.
9 changes: 2 additions & 7 deletions retail/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ endif
export GAME_ICON := $(CURDIR)/$(ASSETS)/icon.bmp

#.PHONY: cardengine_arm7 cardengine_arm9 bootloader BootStrap clean
.PHONY: all dist release nightly bootloader bootloader1 bootloader2 bootloaderi bootloaderi1 bootloaderi2 cardengine_arm7 cardengine_arm7_music cardengine_arm9_igm cardengine_arm9_igm_extmem cardengine_arm9 cardengine_arm9_32 cardengine_arm9_start cardengine_arm9_start_foto cardengine_arm9_alt cardengine_arm9_alt_gsdd cardengine_arm9_alt2 cardengine_arm9_alt3 cardengine_arm9_extmem cardengine_arm9_extmem_gsdd cardengine_arm9_extmem_start cardengine_arm9_extmem_foto cardenginei_arm7 cardenginei_arm7_alt cardenginei_arm7_twlsdk cardenginei_arm7_twlsdk3 cardenginei_arm7_dsiware cardenginei_arm7_dsiware3 cardenginei_arm7_cheat cardenginei_arm9_igm cardenginei_arm9 cardenginei_arm9_dlp cardenginei_arm9_gsdd cardenginei_arm9_dldi cardenginei_arm9_gsdd_dldi cardenginei_arm9_twlsdk cardenginei_arm9_twlsdk3 cardenginei_arm9_twlsdk_dldi cardenginei_arm9_twlsdk3_dldi cardenginei_arm9_dsiware cardenginei_arm9_dsiware3 preLoadSettings apfix arm7/$(TARGET).elf arm9/$(TARGET).elf clean
.PHONY: all dist release nightly bootloader bootloader1 bootloader2 bootloaderi bootloaderi1 bootloaderi2 cardengine_arm7 cardengine_arm7_music cardengine_arm9_igm cardengine_arm9_igm_extmem cardengine_arm9 cardengine_arm9_32 cardengine_arm9_start cardengine_arm9_start_foto cardengine_arm9_alt cardengine_arm9_alt_gsdd cardengine_arm9_alt2 cardengine_arm9_alt3 cardengine_arm9_extmem cardengine_arm9_extmem_gsdd cardengine_arm9_extmem_start cardengine_arm9_extmem_foto cardenginei_arm7 cardenginei_arm7_alt cardenginei_arm7_twlsdk cardenginei_arm7_twlsdk3 cardenginei_arm7_dsiware cardenginei_arm7_dsiware3 cardenginei_arm7_cheat cardenginei_arm9_igm cardenginei_arm9 cardenginei_arm9_gsdd cardenginei_arm9_dldi cardenginei_arm9_gsdd_dldi cardenginei_arm9_twlsdk cardenginei_arm9_twlsdk3 cardenginei_arm9_twlsdk_dldi cardenginei_arm9_twlsdk3_dldi cardenginei_arm9_dsiware cardenginei_arm9_dsiware3 preLoadSettings apfix arm7/$(TARGET).elf arm9/$(TARGET).elf clean

all: $(OUTPUT)

Expand Down Expand Up @@ -117,7 +117,7 @@ bootloader2:
@$(MAKE) -C bootloader2

#---------------------------------------------------------------------------------
bootloaderi: cardenginei_arm7 cardenginei_arm7_alt cardenginei_arm7_twlsdk cardenginei_arm7_twlsdk3 cardenginei_arm7_dsiware cardenginei_arm7_dsiware3 cardenginei_arm7_cheat cardenginei_arm9_igm cardenginei_arm9 cardenginei_arm9_dlp cardenginei_arm9_gsdd cardenginei_arm9_dldi cardenginei_arm9_gsdd_dldi cardenginei_arm9_twlsdk cardenginei_arm9_twlsdk3 cardenginei_arm9_twlsdk_dldi cardenginei_arm9_twlsdk3_dldi cardenginei_arm9_dsiware cardenginei_arm9_dsiware3
bootloaderi: cardenginei_arm7 cardenginei_arm7_alt cardenginei_arm7_twlsdk cardenginei_arm7_twlsdk3 cardenginei_arm7_dsiware cardenginei_arm7_dsiware3 cardenginei_arm7_cheat cardenginei_arm9_igm cardenginei_arm9 cardenginei_arm9_gsdd cardenginei_arm9_dldi cardenginei_arm9_gsdd_dldi cardenginei_arm9_twlsdk cardenginei_arm9_twlsdk3 cardenginei_arm9_twlsdk_dldi cardenginei_arm9_twlsdk3_dldi cardenginei_arm9_dsiware cardenginei_arm9_dsiware3
@$(MAKE) -C bootloaderi

#---------------------------------------------------------------------------------
Expand Down Expand Up @@ -228,10 +228,6 @@ cardenginei_arm9_igm:
cardenginei_arm9:
@$(MAKE) -C cardenginei/arm9

#---------------------------------------------------------------------------------
cardenginei_arm9_dlp:
@$(MAKE) -C cardenginei/arm9_dlp

#---------------------------------------------------------------------------------
cardenginei_arm9_gsdd:
@$(MAKE) -C cardenginei/arm9_gsdd
Expand Down Expand Up @@ -312,7 +308,6 @@ clean:
@$(MAKE) -C cardenginei/arm7_cheatonly clean
@$(MAKE) -C cardenginei/arm9_igm clean
@$(MAKE) -C cardenginei/arm9 clean
@$(MAKE) -C cardenginei/arm9_dlp clean
@$(MAKE) -C cardenginei/arm9_gsdd clean
@$(MAKE) -C cardenginei/arm9_dldi clean
@$(MAKE) -C cardenginei/arm9_gsdd_dldi clean
Expand Down
26 changes: 6 additions & 20 deletions retail/arm9/source/conf_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1558,28 +1558,14 @@ int loadFromSD(configuration* conf, const char *bootstrapPath) {
tonccpy((u8*)LOADER_RETURN_LOCATION+0x100, &srBackendId, 8);
}

const bool dlp = (memcmp(romTid, "HND", 3) == 0);
const bool gsdd = (memcmp(romTid, "BO5", 3) == 0);

if (conf->gameOnFlashcard) {
const char* ce9Path = "nitro:/cardenginei_arm9_dldi.lz77";
if (gsdd) {
ce9Path = "nitro:/cardenginei_arm9_gsdd_dldi.lz77";
}

// Load DLDI ce9 binary
loadCardEngineBinary(ce9Path, (u8*)CARDENGINEI_ARM9_BUFFERED_LOCATION);
} else {
const char* ce9Path = "nitro:/cardenginei_arm9.lz77";
if (dlp) {
ce9Path = "nitro:/cardenginei_arm9_dlp.lz77";
} else if (gsdd) {
ce9Path = "nitro:/cardenginei_arm9_gsdd.lz77";
}

// Load ce9 binary
loadCardEngineBinary(ce9Path, (u8*)CARDENGINEI_ARM9_BUFFERED_LOCATION);
}
// Load DLDI ce9 binary
loadCardEngineBinary(
conf->gameOnFlashcard
? (gsdd ? "nitro:/cardenginei_arm9_gsdd_dldi.lz77" : "nitro:/cardenginei_arm9_dldi.lz77")
: (gsdd ? "nitro:/cardenginei_arm9_gsdd.lz77" : "nitro:/cardenginei_arm9.lz77")
, (u8*)CARDENGINEI_ARM9_BUFFERED_LOCATION);
}

bool found = (access(pageFilePath.c_str(), F_OK) == 0);
Expand Down
4 changes: 2 additions & 2 deletions retail/cardenginei/arm7/source/cardengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ void reset(const bool downloadedSrl) {
ensureBinaryDecompressed(ndsHeader, moduleParams);

patchCardNdsArm9(
(cardengineArm9*)((valueBits & isDlp) ? CARDENGINEI_ARM9_LOCATION_DLP : CARDENGINEI_ARM9_LOCATION),
(cardengineArm9*)CARDENGINEI_ARM9_LOCATION,
ndsHeader,
moduleParams,
1
Expand All @@ -580,7 +580,7 @@ void reset(const bool downloadedSrl) {
ndsHeader
);
hookNdsRetailArm9(
(cardengineArm9*)((valueBits & isDlp) ? CARDENGINEI_ARM9_LOCATION_DLP : CARDENGINEI_ARM9_LOCATION),
(cardengineArm9*)CARDENGINEI_ARM9_LOCATION,
ndsHeader
);

Expand Down
146 changes: 0 additions & 146 deletions retail/cardenginei/arm9_dlp/Makefile

This file was deleted.

Loading

0 comments on commit a40bd83

Please sign in to comment.