Skip to content

Instantly share code, notes, and snippets.

View dogtopus's full-sized avatar
🦄
Unicorn!

dogtopus

🦄
Unicorn!
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dogtopus
dogtopus / outpoke5.py
Created November 4, 2020 06:23
DualSense output report fuzzer
#!/usr/bin/env python3
import hid
import os
import contextlib
import time
if __name__ == '__main__':
with contextlib.closing(hid.device()) as dev:
dev.open(0x054c, 0x0ce6)
@dogtopus
dogtopus / ds5.desc.xml
Last active March 14, 2024 01:17
DualSense descriptor
<?xml version="1.0"?>
<!--
DualSense (DS5) USB HID Report Descriptor
Documentation WIP
TODO: Extract info from hid-playstation and cross-verify with us.
-->
@dogtopus
dogtopus / ft-slider-illust-all-primitive-allpath.svg
Last active October 13, 2020 21:07
Alpaca slider illustration draft. Font is Xolonium https://sev.dev/fonts/xolonium/. CC-BY-SA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

fx-5800p Two Wire Interface

Connector

2.5mm TRS audio jack and plugs.

Pinout: T: SCL, R: SDA, S: GND

Link layer

@dogtopus
dogtopus / kpartx-psvita-pt.diff
Created September 14, 2020 20:39
PSVita eMMC partition table support for kpartx
diff --git a/kpartx/Makefile b/kpartx/Makefile
index 2906a984..0404f029 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -13,7 +13,7 @@ ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0)
endif
OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
- gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
+ gpt.o mac.o ps3.o psvita.o crc32.o lopart.o xstrncpy.o devmapper.o
@dogtopus
dogtopus / ptouch_tape2.inx
Last active February 7, 2023 11:56
PTouch tape template for Inkscape 1.x
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
<_name>PTouch Tape</_name>
<id>org.inkscape.render.ptouch_tape2</id>
<dependency type="executable" location="extensions">ptouch_tape2.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<!-- TODO Not sure about the valid printing region (conflicts with what
datasheet says). More tests needed. -->
<!-- Format: width,valid_width,offset -->
@dogtopus
dogtopus / wipf.py
Last active June 26, 2020 04:18
WillPlus Image Pack (WIP) reader
#!/usr/bin/env python3
# WillPlus Image Pack (WIP) reader
# The format is used by older (200x era) WillPlus VN engine.
# Special thanks to: asmodean's exbelarc (http://asmodean.reverse.net/pages/exbelarc.html).
# Although the source release is incomplete and didn't compile, it provides all the information necessary for me to write my own (and improved) parser.
import argparse
import ctypes
import fnmatch
@dogtopus
dogtopus / datsum.c
Created March 22, 2020 20:44
datsum
/*
* datsum.c
* Generates checksum for Taiko no Tatsujin iOS dat file
*
* NOTE: For 32-bit build, set _FILE_OFFSET_BITS=64
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
@dogtopus
dogtopus / bddazz.sh
Created January 4, 2020 19:26
Tieba pseudo-"dazzle" post generator
#!/bin/bash
# 20131221 - Add new font type - 1040006, 104900{1,2,3}
getglyphname(){
if [ ! $1 == ' ' ]
then {
printf "%s.jpg\n" \
$({
LC_CTYPE=C.UTF-8 printf "baidu_dazz%x" "'$1" \
| md5sum \