Skip to content

Instantly share code, notes, and snippets.

@sehugg
sehugg / happy2019.bas
Last active December 31, 2018 18:59
Happy 2019 demo in batariBASIC
set kernel_options no_blank_lines pfcolors
set romsize 8kSC
set smartbranching on
const pfres=18
pfclear
rem make sprites go behind playfield
CTRLPF = %00000101
@sehugg
sehugg / README.md
Created January 26, 2019 18:45
SCRIPT-8
import json
import dateutil.parser
with open('nvdcve.json','r') as f:
root = json.load(f)
items = root['CVE_Items']
items = sorted(items, key=lambda k: dateutil.parser.parse(k.get('publishedDate', '')), reverse=True)
@sehugg
sehugg / mamexml.py
Last active June 25, 2021 18:41
generates list of supported mame games in XML (requires mame binary)
import xml.parsers.expat
import sys,gzip,string
_name = ''
_manf = ''
_year = 0
_desc = ''
_srcfile = ''
_tag = None
_cpus = []
@sehugg
sehugg / xygoto.c
Created May 23, 2020 16:50
Workaround gotoxy() kernel crash in C64 open source BIOS
#include <stdio.h>
#include <conio.h>
#include <c64.h>
#include <cbm_petscii_charmap.h>
void xygoto(char x, char y) {
x=x; y=y; // to avoid "unused variable" warning
__asm__ ("jsr popa");
__asm__ ("tax"); // pop X
import xml.parsers.expat
import sys,gzip,string
_name = ''
_manf = ''
_year = 0
_desc = ''
_srcfile = ''
_tag = None
_cpus = []