Skip to content

Instantly share code, notes, and snippets.

View cbmeeks's full-sized avatar
🏠
Working from home

cbmeeks cbmeeks

🏠
Working from home
View GitHub Profile
@cbmeeks
cbmeeks / custom.js
Created November 30, 2023 01:35
Simple Combo / Select Box
const autocomplete = (inputId, listId, dimensionCode) => {
const input = document.getElementById(inputId)
const list = document.getElementById(listId)
if (!input || !list) return false
list.innerHTML = ''
let items = []
let current = -1
const bg_default = 'bg-white'
const bg_select = 'bg-blue-500'
@cbmeeks
cbmeeks / sid.txt
Last active June 2, 2024 16:29
SID File Format
===========================
SID FILE FORMAT DESCRIPTION
===========================
AUTHORS:
Michael Schwendt (PSID v1 and v2)
Simon White (PSID v2NG, RSID)
Dag Lem (PSID v2NG)
Wilfred Bos (PSID v3, RSID v3, PSID v4, RSID v4)
@cbmeeks
cbmeeks / odd.java
Created February 21, 2024 20:45
Convert Odd DateTime String
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
public class Main {
public static void main(String[] args) throws ParseException {
final String dateTime = "20240310 120600.000";
@cbmeeks
cbmeeks / usb_hid_keys.h
Created January 6, 2023 02:19 — forked from ekaitz-zarraga/usb_hid_keys.h
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@cbmeeks
cbmeeks / Yacht.txt
Created July 18, 2019 17:57
M68000 Cycle Counting
Yacht
(Yet Another Cycle Hunting Table)
-------------------------------------------------------------------------------
Forewords :
-------------------------------------------------------------------------------
This document is based on :
- 9th Edition of M68000 8-16-32-bit Microporcessor User's Manual
(Motorola, 1993) (laterly refered as M68000UM)
@cbmeeks
cbmeeks / sprites.asm
Last active June 3, 2023 12:08
sprites.asm -- Commodore 64 Sprite Multiplexer
.importonce
//***************************************************************************
// VIC II
// BANK 0: $0000 - $3FFF
// BANK 1: $4000 - $7FFF
// BANK 2: $8000 - $BFFF
// BANK 3: $C000 - $FFFF
//***************************************************************************
@cbmeeks
cbmeeks / vic-20-rom.asm
Created July 7, 2017 13:04
VIC-20 ROM Disassembly
;***********************************************************************************;
;***********************************************************************************;
;
; The almost completely commented VIC 20 ROM disassembly. V1.01 Lee Davison 2005-2012.
; With enhancements by Simon Rowe <srowe@mose.org.uk>.
; This is a bit correct assembly listing for the VIC 20 BASIC and KERNAL ROMs as one 16K
; ROM. You should be able to assemble the VIC ROMs from this with most 6502 assemblers,
; as no macros or 'special' features were used. This has been tested using Michal
; Kowalski's 6502 Simulator assemble function. See http://exifpro.com/utils.html for
@cbmeeks
cbmeeks / c64.asm
Created August 30, 2018 12:14
Commented C64 Kernal
;************************************************************************************
;************************************************************************************
; This file was included in the Project 64 Repository after all efforts to contact
; Lee Davison, the original author, were proven unsuccessful. The inclusion is meant
; to honour his sterling work on providing us with the very best document on every
; bit of the Commodore 64's firmware content. We want this to remain available to
; the public and allow other members to benefit from Lee's original, excellent job.
;************************************************************************************
; $VER:C64LD11.S, included on 2014-11-12
;************************************************************************************
@cbmeeks
cbmeeks / debug.asm
Last active January 8, 2023 05:47
Simple integer to hex print in 6502 assembly language
// This is for the Commodore 64 and requires KickAssembler
// Written by Cecil Meeks (cbmeeks) in 2023
// NOTE, this prints whatever is in A to the screen. So load A first.
// First, create a simple macro:
.macro DebugText_A_Hex(X, Y) {
sta ModA + 1 // save A below
stx ModX + 1 // save X below
sty ModY + 1 // save Y below
@cbmeeks
cbmeeks / main.java
Created March 2, 2022 16:32
Pilot Example
package com.company;
public class Main {
public static void main(String[] args) {
// write your code here
String badNumber = "ABC123";
String goodNumber = "423-867-5309";