Skip to content

Instantly share code, notes, and snippets.

View iwalton3's full-sized avatar

Izzie Walton iwalton3

View GitHub Profile
@iwalton3
iwalton3 / ascal-scaler-plan.md
Last active July 27, 2026 16:33
Claude session where MiSTer ASCAL scaler gained an interlaced output mode

True 480i/576i ASCAL scaler output over direct_video

Context

The MiSTer board is used with direct_video=1 (realtime analog video via HDMI DAC). Cores with native interlaced output (Minimig) produce true 480i on a CRT, but cores that only output 480p (ao486) cannot. Goal: patch the ASCAL scaler so it can render any core's video (and the Linux/menu framebuffer) as true interlaced 480i/576i — alternating 262/263-line (312/313 PAL) fields with a half-line vsync offset — delivered over the direct_video HDMI pins, giving ~480 visible NTSC lines.

Two features, per user decisions:

  1. vga_scaler=1 + direct_video=1 together routes the ASCAL output to the HDMI/DV pins for game cores (today only cores hardwiring VGA_SCALER=1, like ao486, get this). Works with unmodified core bitstreams — it's pure Linux-side routing via the existing CONF_VGA_FB mux (production-tested path, sys_top.v:1317-1320).
  2. New ini key DIRECT_VIDEO_INTERLACE=1: the DV scaler mode becomes true 480i (576i when `ME
@iwalton3
iwalton3 / claude-code-collaboration.md
Created January 28, 2026 06:52
A short document explaining how to get the most out of modern coding agents like Claude Opus 4.5, specifically why the most critical strategy is collaboration and not prompt engineering.

Collaborating with Claude Code

This guide distills patterns from hundreds of successful AI-assisted development sessions. The core insight: you're not "prompting" a tool, you're collaborating with a knowledgeable partner who happens to have no memory of yesterday.

Mindset Shift

Stop thinking: "How do I get the AI to produce the right output?" Start thinking: "How do I collaborate with a senior developer who has amnesia?"

This reframe changes everything. You wouldn't give a colleague a vague task and hope for the best. You'd share context, explain your reasoning, discuss tradeoffs, and work together toward a solution.

@iwalton3
iwalton3 / ai-detector.js
Last active July 21, 2026 13:25
AI Detector - Detect AI "slop" articles before you waste your time reading them.
// ==UserScript==
// @name AI Detector
// @version 5
// @grant GM.xmlHttpRequest
// @grant GM.setValue
// @grant GM.getValue
// @include *
// @exclude https://assistant.kagi.com/*
// @exclude https://nano-gpt.com/*
// @exclude https://github.com/*/blob/*
@iwalton3
iwalton3 / nfc-example.py
Created October 3, 2024 03:31
Example usage of pyscard to read and write second sector of xSiiD with password protection turned on.
#!/usr/bin/env python3
from smartcard.System import readers
from smartcard.CardRequest import CardRequest
from smartcard.Exceptions import CardRequestTimeoutException, CardConnectionException
import time
reader = readers()
conn = reader[0].createConnection()
@iwalton3
iwalton3 / write-nfc-file.sh
Last active September 29, 2024 17:26
Backup a small file on your xSiiD or similar while still allowing normal function (e.g. URL on scan) for unused space. File can be protected from deletion and also optionally protected from reading using password. Note you should still encrypt the file if it is sensitive! Please be careful as you can't recover password if forgotten!
#!/bin/bash
read -sp"Password (8 hex chars raw or string): " p
echo
if ! grep -q "^[0-9A-Fa-f]\{8\}$" <<< "$p"
then
echo "You provided a text password."
echo "Hashing with: echo -n \"PASSWORD\" | sha256sum"
echo "The password will be the first 8 chars of the hash."
p=$(echo -n "$p" | sha256sum)
p=${p:0:8}
@iwalton3
iwalton3 / clear-watched.js
Last active July 19, 2023 14:40
Clear Watched (for when you get 502 errors trying to remove watched videos from your YouTube watched later)
window.setInterval(
async() => {
let f = document.querySelector('.ytd-playlist-video-renderer .ytd-thumbnail-overlay-resume-playback-renderer');
if (f) {
f = f.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.querySelector('#menu yt-icon-button');
}
if (!f) {
f = document.querySelector('.ytd-playlist-video-renderer img[src="https://i.ytimg.com/img/no_thumbnail.jpg"]');
if (f) {
f = f.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.querySelector('#menu yt-icon-button');
@iwalton3
iwalton3 / ai-friend-exllama.py
Created May 31, 2023 02:32
Discord Exllama Chatbot
#!/usr/bin/env python3
from model import ExLlama, ExLlamaCache, ExLlamaConfig
from tokenizer import ExLlamaTokenizer
from generator import ExLlamaGenerator
import argparse
import torch
from timeit import default_timer as timer
torch.set_grad_enabled(False)
torch.cuda._lazy_init()
@iwalton3
iwalton3 / data-format.json
Created May 12, 2023 03:52
Message Splitter - Split chat messages into chunks for training GPTs
{
"data": "%data%"
}
@iwalton3
iwalton3 / jmpapi.ts
Last active March 15, 2023 05:07
Prototype Jellyfin Media Player Typescript API
interface JMPSettings {
appleremote: {
emulatepht: boolean;
};
audio: {
channels: 'auto' | '2.0' | '5.1,2.0' | '7.1,5.1,2.0';
/**
* auto or device name
*/
device: string;
@iwalton3
iwalton3 / jellyfin-cotton-candy.css
Last active March 13, 2023 22:33
Jellyfin Cotton Candy Theme
* {
scrollbar-width: thin;
}
.skinHeader,
html {
color: #222;
color: rgba(0, 0, 0, 0.87);
}