Homebrew RELEASE JKSV (save manager) for Switch

  • Thread starter Thread starter JK_
  • Start date Start date
  • Views Views 202,675
  • Replies Replies 633
  • Likes Likes 27
@JK_

Thank you for your answer and hard work.
You're welcome. I appreciate it. If it weren't for that setback last week, I'd probably have dropped it here yesterday so people could report bugs or give feedback. Right now I'm trying to debug a weird issue with downloading. Files download fine, but I can't touch them afterwards which is odd. FsLib's File destructor should be taking care of cleanup after the download was done and the file went out of scope. Still trying to figure that one out.

There's a few more things to handle too, like Auto-Upload being enabled, but falling back if the remote isn't setup right. I have serious issues with perfectionism too. There's also the fact that there's like 10 different ways to accomplish the same goal in C++ and everyone argues which is "correct." File mode actually shouldn't be that difficult to implement afterwards. Then we'll be officially up to master branch, but improved greatly.
 
I'm going to post this here with a warning: It works for me. That's all I know at this point. I'm looking for people that use WebDav. I've been using Apache on Windows to test and I don't want a repeat of last time: Someone basically adds support for their preferred server and to hell with everyone else. I scrapped the entirety of the old Web Dav code. The config path is sdmc:/config/JKSV/webdav.json. I tried to keep the config the same, but here is the format just in case:
JSON:
{
    "origin": "server",
    "basepath": "path/to/folder",
    "username": "username",
    "password": "secure_password_123456!"
}
Report any bugs or weirdness at all. I didn't have a chance to do the loading screen thing yet. So, sit tight at first launch. As long as it doesn't crash, just cross your fingers for now. I also used AI to translate the strings. They're probably going to need fixing up later. JKSV doesn't have any internal strings anymore. And, yes Auto Upload works now. JKSV should be able to backup all of your save data and upload it just by hitting Y on the first main screen. Nothing stays on the SD card. I'm going to maybe take a break tomorrow and clean some stuff up Sunday.

Take it easy, everyone. Be careful though. Let me know if anything goes wrong.
 

Attachments

@JK_ Game saves cannot be restored on another console with this version.
Can you explain exactly what you're doing so I can try to replicate it? Like through the cloud saving stuff? Google Drive might actually need some reconsideration. The TV/limited input way is more convenient, but like I said earlier, Google is really stupid about this stuff.

If it's not showing up, JKSV caches the entire listing at boot. I can add something to refresh it afterwards, I guess. Constantly pinging Google's servers is slow and causes awkward pauses. Just let me know what you did and what you expected to happen. I'll get to it when I can.
 
@JK_ OK! I created different save files for a game that I had installed on two consoles and backed them up using JKSV. I then transferred one of the save files to the other console via FTP and restored it. However, the save file that was already backed up on the other console is loaded. Apparently, the save file from console 1 was not restored there. I hope I have made myself clear, as I had to run everything through a translator.

Edit:
I tested this again on the same console with different save games for a title. Save game 1 was first saved, then I played a little further and created save game 2 and saved that as well. Then I restored save game 1 and save game 2 was loaded. Apparently, the old save game was not restored here either, because the most recent one was loaded.
 
Last edited by Muxi,
  • Like
Reactions: Blythe93 and JK_
I didn't test restore, but load time is always around 41s (tested 4 times)
Note: Switch is in offline mode

in the previous test build, it was a lot faster
"2nd to 5th boot avg 10s with 6s being the fastest, 14s being the slowest"
 
  • Like
Reactions: Blythe93
@Muxi
I'll give it a shot later and see what happens. I have to dig my original Switch out first. I retired it because of battery issues. I'll see if I can replicate it.

@dsrules
Do you have a lot of save data or titles? Can you check if there's a cache.bin in the sdmc:/config/JKSV folder and see if the log has any error strings in it?
 
  • Like
Reactions: Blythe93 and Muxi
@dsrules
Do you have a lot of save data or titles? Can you check if there's a cache.bin in the sdmc:/config/JKSV folder and see if the log has any error strings in it?
I wouldn't say a lot, 154 game icons in JKSV (around 10 more than the previous build)
jksv.log is 0 bytes
 
  • Like
Reactions: Blythe93
154 game icons in JKSV
That's quite a lot! I have a similar number of games and three users on one of my consoles. It takes almost a minute for JSKV to start up, which is due to the large number of titles installed, and I would say that's completely normal!
 
  • Like
Reactions: Blythe93
That's quite a lot! I have a similar number of games and three users on one of my consoles. It takes almost a minute for JSKV to start up, which is due to the large number of titles installed, and I would say that's completely normal!
if you compare the speed with the test build in post #445, you will notice a big difference in load time speed

Note: I can confirm that restore has no effect
 
I wouldn't say a lot, 154 game icons in JKSV (around 10 more than the previous build)
jksv.log is 0 bytes
If you're wiling to donate your cache.bin for science, let me know. Check how large it is too. I wouldn't mind taking a look and possibly compressing the cache if it doesn't cause enough of an impact.
 
  • Like
Reactions: Blythe93
If you're wiling to donate your cache.bin for science, let me know. Check how large it is too. I wouldn't mind taking a look and possibly compressing the cache if it doesn't cause enough of an impact.
I have already deleted half of the game saves from the system, load time is now 20ish seconds
and what is the .nx_save_meta.bin in the save backup folder? it wasn't there in previous versions
 
  • Like
Reactions: Blythe93
I have already deleted half of the game saves from the system, load time is now 20ish seconds
and what is the .nx_save_meta.bin in the save backup folder? it wasn't there in previous versions
It saves information about the save container for restoring saves. Right now it's only used for the size since some games extend it as they go.

