Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

cbmeeks cbmeeks

🏠
Working from home
View GitHub Profile
@cbmeeks
cbmeeks / debug.asm
Last active January 8, 2023 05:47
Simple integer to hex print in 6502 assembly language
View debug.asm
// 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 / usb_hid_keys.h
Created January 6, 2023 02:19 — forked from ekaitz-zarraga/usb_hid_keys.h
USB HID Keyboard scan codes
View usb_hid_keys.h
/**
* 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 / main.java
Created March 2, 2022 16:32
Pilot Example
View main.java
package com.company;
public class Main {
public static void main(String[] args) {
// write your code here
String badNumber = "ABC123";
String goodNumber = "423-867-5309";
@cbmeeks
cbmeeks / main.java
Created March 2, 2022 16:19
Valid Phone Number
View main.java
package com.company;
public class Main {
public static void main(String[] args) {
String badNumber = "ABC123";
String goodNumber = "423-867-5309";
System.out.println("Testing Number " + badNumber);
System.out.println("\t" + isValidNumber(badNumber));
@cbmeeks
cbmeeks / stable_raster.asm
Last active August 18, 2020 17:24
Stable Raster
View stable_raster.asm
/*
This is working for NTSC. However, by my calculations, we're at 68 cycles instead of the required 65.
That can't be right. Yet, it works. I assume I am making a false assumption on some of the timings.
*/
BasicUpstart2(Entry)
Entry:
@cbmeeks
cbmeeks / Yacht.txt
Created July 18, 2019 17:57
M68000 Cycle Counting
View Yacht.txt
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 / helloworld.4th
Last active February 15, 2019 14:45
FORTH Hello World
View helloworld.4th
: HELLO-WORLD ." Hello world!" ;
HELLO-WORLD
@cbmeeks
cbmeeks / tinybasic.asm
Created November 1, 2018 18:58
TinyBASIC
View tinybasic.asm
; v0.2.2
;
; Bill O'Neill - Last update: 2011/11/11
;
; Monitor code is Open License and can be used freely
; Tiny Basic code is Copyright, Tom Pitman
;
; Consist of a minimal terminal monitor and Tom
; Pitman's Tiny Basic as a high-level
; programming language
@cbmeeks
cbmeeks / c64.asm
Created August 30, 2018 12:14
Commented C64 Kernal
View c64.asm
;************************************************************************************
;************************************************************************************
; 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 / disable.txt
Last active August 23, 2018 17:37
Disable Java Updating
View disable.txt
https://serverfault.com/questions/14303/cant-seem-to-disable-java-automatic-update/26568#26568
To turn off/on the Java updater (C:\Program Files\Java\jreXXX\bin\javacpl.exe), put a 0 in the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Update\Policy\EnableJavaUpdate
Turn it back on with a 1.
Be sure to run javacpl.exe as ADMIN.