Status
Not open for further replies.

Homebrew Bounty 2018 Month 1: Switch Tools and Utilities

hbb2018_med.png


THE 2018 SWITCH HOMEBREW BOUNTY
MONTH 1: SWITCH TOOLS AND UTILITIES

What is the 2018 GBAtemp Switch Homebrew Bounty? Read more here.

The first month has now officially begun. You have until November 6th (23:59:59 UTC+00) to submit your Switch-related tool/utility and get a chance to win a massive cash reward! There will be 4 consecutive months, one for each category. We'd like to remind you that this first month is dedicated to the following category.

CATEGORY 1: Tools and Utilities
(WINNERS ANNOUNCED! CLICK HERE)

This category is meant to reward authors of tools/utilities, as in, programs that run on a computer (not on the Switch itself) and serve a specific purpose such as patching tools, content extractors, development libraries, and much more (this short list is non-exhaustive). If you aren't sure whether your project fits in this category, look at the other categories listed in this thread, and if in doubt, simply ask a moderator.

The top 5 highest-voted projects in this category will receive:
#1: $1,000 reward
#2: $500 reward
#3: $300 reward
#4: $150 reward
#5: $55 reward

In order to submit your project, please respect the following instructions:
• Upload your project to the GBAtemp Download Center. Make sure to give a proper description, screenshots, anything you might find useful. This is your chance to showcase your project, the better your page looks, the more chance you may receive votes from judges.
• If your project is not entirely new, it must at least come with a major/significant update, so please describe specifically what new feature(s) the upgrade brings forth.
• After your project is posted to the download center, please post a comment in this thread to link to your project.

After November 6th, two voting sessions will begin simultaneously: a staff vote, and a patron vote (for our backers on Patreon). The results will be announced a week after.



Sponsors

Half of this sum is generously donated by yours truly, GBAtemp!
Thanks to ad revenue and to our Patreon backers, GBAtemp is the biggest donator.
The other half comes from our generous sponsors as listed below.

0.jpg


MOD3DSCARD.COM
Buy flashcard to mod 3DS and Switch | Team Xecuter SX | Sky3ds+ | Stargate 3DS | R4 3DS - mod3dscard

axiogame.png


AXIOGAME.COM
Axiogame | Backup Units, Modchips and more

sxossmall.jpg


And let's not forget Team Xecuter who made a very generous donation too.



Member donations

The bounty isn't only about sponsor companies: you, beloved members of our community (and even guests) can contribute too! If you want to make a donation, simply click the button below to send a payment to our Paypal. Needless to say, 100% of the amount we receive will be transfered to the authors of winning projects.

PayPal-Donate-Button-PNG-HD.png

Upon submitting your donation, you can indicate whether you want the donation to go to a particular category, or all of them.
Also please note that our Paypal account name is "FILETRIP" - this is normal.

We have already received the following donations:
• Eric C. donated $100 towards the Game bounty
• Pierce T. donated $25 towards the Emulator bounty
• Jonah N. donated $10 to the bounty
• Andrew B. donated £5 towards the Tools and Utilities bounty
• Michael C. donated $5 to the bounty
• Raphael G.V. donated an incredible $0.36 towards, hmm, creating complexity for our accountant?

Thanks a lot guys! To everyone else, feel free to make additional donations, which will go to the other 3 categories.

 

gameboy

Well-Known Member
Member
Joined
Dec 9, 2015
Messages
2,035
Trophies
1
Age
44
XP
2,166
Country
United States
I understand your gripes with TX but please, I would appreciate if people could stay on topic in this thread.
There's already another thread if you want to talk about that.

i bought my tx awhile back, havent used it so no gripes, but im not going to act like i dont know why they donated a lot for bounties lol
 

Rikikoo

Member
Newcomer
Joined
Aug 1, 2018
Messages
21
Trophies
0
Age
26
XP
246
Country
France
pythac

pythac is a python3 library for parsing/extracting/building various file formats of the Nintendo Switch, with a special focus put on building.

