Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
Unicorn!

dogtopus

🦄
Unicorn!
View GitHub Profile
@dogtopus
dogtopus / syscalls_krnl.json
Last active Sep 9, 2021
Besta RTOS syscalls
View syscalls_krnl.json
{
"0x20000": "ReadTADInfo",
"0x20001": "WriteTADInfo",
"0x20002": "GetTADCityDefault",
"0x20003": "_GetLastError",
"0x20004": "_SetLastError",
"0x20005": "FTL_CheckBadBlock",
"0x20006": "FTL_GetCurDiskSize",
"0x20007": "FTL_WriteSector",
"0x20008": "FTL_SetDeviceExistHandle",
@dogtopus
dogtopus / trace2pcap.py
Last active Aug 9, 2021
Convert sigrok JSON trace containing UART HCI traffic to HCI PCAP file. Requires scapy.
View trace2pcap.py
#!/usr/bin/env python3
from __future__ import annotations
'''
Convert sigrok JSON trace containing UART HCI traffic to HCI PCAP file.
The JSON trace files are typically acquired with:
sigrok-cli -i some-sigrok-session.sr -P uart:baudrate=<hci-baud> -A uart=tx-data:rx-data --protocol-decoder-jsontrace > some-json-trace-file.json
View jdm_mcu.md

Jedi Info

Identification

FCCID

  • AK8CUHZCT1: JDM-001, JDM-020(?, uses similar BT module)
  • AK8CUHZCT1F1: JDM-011(D2?)
  • AK8CUHZCT1A: JDM-030
  • AK8CUHZCT2: JDM-040
@dogtopus
dogtopus / gen_ds4key.py
Created Jul 24, 2021
DS4Key generation
View gen_ds4key.py
#!/usr/bin/env python3
from Cryptodome.PublicKey import RSA
from Cryptodome.Signature import pss
from Cryptodome.Hash import SHA256
from Cryptodome.Math.Numbers import Integer
import io
import shutil
import sys
@dogtopus
dogtopus / ds40304poke.py
Last active Jul 18, 2021
DS4 Bluetooth auth2/"weak auth" checker.
View ds40304poke.py
#!/usr/bin/env python3
import hid
import contextlib
import ctypes
import enum
import hashlib
import os
import sys
View mgrillbtw-thefuck.sh
# Invokes [thefuck](https://github.com/nvbn/thefuck) when typing
# 'im a girl btw' in the shell.
#
# Inspired by Beluga's discord series. https://www.youtube.com/c/Beluga1
#
# Installation: add to anywhere in .bashrc.
#
# Effect:
#
# $ pacman -Syu
@dogtopus
dogtopus / _sgp.md
Last active Sep 1, 2021
SEGA Grand Pianist related stuff
View _sgp.md

SEGA Grand Pianist

SD Card

SD card slot is on its own separate PCB connected via a 8-pin JST PH (?) jumper cable.

Tested with 2GB SD card formatted with FAT16. Cards smaller than 2GB might also work but are untested (since the smallest cards I got are 2GB).

(Official spec stated that it supports 128MB-2GB SD cards formatted with FAT16.)

@dogtopus
dogtopus / sega-slider-impl.md
Last active May 8, 2021
SEGA Slider (-like) Implementation Mega List - Heavily WIP
View sega-slider-impl.md

SEGA Slider (-like) Implementation Mega List

Diva

Name Author Sensor Type Construction Controller Type # of Controllers # of Segments LED Controller Type # of LEDs/Pixels Protocol Open-source?
837-15275 SEGA Capacitive FR4 PCB CY8C22345-24SXI 2 32 THL3504 64/32 sega-slider/UART/RS232 No
(No name) benjilei Capacitive Pad hack (aggregated DS4 touchpad) MXT series or TrueTouch series (DS4 Touchpad)+? 4? 80? (virtual) None 0 maxTouch (or TrueTouch)/I2C No (aggregation method unknown)
[(No name)][fa40] fa40 Capacitive Pad hack (copper foil on wood substrate) ZET6223 (Brook Touchpad) 1 17 None 0 ZET6223/I2C N/A
(No name) Mo10 Capacitive FR4 PCB CY8C4104LQI-422 4 32 WS2812 32 Proprietary/I2C No
@dogtopus
dogtopus / datutil.py
Created Apr 3, 2021
Old Taiko no Tatsujin iOS song pack tool
View datutil.py
#!/usr/bin/env python2
import yaml
import struct
import os
SUFFIX = (
'.m4a',
'_e.sht',
'_n.sht',
'_h.sht',
View lkp-logo-draft4.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.