-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrainbow.dasm
More file actions
56 lines (45 loc) · 730 Bytes
/
Copy pathrainbow.dasm
File metadata and controls
56 lines (45 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
processor 6502
include "vcs.h"
include "macro.h"
seg code
org $f000
Start:
CLEAN_START ; Usual start routine defined in macro.h
; Start a new fram by turnin on VBLANK and VSYNC
NextFrame:
lda #2
sta VBLANK
sta VSYNC
; Generate three lines for VSYNC
sta WSYNC
sta WSYNC
sta WSYNC
lda #0
sta VSYNC
; Generate 37 lines for the VBLANC
ldx #37
VBlankLoop:
sta WSYNC
dex
bne VBlankLoop
sta VBLANK
; Draw 192 visible scanlines
ldx #192
VisibleLoop:
stx COLUBK ; Changing background color with every line
sta WSYNC
dex
bne VisibleLoop
; Generate Overscan lines
lda #2
sta VBLANK
ldx #30
OverscanLoop:
sta WSYNC
dex
bne OverscanLoop
sta VBLANK
jmp NextFrame
org $fffc
.word Start
.word Start