What it can do:
  • Parse formats, allowing you to easily access properties without worrying about the nitty gritty.
  • Transparently mount files from containers: this means that you can read a file from its container, without extracting it. There is no limitation to this: you could be reading a CNMT from an NCA, which is turn is in a XCI (ie two layers of HFS0), without extracting anything. In the case of NCA's, decryption is handled by the lib.
  • Build RomFS, PFS0/NSP, and HFS0. XCI, as well as NCA, is planned down the road (soon™). Similarly, no intermediate file is created. You can be building the RomFS partition of an NCA from a folder tree, without having first to build a throwaway file. Update regarding NCA building: progress is being made. An inputted file is rebuilt correctly, so most of the work is done.
Supported formats:
  • NCA3
  • RomFS
  • PFS0/NSP
  • HFS0
  • XCI
  • CNMT
  • NCAP
  • NPDM

It's always hard to judge a library's capabilities, but I tried to write a few examples. They can be found here, and below are screenshots of some:
  • This is what is printed when dragging a control NCA over the print_control.py script: Info about the NACP is printed on the console, and each different icon is displayed. I'd like to emphasize on the fact that nothing is extracted in the process, all the reads are redirected to the NCA. (PIL library required, and please forgive the weird font, windows cmd had trouble with non-ascii characters).
    Croquis (1).png
  • And here is what you see when dragging the same NCA over the print_nca.py script: info about the NCA, then full print of each section, including the file struture. Here it's nothing impressive, because the NCA only contains one RomFS partition without any subfolder, but here you can see the output with a much more complex NCA.
    Croquis (1).png
  • Other examples include:
    • NCA/NSP validation scripts
    • CNMT pretty-printer (from its NCA of course)
    • NCA/NSP extraction/decryption scripts
    • Mass renaming script for NCA's (renames to TitleID by default, or sysmodule name if known, useful for organizing sysupdates saves)
  • In my rewrite of CDNSP (of which I'm the original dev), I completely got rid of hactool binaries, and it won't extract myriads of files anymore. Everything is neatly kept. Not sure I'm allowed to post links of that here, but it's on my github.
What's planned:
  • XCI/NCA3 building (progress is being made towards that, sadly holidays are over and I don't have half the free time I'd like to)
  • A few methods to toy with NCA3 encryption (dev prod, rightsid standard)
  • A very much needed cleanup/refactor
  • Documenting the API (Docstrings)
  • Once I'm all done, building a .whl for easy installation, maybe even uploading it to PyPI for use with pip
Requirements/getting started:
  • Python 3.x
  • "Crypto" library (pip install pycryptodome), and that's all!
  • Keys in the hactool ini-like format. Please also include "xci_header_key" (google it), and the rsa keys "nca_header_fixed_key_modulus", "xci_cert_pub_modulus", "xci_header_pub_modulus" (all found in hactool source, values here). Keys should be named "prod.keys" or "title.keys" (depending on their type), and be placed in either HOME/.switch/, or the lib directory.
  • If you want Python to automatically detect the lib, either add it in Lib/site-packages, or modify your PYTHONPATH to include the lib directory.
Source/Github here
PR's are welcome!
 
Last edited by Rikikoo,

Issac

Iᔕᔕᗩᑕ
Supervisor
Joined
Apr 10, 2004
Messages
7,025
Trophies
3
Location
Sweden
XP
7,344
Country
Sweden
Will be exciting to see what all these talented people will be able to come up with! Do your best! :)
 
  • Like
Reactions: Auyx

XorTroll

Switching between my 2DS and my Switch
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,229
Country
Spain
Hey guys, here's my new tool!

NSPack - NSP builder GUI (using hacPack)

NSPack is a simple, easy-to-use .NET GUI for NSP building, using an embedded hacPack executable.
Obviously, this GUI is 100% legal as it just uses hacPack tool.

screenshot-png.145708


Using the builder

