From c68524fb30716a9ece935f85df5e02e14403b161 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sat, 25 May 2024 21:37:36 +0100 Subject: Initial test skeleton with flashing colours to try on real VCS --- Makefile | 2 +- vcs.asm | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vcsdrive.asm | 33 ++++++++++++++++++++++ 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 vcs.asm diff --git a/Makefile b/Makefile index 73f5262..42436ec 100644 --- a/Makefile +++ b/Makefile @@ -20,5 +20,5 @@ # Makefile # -vcsdrive.bin: vcsdrive.asm +vcsdrive.bin: vcsdrive.asm vcs.asm casm vcsdrive.asm diff --git a/vcs.asm b/vcs.asm new file mode 100644 index 0000000..e716442 --- /dev/null +++ b/vcs.asm @@ -0,0 +1,90 @@ +; vcsdrive - Simple Atari VCS driving game +; +; Copyright (C) 2024 Ian Cowburn (ianc@noddybox.demon.co.uk) +; +; This program is free software: you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation, either version 3 of the License, or +; (at your option) any later version. +; +; This program is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY; without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with this program. If not, see . +; +; ------------------------------------------------------------------------- +; +; Atari VCS definitions +; +VSYNC equ $00 +VBLANK equ $01 +WSYNC equ $02 +RSYNC equ $03 +NUSIZ0 equ $04 +NUSIZ1 equ $05 +COLUP0 equ $06 +COLUP1 equ $07 +COLUPF equ $08 +COLUBK equ $09 +CTRLPF equ $0A +REFP0 equ $0B +REFP1 equ $0C +PF0 equ $0D +PF1 equ $0E +PF2 equ $0F +RESP0 equ $10 +RESP1 equ $11 +RESM0 equ $12 +RESM1 equ $13 +RESBL equ $14 +AUDC0 equ $15 +AUDC1 equ $16 +AUDF0 equ $17 +AUDF1 equ $18 +AUDV0 equ $19 +AUDV1 equ $1A +GRP0 equ $1B +GRP1 equ $1C +ENAM0 equ $1D +ENAM1 equ $1E +ENABL equ $1F +HMP0 equ $20 +HMP1 equ $21 +HMM0 equ $22 +HMM1 equ $23 +HMBL equ $24 +VDELP0 equ $25 +VDELP1 equ $26 +VDELBL equ $27 +RESMP0 equ $28 +RESMP1 equ $29 +HMOVE equ $2A +HMCLR equ $2B +CXCLR equ $2C +CXM0P equ $30 +CXM1P equ $31 +CXP0FB equ $32 +CXP1FB equ $33 +CXM0FB equ $34 +CXM1FB equ $35 +CXBLPF equ $36 +CXPPMM equ $37 +INPT0 equ $38 +INPT1 equ $39 +INPT2 equ $3A +INPT3 equ $3B +INPT4 equ $3C +INPT5 equ $3D +SWCHA equ $0280 +SWACNT equ $0281 +SWCHB equ $0282 +SWBCNT equ $0283 +INTIM equ $0284 +INSTAT equ $0285 +TIM1T equ $0294 +TIM8T equ $0295 +TIM64T equ $0296 +T1024T equ $0297 diff --git a/vcsdrive.asm b/vcsdrive.asm index dd84ef1..c271652 100644 --- a/vcsdrive.asm +++ b/vcsdrive.asm @@ -19,3 +19,36 @@ ; ; Code ; + processor 6502 + option output-file,vcsdrive.bin + + include vcs.asm + + org $f000 + + ; Set up stack pointer +start: + sei + cld + ldx #$ff + txs + + ; Initialise page zero + lda #0 +.zero: + sta $0,x + dex + bne zero + + ; Set background + lda #$3e + clc +.loop: + sta COLUBK + adc #1 + jmp loop + + ; Set start adresses and pad ROM + org $fffc + word start + word start -- cgit v1.2.3