Skip to content

Instantly share code, notes, and snippets.

View dogtopus's full-sized avatar
πŸ¦„
Unicorn!

dogtopus

πŸ¦„
Unicorn!
View GitHub Profile
@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 \
@dogtopus
dogtopus / backup-boot.sh
Last active January 8, 2020 02:51
Safer snap-pac boot backup hook for Raspberry Pi
#!/bin/bash
if [[ ! -d /.bootbackup ]]; then
mkdir /.bootbackup
fi
grep -qs '/boot ' /proc/mounts || mount /boot
rsync -av --delete /boot /.bootbackup
@dogtopus
dogtopus / sega-slider.md
Last active September 26, 2024 16:17
SEGA rhythm game slider protocol

SEGA touch slider (837-15275 and 837-15330) protocol

Some of the information are from [this writeup][ja] and some come from original researches.

Logic analyzer captures

[slider_cap.zip (sigrok format)][slider-cap-sigrok]

[slider_cap.zip (original ZeroPlus ALC format)][slider-cap-alc]

@dogtopus
dogtopus / slider-emu.md
Last active August 10, 2022 14:07
Project Diva slider emulation feature charts

Slider emulation mode feature chart

Stock Buttons Sticks Touchpad ATRF TTRF TGRF AR
Absolute? βœ” ✘ ✘ βœ” (2 points only) ✘ ✘ ✘ βœ”
Pinch in/out ordering βœ” ✘ βœ” βœ” βœ” βœ” βœ” βœ”
Linear encoding βœ” ✘ ✘ βœ” (limited) βœ” (limited) βœ” (limited) βœ” βœ”
Multi-point (>2) βœ” βœ” (directions only) ✘ ✘ ✘ (current impl) ✘ (current impl) summed βœ”
Single swipe fills 31 undeterministic undeterministic 20 40 40 40 (could be ∞) 31
Maximum fills 136 (8 fingers end-to-end) ∞ ∞ 40 40 40 40+∞ 136 (8 fingers end-to-end)
@dogtopus
dogtopus / mncsave.sh
Last active May 3, 2019 06:12
Monon Color (Moonoon Color) save dumper/injector
#!/bin/bash
# Old code, published as-is. Should work on most 64Mbit games. Not sure about others.
SAVE_OFFSET=$((0x50000))
SAVE_SIZE=$((0x20000))
save_read() {
dd if="$1" of="$2" \
iflag=skip_bytes,count_bytes count=$SAVE_SIZE skip=$SAVE_OFFSET
}
#!/bin/bash
[[ $# -lt 2 ]] && echo "Usage: ${0} jedi-ca ds4id" && exit 1
openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:-1 -verify "${1}" -signature "${2}.sig" "${2}"
@dogtopus
dogtopus / crc_v3.gfm.md
Created March 19, 2019 03:08
Ross Williams' CRC guide, reformatted in Markdown. No change made to the original text besides formatting.

A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS

"Everything you wanted to know about CRC algorithms, but were afraid to ask for fear that errors in your understanding might be detected."

Version : 3.
Date    : 19 August 1993.
Author  : Ross N. Williams.
Net     : [email protected].
@dogtopus
dogtopus / error-success.c
Created February 13, 2019 05:37
Make memes by abusing perror()
#include <errno.h>
#include <stdio.h>
int main(void) {
errno = 0;
perror("Error");
return 0;
}
@dogtopus
dogtopus / ps4cse_public.md
Last active April 25, 2025 01:08
Licensed PS4 Controller "Security Chip" Secure Element

SE for PS4 Licensed Controllers

Disclaimer

This documentation is provided solely for education and interoperability purposes (aka persons who are tired of proprietary non-customizable hardware and want to use their own hardware for DIY controllers). It enables neither chip-cloning nor controller counterfeiting which would violate copyright and/or any other applicable laws. This documentation also comes without warranty. Use it at your own risk.

Basic info

  • Model: NXP A710x series, possibly semi-customized (Label says 7105 - A7105 does not exist)
  • Protocol: I2C