There are some basic elements you need to provide at least to be able to make a NSP:
  • Title ID: 16 hex characters (example: 0100CAFE1234BEEF) - any title ID should work.
  • Name: the title's name, which will be the same for all the languages.
  • Author: the author/developer's name, which will also be the same for all the languages.
  • Version: the version string (1.0.0, 2.0beta1), limited to 16 characters.
  • Product code: a simple code string (SMO's product code: LA-H-AAACA), no matter what does it have.
  • ExeFS directory: any title needs to have a ExeFS, which contains the compiled source code and the metadata NPDM.
  • Icon: provide any icon, as it will be resized to 256x256, otherwise the defaut one will be used. It's recommended to use an image which is 256x256 or bigger.
Appart from those, there are some other optional features to add or customize:
  • RomFS: the directory containing extra files for the title.
  • Logo: the custom PNG and GIF images which are shown when booting a title.
  • Important / IPNotices / Support HTML: this three are legal information HTML documents, which can be accessed from the home menu.
  • Offline HTML: this HTML documents are useless when making homebrew NSPs, but can be used (if you know how) to make your own video players...
Using asset files

You can also save the assets as a asset file (*.nsxml format) if you are going to use that as a template for making NSPs.

Planned stuff

This is still a beta version, as much other stuff is planned:
  • Allow to load NACP files directly
  • Direct conversion from NRO to NSP, or any easy way to create NRO forwarders
  • Conversion from XCI to NSP
  • Add updates or add-on content support
  • Add individual NCA making support
Credits to The-4n, who made hacPack tool and made legal NSP and NCA making possible.

IMPORTANT!
  • Installing and running NSPs can get you banned. Although this NSPs are not titlekey-encrypted (ovbiously), using them can be dangerous.
  • If the NSP doesn't run on your console, it can be for various reasons: used a title ID which is smallet than the NPDM's max title ID, not using a correct key generation...
  • Don't try building titles which ask for a user, because they could fail as generated NSPs don't ask for a user.
  • For the build process the program creates a temporary directory on the same folder as the EXE. Don't try messing up with that folder or deleting it while the NSP making process, because it could crash the program. Anyway, reopening the program should reset the directory.
  • As this program is made using WPF, it won't probably work on any other OSs but Windows (Wine supports WinForms but doesn't support WPF)

GBAtemp download: https://gbatemp.net/download/nspack-nsp-builder-gui-using-hacpack.35223/
GitHub repository: https://github.com/XorTroll/Brew.NET

(lmao, just noticed that the voting sessions are on November 6th, on my birthday!)
 
Last edited by XorTroll,

bodyXY

Well-Known Member
Member
Joined
May 15, 2018
Messages
157
Trophies
0
Age
38
XP
989
Country
Germany
NES Online Game AutoInjector

With this tool you can easily add more games to Nintendo NES Online. It checks every time if the game code already exists, so you do not accidentally overwrite existing games. In addition, both NES Online versions are supported, EU / US and JP.

Required
  • NvnTexpkg.package
  • An NES game (.nes)
  • Two PNG / JPG or TGA 32 bit cover files with the size 400x400 and 355x512
  • Your "lclassics.titlesdb" file (EU/US or JP version)

Legend
  • Sort Title = "Enter the sort of the game"
  • Publisher = "Enter the publisher of the game"
  • Game Code = "Enter the Game code for the game (it has to be unique "its checked every time, if it already exists in the database")
  • Copyright = "Enter the copyright holder of the game"
  • Game Title = "Enter the title of the game"
  • Overscan = "Enter with which overscan the game should run"
  • Simultaneous ="select simultaneous false or true"
  • Fade In = "Enter the fade in for the game"
  • Volume = "Enter the volume for the game"
  • Out put folder: (NES-Online-Game-Autoinjector).path/NES_ONLINE_MOD

Instructions

  • Unpack "NOGA" and the files of "NvnTexpkg.package" in the same folder
  • Create two (PNG/JPG/TGA32bit) images with size 400x300 and 355x512, using Photoshop or a program of your choice
  • Enter all required data into the text-boxes and provide all required files
  • If you want to add games to "NES Online JP", check the JP-Version check box
  • Press "Inject" done!
  • Save the created Titles folder to match your CFW, on your SD card

    NOTE:
  • If you want to add more games after the first game, specify the "lclassics.titlesdb" file from the out put folder "NES-Online-Game-Autoinjector.path / NES_ONLINE_MOD / titles / TITLE_ID (EU_US or JP) / romfs / titles".

Update 3.5

  • Add PNG / JPG Support (auto-convert PNG/JPG to TGA)
  • Bug fixes
Update 3.0


Update 2.8.5

  • swap cover / Screenshot

