Homebrew RELEASE NSPatch - Patch NSP Files to their actual needed FW version

Status
Not open for further replies.

adrifcastr

Well-Known Member
OP
Member
Joined
Sep 12, 2016
Messages
2,038
Trophies
0
XP
1,947
Country
Germany
Gave it a shot, and all seemed to work well, but its still making 0kb Patched.NSP's?
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)
 

GyTe

Active Member
Newcomer
Joined
May 2, 2018
Messages
25
Trophies
0
Age
48
XP
288
Country
Italy
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!
 

Kobigov

Well-Known Member
Member
Joined
Jan 10, 2018
Messages
129
Trophies
0
Age
44
XP
300
Country
United States
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!
I don't think 4.0.1 really offers anything special if you wanna just update to 4.1.
 

rrocha

Developer
Developer
Joined
Nov 21, 2016
Messages
137
Trophies
0
XP
1,814
Country
Portugal
@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
 
  • Like
Reactions: adrifcastr
D

Deleted User

Guest
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)
Ah, its likely I'm missing python, I just recently did a reinstall of Win10, so that's fully possible where the issue lays.

Th
 
  • Like
Reactions: adrifcastr

adrifcastr

Well-Known Member
OP
Member
Joined
Sep 12, 2016
Messages
2,038
Trophies
0
XP
1,947
Country
Germany
@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
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!
 
Last edited by adrifcastr,

bloodien0se

New Member
Newbie
Joined
Jun 27, 2015
Messages
3
Trophies
0
Age
35
XP
494
Country
United States
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
}
 
  • Like
Reactions: adrifcastr

adrifcastr

Well-Known Member
OP
Member
Joined
Sep 12, 2016
Messages
2,038
Trophies
0
XP
1,947
Country
Germany
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
}
thanks, that's what probably also causes most of the issues, I was looking to also get that implemented!
 

rrocha

Developer
Developer
Joined
Nov 21, 2016
Messages
137
Trophies
0
XP
1,814
Country
Portugal
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
 

bloodien0se

New Member
Newbie
Joined
Jun 27, 2015
Messages
3
Trophies
0
Age
35
XP
494
Country
United States
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've seen interim values that aren't these known ones too. Check the Title_list article on the switchbrew wiki, under System Data Archives / SystemVersion. Those seem to be the values for the actual FW updates. I'm assuming values outside of those were development fw versions that didn't get pushed as prod fw versions.

Except for Updates, those often have some wild RequiredSystemVersions, no idea why.
 

aos10

Yuuki chan
Member
Joined
Apr 10, 2012
Messages
4,756
Trophies
2
Age
38
XP
4,029
Country
Saudi Arabia
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.
 

adrifcastr

Well-Known Member
OP
Member
Joined
Sep 12, 2016
Messages
2,038
Trophies
0
XP
1,947
Country
Germany
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.
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#
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    NinStar @ NinStar: the voices inside my head