Skip to content

Commit

Permalink
Fix multiple disc dumping and other potential issues
Browse files Browse the repository at this point in the history
Thanks to Maschell for finding the ios_mcp issues that are now ported!
  • Loading branch information
Crementif committed May 17, 2022
1 parent 42048cb commit 32092b7
Show file tree
Hide file tree
Showing 10 changed files with 223 additions and 230 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ For an always up-to-date guide to dump your games for Cemu using Dumpling, see [
## How to compile
- Install [DevkitPro](https://devkitpro.org/wiki/Getting_Started) for your platform.
- Install [wut](https://github.com/devkitPro/wut) through DevkitPro's pacman or compile (and install) the latest source yourself.
- Compile [libiosuhax](https://github.com/wiiu-env/libiosuhax).
- Compile [libiosuhax](https://github.com/Crementif/libiosuhax).
- Compile [libfat](https://github.com/Crementif/libfat) from source, since it has been fixed to perform MUCH better in certain situations which would normally cripple the classic Dumpling.
- Then, with all those dependencies installed, you can just run `make` to get the .rpx file that you can run on your Wii U.

Expand Down
2 changes: 1 addition & 1 deletion assets/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<app version="1">
<name>dumpling</name>
<coder>Crementif and emiyl</coder>
<version>2.2.4</version>
<version>2.4.1</version>
<release_date>20200813200000</release_date>
<short_description>Simple Cemu File Dumper</short_description>
<long_description>A simple, all-in-one Wii U file dumper! Developed with the intent of making dumping games and other files for Cemu faster and easier.</long_description>
Expand Down
1 change: 0 additions & 1 deletion source/app/dumping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ bool dumpDisc() {
if (!checkForDiscTitles(mcpHandle)) {
// Loop until a disk is found
while(true) {
// Print menu
WHBLogFreetypeStartScreen();
WHBLogPrint("Looking for a game disc...");
WHBLogPrint("Please insert one if you haven't already!");
Expand Down
18 changes: 12 additions & 6 deletions source/app/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void showLoadingScreen() {
WHBLogFreetypeSetBackgroundColor(0x0b5d5e00);
WHBLogFreetypeSetFontColor(0xFFFFFFFF);
WHBLogFreetypeSetFontSize(22, 0);
WHBLogPrint("Dumpling V2.4.0b");
WHBLogPrint("Dumpling V2.4.1");
WHBLogPrint("-- Made by Crementif and Emiyl --");
WHBLogPrint("");
WHBLogFreetypeDraw();
Expand All @@ -27,7 +27,7 @@ void showMainMenu() {
while(!startSelectedOption) {
// Print menu text
WHBLogFreetypeStartScreen();
WHBLogPrint("Dumpling V2.4.0b");
WHBLogPrint("Dumpling V2.4.1");
WHBLogPrint("===============================");
WHBLogPrintf("%c Dump a game disc", selectedOption==0 ? '>' : ' ');
WHBLogPrintf("%c Dump digital games", selectedOption==1 ? '>' : ' ');
Expand Down Expand Up @@ -146,8 +146,14 @@ bool showOptionMenu(dumpingConfig& config, bool showAccountOption) {
}
}

config.location = dumpLocation::SDFat;
if (!mountSD()) config.location = dumpLocation::USBFat;
if (isSDInserted()) {
config.location = dumpLocation::SDFat;
mountSD();
}
else {
config.location = dumpLocation::USBFat;
mountUSBDrive();
}

// Detect when multiple online files are getting dumped
if (showAccountOption && HAS_FLAG(config.dumpTypes, dumpTypeFlags::Custom) && dirExist((getRootFromLocation(config.location)+"/dumpling/Online Files/mlc01/usr/save/system/act/80000001").c_str())) {
Expand Down Expand Up @@ -197,7 +203,7 @@ bool showOptionMenu(dumpingConfig& config, bool showAccountOption) {
}
else showDialogPrompt("Couldn't detect an useable FAT32 SD card.\nTry reformatting it and make sure it has only one partition.", "OK");
}
if (selectedOption == 0 && config.location == dumpLocation::SDFat) {
else if (selectedOption == 0 && config.location == dumpLocation::SDFat) {
if (mountUSBDrive()) {
config.location = dumpLocation::USBFat;
unmountSD();
Expand All @@ -223,7 +229,7 @@ bool showOptionMenu(dumpingConfig& config, bool showAccountOption) {
}
else showDialogPrompt("Couldn't detect an useable FAT32 SD card.\nTry reformatting it and make sure it has only one partition.", "OK");
}
if (selectedOption == 0 && config.location == dumpLocation::SDFat) {
else if (selectedOption == 0 && config.location == dumpLocation::SDFat) {
if (mountUSBDrive()) {
config.location = dumpLocation::USBFat;
unmountSD();
Expand Down
3 changes: 2 additions & 1 deletion source/app/titles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ bool loadTitles(bool skipDiscs) {
}

// Parse title meta files and create title entries for each title
installedTitles.clear();
for (auto& sortedTitle : rawTitles) {
installedTitles.emplace_back(titleEntry{});
titleEntry& title = installedTitles.back();
Expand Down Expand Up @@ -373,7 +374,7 @@ bool checkForDiscTitles(int32_t mcpHandle) {
uint32_t titlesListed = 0;
MCP_TitleList(mcpHandle, &titlesListed, titles.data(), titleByteSize);

for (auto& title : titles) {
for (auto& title : titles) {
if (isBase(title.appType) && deviceToLocation(title.indexedDevice) == titleLocation::Disc) {
// Skip wii games when using Tiramisu for now
if (getCFWVersion() == TIRAMISU_RPX && title.appType == MCP_APP_TYPE_GAME_WII) {
Expand Down
5 changes: 3 additions & 2 deletions source/cfw/ios_mcp/source/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ typedef struct {
uint64_t created;
uint64_t modified;
uint8_t attributes[48];
} __attribute__((packed)) FSStat;
} __attribute__((aligned(4))) __attribute__((packed)) FSStat;
static_assert(sizeof(FSStat) == 0x64, "FSStat struct is not 0x64 bytes!");

typedef struct {
Expand All @@ -95,4 +95,5 @@ typedef struct {
uint64_t blocks_count;
uint64_t some_count;
uint32_t block_size;
} FSBlockInfo;
} __attribute__((packed)) FSBlockInfo;
static_assert(sizeof(FSBlockInfo) == 0x14, "FSBlockInfo struct is not 0x14 bytes!");
Loading

0 comments on commit 32092b7

Please sign in to comment.