Update 2.8.1

  • Bug fixes

Update 2.8.0

  • Add Details-Picture to EU/US Version
  • Add false/true radio-button
  • Add new Game Code outset
  • Textbox jump is fixed
  • Input methods revised for error minimization
  • More background checks for error minimization
  • Bug fixes

Update 2.0.1

  • Bug fixes

Update 2.5.0

  • Add FAMICOM-Support (NES ONLINE JP Version)

Update 2.0

  • Add ToolTip
  • Add Game code verification
  • Bug fixes
  • and more background stuff


NOGA_3_5.png

The use of LayeredFS can get you banned!


Source code:
https://github.com/bodyXY/NES-ONLINE-Game-Injector

Download center link : https://gbatemp.net/download/nes-online-game-autoinjector.35224/
 

Attachments

  • NOGA_3.5.zip
    340.6 KB · Views: 266
Last edited by Cyan, , Reason: added download center link

The-4n

Well-Known Member
Newcomer
Joined
Aug 3, 2018
Messages
46
Trophies
0
Age
44
XP
2,766
Country
United States
hacPack

147630

hp2-jpg.147631

hacPack is a tool for creating Nintendo Switch NCAs (Nintendo Content Archive) and packing them into NSPs (Nintendo Submission Package)
hacPack is totally written from scratch and it's fully open-source, there's nothing illegal (Nintendo's stuff) in it

Key features:

  • Support all types of NCAs (Program, Control, Data, Metadata, PublicData)
  • Options for creating program nca with/without romfs and logo sections
  • Support Application, AddOnContent, SystemData and System Program Metadata NCAs
  • Support for creating Metadata nca from ncas and cnmt
  • Fully crypto customization, Including Keygeneration, Keyarea encryption key 2, Section encryption
  • CLI app, also includes a simple GUI for end-users
  • Multi architecture and Multi platform compatibility, Including but not limited to: Windows, Linux, macOS, x86, x86-64, arm-le

Some of the use cases of hacPack:
  • Creating homebrew and custom NCAs/NSPs
  • Merging updates and dlcs NCAs/NSPs into game NCAs/NSPs
  • Making NCAs/NSPs from game mods and merging game mods with existing game NCAs/NSPs
  • Fully modifying and repacking applications and system NCAs
  • Changing titleid, icons and other control parameters of games and dlcs, changing the game loading logos
  • Repacking games to work on lower firmwares
  • Repacking dlcs to work on lower game versions
  • Add translations to game
Also hacPack is now comes with hacPackTools, hacPackTools are tools for viewing and modifying the files inside ncas
First hacPackTool is now released, It's hacPackTools-NACP

NACP is a file in control nca that specifies multiple parameters of the game including screenshot permissions, video capture permission, savedata file size and etc...

Key features of hacPackTools-NACP:
  • Viewing the value of NACP parameters
  • Creating .nacp.xml from .nacp
  • Creating .nacp from .nacp.xml
Some of the use cases of hacPackTools-NACP:
  • Making xml from nacp so it becomes human readable, modifying it and make nacp again from xml
  • Creating nacp for homebrew nsps
  • Changing the game data save size
  • Changing the games and apps permissions, like allowing screenshot and video capture
  • Remove the need of selecting user account when launching a game/app

hacBrewPack, a tool for creating homebrew nsps is based on hacPack. It's a simplified version of hacPack which is designed for creating nsps from homebrews fast and easy.
First and the only legal hbmenu nsp is built with hacPack and the latest version features hacPackTools-NACP which enables capabilities like videocapture and 0 size save data and no need for user selection
Also all custom nsps from Developers and Scene groups are built with hacPack/hacBrewPack

hacPack will continue to be updated with new features and tools


Features added after the start of competition:
  • Ability to create SystemData Metadata nca
  • Ability to create SystemProgram Metadata nca
  • Ability to create Metadata nca from existing cnmt
  • Titleversion option for Metadata nca
  • Release of the first tool of hacPackTools, hacPackTools-NACP, a tool for viewing .nacp files, creating .nacp.xml from .nacp and creating .nacp from .nacp.xml

Github: https://github.com/The-4n/hacPack
Download center: https://gbatemp.net/download/hacpack-v1-20-r3.35244/
 
Last edited by The-4n,

cpasjuste

Well-Known Member
Member
Joined
Aug 27, 2015
Messages
1,108
Trophies
1
Age
44
XP
4,481
Country
France
Hi,

I just released "libcross2d", an easy to use, C++ cross platform 2d graphic, input, audio, etc... library. I think it could be in this category, as the main goal of this is to run/develop on the computer itself.

The main and official thread, for discussion, information and more is located here !
Release version 1.0 is located in the gbatemp download center, and on github.

I hope people will like that, a lot of work have been spent in this :)

