summaryrefslogtreecommitdiff
path: root/vcsdrive.asm
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2024-06-28 00:00:51 +0100
committerIan C <ianc@noddybox.co.uk>2024-06-28 00:00:51 +0100
commit6eb9fcf412e91c3246d11bda7013c9606e9d7c48 (patch)
treed8f1db8fe0a3b7b715ca1f9838d275d40d91d2a8 /vcsdrive.asm
parentc68524fb30716a9ece935f85df5e02e14403b161 (diff)
Added oversan background changes to see if they workedHEADmaster
Diffstat (limited to 'vcsdrive.asm')
-rw-r--r--vcsdrive.asm62
1 files changed, 55 insertions, 7 deletions
diff --git a/vcsdrive.asm b/vcsdrive.asm
index c271652..22a9db0 100644
--- a/vcsdrive.asm
+++ b/vcsdrive.asm
@@ -24,6 +24,8 @@
include vcs.asm
+bgcolour equ $81
+
org $f000
; Set up stack pointer
@@ -40,13 +42,59 @@ start:
dex
bne zero
- ; Set background
- lda #$3e
- clc
-.loop:
- sta COLUBK
- adc #1
- jmp loop
+ ; Start frame
+next_frame:
+ lda #2
+ ldy bgcolour
+ sta VBLANK
+ sty COLUBK
+ iny
+ sta VSYNC
+ sty COLUBK
+ iny
+ sta WSYNC
+ sty COLUBK
+ iny
+ sta WSYNC
+ sty COLUBK
+ iny
+ sta WSYNC
+ sty COLUBK
+ iny
+ lda #0
+ sta VSYNC
+
+ ; Do VBLANK
+ ldx #37
+.vblank:
+ sta WSYNC
+ dex
+ bne vblank
+ lda #0
+ sta VBLANK
+
+ ; Draw 192 visible scan lines
+ ldx #192
+.scanlines:
+ sty COLUBK
+ sta WSYNC
+ iny
+ dex
+ bne scanlines
+
+ ; Complete the frame
+ lda #2
+ sta VBLANK
+ ldx #30
+.complete:
+ sty COLUBK
+ iny
+ sta WSYNC
+ dex
+ bne complete
+
+ dec bgcolour
+ jmp next_frame
; Set start adresses and pad ROM
org $fffc