Skip to content

Instantly share code, notes, and snippets.

View dansanderson's full-sized avatar

Dan Sanderson dansanderson

View GitHub Profile
***NOTE***
This document was updated by Ken Sumrall on 3/26/06. I've noted my
updates with the notation ***KEN***. They are all in the CPU section.
***NOTE***
(*TODO*: remove above note, once all ***KEN*** remarks are integrated)
C64DX SYSTEM SPECIFICATION
o Design Concepts
o Hardware Specifications
--
-- Written by
-- Paul Gardner-Stephen <[email protected]> 2013-2014
--
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU Lesser General Public License as
-- * published by the Free Software Foundation; either version 3 of the
-- * License, or (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
@dansanderson
dansanderson / whichrom.py
Created September 15, 2022 05:55
Identifies the version of a given MEGA65 ROM file
#!/usr/bin/env python
import sys
PREFIX = b'\x42\x41\x53\x49\x43\x20\x36\x35\x20'
def main(args):
if len(args) != 1:
print('Usage: python3 whichrom.py mega65.rom')
@dansanderson
dansanderson / superclean.py
Created August 15, 2022 03:28
A tool for cleaning up all build-generated files in a project (SEE NOTES)
#!/usr/bin/env python3
# READ THIS BEFORE USING
# ----------------------
#
# This cleans all git-ignored files and empty directories out of a project,
# and also deletes *all* untracked files from git submodules.
#
# Use --dry-run to print what would be deleted without actually deleting.
# python3 superclean.py --dry-run
@dansanderson
dansanderson / balloon65.bas
Created May 20, 2022 22:44
A C65 version of the balloon demo program from the Commodore 64 Programmer's Reference Guide, p181
10 print"{clr}":fori=0to63:poke8128+i,0:next
20 gosub60000
999 end
60000 data" xxxxxxx "
60001 data" xxxxxxxxxxx "
60002 data" xxxxxxxxxxxxx "
60003 data" xxxxx xxxxx "
60004 data" xxxxx xxx xxxx "
60005 data" xxxxx xxx xxxxx "
60006 data" xxxxx xxx xxxx "
@dansanderson
dansanderson / balloon64.bas
Created May 20, 2022 19:56
The balloon demo program from the Commodore 64 Programmer's Reference Guide, p181
10 print"{clr}":fori=0to63:poke832+i,0:next
20 gosub60000
999 end
60000 data" xxxxxxx "
60001 data" xxxxxxxxxxx "
60002 data" xxxxxxxxxxxxx "
60003 data" xxxxx xxxxx "
60004 data" xxxxx xxx xxxx "
60005 data" xxxxx xxx xxxxx "
60006 data" xxxxx xxx xxxx "
@dansanderson
dansanderson / circles65.bas
Created May 20, 2022 19:52
A simple BASIC 65 program that draws circles, for the MEGA65
10 screen 320, 200, 5
20 for x=0 to 31
30 pen x
40 circle x*10+10, x*10+10, x*5
50 next x
60 sleep 3
70 screen close
80 color 0
90 print "{clr}{wht}have a {cyn}nice{wht} day!"
@dansanderson
dansanderson / beefinder.py
Last active May 21, 2022 07:42
Finds New York Times Spelling Bee puzzles in a word list
#!/usr/bin/env python3
#
# A tool to generate New York Times Spelling Bee puzzles from a word list.
#
# A Bee is a set of seven unique letters that can be used to form words. One
# of the letters is required to appear at least once in every word, and each
# word must be at least four letters long. Letters can be repeated. A Bee must
# have at least one word in its word list that uses all seven letters at least
# once (a "pangram").
#
@dansanderson
dansanderson / bee_saeinrt.txt
Last active December 11, 2021 03:32
New York Times Spelling Bee answers for [S] A E I N R T
New York Times Spelling Bee answers for [S] A E I N R T
airiness
aitesis
ananas
anastasis
anastate
anatase
anenst
anes
@dansanderson
dansanderson / angletest.lua
Last active November 1, 2021 00:39
Calculating the angle formed by three points in PICO-8
-- ❎ changes selected point
-- direction keys move point
function _init()
a = {x=20,y=20}
b = {x=80,y=80}
c = {x=40,y=60}
pts = {a,b,c}
sel = 1
end