I did make a change that might be impacting boot. I went from memcpying to heap allocating the control data buffer and adding a move operator. The heap allocations might be what created the slow down from the previous version. I'd still be interested in the cache.bin file for testing and timing myself. I'm working with what I have. I have everything I own on my Switch.

Edit: It would also save me time from having to generate a fake one. That's another option.

@Muxi
May I ask what game you were trying to transfer? I just uploaded a save from my newer Switch, downloaded it to my older one, and it restored no problem for me. It might be something specific I need to look at. Also, if you're willing to try again, check if the log shows any errors. It's in the JKSV config directory.

Edit: I tried duplicating it again using Final Fantasy. I started the game, grinded a bit, sent it over to my other Switch through WebDav. It restored fine. On the other Switch, I played some more, defeated Garland, and let the bridge get rebuilt, repeat. It worked both times for me. Maybe it's a game specific thing? I'll attach pictures. Also, one of the Switch's is banned, so it can't be because of NSO sync either.

Edit 2: I've tested this with multiple games, FF, Minecraft, New Pokemon Snap, and both Zelda titles. I can't duplicate it. The only thing I can think of is to try it again and post the log file. It should catch whatever is happening. The log is cleared at each boot though.

After Garland.jpgBefore Garland.jpg
 
Last edited by JK_,
  • Like
Reactions: Muxi and Blythe93
May I ask what game you were trying to transfer?
It´s for Dark Souls Remastered.
I will try again and look for the log file and post it here.

I only discovered this problem because another user reported it to me. It was about Zelda BOTW. Then I tested it myself with Dark Souls RM and was able to confirm it. @dsrules was also able to confirm the problem. I don't know which title he tried to restore.

I deleted the “cache.bin” and “JKSV.log” files in the “config/JKSV” folder before I performed a new restore.
And here is the log file:
 

Attachments

Last edited by Muxi,
It´s for Dark Souls Remastered.
I will try again and look for the log file and post it here.

I only discovered this problem because another user reported it to me. It was about Zelda BOTW. Then I tested it myself with Dark Souls RM and was able to confirm it. @dsrules was also able to confirm the problem. I don't know which title he tried to restore.

I deleted the “cache.bin” and “JKSV.log” files in the “config/JKSV” folder before I performed a new restore.
And here is the log file:
I think I might have caught the issue last night. It might only occur with directory backups. I was using ZIP. I'll see what it is for sure later, but thanks for the log. It should give me a clue.

@Muxi
Thank you so much for the log file! I'm glad I added error logging like that now. So, what's happening is that even though it's a local backup, I still fetch the remote instance for if Auto-Upload and Auto Backup on Restore is enabled. I check all the data pointers required with error::is_null before continuing any further. I mistakenly added the remote::Storage pointer to that statement even though it shouldn't be. I'll update it ASAP. I've also made the log file semi-persistent up to 64KB. Wiping it at boot every time wasn't the greatest idea anyway. Thank you! You have no idea how much those log files can cut down on debugging time.

Side note: Did anyone ever make any headway with what causes the battery drain issues on 19+? I think that's what might causing my battery issues with my OG Switch. Turning on Airplane mode while it's asleep fixes it, but that's a pain in the ass.
 
Last edited by JK_,
  • Like
Reactions: Muxi and Andre63
Side note: Did anyone ever make any headway with what causes the battery drain issues on 19+? I think that's what might causing my battery issues with my OG Switch. Turning on Airplane mode while it's asleep fixes it, but that's a pain in the ass.
There's a GitHub link here with a fix that apparently works, I haven't tested yet

 
Side note: Did anyone ever make any headway with what causes the battery drain issues on 19+? I think that's what might causing my battery issues with my OG Switch. Turning on Airplane mode while it's asleep fixes it, but that's a pain in the ass.

I recreated a new emuMMC from OFW 20.2.0 and the rapid battery drain disappeared.
Updating to CFW 20.3.0 didn't degrade the rapid battery drain.
However, it was very tedious to reinstall all the games and their saves.
Fortunately, JKSV 01/05/2024 was very helpful.
Thanks for that.
 
  • Like
Reactions: Blythe93
@JK_ The solution to the battery drain problem is either to use a specially modified ‘system_settings.ini’ or to set up the system (emuMMC) again under FW 20.x.x. I can provide you with my customised ‘system_settings.ini’. Numerous users have successfully used it to solve this problem.
 

Attachments

@JK_ The solution to the battery drain problem is either to use a specially modified ‘system_settings.ini’ or to set up the system (emuMMC) again under FW 20.x.x. I can provide you with my customised ‘system_settings.ini’. Numerous users have successfully used it to solve this problem.
@Muxi i've never had any battery drain issues since i've had the Switch,perhaps because it's banned or because it's always offline.
Even with the latest firmware,it loses 2% after 8 hours of standby time.
 
@Muxi i've never had any battery drain issues since i've had the Switch,perhaps because it's banned or because it's always offline.
Even with the latest firmware,it loses 2% after 8 hours of standby time.
That's exactly how mine is though. I have three.
  • The first is a launch Switch that got banned shortly after I started JKSV. Not sure what triggered it.
  • The second was the one to replace that so I could play MHGU online with a buddy. It's also surprisingly RCM'able given when I bought it too.
  • Third is an OLED.
The first is the one with the battery issue. I've never had emummc. It was banned before that was even a thing. It gets warm in sleep mode and eats the battery in an hour or two at the most. Airplane mode solves it. I'm going to try what hippy_dave and Muxi were talking about earlier and leave it overnight to see what happens. The other two are fine. Really bizarre thing. Nintendo not addressing too is weird. This isn't just a CFW thing.
 

Site & Scene News

Popular threads in this forum