-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ConcatenationFiles for all output dumps saved to the SD card (if needed). #11
Comments
Hi there. Sorry for taking so long to answer, a lot of things have happened in my personal life in the past few months, and they have kept me busy enough to stop browsing the Internet as much as I'd like. Given that other dumpers also fail to dump the same chunk, it may very well be some kind of gamecard malfunction. However, unless I see either an screenshot with the error code provided (or the error code itself), it'll be hard for me to debug this particular problem. Nonetheless, feel free to test the latest published release. |
@Hking0036 Thanks for your input on this matter. It is greatly appreciated. At first, the fact that @DarkerUltor was able to reproduce this exact same problem with other dumpers made me doubt. I gotta say, it's weird that the bug is reproduced when the split option is disabled, since file I/O is more complicated when it's actually enabled. A single fwrite() call is performed per each loop iteration in that case, so it must be happening here for some kind of reason: I'll look into it ASAP. Would you be able to try out any test builds? Any additional information regarding your environment setup would be useful, like:
To be honest, I'd love to add a way to automatically detect if an exFAT partition is being used and remove the split option altogether, but there seems to be no IPC call to do just that. In the past, I've seen cases in which the application acts all funky because of problems related to the SD card being used (like issues #3 and #6). This would also explain why other dumpers failed for @DarkerUltor as well, since all applications are built using libnx as a foundation. There's little next to nothing I can do if it turns out to be something like this. |
I can try out test builds, but unfortunately I'm away from home until tomorrow, so short-term I won't really be able to. In regards to the setup:
In regards to the SD checking, it looks like you might be able to use For now, at least, we can do I also see a |
@Hking0036 Don't worry about it, just getting any help on this is good enough. Doesn't matter if its slow or not. :) If you're using FAT32, that explains why the error is happening: the application is exceeding the So, this would just be related to the fact the application actually needs the user to choose if they're using FAT32 or exFAT. We *really* need to add a way to check this automatically. I have also considered using I've been looking for a way to gain raw access to the SD card storage device in order to manually check the partition signature, but I've had no luck. This is actually how gamecard dumping works, by gaining raw access to it. Without an IPC call to achieve this, I suppose it's gonna be difficult. I already have an internal v1.0.8 build with many code style changes, and better error reporting for Edit: here's the file. |
@Hking0036 Yup, just as I thought: the problem is definitely related to the FAT32 file size limit. That's why it works when you enable the split option. The displayed information matches up with the sum I wrote in my previous comment. Unless a solution for detecting exFAT partitions is found, the application will still rely on the user to determine this, sadly. I'll just add a check to see if the error was produced after the file size limit was reached, and tell the user about it. Thanks for taking the time to test it! |
Wouldn't it help to look into Hekate and check how it does Fat32 / ExFat handling (https://github.com/CTCaer/hekate/tree/master/bootloader/libs/fatfs) |
@sttng Nope, it wouldn't. Hekate has full hardware access because it runs on a pretty early boot stage, so it offers features that simply can't be done while running under a homebrew context. CFWs need to be modified to provide some sort of custom IPC call that simply reports the SD card partition type that was detected while booting. Unless an official (and widespread) solution is released, I don't see myself fixing this anytime soon. I definitely don't want to fork Atmosphère. |
Why not keep track of how many bytes are written, and in case there is an error at 4 GiB, catch that error and start split - in case of no error at 4 GiB just continue writing ? There may be a rare case of split because of an actual sector problem at exactly 4 GiB while being on exfat I guess (so triggering a 'false' write error). But that should be rather low.
|
@sttng Technically, the error is already being caught, but nothing more than displaying a message that suggests the user to enable the FAT32 option is being done at the moment. If I have enough free time, I'll try to look into that. |
The ongoing rewrite will generate output dumps using ConcatenationFiles if they exceed the 4 GiB mark, even under exFAT. This will remove the need for a FAT32 option. |
i was dumping super mario odissey, when the dump is at 53% i get that error: Failed to write chunk to offset 0x00000000FFF18000. i tried with another dumpers, but i get the same error, is it the cart? im on 6.2.0
The text was updated successfully, but these errors were encountered: