Tutorial  Updated

How to edit Memory and change in-game values (NSwitchDebugger)

NSwitchDebugger tutorial
original post
The goal is to check addresses until we find the correct one with the value we want to change. we do this by starting game multiple time and with process of deduction we can find it

prerequisites

Download above file
  1. extract SDfiles to your sd card (if you already have latest hekate skip this step)
  2. extract NSwitchDebuger to sd card overwriting files
  3. enter RCM mode and select "NSDebugger"
Once in game note what items you wish to edit (coin count) then hit home
  • Start homebrew menu and run NSwitchDebugger
image.png
  • Now use UP and Down to select the game by title id
    • flip threw until you see Application name where it says Apllication in image
keep in mind a game may have multiple processes running you may have to try bellow a few times until you find results
  • Hit A, should show Success
image.png

The next screen will appear
image.png
  • If you know the address this is where you would enter it...
    • Also if you see below We are our of range
Code:
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX
  • We dont know the address for this guide so we will need to search for our value
    • note: we now need to know how wide are the offset is lets say we are editing coins we note that coin count can go up to 9999999 so we use 8 bytes, lets say we are editing a item that can go up to 9999 so 4 bytes, 99 would be 2. we would change between them by hitting L and R
  • Hit X to search for value so lets say we are editing 1234 coins in SMO
  • use L and R to change byte size 2,4,8) use d-pad LEFT and RIGHT to move between digits and UP and DOWN to match 1234
    • it is easier to hit d-pad left a few places to change numbers to higher values instead of going from 1 to 1234
image.png
  • Now hit A to do the search
you will see below as searches through addresses
image.png
If you only found one or two offsets you do not need to exit and restart
  • After the search hit home
    • we will now spend coins and re-search the stored offsets from prior search
If you find more than one addresses you will want to open game again and spend a couple coins re-search with Y.
  • Restart nswitchdebugger repeat above but hit Y instead of X to repeat search
    • this should narrow search down to a couple or one hit
  • If you still getting many hits open game up again and spend more coins and re-search again with Y
When your search is done and narrowed down it will take you to first found address hit (hit L and R to change addresses if multiple hits). Now we can do our edit
(I was only looking for number 1 for this screenshot to write this guide, assume I spent 1233 coins)
image.png
  • The following is now where we do our value changing
    • note: write down the address listed as you will use it in future to do this mod without doing the whole searching method
  • We will now press A to change 4D2 to 5F5E0FF (again for guide i did 1 to 2)
we will now see bellow
image.png
  • press up or down to change number left or right to change column
    • note: we can also change byte size here but keep in mind this could break game if writing back a too large value
image.png
rinse and repeat until you see your coins in-game change, continue the same for other values to get the result's desired

Here is a Video Tutorial



Congratulations you have now patched memory, Enjoy!:grog:
 

Attachments

  • 2018062719292500-DB1426D1DFD034027CECDE9C2DD914B8.jpg
    2018062719292500-DB1426D1DFD034027CECDE9C2DD914B8.jpg
    44.6 KB · Views: 912
  • 2018062719294000-DB1426D1DFD034027CECDE9C2DD914B8.jpg
    2018062719294000-DB1426D1DFD034027CECDE9C2DD914B8.jpg
    49.7 KB · Views: 726
  • 2018062719295000-DB1426D1DFD034027CECDE9C2DD914B8.jpg
    2018062719295000-DB1426D1DFD034027CECDE9C2DD914B8.jpg
    78 KB · Views: 711
  • 1234.jpg
    1234.jpg
    24.7 KB · Views: 709
  • searching.jpg
    searching.jpg
    109.1 KB · Views: 688
  • address_after_found.jpg
    address_after_found.jpg
    102.3 KB · Views: 674
  • changing_value.jpg
    changing_value.jpg
    24.4 KB · Views: 676
  • seccessful_changed.jpg
    seccessful_changed.jpg
    57.4 KB · Views: 730
Last edited by Type_O_Dev,

dsrules

Well-Known Member
Member
Joined
Sep 20, 2005
Messages
8,781
Trophies
2
XP
6,343
Country
I honestly dont think so as the app doesn't stay running after exit it basically just patches memory with new value

--------------------- MERGED ---------------------------


BTW what was the offset for hearts in zelda and if you dont mind can you report any others you find so I can update OP with them.
there are few .txt cheat files in the cheat folder, maybe that's for auto enable cheats???
I couldn't read the v0.5x.txt in the zip
 

Type_O_Dev

Developer
OP
Developer
Joined
Dec 12, 2017
Messages
683
Trophies
0
XP
1,475
Country
United States
there are few .txt cheat files in the cheat folder, maybe that's for auto enable cheats???
I couldn't read the v0.5x.txt in the zip
good eye, I'm looking into it. The only way i would be able to figure it out would be to load one of the titles and see what it modifies. i can only make sence of a couple items
Code:
_title ƒXƒ^[
_enable
_s0
_size:3229000
_type:5
_perm:3
_offset:24D5DD0
_val:63
_vals:2
_end
 

dsrules

Well-Known Member
Member
Joined
Sep 20, 2005
Messages
8,781
Trophies
2
XP
6,343
Country
good eye, I'm looking into it. The only way i would be able to figure it out would be to load one of the titles and see what it modifies. i can only make sence of a couple items
Code:
_title ƒXƒ^[
_enable
_s0
_size:3229000
_type:5
_perm:3
_offset:24D5DD0
_val:63
_vals:2
_end
translated from google
the app always freezes on me when the searching has more than 1 page :(

Code:
v 0.57
Memory search correction

v 0.56

[hekate] type
[NSDebugger]
Used for code search, registration
[NSDebugger_kip]
Rewrite code in real time
[NSDebugger_fs_mitm_kip]
Rewrite code in real time fs_mitm

nsdebugger.kip
1.
switch \ NSwitchDebugger \ debug \ cheat \
Compare whether titleid.txt matches the process titleid
Debug start if they match
Repeat until matching

2.
Load cheat code of titleid.txt

3.
Memory space search
Memory rewriting
Search and repeat memory space after 1 second sleep


NSwitchDebugger.nro
Cheat registration
After process debugging
Press L, R to search and change to the matched address
Press the Y button
switch \ NSwitchDebugger \ debug \ cheat \ titleid.txt
Cheat code is appended to

Code:
_title Trout
Enable _enable
_s 0
_size: 6f 84000
_type: 5
_perm: 3
_offset: 1fff
_val: 3e7
_vals: 4
_end

How much is _title
_disable invalid
_s 0
_size 6f 84000
_type 5
_perm 3
_offset:
_val
_end

_s 0 Find address based on size, type, and permission of memory space
_size Specify the size of memory space
_type Specify the type of memory space
Specify permission of _perm memory space
_offset Specify offset from base address of memory space
_val Specify the value to be entered
_vals Specify from the size 1, 2, 4, 8 of the value to be input

ill have a look to see how to set up, ive only booted sx cfw using pro dongle to boot games and thats it.
it works fine with external payload from sx menu for nsp games you have installed, the the app always tends to freeze for me (5/5 times) during searching, but I only tested with one game
 
Last edited by dsrules,
  • Like
Reactions: Type_O_Dev

Diavol0

Member
Newcomer
Joined
Jun 29, 2018
Messages
21
Trophies
0
Age
35
XP
230
Country
Italy
Someone can try this on Disgaea 5 ?
(i'm not a nps fan)

--------------------- MERGED ---------------------------

translated from google
the app always freezes on me when the searching has more than 1 page :(

Code:
v 0.57
Memory search correction

v 0.56

[hekate] type
[NSDebugger]
Used for code search, registration
[NSDebugger_kip]
Rewrite code in real time
[NSDebugger_fs_mitm_kip]
Rewrite code in real time fs_mitm

nsdebugger.kip
1.
switch \ NSwitchDebugger \ debug \ cheat \
Compare whether titleid.txt matches the process titleid
Debug start if they match
Repeat until matching

2.
Load cheat code of titleid.txt

3.
Memory space search
Memory rewriting
Search and repeat memory space after 1 second sleep


NSwitchDebugger.nro
Cheat registration
After process debugging
Press L, R to search and change to the matched address
Press the Y button
switch \ NSwitchDebugger \ debug \ cheat \ titleid.txt
Cheat code is appended to

Code:
_title Trout
Enable _enable
_s 0
_size: 6f 84000
_type: 5
_perm: 3
_offset: 1fff
_val: 3e7
_vals: 4
_end

How much is _title
_disable invalid
_s 0
_size 6f 84000
_type 5
_perm 3
_offset:
_val
_end

_s 0 Find address based on size, type, and permission of memory space
_size Specify the size of memory space
_type Specify the type of memory space
Specify permission of _perm memory space
_offset Specify offset from base address of memory space
_val Specify the value to be entered
_vals Specify from the size 1, 2, 4, 8 of the value to be input


it works fine with external payload from sx menu for nsp games you have installed, the the app always tends to freeze for me (5/5 times) during searching, but I only tested with one game
How did you make it work with Sx os file on SD? (kip,ecc..)
 

rdavis0688

Well-Known Member
Newcomer
Joined
Jun 10, 2018
Messages
62
Trophies
0
Age
35
XP
151
Country
United States
Edit:
Problem: Freezing game, black screen in nswitchdebugger.

This was fixed by completely wiping everything off the SD card including downloads, putting just the sd files 5.2.1 and nswitchdebugger and checkpoint back on the system. Then I downloaded my games overnight. I don't think it's a bad SD card (Samsung EVO 256G), or rather, I hope not. Just a clean install of _everything_, and it all works again.
 
Last edited by rdavis0688,

aos10

Yuuki chan
Member
Joined
Apr 10, 2012
Messages
4,756
Trophies
2
Age
38
XP
4,031
Country
Saudi Arabia
i am trying using this on rajNX, and managed to narrow the search to 2 address in dead cells, managed to edit the first address but i can't choose the second address.
 

aos10

Yuuki chan
Member
Joined
Apr 10, 2012
Messages
4,756
Trophies
2
Age
38
XP
4,031
Country
Saudi Arabia
ok, i've edited the two address, when i return to the game, the value is still not changed, i've bought spend some cells, but still decreasing.
the way that i am using this app is open the game, then look at the value, press home and open the homebrew app, search until there is 1-2 address.
i've changed both, back to the game, but there is no change. maybe after the change it didn't save?

the final photo looks like this

 

wiitendo84

Well-Known Member
Member
Joined
Jan 3, 2014
Messages
1,392
Trophies
2
Age
40
Location
New Albany, Indiana
XP
3,801
Country
United States
I'm kind of having a problem as to it freezing when I select my game. Botw cartridge. Like it starts to load the game but freezes on the switch symbol at the bottom right. I am on 5.1.0 so will that be the cause?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=6igvB1yR04A