Skip to content

Instantly share code, notes, and snippets.

View Coolsonickirby's full-sized avatar

Ali Hussain Coolsonickirby

View GitHub Profile
@Coolsonickirby
Coolsonickirby / audio_table_expansion.rs
Last active March 13, 2024 13:54
former wip audio table expansion (shoutouts to jozz for telling me about the easier way)
use crate::api::cpu::*;
use once_cell::sync::Lazy;
use skyline::hooks::{getRegionAddress, InlineCtx, Region};
use std::collections::HashMap;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NarrationCharacallEntry {
pub unk_1: u64,
pub nus3bank_path: u64,
# ============================================================
# Written by Coolsonickirby
# Use Python 3.9 or higher
#
# You shouldn't need to install any modules for this script
# You do however need to have curl downloaded and added to PATH
#
# You also need sys-ftpd(-light) set up on your switch (even for normal `cargo skyline run`)
#
# Usage: python cargo-skyline-run.py
# ============================================================
# Written by Coolsonickirby
# Use Python 3.9 or higher
#
# You shouldn't need to install any modules for this script
# However, you do need sys-ftpd(-light) set up on your switch
# This also won't work on emulators (for now) since irdc about that
#
# Make sure you update the following variables for your specific setup:
# - server
import os, struct, zlib
def get_padding_amount(offset):
return ((24 - (offset % 16)) % 16)
def intToBytes(number):
return int(number).to_bytes(4, byteorder="little", signed=False)
nus3file = open(r'D:\Modding\Super Smash Bros. Ultimate\Audio\new_test.nus3audio', "r+b")