Skip to content

Instantly share code, notes, and snippets.

@GaryOderNichts
GaryOderNichts / README.md
Created April 18, 2025 16:01
wafel_nowifi_patch

wifi patches

When no wifi module is connected to the system, all nn::ac::Connect calls will fail, since /dev/net/ifmgr/ncl cannot be opened without /dev/net/ifmgr/wd being opened successfully. This is done to ensure that the wifi driver (wifi24) has finished successfully, which will of course never happen without a wifi module.
This causes some funny issues in /dev/emd, since it will abort and go into an endless loop causing the console to freeze due to the cooperative thread model in IOS. This patch simply allows opening /dev/net/ifmgr/ncl without /dev/net/ifmgr/wd, maybe don't use this on a console with an actual wifi module installed though.

Keybase proof

I hereby claim:

  • I am garyodernichts on github.
  • I am garyodernichts (https://keybase.io/garyodernichts) on keybase.
  • I have a public key ASBN0rEu_FapFsQWzTMQdNLaASebkzdU3Cxxl4gurJ3IlAo

To claim this, I am signing this object:

@GaryOderNichts
GaryOderNichts / bMAL_decompress.py
Created May 6, 2024 11:42
Script to decompress .cx files found in Pokemon Rumble U
import zlib
import sys
import struct
"""
.cx file header (0x14 in size):
word[0] 0xe0000000 -> Magic, only the 0x0e is checked
word[1] little endian value, uncompressed size
word[2] 0x624d414c -> "bMAL" Magic
word[3] little endian value, compressed size
@GaryOderNichts
GaryOderNichts / dump2bin.py
Created May 2, 2024 19:46
Scripts to convert data from NFC scan apps to raw bin files
import re
import sys
pattern = r"^\[ ([0-9A-F]{2}):([0-9A-F]{2}):([0-9A-F]{2}):([0-9A-F]{2}):([0-9A-F]{2}):([0-9A-F]{2}):([0-9A-F]{2}):([0-9A-F]{2}) \] Addr\. ([0-9A-F]+)+ : .*"
compiled_regex = re.compile(pattern, re.MULTILINE)
with open(sys.argv[1]) as inf:
with open(sys.argv[2], "wb") as outf:
for l in inf.readlines():
@GaryOderNichts
GaryOderNichts / fsa_capabilities.h
Created March 18, 2024 19:34
FSA capability masks
#pragma once
#define FSA_CAPABILITY_ODD_READ (1llu << 0)
#define FSA_CAPABILITY_ODD_WRITE (1llu << 1)
#define FSA_CAPABILITY_ODD_RAW_OPEN (1llu << 2)
#define FSA_CAPABILITY_ODD_MOUNT (1llu << 3)
#define FSA_CAPABILITY_SLCCMPT_READ (1llu << 4)
#define FSA_CAPABILITY_SLCCMPT_WRITE (1llu << 5)
#define FSA_CAPABILITY_SLCCMPT_RAW_OPEN (1llu << 6)
#define FSA_CAPABILITY_SLCCMPT_MOUNT (1llu << 7)
; $MODE = "UniformRegister"
; $NUM_SPI_PS_INPUT_CNTL = 1
; texCoords R0
; $SPI_PS_INPUT_CNTL[0].SEMANTIC = 0
; $SPI_PS_INPUT_CNTL[0].DEFAULT_VAL = 1
; $SAMPLER_VARS[0].name = "tex0"
; $SAMPLER_VARS[0].type = "SAMPLER2D"
; $SAMPLER_VARS[0].location = 0
//Find Wii IOS syscalls via undefined instruction
//@author rw, GaryOderNichts
//@category ARM
//@keybinding
//@menupath
//@toolbar
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
@GaryOderNichts
GaryOderNichts / !vscode-wiiu-debugging.md
Last active December 21, 2024 11:59
Guide for Wii U remote GDB debugging with VS Code

Wii U remote GDB debugging with VS Code

This guide will set up VS Code to work with debugging Wii U apps using the GDB stub plugin for Aroma.

Choosing a GDB version

To debug you will need a compatible GDB version installed which supports the powerpc:750 archtitecture.
The one which is bundled with devkitPPC is not recommended, due to being several versions behind.
Edit: It has now been updated to the latest version and can be used without issues. Use /opt/devkitpro/devkitPPC/bin/powerpc-eabi-gdb for the gdb path.
You can also install a PowerPC specific version, or use gdb-multiarch which comes with several linux distributions.
Note down the path to the gdb executable, this is required for the next steps.

Additions

acsCoppaStart_002

To set up a Nintendo Network ID
for your child, please contact
Nintendo Customer Support:

1-800-255-3700
@GaryOderNichts
GaryOderNichts / 0x5000000.s
Created August 10, 2022 14:59
Running MCP recovery on retail
.arm.big
.open "patches/sections/0x5000000.bin","patches/patched_sections/0x5000000.bin",0x05000000
; patch IOS_CheckDebugMode to always return 0
.org 0x0501fc98
.thumb
mov r0, #0
mov r0, #0