Skip to content

Instantly share code, notes, and snippets.

@hthh
hthh / a-diff.py
Last active March 10, 2024 23:47
Switch IPC changes
from data1 import data1
from data2 import data2
from data3 import data3
from data4 import data4
from data500 import data500
from data600 import data600
from data610 import data610
from data700 import data700
all_data = (data1, data2, data3, data4, data500, data600, data610, data700)
@shuffle2
shuffle2 / fuses.c
Created October 17, 2017 23:26
dump + decode tegra t210 ipatches
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#define ARRAYSIZE(x) (sizeof(x) / sizeof(*x))
@shuffle2
shuffle2 / brcm_flash.c
Created September 20, 2017 20:47
joycon command handling
unsigned __int8 *__fastcall process_cmd(struct_a1 *a1, int a2, int a3, unsigned __int8 *pkt, signed int pkt_len)
{
unsigned __int8 *pkt_; // r0@1 MAPDST
int v10; // r0@2
int v11; // r12@8
unsigned __int8 v12; // r0@13
signed int b0; // r0@15
int v14; // r0@38
unsigned __int8 v15; // r1@46
unsigned int v16; // r2@51