Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Patchnso Switch: Difference between revisions

From GameBrew
(Created page with "{{Infobox Switch Homebrews |title=Patchnso |image=Switch-logo.png |description=a script to patch the code of games more easily, before layeredfs. |author=tesnos6921 |lastupdated=2018/06/03 |type=PC Utilities |version=2018 |license=Mixed |download=https://dlhb.gamebrew.org/switchhomebrews/patchnsoswitch.7z |website=https://gbatemp.net/threads/patchnso-py-a-script-to-patch-the-code-of-games-more-easily-before-layeredfs.506152/ |source=https://gist.github.com/tesnos/66d17f6...")
 
No edit summary
 
Line 1: Line 1:
{{Infobox Switch Homebrews
{{Infobox Switch Homebrews
|title=Patchnso
|title=patchnso.py
|image=Switch-logo.png
|image=patchnsonx.png
|description=a script to patch the code of games more easily, before layeredfs.
|description=A script to patch the code of games more easily, before layeredfs.
|author=tesnos6921
|author=tesnos6921
|lastupdated=2018/06/03
|lastupdated=2018/06/03
Line 8: Line 8:
|version=2018
|version=2018
|license=Mixed
|license=Mixed
|download=https://dlhb.gamebrew.org/switchhomebrews/patchnsoswitch.7z
|download=https://dlhb.gamebrew.org/switchhomebrews/patchnsonx.7z
|website=https://gbatemp.net/threads/patchnso-py-a-script-to-patch-the-code-of-games-more-easily-before-layeredfs.506152/
|website=https://gbatemp.net/threads/patchnso-py-a-script-to-patch-the-code-of-games-more-easily-before-layeredfs.506152/
|source=https://gist.github.com/tesnos/66d17f694ef570ae8011a53e97ce437d
|source=https://gist.github.com/tesnos/66d17f694ef570ae8011a53e97ce437d
|donation=
|donation=
}}
}}
{{#seo:
{{obsolete}}
|title=Switch Homebrew PC Tools (PC Utilities) - GameBrew
A simple script to patch the .text sections of nso files and reassemble them.
|title_mode=append
 
|image=Switch-logo.png
Here are some sample videos of what it can do:
|image_alt=Patchnso
*https://twitter.com/tesnos6921/status/1003007238984921089
}}
*https://twitter.com/tesnos6921/status/1003365767449018373
{{cleanup|article|Needs cleanup}}
 
a script to patch the code of games more easily, before layeredfs.
==User guide==
Python 2.7, requires lz4 module to be installed.


==Media==
Usage Instructions:
<youtube></youtube>
*Using hactool, extract the exefs of your game.
*Within the exefsdir, there should be "main" and "main.npdm" and possibly a few others.
*"main" is the game's main nso, you can load it into IDA and create your own patches or go out and find some.
*When you have your patches put them all in a file in this format: (all values should be in hex) <code>location:codepatch</code>
** Example: <code>2E8:21008052</code>
*Then run "python patchnso.py main patch-file-here output-file-here".
*Your patched file will appear and you can put it under /atmosphere/titles/title-id/exefs/ on your sd card, renamed back to "main", with the other files from your extracted exefs and you have now patched your game.


===Sample patches===
Some sample patches are included (made for Super Mario Odyssey Version 1.2.0) which you can try out. Make sure it is on the correct version.


==Screenshots==
Sample patches nclude:
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-01.png
*Don't Lose Health.
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-02.png
*Near-Zero Gravity for Normal Jumps.
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-03.png
*Raise Coin Limit To 65536 (Untested).
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-04.png
*High-Power Long Jump.
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-05.png
*Hyper Walking Speed.
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-06.png
*Stop Player From Dying (Allows walking on acid and lava) (Credit to SimonMKWii).
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-07.png
*No Damage for Running out of Oxygen or Staying in Ice Water (Credit to SimonMKWii).
https://dlhb.gamebrew.org/switchhomebrews/Switch-logo-08.png


==Changelog==
==Credits==
'''v.1.0'''
Thanks to switchbrew.org for docs and the atmosphere team for exefs patching so early.
* First Release.


== External links ==
== External links ==
* Gbatemp - https://gbatemp.net/threads/patchnso-py-a-script-to-patch-the-code-of-games-more-easily-before-layeredfs.506152/
* GitHub - https://gist.github.com/tesnos/66d17f694ef570ae8011a53e97ce437d
* Github - https://gist.github.com/tesnos/66d17f694ef570ae8011a53e97ce437d
* GBAtemp - https://gbatemp.net/threads/patchnso-py-a-script-to-patch-the-code-of-games-more-easily-before-layeredfs.506152/
* Reddit -

Latest revision as of 08:37, 5 Haziran 2023

patchnso.py
Patchnsonx.png
General
Authortesnos6921
TypePC Utilities
Version2018
LicenseMixed
Last Updated2018/06/03
Links
Download
Website
Source

A simple script to patch the .text sections of nso files and reassemble them.

Here are some sample videos of what it can do:

User guide

Python 2.7, requires lz4 module to be installed.

Usage Instructions:

  • Using hactool, extract the exefs of your game.
  • Within the exefsdir, there should be "main" and "main.npdm" and possibly a few others.
  • "main" is the game's main nso, you can load it into IDA and create your own patches or go out and find some.
  • When you have your patches put them all in a file in this format: (all values should be in hex) location:codepatch
    • Example: 2E8:21008052
  • Then run "python patchnso.py main patch-file-here output-file-here".
  • Your patched file will appear and you can put it under /atmosphere/titles/title-id/exefs/ on your sd card, renamed back to "main", with the other files from your extracted exefs and you have now patched your game.

Sample patches

Some sample patches are included (made for Super Mario Odyssey Version 1.2.0) which you can try out. Make sure it is on the correct version.

Sample patches nclude:

  • Don't Lose Health.
  • Near-Zero Gravity for Normal Jumps.
  • Raise Coin Limit To 65536 (Untested).
  • High-Power Long Jump.
  • Hyper Walking Speed.
  • Stop Player From Dying (Allows walking on acid and lava) (Credit to SimonMKWii).
  • No Damage for Running out of Oxygen or Staying in Ice Water (Credit to SimonMKWii).

Credits

Thanks to switchbrew.org for docs and the atmosphere team for exefs patching so early.

External links

Advertising: