- Joined
- Nov 18, 2017
- Messages
- 666
- Reaction score
- 1,246
- Trophies
- 0
- Location
- Melbourne, Victoria
- XP
- 2,781
- Country

This should make patching executables a lot easier (and a whole lot more legal!)
Switch eXecutable Patch Delta format notes:
For use with .elf files generated with nx2elf from an NSO.
Key: Start Offset, Length (in hex)
[HEADER, 0x00, 0x50]
0x0, 0x4 = Magic number: "SXPD"
0x4, 0x4 = Number of instructions to patch (in hex)
0x8, 0x20 = SHA256 hash of original .elf
0x28, 0x20 = SHA256 hash of patched .elf
0x48, 0x8 = Padding data, put whatever you want here
[LISTINGS, 0x50, (variable length)]
Each listing is 0x8 in length.
0x0, 0x4 = Offset of instruction (in the .elf)
0x4, 0x4 = ARM instruction (as hex)
Note: this format is specifically designed for ARM instructions, and could potentially be used for real-time patching.
Attached is a highly WIP utility (Sexep - Switch executable patcher) to patch games, it includes 2 sample patches for Super Mario Odyssey 1.2.0 (note: the god mode patch disables online functionality for obvious reasons).
Currently it can only patch games, but soon you will be able to make your own patches as well. (You can make them now if you follow the format notes!)
I'll be posting a few more sample patches a bit later on.
Switch eXecutable Patch Delta format notes:
For use with .elf files generated with nx2elf from an NSO.
Key: Start Offset, Length (in hex)
[HEADER, 0x00, 0x50]
0x0, 0x4 = Magic number: "SXPD"
0x4, 0x4 = Number of instructions to patch (in hex)
0x8, 0x20 = SHA256 hash of original .elf
0x28, 0x20 = SHA256 hash of patched .elf
0x48, 0x8 = Padding data, put whatever you want here
[LISTINGS, 0x50, (variable length)]
Each listing is 0x8 in length.
0x0, 0x4 = Offset of instruction (in the .elf)
0x4, 0x4 = ARM instruction (as hex)
Note: this format is specifically designed for ARM instructions, and could potentially be used for real-time patching.
Attached is a highly WIP utility (Sexep - Switch executable patcher) to patch games, it includes 2 sample patches for Super Mario Odyssey 1.2.0 (note: the god mode patch disables online functionality for obvious reasons).
Currently it can only patch games, but soon you will be able to make your own patches as well. (You can make them now if you follow the format notes!)
I'll be posting a few more sample patches a bit later on.
Attachments
Last edited by SimonMKWii,