See you,
Cpasjuste.
 
Last edited by cpasjuste,

exelix11

Developer
Developer
Joined
Feb 25, 2015
Messages
915
Trophies
1
Location
C:\users\exelix11\
XP
3,062
Country
Italy
Switch Theme Injector V3
This is the project i've been working on lately, it's an easy to use tool to edit the home menu and create custom themes, at the time of writing latest version is the just released 3.3

upload_2018-10-30_21-59-0.png

This is the changelog from version 3.0:
  • Full support for firmwares 5.0 up to 6.1.0
  • Auto image injection, no external tools needed.
  • Support for Lockscreen, Console Settings and User settings
  • Support for custom layouts
  • Auto image to DDS conversion
  • Auto NCA Extraction to easily extract the SZS files from the home menu
  • Advanced tools to help people develop custom layouts or patches
  • Web version with Auto-Theme to share themes
Since the changes for end users have been already documented on the release thread, in this post i'm going to explain why this is such a huge update and why the new features have been implemented the way they are.
So, from a development standpoint the key changes are:
  • Moved from a "static" patching method to a "dynamic" one based on templates
  • Web port with "Auto-Theme"
As you can see this whole update was focused on two critical features: being future-proof and legal theme sharing.
Until now people have been sharing themes as modified SZS files, which since are being extracted from the home menu are not only illegal to share but also locked to the specific firmware they've been extracted from.
We needed a legal and most importantly convenient way of sharing custom themes, i've looked into different approaches to the problem and Auto-Theme is the one i feel works the best.
But before that i needed a way to support every firmware.

Dynamic patching and custom layouts
Since version 2.0 i decided to develop this application to be "future-proof", with this i mean that it must allow to easily add support for new firmwares or other parts of the os.
I made a sort of "engine" for patching layout files, it's configurable from a simple json file and can theoretically apply a background image to most if not all the switch os' layouts, the patch format is explained in detail here.
This not only means that i can easily add support for new firmwares as soon as they drop but also that everyone can create new patches for old unsupported firmwares or other parts of the os without having to change one line of code.
In a very similar way are implemented custom layouts, probably the most requested feature, by comparing a theme with a custom layout and an original file the program can automatically create a json file to apply that custom layout to any other firmware.
This is important especially because the current tools to edit layouts stopped working with files from firmware 6.0

So what is Auto-Theme ?
It's a tool that given an image and optionally a layout file automatically generates a theme. That's it.
Why is it such a big deal ?
There are two "killer features" that other options such as binary patches (think of ips) don't have :
- Compatibility with every firmware :
If a new firmware comes out all the themes already released will work as soon as the tool is updated because the actual theme files are built on the fly using the templates explained earlier.
- Support for updates :
When the first custom themes were released there was an issue that led to the news applet to crash, many people didn't care and kept on sharing themes, when i updated the tool to fix this issue people had to redo all their themes to have a fully working version. Auto-Theme instead always uses the latest patching code so you just need to download the theme from the same link to have a fixed version.

This is the idea behind Auto-Theme and it's pretty great, but originally it was meant to be part of the windows app which made me think "is it convenient for the end user ?" And the answer was "not really" because it used to work only on windows and still required you to download the program and the image, i wanted something cross platform everybody could use and that "just works", so it struck me: I had to port it as a web app !

