Skip to content

Instantly share code, notes, and snippets.

import struct
import time
import usb
dev = usb.core.find(idVendor=0x32f8, idProduct=0x424c)
# print(dev)
dev.set_configuration()
serno = usb.util.get_string(dev, dev.iSerialNumber)
OUTDATED PLEASE GO TO https://github.com/rqou/linux/tree/atc-m1max
if instance == 0
AUSPLL_CORE_AUSPLL_CFG_DCO_EFUSE_SPARE.RODCO_ENCAP_EFUSE = efuse 0xa10 >> 25
AUSPLL_CORE_AUSPLL_CFG_DCO_EFUSE_SPARE.RODCO_BIASADJ_EFUSE = efuse 0xa10 >> 22
@ArcaneNibble
ArcaneNibble / _jpeg_doc.md
Last active March 28, 2022 02:18
Attempt #7 - M1 (Max?) JPEG encoder/decoder block
@ArcaneNibble
ArcaneNibble / README.md
Created February 8, 2022 11:52
Set up reMarkable for easy hacking

Set up reMarkable for easy UI hacking

The reMarkable UI is primarily built using QML, but all of the files are embedded inside the binary as compiled Qt resources. For ease of hacking, it is possible to extract the files onto the filesystem and patch the binary to load the extracted files.

--> ONLY FOR FIRMWARE VERSION 2.11.0.442 on rM2 <--

Resource extraction

@ArcaneNibble
ArcaneNibble / convert_font_sheet.py
Created November 26, 2020 00:37
TWEWY font datamining and extraction
#!/usr/bin/env python3
import sys
from PIL import Image
infn = sys.argv[1]
outfn = sys.argv[2]
with open(infn, 'rb') as f:
indata = f.read()
set mem inaccessible-by-default off
# GPIO clocks
set *(int*)0x58024540 = 0x7FF
# OCTOSPI clocks
set *(int*)0x58024534 = 0x00204000
# Port A
set *(int*)0x58020020 = 0x00000090
#!/usr/bin/env python3
from math import ceil
import pyftdi.gpio
dev = pyftdi.gpio.GpioAsyncController()
dev.open_from_url('ftdi:///1', 0b11)
print(dev)
dev.set_frequency(1000000)
@ArcaneNibble
ArcaneNibble / pcbnew
Created July 8, 2020 10:21
KiCad fairyfloss theme
canvas_type=2
Color4DPCBLayer_F.Cu=rgb(255, 133, 127)
Color4DPCBLayer_In1.Cu=rgb(255, 243, 82)
Color4DPCBLayer_In2.Cu=rgb(197, 163, 255)
Color4DPCBLayer_In3.Cu=rgb(194, 0, 0)
Color4DPCBLayer_In4.Cu=rgb(0, 132, 132)
Color4DPCBLayer_In5.Cu=rgb(0, 132, 0)
Color4DPCBLayer_In6.Cu=rgb(0, 0, 132)
Color4DPCBLayer_In7.Cu=rgb(132, 132, 132)
Color4DPCBLayer_In8.Cu=rgb(132, 0, 132)
module top(r0, r1, g0, g1, b0, b1, hsync, vsync,
clk_,
but0, but1, but2, but3,
led4);
(* LOC = "FB1_2" *)
output r0;
(* LOC = "FB1_6" *)
output r1;
(* LOC = "FB1_3" *)
#!/usr/bin/env python3
from collections import namedtuple
import socket
import struct
usbip_user_op_common = namedtuple('usbip_user_op_common', 'version code status')
usbip_usb_device = namedtuple('usbip_usb_device', 'path busid busnum devnum speed idVendor idProduct bcdDevice bDeviceClass bDeviceSubClass bDeviceProtocol bConfigurationValue bNumConfigurations bNumInterfaces')
usbip_header_basic = namedtuple('usbip_header_basic', 'command seqnum devid direction ep')