Gave it a shot, and all seemed to work well, but its still making 0kb Patched.NSP's?Update 2.0 Released.
For changelog, downloadlink and GIFs see OP.
Working fine on my side.Gave it a shot, and all seemed to work well, but its still making 0kb Patched.NSP's?
I don't think 4.0.1 really offers anything special if you wanna just update to 4.1.Thanks even for that release... I've tried with my Switch... I'm on 4.0.1... the procedure is completed and patched.nsp created but seems I received always the same message to update my Switch... I'm trying to start a 4.1 games on my 4.0.1...
Anyway thanks for your effort!
Ah, its likely I'm missing python, I just recently did a reinstall of Win10, so that's fully possible where the issue lays.Working fine on my side.
Do you have a proper installation of python 3.5 including path variables?
Also to anyone else: I'm looking for someone who is able to translate from python to c# as I'd like to reimpl nspbuild and get rid of python being a dependency
(Also the next release will probably have hactool and it's dlls packed in)
oh wow, c++ and c# are even more different than I originally thought. I can read 50% of what is what, but that looks really good to me, great job, thanks a lot!@adrifcastr I've created a c++ patcher (no need to unpack and repack). You can either compile it and distribute it together with your app or port the code to your favorite language.
Further optimizations would be to do a reverse search (as the XMLs appear to be packed towards the end) but it's fast enough form me as it is. Furthermore, it's open-source so people can grab it and improve it if they want.
Enjoy: https://gist.github.com/rdmrocha/6c74d8c238751f3e5a0aac3119dfc586
# Lowest RequiredSystemVersion values for each KeyGeneration
KG_LOWEST_RSV = {
0: 0, # Keyblob 0
1: 450, # Keyblob 1, System Version 1.0.0
2: 201327002, # Keyblob 2, System Version 3.0.0
3: 201392178, # Keyblob 3, System Version 3.0.1
4: 268435656, # Keyblob 4, System Version 4.0.0
5: 335544750, # Keyblob 5, System Version 5.0.0
}
thanks, that's what probably also causes most of the issues, I was looking to also get that implemented!Here's a list of what I believe the "proper" lowest RequiredSystemVersion values should be for each KeyGeneration, from what I can gather from the Switchbrew wiki, if anyone wants to incorporate this rather than always setting to 0:
Code:# Lowest RequiredSystemVersion values for each KeyGeneration KG_LOWEST_RSV = { 0: 0, # Keyblob 0 1: 450, # Keyblob 1, System Version 1.0.0 2: 201327002, # Keyblob 2, System Version 3.0.0 3: 201392178, # Keyblob 3, System Version 3.0.1 4: 268435656, # Keyblob 4, System Version 4.0.0 5: 335544750, # Keyblob 5, System Version 5.0.0 }
oh wow, c++ and c# are even more different than I originally thought. I can read 50% of what is what, but that looks really good to me, great job, thanks a lot!
Part of it is C for better efficiency.
Regarding the keyblobs, I already encountered different values. Maybe for interim versions. Sonic Mania Plus is 201326592 and is supposedly 5.x.x
I just want to stick there in order to preserve efuse...I don't think 4.0.1 really offers anything special if you wanna just update to 4.1.
4.0.0 and 4.1.0 both have 5 burned fuses. you can change between them at your will.I just want to stick there in order to preserve efuse...
Yeah seems that that somehow happens to some people, probably because of my "raw" way to patch, I'll edit, compile and embed @rrocha 's code as a workaround until I manage to reimplement it in c#the new update is amazong, but it strange, i patched shaq fu my self and worked on 4.1
but now with the new version it patched it to work on 5.0.0, very weird.
Thanks... I didn't know about that... So basically I need to find now a cartridge with 4.1 inside...4.0.0 and 4.1.0 both have 5 burned fuses. you can change between them at your will.
Labo toycon kit or just use rajkosto's update methodThanks... I didn't know about that... So basically I need to find now a cartridge with 4.1 inside...
Or better yet, look for the xml in the header, and directly jump to its offset in the filedata.Further optimizations would be to do a reverse search (as the XMLs appear to be packed towards the end) but it's fast enough form me as it is.