Skip to content

Instantly share code, notes, and snippets.

View dansalvato's full-sized avatar

Dan Salvato dansalvato

View GitHub Profile
@dansalvato
dansalvato / karabiner.json
Last active January 6, 2024 00:31
Karabiner Elements config for ergonomic text motions with Caps Lock + IJKLH;UO
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"name": "Default",
"selected": true,
@dansalvato
dansalvato / sincos.s
Created March 18, 2022 11:06
Fast sin/cos function for 68k Assembly
; Fast 68k sin/cos function
; -------------------------------------
; This is a sin/cos function suitable to be used inline as a macro for
; maximum speed, using a 256-byte lookup table.
; Provides simultaneous signed sin and cos values of an angle from 0-255.
; The return range is from -256 (0xff00) to 255 (0x00ff).
; This works especially well if your position, velocity, etc. are word values,
; where the high byte is the pixel value, and the low byte is the
; fractional/subpixel value.
; The macro version of this function takes 44 cycles and 10 memory reads.
@dansalvato
dansalvato / SMBDIS.ASM
Last active June 26, 2023 14:55 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no