The web version
It took some work but in the end i ported Auto-Theme and some basic features of the original injector as a web app that runs in almost any browser.
Now sharing a theme is just a matter of attaching your image url to the Auto-Theme page:
https://exelix11.github.io/SwitchThemeInjector/autotheme.html?type=home&dds=https://exelix11.github.io/SwitchThemeInjector/exampleImage.dds
And opening that link will automagically let you download a working theme in a few seconds !
This is exactly what i've been looking for, granted there are a few caveats due to some limitations of web technologies but this is almost perfect.
Still the web version is only meant for Auto-Theme, it can manually generate themes as well but the windows version has more features like support for any kind of image, custom layouts and so on.


upload_2018-10-30_22-25-35.png

Gotta love that loading animation ;)

To wrap up i'd like to share with you the thing that amazed me the most about this project: most of the C# code of the windows app is shared with the web version, that's right, 80% of the app's C# code can be directly compiled to JS how cool is that ? This is something that like 5 years ago wouldn't have been possible and really shows what ever-evolving techonologies like JS and HTML can do.

So this concludes my explaination, i hope you'll like the app and enjoy custom themes :)

Edit: I started working on an homebrew to make Auto-Theme work directly on the switch, if this works extracting the ncas won't be needed anymore so stay tuned

Links :
Discussion thread
Windows app download
Web version
Github repo
 

Attachments

  • upload_2018-10-30_22-12-15.png
    upload_2018-10-30_22-12-15.png
    95.8 KB · Views: 247
Last edited by exelix11,

caHarkness

Member
Newcomer
Joined
Nov 1, 2018
Messages
7
Trophies
0
Age
28
XP
67
Country
United States
Lua.js (luajs-interop on GitHub)

logo.png


Hi there, new to the community and new to Switch and C/C++ development, but not programming. I want to share my small template project for beginners that includes both Lua and JavaScript interpretation side by side.

I can't directly share a link as a new member, but it's associated with my uploads under the name "Lua.js (luajs-interop on GitHub)"
https://gbatemp.net/download/lua-js-luajs-interop-on-github.35264/

In a nutshell, it's a ready-to-compile C project that requires no extra dependencies aside from a devkitPro environment set up for Switch development. It demonstrates a good example of code organization, advanced techniques like Lambda "function literals", and the inclusion of open source software, segregated from the main source code. It's not a tutorial or a how-to.

Thanks for taking the time to look and consider my entry!
 
Last edited by Scarlet,

Costello

Headmaster
OP
Administrator
Joined
Oct 24, 2002
Messages
14,202
Trophies
4
XP
19,718
Lua.js (luajs-interop on GitHub)

View attachment 148216

Hi there, new to the community and new to Switch and C/C++ development, but not programming. I want to share my small template project for beginners that includes both Lua and JavaScript interpretation side by side.

I can't directly share a link as a new member, but it's associated with my uploads under the name "Lua.js (luajs-interop on GitHub)"
https://gbatemp.net/download/lua-js-luajs-interop-on-github.35264/

In a nutshell, it's a ready-to-compile C project that requires no extra dependencies aside from a devkitPro environment set up for Switch development. It demonstrates a good example of code organization, advanced techniques like Lambda "function literals", and the inclusion of open source software, segregated from the main source code. It's not a tutorial or a how-to.

Thanks for taking the time to look and consider my entry!

thank you for entering! I have upgraded your account so that you can use the site like a regular member :)
 
  • Like
Reactions: Quantumcat

XorTroll

Switching between my 2DS and my Switch
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,229
Country
Spain
Lua.js (luajs-interop on GitHub)

View attachment 148216

Hi there, new to the community and new to Switch and C/C++ development, but not programming. I want to share my small template project for beginners that includes both Lua and JavaScript interpretation side by side.

I can't directly share a link as a new member, but it's associated with my uploads under the name "Lua.js (luajs-interop on GitHub)"
https://gbatemp.net/download/lua-js-luajs-interop-on-github.35264/

In a nutshell, it's a ready-to-compile C project that requires no extra dependencies aside from a devkitPro environment set up for Switch development. It demonstrates a good example of code organization, advanced techniques like Lambda "function literals", and the inclusion of open source software, segregated from the main source code. It's not a tutorial or a how-to.

Thanks for taking the time to look and consider my entry!
Nice concept, although I already have a C++ API for duktape I've been developing for a while, but mine is C++-only https://github.com/XorTroll/Brew.js
 

caHarkness

