Skip to content

Instantly share code, notes, and snippets.

@badvision
Last active December 30, 2016 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badvision/2d2d4d9439fb1e08344b1cb4ff54dc78 to your computer and use it in GitHub Desktop.
Save badvision/2d2d4d9439fb1e08344b1cb4ff54dc78 to your computer and use it in GitHub Desktop.
Makes a trippy diagonal line pattern on the VCS
; use with 8bitworkshop's VCS IDE
; http://8bitworkshop.com/?platform=vcs
processor 6502
; Include files for Atari 2600 constants and handy macro routines
include "vcs.h"
include "macro.h"
org $f000
Start sei ; disable interrupts
cld ; disable BCD math mode
ldx #$ff ; init stack pointer to $FF (grows upward)
txs ; ... transfer X register to S register (stack pointer)
lda #$00
ldy #$00
Loop
;load value into A ($30 is deep red on NTSC)
sty COLUBK
ldx #61
Loop2 Dex
sty COLUBK
sta COLUBK
Bpl Loop2
INY
Bne Loop
org $fffc
.word Start
.word Start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment