More actions
(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= | |title=patchnso.py | ||
|image= | |image=patchnsonx.png | ||
|description= | |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/ | |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= | ||
}} | }} | ||
{{ | {{obsolete}} | ||
A simple script to patch the .text sections of nso files and reassemble them. | |||
Here are some sample videos of what it can do: | |||
*https://twitter.com/tesnos6921/status/1003007238984921089 | |||
*https://twitter.com/tesnos6921/status/1003365767449018373 | |||
==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) <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. | |||
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 == | == External links == | ||
* | * 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/ | |||
Latest revision as of 08:37, 5 Haziran 2023
patchnso.py | |
---|---|
General | |
Author | tesnos6921 |
Type | PC Utilities |
Version | 2018 |
License | Mixed |
Last Updated | 2018/06/03 |
Links | |
Download | |
Website | |
Source | |
This application has been obsoleted by one or more applications that serve the same purpose, but are more stable or maintained. |
A simple script to patch the .text sections of nso files and reassemble them.
Here are some sample videos of what it can do:
- https://twitter.com/tesnos6921/status/1003007238984921089
- https://twitter.com/tesnos6921/status/1003365767449018373
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
- Example:
- 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.