mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-08-11 13:25:00 +00:00
driven: work on horiz scroll
This commit is contained in:
@@ -2,24 +2,47 @@
|
|||||||
; scrolls large font
|
; scrolls large font
|
||||||
; right to left, at 168
|
; right to left, at 168
|
||||||
|
|
||||||
; this version scrolls in 7 pixel chunks
|
; scroll by half
|
||||||
; which is blocky but compact
|
|
||||||
|
; even frames, like normal
|
||||||
|
; odd frames, start with odd
|
||||||
|
|
||||||
|
|
||||||
do_scroll:
|
do_scroll:
|
||||||
lda #0
|
lda #0
|
||||||
sta SCROLL_START
|
sta SCROLL_START
|
||||||
|
sta SCROLL_ODD
|
||||||
|
|
||||||
|
|
||||||
do_scroll_again:
|
do_scroll_again:
|
||||||
ldy #0
|
ldy #0 ; Y is column on screen currently drawing
|
||||||
lda SCROLL_START
|
|
||||||
sta SCROLL_OFFSET ; FIXME: SCROLL_OFFSET
|
lda SCROLL_START ; reset string offset to current start
|
||||||
do_scroll_loop:
|
sta SCROLL_OFFSET
|
||||||
ldx SCROLL_OFFSET
|
|
||||||
lda scroll_text,X
|
lda SCROLL_ODD ; check if odd/even inside of char
|
||||||
|
beq do_scroll_loop ; if even, normal scroll
|
||||||
|
|
||||||
|
ldx SCROLL_OFFSET ; load offset into string
|
||||||
|
lda scroll_text,X ; get the character
|
||||||
sec
|
sec
|
||||||
sbc #'@'
|
sbc #'@' ; convert from ASCII
|
||||||
asl
|
asl
|
||||||
tax
|
tax
|
||||||
|
inx ; point to second half of char
|
||||||
|
|
||||||
|
jmp do_scroll_col_loop
|
||||||
|
|
||||||
|
|
||||||
|
do_scroll_loop:
|
||||||
|
ldx SCROLL_OFFSET ; load offset into string
|
||||||
|
lda scroll_text,X ; get the character
|
||||||
|
sec
|
||||||
|
sbc #'@' ; convert from ASCII
|
||||||
|
asl
|
||||||
|
tax
|
||||||
|
|
||||||
|
|
||||||
do_scroll_col_loop:
|
do_scroll_col_loop:
|
||||||
; row1
|
; row1
|
||||||
lda large_font_row0,X
|
lda large_font_row0,X
|
||||||
@@ -70,26 +93,34 @@ do_scroll_col_loop:
|
|||||||
lda large_font_row15,X
|
lda large_font_row15,X
|
||||||
sta $3F50,Y
|
sta $3F50,Y
|
||||||
|
|
||||||
|
skip_first_col:
|
||||||
inx
|
inx
|
||||||
iny
|
iny
|
||||||
tya
|
|
||||||
and #1
|
|
||||||
bne do_scroll_col_loop
|
|
||||||
|
|
||||||
inc SCROLL_OFFSET
|
txa ; see if done char
|
||||||
cpy #40
|
and #1
|
||||||
bne do_scroll_loop
|
bne do_scroll_col_loop ; if not, draw second half
|
||||||
|
|
||||||
|
inc SCROLL_OFFSET ; point to next char
|
||||||
|
|
||||||
|
cpy #40 ; see if Y edge of screen
|
||||||
|
bcc do_scroll_loop
|
||||||
|
|
||||||
; FIXME: also check keyboard
|
; FIXME: also check keyboard
|
||||||
|
|
||||||
lda #200
|
lda #200
|
||||||
jsr wait
|
jsr wait
|
||||||
|
|
||||||
|
lda #$1
|
||||||
|
eor SCROLL_ODD
|
||||||
|
sta SCROLL_ODD
|
||||||
|
bne jmp_scroll_again ; skip if odd
|
||||||
|
|
||||||
inc SCROLL_START
|
inc SCROLL_START
|
||||||
lda SCROLL_START
|
lda SCROLL_START
|
||||||
cmp #80
|
cmp #80
|
||||||
beq do_scroll_done
|
beq do_scroll_done
|
||||||
|
jmp_scroll_again:
|
||||||
jmp do_scroll_again
|
jmp do_scroll_again
|
||||||
|
|
||||||
do_scroll_done:
|
do_scroll_done:
|
||||||
|
@@ -181,6 +181,7 @@ GUITAR_FRAME = $F4
|
|||||||
|
|
||||||
SCROLL_OFFSET = $F0
|
SCROLL_OFFSET = $F0
|
||||||
SCROLL_START = $F1
|
SCROLL_START = $F1
|
||||||
|
SCROLL_ODD = $F2
|
||||||
|
|
||||||
; PLASMACUBE
|
; PLASMACUBE
|
||||||
;OUT1 = $F0
|
;OUT1 = $F0
|
||||||
|
Reference in New Issue
Block a user