diff options
Diffstat (limited to 'newtitle.s')
-rw-r--r-- | newtitle.s | 72 |
1 files changed, 66 insertions, 6 deletions
@@ -19,24 +19,50 @@ screendata = $9000 version: .incbin "ver.dat" +help: + .incbin "help.dat" + +helphitbl: + .byte >version + .byte >help + .byte >(help+32) + .byte >(help+64) + .byte 0 + +helplotbl: + .byte <version + .byte <help + .byte <(help+32) + .byte <(help+64) + .byte 0 + +helpshowing = FR1 + colorchoices: .byte $c0,$10,$00 colorcount = (*-colorchoices)-1 +textchoices: + .byte $0c,$0e,$0a + +textcount = (*-textchoices)-1 + ; executable code here start: ; setup color registers - lda #$c0 ; dark green + lda colorchoices sta COLOR2 ; text bg - lda #$0c ; white - sta COLOR1 + lda textchoices + sta COLOR1 ; text fg ; turn off screen, in case vblank happens while we work lda #0 + sta FR0 sta SDMCTL ; build our display list + ; TODO, for now it's hardcoded (see 'dlist' below) ; wait for the next frame, to avoid graphics glitching jsr wait1jiffy @@ -59,20 +85,53 @@ start: lda #$ff sta CH - ldx #0 ; X = index into color choices + ldx #0 ; X = index into bg color choices + ldy #0 ; Y = index into text color choices ; wait for user to press a key wait4key: lda colorchoices,x sta COLOR2 + lda textchoices,y + sta COLOR1 lda CH cmp #$ff beq wait4key - cmp #39 ; atari logo key - bne keyok + cmp #28 ; Escape key + bne not_esc + + ; show next line of help + stx FR1+1 + ldx helpshowing + inx +loadhelp: + lda helphitbl,x + bne helpok + ldx #0 + beq loadhelp +helpok: + sta help_lms+1 + lda helplotbl,x + sta help_lms + stx helpshowing + ldx FR1+1 + clc + bcc x_ok + +not_esc: + cmp #21 ; B key + bne not_b dex bpl x_ok ldx #colorcount + +not_b: + cmp #45 ; T key + bne keyok + dey + bpl x_ok + ldy #textcount + x_ok: lda #$ff sta CH @@ -111,6 +170,7 @@ dlist: .endrepeat ; .byte $30 ; blank 4 lines to match GR.8 (does it even matter?) .byte $02 | $40 ; LMS, 1 line of GR.0 for the version +help_lms: .word version .byte $41 ; JVB, jump & wait for vblank .word dlist |