Instantly share code, notes, and snippets.

View ark-loader.s
di ;c000
in a,(0a8h) ;c001
and 0f3h ;c003
ld hl,04000h ;c005
ld c,004h ;c008
call sub_c04bh ;c00a
and 0cfh ;c00d
ld c,010h ;c00f
ld hl,08000h ;c011
#!/usr/bin/env python3
We all have seen some memes about how long did it take to load games from tape
in the old 8-bit microcomputers. 30 minutes, lol. Well, not really (or at least
not for the speccy and the CPC; sorry, no C64 data).
This is not very scientific, as it doesn't take into account multi-load,
turbos, anti-copy, etc; but look at the times and you get the idea.
View gist:eec4d91e712c37ae217ec71ed27a2e60
$ ssh -A vm
$ git config --global url."".insteadOf ""
$ cat ~/.gitconfig
[url ""]
	insteadOf =
$ go get && echo Success!
View pad8.c
void pad_numbers8(uint8_t *s, uint8_t limit, uint8_t number)
s += limit;
*s = 0;
View enc_text.txt
deep in the shady sadness of a vale
far sunken from the healthy breath of morn,
far from the fiery noon, and eve's one star,
sat gray-hair'd saturn, quiet as a stone,
still as the silence round about his lair;
forest on forest hung about his head
like cloud on cloud. no stir of air was there,
not so much life as on a summer's day
robs not one light seed from the feather'd grass,
but where the dead leaf fell, there did it rest.
View main.s
; output of gcc -O2 -s -S main.c
.file "main.c"
.p2align 4,,15
.globl abs
.type abs, @function
movl %edi, %edx
#!/usr/bin/env python
__version__ = "1.0"
import sys
from argparse import ArgumentParser
import struct
ROM_SIZE = 32 * 1024 * 16
View map.h
// using 4-bit per tile
// map compressed (UCL/2B)
const unsigned char map[66] = {
0x92, 0x33, 0x72, 0x30, 0x00, 0x0d, 0x03, 0x80, 0x09, 0x7d,
0x33, 0x55, 0x53, 0xfb, 0x07, 0x35, 0x55, 0x27, 0x08, 0x6d,
0x33, 0x01, 0x73, 0x02, 0x3b, 0x23, 0xd9, 0x30, 0x03, 0x09,
0x1b, 0x67, 0xb6, 0x03, 0x33, 0x27, 0x2c, 0x29, 0x6c, 0x03,
0x09, 0x23, 0x66, 0x93, 0xc0, 0x8b, 0xb6, 0x41, 0xb6, 0x8b,
0x35, 0xeb, 0x02, 0x30, 0xa9, 0x02, 0xd9, 0x00, 0x20, 0x00,
View cpcre
REALPATH=`realpath "$1"`
FILE=`winepath -w "$REALPATH"`
echo auto-booting $FILE...
cd $CPCPATH && exec wine CPCE95.EXE /a+ "$FILE
FPS = 1.0/60
UFPS = 1.0/80
dt = 0
def update(last_dt):
if paused: