Hacking Sigpatches for Atmosphere (Hekate, fss0, fusee & package3)

unicornman

Member
Newcomer
Joined
Mar 28, 2024
Messages
12
Trophies
0
Age
41
XP
63
Country
United Kingdom
He went out of his way to be shitty to people and say shitty things about people based on who they were. I call him shitty for being shitty to other people. If you feel that's equivalent then that's your opinion and you're welcome to it because it's not a harmful opinion being actively used to cause harm.
This post reminds me about the school yard bully that hits someone that's unconscious on the ground. MrDude is banned so can't answer back to your claims and so you go out of your way to bad mouth him. I didn't see any posts where your claims are true, only your words against his silence.
I am happy that we have patches and can make them by ourselves thanks to him, what did you bring to the table?
 

RedColoredStars

Well-Known Member
Member
Joined
Aug 14, 2022
Messages
944
Trophies
0
Location
Vancouver
XP
1,264
Country
Canada
Moral of the story for now. If a person wants to keep using sigpatches with a modded fusee, doesn't want to use sys-patch, and wants ctest patched... they need to use the three cats ctest patches.
 
  • Wow
Reactions: impeeza

unicornman

Member
Newcomer
Joined
Mar 28, 2024
Messages
12
Trophies
0
Age
41
XP
63
Country
United Kingdom
Moral of the story for now. If a person wants to keep using sigpatches with a modded fusee, doesn't want to use sys-patch, and wants ctest patched... they need to use the three cats ctest patches.
Not true as the patch from IPS patch creator works just fine. I tried and can connect the switch to wifi with internet connection not turned on, this is the point of the patch.

This is what is patched:

========================
IPS Patch creator
Patch location: 0x00083660
patch -
E0 03 1F AA
C0 03 5F D6

Patch in assembly:
mov x0, xzr
ret
========================
3 cats Patches
Patch location: 0x00083660
Patch -
00 30 9A D2
00 1E A1 F2
61 01 00 D4
E0 03 1F AA
C0 03 5F D6

Patch in assembly:
movz x0, #0x8F0D180 (move address which is no existant into x0?)
svc 0xB (cause exception - processor mode changes to Supervisor)
mov x0, xzr (this just does the same as IPS patch creator and moves xzr into x0)
ret (return basically just exits the function)
========================

Both patches just move zxr into register x0 and then return out of the function without executing the rest of the code in that function.
 
  • Like
Reactions: oggi and Blythe93

SaggyBeans

Well-Known Member
Member
Joined
Jul 8, 2014
Messages
228
Trophies
0
XP
565
Country
Canada
Moral of the story for now. If a person wants to keep using sigpatches with a modded fusee, doesn't want to use sys-patch, and wants ctest patched... they need to use the three cats ctest patches.

What I did was copy over the sigpatches found here on the forum to my SD card, and then copied the three cats sigpatches over them, replacing duplicate files. Going forward I will just use the three cats sigpatches along with sys-patch.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,884
Trophies
2
XP
29,296
Country
United Kingdom
I didn't see any posts where your claims are true, only your words against his silence.
I went back to the previous page because I was going to show you the link someone posted to mrdude calling people mentally ill and the r word, but oh look it was you who posted it. You can easily go back through his posts and find other offensive hate speech, but obviously you're claiming not to see it as such because your opinions are as shit as his. Don't worry, I won't be responding to you again.

FB_IMG_1712198607033.jpg
 
Last edited by hippy dave,
  • Like
Reactions: AngelofWoe

RedColoredStars

Well-Known Member
Member
Joined
Aug 14, 2022
Messages
944
Trophies
0
Location
Vancouver
XP
1,264
Country
Canada
Not true as the patch from IPS patch creator works just fine.

I don't believe that and I've already explained why several times over. For the last time.... If using both sigpatches and sys-patch, the sys-patch overlay should show ctest in orange. That means the sigpatch for it is working correctly so there is no need for sys-patch to patch it. When it's green, that means the sigpatch didn't do it's job so sys-patch had to patch it.