Member
Newcomer
Joined
Nov 1, 2018
Messages
7
Trophies
0
Age
28
XP
67
Country
United States
Nice concept, although I already have a C++ API for duktape I've been developing for a while, but mine is C++-only -snip-

Your work actually inspired mine. It probably wasn't obvious at first, but I was the one that inquired about UI libraries on your Discord! Don't be confused though, if someone asked me about where they should look for porting their JavaScript apps to Switch, I'd recommend your Brew.js over what I have here. This is essentially a template project including functionality commonly found in C homebrew. I feel like if someone was looking for a great place to start developing their own C homebrew, I'd share my project with them and tell them it demonstrates a little bit of everything and that they should take a look. I wouldn't ever tell them it's better than anything that currently exists, though...

Anyways, I feel this is a little off-topic, but no closure would give people the impression that I don't care about my work, and that is simply not the case. Ultimately, I'd love to see more quality work brought over to the Switch, so this is all I have!
 

minibar

Member
Newcomer
Joined
Oct 23, 2018
Messages
12
Trophies
0
XP
226
Country
United States
LibHac/hactoolnet

LibHac

LibHac is a .NET Framework and .NET Core library for reading and editing file formats used by the Nintendo Switch.

The latest major addition to the library was Switch save file reading and writing.
Note to self: Get off your lazy butt and finish documenting the format on SwitchBrew.

Supported formats
  • NCA
  • XCI
  • NAX0
  • PFS0/HFS0/NSP
  • RomFS
  • Save file
  • Package1
  • Package2
  • INI1/KIP1
  • CNMT
  • NACP
  • Ticket
  • PRODINFO
  • Switch NAND and SD card

Additional features
  • Save file editing and signing
  • PFS0 creation
  • Switch key derivation
  • Integrity verification of NCA, XCI, etc.
  • Personalized title key reading
  • Read, parse and display information about a Switch NAND or SD card
  • Extract NCA, RomFS and other formats directly from an SD card or NAND, including patched titles
  • Read NAND directly from a Switch running memloader
  • And more!

Software using LibHac
  • hactoolnet - A hactool-like program for dumping common Switch file formats
  • Ryujinx - A Nintendo Switch emulator
  • SwitchSDTool - Dump NSP files from your Switch's SD card
  • SwitchExplorer - A simple GUI-based NCA explorer (also compatible with NSPs and XCIs)

A couple toy example programs including a program that automatically extracts all title keys from a NAND or NAND dump can be found in the GitHub repository.

Links:
GitHub repository
NuGet package
Discussion thread
Download Center

hactoolnet

Hactoolnet is a tool that uses LibHac for viewing and extracting data from common Nintendo Switch file formats. It partially mimics hactool's interface.

Information on the usage of the program can be found here

Features
  • Dump the container formats that LibHac supports
  • A progress bar!
  • Save file signing
  • Dump RomFS directly from an XCI or SD card
  • Dump SD card titles as NSP files
  • Verify the integrity of all titles on a Switch SD card or NAND
  • Switch key derivation
  • Automatic integrity verification of NCA, XCI, etc.
  • Give information about the titles and applications on a Switch NAND or SD card
  • Extract NCA, RomFS and other formats directly from an SD card or NAND, including patched titles

Dumping a game from the SD card:
147445


More screenshots can be found on the Download Center page.

Links:
GitHub repository
Discussion thread
Download Center

Changelog

v0.1.3
  • Add basic save file editing. Any files already in the save file can be written to
  • Check validity of save files
  • Check validity of PFS files
  • Check validity of SwitchFS and SD cards
  • Check file hashes in HFS archives
  • Partial NSO support
  • When keys required to decrypt an NCA are missing, throw an exception with information about the missing keys.
  • Add more sanity checks when reading an NCA.
  • Read only the NCA header when first opening an NCA. This allows for reading of partial NCAs and slightly improves performance when opening an NCA.
  • Fix bug in CombinationStream when reading across boundaries

    hactoolnet changes

  • Add option to verify SwitchFS and SD cards
  • Add option to export all keys
  • Add PFS0 extraction
  • Print more information about save files
 
Last edited by minibar,
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Xdqwerty @ Xdqwerty: