aboutsummaryrefslogtreecommitdiff
path: root/newtitle.s
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-03 22:31:31 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-03 22:31:31 -0500
commit78955cb3856cfc0115c7e2f2813132cc46c4fd23 (patch)
tree051c4061a451cbd66c42b9cca9315417fcf632c6 /newtitle.s
parent3e443ad06e61cf6f67c335f657b4010efc7993fe (diff)
downloadtaipan-78955cb3856cfc0115c7e2f2813132cc46c4fd23.tar.gz
choose pallette on title screen (atari logo key)
Diffstat (limited to 'newtitle.s')
-rw-r--r--newtitle.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/newtitle.s b/newtitle.s
index f52ac57..9eef9ed 100644
--- a/newtitle.s
+++ b/newtitle.s
@@ -19,6 +19,11 @@ screendata = $9000
version:
.incbin "ver.dat"
+colorchoices:
+ .byte $c0,$10,$00
+
+colorcount = (*-colorchoices)-1
+
; executable code here
start:
; setup color registers
@@ -52,12 +57,26 @@ start:
lda #$ff
sta CH
+ ldx #0 ; X = index into color choices
+
; wait for user to press a key
wait4key:
+ lda colorchoices,x
+ sta COLOR2
lda CH
cmp #$ff
beq wait4key
+ cmp #39 ; atari logo key
+ bne keyok
+ dex
+ bpl x_ok
+ ldx #colorcount
+x_ok:
+ lda #$ff
+ sta CH
+ bne wait4key
+keyok:
; eat the keypress
lda #$ff
sta CH