This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Mastodon timeline thing | |
// @description keep timeline from automatically scrolling under mouse cursor | |
// @author @[email protected] | |
// @version 0.1 | |
// @include https://mastodon.social/* | |
// @run-at document-idle | |
// @namespace revenant.mastodon | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import struct | |
from omg.util import * | |
class StructMeta(type): | |
@staticmethod | |
def _get(f): | |
# Get struct field or default value | |
def fn(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//; "Super Keftendo" 256-byte SNES intro source code | |
//; by Revenant | |
//; http://www.pouet.net/prod.php?which=70163 | |
//; This is an attempt at implementing the "Kefrens bars" effect on the SNES, using less than | |
//; 256 bytes of ROM. The technique used here is to set up a 256-color line buffer using | |
//; Mode 7, then rendering a few pixels directly to CGRAM every scanline and resetting the | |
//; Y-scroll position to display the same buffer on every visible scanline as it is repeatedly | |
//; rendered to. Some more information about specific size optimizations are detailed later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
const char *ui_template = \ | |
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ | |
<ui version=\"4.0\">\n\ | |
<class>%s</class>\n\ | |
<widget class=\"%s\" name=\"%s\">\n\ |
NewerOlder