Skip to content

Instantly share code, notes, and snippets.

View ashquarky's full-sized avatar
🦊
???

Ash ashquarky

🦊
???
View GitHub Profile
@ashquarky
ashquarky / midnight.py
Last active March 12, 2023 09:46
Barebones Riivolution ISO patcher (for Mario Kart Midnight). Must patch .dol seperately.
# to patch:
# wit x RMCP01.wbfs kart/
# python midnight.py riivolution/Mario_Kart_Midnight_1.2.xml P kart/DATA/files/
# cp ISO\ Patcher/Midnight/iso/P/main.dol kart/data/sys/ # borrowed from v1.1 ISO patcher
# nano kart/DATA/setup.txt # change "!part-id = RMCP01" -> "part-id = RMCPMN"
# wit cp --source kart/ RMCPMN.wbfs
import argparse
import os
import shutil
@ashquarky
ashquarky / tfnsw-to-osm-osmosis.xml
Last active February 25, 2020 10:35
Osmosis TagTransform file to convert TfNSW Cycleways data into OSM-ready tags
<?xml version="1.0"?>
<!--
Things to note:
- You may or may not want name= and alt_name= from this dataset, as name= has other sources
and standards (St. vs Street); while alt_name seems to be naming sidewalks after the
assosciated road
- name= and alt_name= are *stripped by default*. Scroll down and uncomment the appropriate
lines to output them.
- foot=designated on highway=cycleway is not accompanied by bicycle=designated by default
- SURFACE=Spray Seal and SURFACE=AC are translated as surface=asphalt
@ashquarky
ashquarky / FSODM_PowerOnAuth.c
Last active April 6, 2021 04:38
Very loose RE of Wii U disc drive auth function
byte a[0x20]; //aka +40050
byte b[0x10]; //aka +40090
byte c[0x20]; //aka +40070
byte d[0x10]; //aka +400b0
byte final_key[unknown]; //aka +409cc
/* FSODM_CmdAuthATA always assumes 0x20 byte buffers, though the drive could be ignoring some bytes */
diff --git src/audio/wiiu/SDL_wiiuaudio.c src/audio/wiiu/SDL_wiiuaudio.c
index 8004ff99d..fa01d2020 100644
--- src/audio/wiiu/SDL_wiiuaudio.c
+++ src/audio/wiiu/SDL_wiiuaudio.c
@@ -66,15 +66,43 @@ static int WIIUAUDIO_OpenDevice(_THIS, void* handle, const char* devname, int is
AXVoiceVeData vol = {
.volume = 0x8000,
};
- AXVoiceDeviceMixData drcmix = {
- .bus = {
unsigned int devbsp_msgqueue[0x40]; //.bss:E6047000 - E60470FC inclusive
unsigned int devbsp_msgqueue_id; //.bss:E6047100
unsigned int devbsp_msgqueue_fdtable[0x40]; //.bss:E6047104 - E6047200 inclusive
unsigned int dword_E6042000 = 0xFFFFFFFF; //.data:E6042000
/* http://wiiubrew.org/wiki/IOSU#IPC */
struct ipc_msg {
/* 1:open, 2:close, 3:read, 4:write, 5:seek, 6:ioctl, 7:ioctlv */
unsigned int cmd;
unsigned int client_reply;
@ashquarky
ashquarky / WaraWara-Annotated.xml
Created September 30, 2017 00:47
WaraWara Plaza's EUR XML file; with data stripped out and annotated.
<!--
Australian (EUR) console; signed in as native NNID
http[s]://olveu.cdn.nintendo.net/xml/warawara/L1/eu/all/teen.xml
No special auth needed; works in a web browser
HTTP/1.1 200 OK
Server: Apache
ETag: "421c904409fa4953470148a9144389ad:1504573890"
Last-Modified: Tue, 05 Sep 2017 01:11:30 GMT
Accept-Ranges: bytes
@ashquarky
ashquarky / keybase.md
Created June 26, 2017 06:22
Keybase proof

Keybase proof

I hereby claim:

  • I am quarktheawesome on github.
  • I am quarktheawesome (https://keybase.io/quarktheawesome) on keybase.
  • I have a public key ASC0-Lch-SJQTW_dfqlSbdjxZlRx62438lT6BzNjlaFTuQo

To claim this, I am signing this object:

void nn::hai::launch::PrepareLaunch(unsigned int* out, void* buffer, unsigned int val) {
nn::hai::error::Error errorInstance; //stack
nn::hai::error::Init(&errorInstance);
if (errorInstance) goto quit; //will skip StopIfRequired call
if (!buffer) {
//much nn::hai::error::Error handling ensues; "Invalid buffer"
goto quit;
}
@ashquarky
ashquarky / MasterAgent_ProcessPacket.c
Last active September 23, 2016 23:57
Reverse-engineering of the important bits of MasterAgent_ProcessPacket. By important, I mean gdb_query and *nothing else*.
struct _globals {
unsigned int isDebuggerPresent;
unsigned short word_100D1378; //referenced in start()
unsigned int dword_100523D8; //referenced in start()
unsigned int tickStorage; //dword_100523D0, also referenced in start()
char* stringStorage; //dword_1004F964
}
struct _globals globals;
@ashquarky
ashquarky / OurLoader.c
Last active September 23, 2016 09:11
[Code Golf] OurLoader (region free Wii U game loader) in 178 bytes
#define d(x) ((a(*)())*((a*)0x801500+x))(
typedef int a;a e(a b,a(*c)()){d(0)"sysapp",&b);d(1)b,0,"_SYSLaunchTitleByPathFromLauncher",&c);c("/vol/storage_odd03",18,0);return -3;}