From 6eb9fcf412e91c3246d11bda7013c9606e9d7c48 Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 28 Jun 2024 00:00:51 +0100 Subject: Added oversan background changes to see if they worked --- vcsdrive.asm | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file 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 -- cgit v1.2.3