Skip to content

Instantly share code, notes, and snippets.

View shadowninja108's full-sized avatar

Somebody Whoisbored shadowninja108

View GitHub Profile
@shadowninja108
shadowninja108 / Crappy Toolbox Switch SHARCFB Support
Last active February 7, 2025 09:22
Toolbox hacked together a bit to support Switch SHARCFBs better. Note that I include the 0x30 byte header that Ryujinx.ShaderTools assumes is stripped (as other tools do attempt to strip it). You can adjust ShaderTools to support this by changing the first argument to `Translator.CreateContext` in Program.cs to 0x30 (or tweak `GetData` in this g…
diff --git a/File_Format_Library/FileFormats/Shader/SHARC/SHARCFBNX.cs b/File_Format_Library/FileFormats/Shader/SHARC/SHARCFBNX.cs
index def683f4..39af78ac 100644
--- a/File_Format_Library/FileFormats/Shader/SHARC/SHARCFBNX.cs
+++ b/File_Format_Library/FileFormats/Shader/SHARC/SHARCFBNX.cs
@@ -21,6 +21,9 @@ namespace FirstPlugin
{
public List<ShaderProgram> ShaderPrograms = new List<ShaderProgram>();
public List<ShaderVariation> Variations = new List<ShaderVariation>();
+ public byte[] BinaryArray;
+ public uint BinaryArraySize;
@shadowninja108
shadowninja108 / zak.cpp
Last active February 2, 2025 05:06
ZAK decryptor/extractor for Wonder Boy Anniversary Collection
#include <cstdio>
#include <bit>
#include <cstdlib>
#include <span>
#include <lz4.h>
#include <string_view>
#include <filesystem>
/* Buffers. */
namespace {