Also sigpatches from here and created with the tool have matching hashes. The ctest patch from three cats does not. Both things tell me something is not right with the ctest patch from the tool and from impeezas pack. I also tested things myself. I literally changed around everything on my sd card to test. Changed hekate ini to use fusee instead of fss0, removed sys-patch, replaced fusee with the patched fusee, etc. In my own test the ctest patch from here and the one I made with the tool did not work. When I replaced ONLY the fw 18 ctest patch with the one from three cats, it worked. So i don't know what to tell you.

When using both, it's very clear that only the ctest patch from three cats is working. If the others were working, sys-patch would report it in orange. Indicating that the sigtest patch was in fact already doing it's job. When it's green it means sigpatch didn't patch it, so sys-patch had to patch it. I'm not sure what's difficult about that to understand. Perhaps you were able to connect to wifi with it disabled when usiing only sigpatches. I absolutely was not. And again, when using both, the sys-patch log indicates the ctest sigpatch is not being applied unless using the three cats version.
 

unicornman

Member
Newcomer
Joined
Mar 28, 2024
Messages
12
Trophies
0
Age
41
XP
63
Country
United Kingdom
I don't believe that and I've already explained why several times over. For the last time.... If using both sigpatches and sys-patch, the sys-patch overlay should show ctest in orange. That means the sigpatch for it is working correctly so there is no need for sys-patch to patch it. When it's green, that means the sigpatch didn't do it's job so sys-patch had to patch it.

Also sigpatches from here and created with the tool have matching hashes. The ctest patch from three cats does not. Both things tell me something is not right with the ctest patch from the tool and from impeezas pack. I also tested things myself. I literally changed around everything on my sd card to test. Changed hekate ini to use fusee instead of fss0, removed sys-patch, replaced fusee with the patched fusee, etc. In my own test the ctest patch from here and the one I made with the tool did not work. When I replaced ONLY the fw 18 ctest patch with the one from three cats, it worked. So i don't know what to tell you.

When using both, it's very clear that only the ctest patch from three cats is working. If the others were working, sys-patch would report it in orange. Indicating that the sigtest patch was in fact already doing it's job. When it's green it means sigpatch didn't patch it, so sys-patch had to patch it. I'm not sure what's difficult about that to understand. Perhaps you were able to connect to wifi with it disabled when usiing only sigpatches. I absolutely was not. And again, when using both, the sys-patch log indicates the ctest sigpatch is not being applied unless using the three cats version.
Just use whatever works for you. If you have this patch working it doesn't really matter how you did it. For me the IPS Patch creator one works fine and has been for a long time over many firmware versions without any issues, so I'll just continue to use that one. I explained and showed what's patched above and showed you the addresses and code that is executed from the patch, if you understand the Arm64 instruction set you can see from above what the patches are doing. If you don't understand what the patches are doing you are probably just best leaving it to the people that make that patches and not worry about it. Basically unless you want to use wifi without your router being connected to the internet you don't even need this patch.

The reason ctest (NFIM) patch from sys-patch shows the same as the ones from the three cats is because these use the same patch:
Code:
constexpr PatchData ctest_patch_data{ "0x00309AD2001EA1F2610100D4E0031FAAC0035FD6" };

IPS Patch creator uses a different shorter patch to acheive the same thing so that's why it doesn't show in sys-patch as patched. Now some say that the older patch has some memory issue, but I never ran into any issues with any of my games working wrong or crashing etc and i have been using this patch for a few years now. Also both patches are just doing the same thing by moving a value into a register and then exiting the function so that the internet check is never run.
 

RedColoredStars

Well-Known Member
Member
Joined
Aug 14, 2022
Messages
944
Trophies
0
Location
Vancouver
XP
1,264
Country
Canada
IPS Patch creator uses a different shorter patch to acheive the same thing so that's why it doesn't show in sys-patch as patched. Now some say that the older patch has some memory issue, but I never ran into any issues with any of my games working wrong or crashing etc and i have been using this patch for a few years now. Also both patches are just doing the same thing by moving a value into a register and then exiting the function so that the internet check is never run.

Except the test is done on my end when I use ONLY sigpatches and either the ctest patch from here or one I created myself. When I use the one from three cats the test is not performed. I'll continue using the ctest patch from three cats as for me personally, the others do not work.
 
  • Like
Reactions: unicornman

unicornman

Member
Newcomer
Joined
Mar 28, 2024
Messages
12
Trophies
0
Age
41
XP
63
Country
United Kingdom
Except the test is done on my end when I use ONLY sigpatches and either the ctest patch from here or one I created myself. When I use the one from three cats the test is not performed. I'll continue using the ctest patch from three cats as for me personally, the others do not work.
Well as long as you have it working, that's all that matters.
 

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
691
Trophies
1
XP
2,479
Country
Russia
the sys-patch overlay should show ctest in orange. That means the sigpatch for it is working correctly
No it does not. It means only that bytes that sys-patch wants to modify already modified by some other way. If ips patch changes some other bytes than sys-patch it will never found out that.
 

RedColoredStars

Well-Known Member
Member
Joined
Aug 14, 2022
Messages
944
Trophies
0
Location
Vancouver
XP
1,264
Country
Canada
No it does not. It means only that bytes that sys-patch wants to modify already modified by some other way. If ips patch changes some other bytes than sys-patch it will never found out that.

The documentation literally states that if it's green it's being patched by sys-patch and if it's orange it's being patched by the sigpatch. If you have both, and it's green, the sigpatch obviously didn't patch it prior to sys-patch patching it.

If one sigpatch makes it orange and a different sigpatch makes it green. One of the sigpatches isn't doing it's job.

And honestly I don't give a fuck anymore. I lost my best friend in the world yesterday. This all means absolutely nothing to me. I have nothing left to say about it from here on out.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,884
Trophies
2
XP
29,296
Country
United Kingdom
And honestly I don't give a fuck anymore. I lost my best friend in the world yesterday. This all means absolutely nothing to me. I have nothing left to say about it from here on out.
Really sorry mate, that's truly awful. Losing a friend is one of the hardest things. Take care of yourself the best you can, your Switch will be fine.
 

Dust2dust

Well-Known Member
Member
Joined
Jun 17, 2010
Messages
2,422
Trophies
2
XP
4,379
Country
Canada
I lost my best friend in the world yesterday. This all means absolutely nothing to me. I have nothing left to say about it from here on out.
Sorry about your loss. My best friend I ever had passed away 3 years ago, and I still think about him very often. Not easy to get over it, but life goes on.
 

dogtygr

Member
Newcomer
Joined
May 30, 2023
Messages
19
Trophies
0
XP
42
Country
United States
The documentation literally states that if it's green it's being patched by sys-patch and if it's orange it's being patched by the sigpatch. If you have both, and it's green, the sigpatch obviously didn't patch it prior to sys-patch patching it.

If one sigpatch makes it orange and a different sigpatch makes it green. One of the sigpatches isn't doing it's job.

And honestly I don't give a fuck anymore. I lost my best friend in the world yesterday. This all means absolutely nothing to me. I have nothing left to say about it from here on out.
First of all sorry for your loss. I hope everything goes well for you.

I've made a patch on the IPS Patch creator tool that allows you to increase the number of bytes you can add in the NFIM patch 1 and 2 in the WCO tool

Following what unicornman said, you can replicate the sigpatches files by modifying the NFIM Patch2 and 1 value.

For obvious reasons I cannot send you the link of the compiled software but I can give you a patch of what I've modified

Code:
From 94885ec936930291a80b25d21ab317d06ddcd3ee Mon Sep 17 00:00:00 2001
From: dogty <[email protected]>
Subject: [PATCH] Allow to increase the size of the nfim patches

---
 IPS_Patch_Creator/Main.cs | 51 +++++++++++++++++++++++++++++----------
 1 file changed, 38 insertions(+), 13 deletions(-)

diff --git a/IPS_Patch_Creator/Main.cs b/IPS_Patch_Creator/Main.cs
index 6e40b4a..37ac333 100644
--- a/IPS_Patch_Creator/Main.cs
+++ b/IPS_Patch_Creator/Main.cs
@@ -3337,7 +3337,32 @@ namespace IPS_Patch_Creator
                 MessageBox.Show("Error is: " + error.Message);
             }
         }
-
+        private int GetHexVal(char hex)
+        {
+            int val = (int)hex;
+            //For uppercase A-F letters:
+            //return val - (val < 58 ? 48 : 55);
+            //For lowercase a-f letters:
+            //return val - (val < 58 ? 48 : 87);
+            //Or the two combined, but a bit slower:
+            return val - (val <= '9' ? '0' : (val <= 'Z' ? ('A' - 10) : ('a' - 10)));
+        }
+        private void convert_Hexstring_To_Bytes(string hexstring, out byte[] bytesArray)
+        {
+            char[] hexCharArray = hexstring.ToCharArray();
+            int sizeArray = 1;
+            int index = 0;
+            byte[] tempByteArray = new byte[sizeArray];
+            for (int i=0; i < hexCharArray.Length; i+=2)
+            {
+                Array.Resize(ref tempByteArray, sizeArray);
+                tempByteArray[index] = (byte)(GetHexVal(hexCharArray[i])*16 + GetHexVal(hexCharArray[i+1]));
+                index++;
+                sizeArray++;
+            }
+            bytesArray = new byte[sizeArray - 1];
+            Array.Copy(tempByteArray, bytesArray, sizeArray - 1);
+        }
         private void nfim_Patch_Creation()
         {
             try
@@ -3363,14 +3388,14 @@ namespace IPS_Patch_Creator
                                 if (checkBox_nfim_patch_override.Checked == true)
                                 {
                                     string hexstring = textBox_nfim_patch1.Text;
-                                    uint patch = uint.Parse(hexstring, System.Globalization.NumberStyles.AllowHexSpecifier);
-                                    patch = ReverseBytes(patch);
-                                    PatchBytes = BitConverter.GetBytes(patch);
+                                    convert_Hexstring_To_Bytes(hexstring, out PatchBytes);
 
                                     string hexstring2 = textBox_nfim_patch2.Text;
-                                    uint patch2 = uint.Parse(hexstring2, System.Globalization.NumberStyles.AllowHexSpecifier);
-                                    patch2 = ReverseBytes(patch2);
-                                    PatchBytes2 = BitConverter.GetBytes(patch2);
+                                    convert_Hexstring_To_Bytes(hexstring2, out PatchBytes2);
+                                  
+                                    int lengthPatches = PatchBytes2.Length + PatchBytes.Length;
+                                    string PaddingString = lengthPatches.ToString("x4");
+                                    convert_Hexstring_To_Bytes(PaddingString, out PaddingBytes);
                                 }
                             }
 
@@ -4859,14 +4884,14 @@ namespace IPS_Patch_Creator
                                 if (checkBox_fs_patch_override.Checked == true)
                                 {
                                     string hexstring = textBox_fs_patch1.Text;
-                                    uint patch = uint.Parse(hexstring, System.Globalization.NumberStyles.AllowHexSpecifier);
-                                    patch = ReverseBytes(patch);
-                                    PatchBytes = BitConverter.GetBytes(patch);
+                                    convert_Hexstring_To_Bytes(hexstring, out PatchBytes);
 
                                     string hexstring2 = textBox_fs_patch2.Text;
-                                    uint patch2 = uint.Parse(hexstring2, System.Globalization.NumberStyles.AllowHexSpecifier);
-                                    patch2 = ReverseBytes(patch2);
-                                    PatchBytes2 = BitConverter.GetBytes(patch2);
+                                    convert_Hexstring_To_Bytes(hexstring2, out PatchBytes2);
+
+                                    int lengthPatches = PatchBytes2.Length + PatchBytes.Length;
+                                    string PaddingString = lengthPatches.ToString("x4");
+                                    convert_Hexstring_To_Bytes(PaddingString, out PaddingBytes);
                                 }
                             }
 
--
2.36.0.windows.1
 
Last edited by dogtygr,
  • Like
Reactions: Blythe93

TotalJustice

Well-Known Member
Member
Joined
Jan 28, 2017
Messages
443
Trophies
0
Age
26
XP
2,609
Country
United Kingdom
Not true as the patch from IPS patch creator works just fine. I tried and can connect the switch to wifi with internet connection not turned on, this is the point of the patch.

This is what is patched:

========================
IPS Patch creator
Patch location: 0x00083660
patch -
E0 03 1F AA
C0 03 5F D6

Patch in assembly:
mov x0, xzr
ret
========================
3 cats Patches
Patch location: 0x00083660
Patch -
00 30 9A D2
00 1E A1 F2
61 01 00 D4
E0 03 1F AA
C0 03 5F D6

Patch in assembly:
movz x0, #0x8F0D180 (move address which is no existant into x0?)
svc 0xB (cause exception - processor mode changes to Supervisor)
mov x0, xzr (this just does the same as IPS patch creator and moves xzr into x0)
ret (return basically just exits the function)
========================

Both patches just move zxr into register x0 and then return out of the function without executing the rest of the code in that function.
i made the ctest patch, i thought i explained in already in another post, but couldn't find it.

basically, it was reported to me that in the past that core3 would randomly be pinned to 100% usage when using ctest patch. i couldn't find anyone that still had this issue, nor a way to reproduce it, but it was reported often enough, and the fix was to remove the ctest patch, as most people don't need it anyway.

i add a sleep() in the patch code (thats what svc 0xb is, and the mov prior is how long to sleep for) as a hacky "fix" to the problem, which was suggested in the github issue. afaik, no one has since reported crashes with ctest.

for a proper fix, i'd need a way to reproduce the bug, then i could track it down and correct it. but like i said, i can't find anyone with this issue, and i have asked in *everywhere*.

https://github.com/misson20000/exefs_patches/issues/30
https://armconverter.com/?disasm&lock=arm64&code=00309AD2001EA1F2610100D4E0031FAAC0035FD6
The documentation literally states that if it's green it's being patched by sys-patch and if it's orange it's being patched by the sigpatch. If you have both, and it's green, the sigpatch obviously didn't patch it prior to sys-patch patching it.

If one sigpatch makes it orange and a different sigpatch makes it green. One of the sigpatches isn't doing it's job.

And honestly I don't give a fuck anymore. I lost my best friend in the world yesterday. This all means absolutely nothing to me. I have nothing left to say about it from here on out.
duckbill is right. sys-patch simply searches for a pattern, when it finds it, it then looks at the area it wants to patch and checks if it matches the data sys-patch wants to overwrite it with. if its a match, then sys-patch reports it as already patched (orange), if its different, sys-patch will overwrite it (green). as ips patch creator patches the area with different code to sys-patch, it will overwrite it and report it green. i only shared this patch with the guys that make the patches for cat-site, so thats why only sys-patch and them patch it with the same code :)

tldr, both patches work the same to patch ctest, my patch just tries to work around a bug that seemingly no one can reproduce.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
    +1
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Samsung SD format can sometimes fix them too
  • Purple_Heart @ Purple_Heart:
    yes looks like an faulty sd
  • Purple_Heart @ Purple_Heart:
    @Psionic Roshambo i may try that with my dead sd cards
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    It's always worth a shot
  • TwoSpikedHands @ TwoSpikedHands:
    @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the mail lol
    TwoSpikedHands @ TwoSpikedHands: @The Real Jdbye, I considered that, but i'll have to wait until i can get the eu version in the...