Skip to content

Instantly share code, notes, and snippets.

@devinacker
devinacker / gist:7a038ceba2d5652b8b7816107f579c7f
Last active September 17, 2018 16:43
Ad blocker filters for keeping some of Twitter's obtrusive garbage off of your timeline
twitter.com##.moments
twitter.com##div[data-card2-type^="promo"]
twitter.com##div[data-component-context^="suggest_activity_tweet"]
twitter.com##div[data-component-context^="suggest_recycled_tweet_inline"]
/*
Quick SDL2 wrapper for uPNG
[email protected]
This code is public domain.
*/
// https://github.com/elanthis/upng
#include "upng/upng.h"
#include <SDL2/SDL.h>
@devinacker
devinacker / exomizer-816.asm
Created July 10, 2018 01:13
WIP (sorta) Exomizer decruncher for SNES / 65c816 (with ca65)
.include "libSFX.i"
.feature force_range
.export Decrunch
/*
Exomizer (raw mode) decruncher for 65c816 / ca65.
by Devin Acker (Revenant/RSE), 2018
For use on SNES, and theoretically other 65c816-based platforms.
.p816
.code
main:
sei
stz $4207 ; IRQ at H=0
stz $4208 ; (leave IRQ disable flag set so it only resumes after WAI)
lda #%00010000
sta $4200
wai
// ==UserScript==
// @name Mastodon timeline thing
// @description keep timeline from automatically scrolling under mouse cursor
// @author @revenant@mastodon.social
// @version 0.1
// @include https://mastodon.social/*
// @run-at document-idle
// @namespace revenant.mastodon
// ==/UserScript==
#!/usr/bin/env python3
"""
Doom map rect-to-polar "circularizer" - by Revenant
Inspired by a blog post by Ribbiks:
https://rbkz.blogspot.com/2020/05/circularizer-lua.html
"""
from sys import argv
CTK-551 ROM dump (little endian):
https://revenant1.net/ctk551.bin
CTK-541 service manual (identical PCBs to CTK-551):
https://www.synthxl.com/wp-content/uploads/2020/04/Casio-CTK-541-Service-Manual.pdf
CPU: "Casio GT913F", 20-bit address bus, 16-bit data bus
Similar CTK models feature a uPD913 or uPD914, i.e. the GT913F is apparently a rebranded NEC chip.
Instruction set seems to be based on Hitachi H8/300, but with opcodes 5xxx-7xxx rearranged.