Skip to content

Instantly share code, notes, and snippets.

View tomaes's full-sized avatar
💭
Programming is for AIs. Let's go shopping.

tomaes

💭
Programming is for AIs. Let's go shopping.
View GitHub Profile
@tomaes
tomaes / joymin.asm
Last active August 29, 2015 13:56
c64 / MOS 6510: lazy joystick test (port #2)
; lazy joystick test
* = $7c ; auto start in VICE
;
LDA $DC00 ; get port byte
STA $05F4 ; mid-screen
BVC *-6 ; 8 bytes total
@tomaes
tomaes / glitch101
Last active August 29, 2015 13:57
toggle bit 5 'til you pass out. (c64)
0 s=53265:a=32:b=223:c=53280:pokec,.:pokec+1,.
1 pokes,peek(s)ora:pokes,peek(s)andb:::::::::::goto1
@tomaes
tomaes / vscroll
Created March 5, 2014 15:16
an attempt to do a credits scroll routine in glorious Commodore Basic v2 (c64); works, but sucks. ;)
1 rem roll dem credits
2 s=53265:k=240:a$(.)="yo!":a$(1)="let's scroll":a$(2)="upwards":a$(3)="smoothly"
3 printa$(i):i=(i+1)and3:forn=7to.step-1:pokes,peek(s)andkorn:forx=.to49:nextx,n:goto3
@tomaes
tomaes / glitch rumba
Last active August 29, 2015 13:57
rhythmic audio / video glitching in 11 bytes (c64)
;
; glitch f-art
;
* = $1000
;
loop EOR $A2
NOP ; makes everything look much saner ;)
; AND $C5 (fake interactivity :P)
STA $D011
STA $D418
@tomaes
tomaes / text noise
Created March 8, 2014 18:27
19 bytes text noise effect (c64)
;
; fill screen with 'text noise' (19 bytes with SEI)
;
* = $1000
SEI
loop EOR $D012
STA $0400,y
STA $0400+256,y
@tomaes
tomaes / mini maze
Created March 15, 2014 15:39
shortest maze generator on the 64? (and most other Commodore machines)
0 ?spc(rnd(.)+.5)"#";:run
@tomaes
tomaes / bella maze
Created March 17, 2014 11:31
Nicely colored and evolving maze-like patterns.
0 poke646,2+(peek(143)and3):printchr$(206.5+rnd(1)-(peek(161)/2and31));:run
@tomaes
tomaes / snaaakes
Created May 7, 2014 19:57
long-winded obstacle things coming your way (c64)
* = $7c
loop tax
sta $0774,x
jsr $e965 ;\n
jmp loop
@tomaes
tomaes / errglich0mat
Created May 7, 2014 20:27
System messages breaking off a wall. Try to press some keys. (c64)
* = $7c
loop ldy $c5 ;interactive \o/
jsr $f12b ;errout, y offset
jsr $e965 ;pinch o' magic scrolling salt
jmp loop ;awaaay...
@tomaes
tomaes / pre-alpha-bet
Last active August 29, 2015 14:01
Random letters. Type in the one that precedes it in the alphabet. Better hurry. Try not to fail like a 5 year old. ;)
0 c=int(rnd(1)*25)+66:printchr$(c);:fori=.toc*30:next:geta$:iflen(a$)>.thenif((c-1)=asc(a$))goto