demo: black and white

This commit is contained in:
Vince Weaver 2022-11-12 23:53:22 -05:00
parent c5261a7f33
commit 485822d8d8
6 changed files with 61 additions and 51 deletions

View File

@ -24,7 +24,7 @@ draw_apple:
; this will be 0 2nd time through loop, arbitrary otherwise
pla ; ROT
jmp DRAW0 ; XDRAW 1 AT X,Y
jmp XDRAW0 ; XDRAW 1 AT X,Y
; Both A and X are 0 at exit
; Z flag set on exit
; Y varies

View File

@ -1,12 +1,47 @@
;===============================
; draw desire letters, in order
;===============================
; X has color
draw_logo:
jsr HCOLOR1
ldx #5 ; draw 5 letters
letter_time:
lda letters_l,X ; get address
sta INL
lda #>letter_d ; assume on same page
sta INH
ldy letters_x,X ; get X offset
txa ; save X
pha
jsr draw_letter
pla
tax
dex
bpl letter_time
rts
;========================
; draw letter
;========================
; so inefficient
; letter to draw in INL:INH
; A is X offset
; Y is X offset
draw_letter:
sty LETTER_X
sty LETTER_X ; store X-coord
ldy #$FF ; iterator
letter_loop:
@ -100,3 +135,5 @@ get_y:
rts

View File

@ -10,8 +10,11 @@
apple2_desire:
; clear both pages of graphics
jsr HGR
jsr HGR2
lda #$ff
sta HGR_BITS
lda #$20
jsr BKGND+2
; A and Y are 0 now?

View File

@ -25,17 +25,18 @@ PTRIG = $C070
;; BASIC ROUTINES
NORMAL = $F273
HGR = $F3E2
HGR2 = $F3D8
HCLR = $F3F2
HPOSN = $F411 ; (Y,X),(A) (values stores in HGRX,XH,Y)
NORMAL = $F273
HGR = $F3E2
HGR2 = $F3D8
HCLR = $F3F2
BKGND = $F3F6
HPOSN = $F411 ; (Y,X),(A) (values stores in HGRX,XH,Y)
HPLOT0 = $F457 ; plot at (Y,X), (A)
HCOLOR1 = $F6F0 ; set HGR_COLOR to value in X
HGLIN = $F53A ; line to (X,A),(Y)
DRAW0 = $F601
XDRAW0 = $F65D
XDRAW1 = $F661
HGLIN = $F53A ; line to (X,A),(Y)
DRAW0 = $F601
XDRAW0 = $F65D
XDRAW1 = $F661
;; MONITOR ROUTINES

View File

@ -11,53 +11,20 @@
show_logo:
lda #77
lda #80
sta LETTER_Y
ldx #7
jsr HCOLOR1 ; set color
ldx #$7 ; color white
jsr draw_logo
lda #1
jsr draw_apple
lda #72
sta LETTER_Y
lda #$20
sta HGR_PAGE
lda #72
sta LETTER_Y
ldx #$0 ; color black
jsr draw_logo
lda #63
jsr draw_apple
jmp logo_done
draw_logo:
ldx #5
letter_time:
lda letters_l,X
sta INL
lda #>letter_d
sta INH
ldy letters_x,X
txa
pha
jsr draw_letter
pla
tax
dex
bpl letter_time
rts
logo_done:

View File

@ -2,6 +2,8 @@
; pre-defined applesoft vars
HGR_BITS = $1C
CH = $24
CV = $25
GBASL = $26