Skip to content

Instantly share code, notes, and snippets.

@hacst
hacst / byk8xx.cpp
Created November 24, 2018 10:06 — forked from castleberrysam/byk8xx.cpp
Some reverse engineered C++ code from the BYK8xx firmware update utility
#include <stdio.h>
extern char *fw_data;
extern int fw_len;
// used to hold the RunOnlyOneUpdateTools mutex
extern HANDLE dword_458908;
// used to hold the first byte pair after the firmware header
extern int dword_45868c;
@hacst
hacst / pinout.txt
Created November 24, 2018 10:06 — forked from castleberrysam/pinout.txt
GPIO connections for BYK870 based keyboards (WIP)
rows and column numbers start at the bottom left
P0.2: USB pin D+
P0.3: USB pin D-
P0.4: USB pin D+ pulldown (used during reset)
P2.0: USB pin D- pullup (used during reset)
P0.5: switch row 6 drive
P0.6: switch row 5 drive
P0.7: switch row 4 drive
@hacst
hacst / crash.c
Last active August 29, 2015 14:10 — forked from mkrautz/crash.c
// Build x64 version with "cl -O2 /fp:fast crash.c"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
struct TonalityAnalysis {
int count[2]; //< Remove this or change it to multiples of 4 and it works
float std[4];
};
@hacst
hacst / gist:3824223
Created October 3, 2012 00:37 — forked from rlemon/gist:3814072
Callback maybe
It threw an exception from hell,
You ask me, trace wouldn't tell,
I know JS really well,
Events are in my way.
I trade my sleep for a fix,
time and more time trying tricks,
I wasn't looking for this,
Callbacks are in my way.