mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-11 20:29:31 +00:00
xmas_2023: hook up scroll text
This commit is contained in:
parent
b060b0c5d9
commit
b59e4f4364
|
@ -125,9 +125,10 @@ XMAS: xmas.o
|
||||||
|
|
||||||
xmas.o: xmas.s plasma_tree.s fireplace.s \
|
xmas.o: xmas.s plasma_tree.s fireplace.s \
|
||||||
zp.inc hardware.inc qload.inc \
|
zp.inc hardware.inc qload.inc \
|
||||||
vapor_lock.s \
|
vapor_lock.s gr_scroll.s \
|
||||||
graphics/merry.hgr.zx02 \
|
graphics/merry.hgr.zx02 \
|
||||||
graphics/tree01.gr.zx02
|
graphics/tree01.gr.zx02 \
|
||||||
|
graphics/greets.raw.zx02
|
||||||
ca65 -o xmas.o xmas.s -l xmas.lst
|
ca65 -o xmas.o xmas.s -l xmas.lst
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,6 @@ fireplace:
|
||||||
lda #160
|
lda #160
|
||||||
sta HGR_COPY_Y2
|
sta HGR_COPY_Y2
|
||||||
|
|
||||||
lda #$DD
|
|
||||||
sta FIRE_COLOR
|
|
||||||
|
|
||||||
bit SET_GR
|
bit SET_GR
|
||||||
bit LORES
|
bit LORES
|
||||||
bit FULLGR
|
bit FULLGR
|
||||||
|
@ -80,6 +77,11 @@ early_out:
|
||||||
|
|
||||||
bit PAGE1
|
bit PAGE1
|
||||||
|
|
||||||
|
lda #$DD
|
||||||
|
sta FIRE_COLOR
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; attempt vapor lock
|
; attempt vapor lock
|
||||||
|
|
||||||
jmp pad_skip
|
jmp pad_skip
|
||||||
|
@ -255,7 +257,7 @@ do_flicker:
|
||||||
; 8
|
; 8
|
||||||
|
|
||||||
lda FIRE_COLOR ; 3
|
lda FIRE_COLOR ; 3
|
||||||
eor #$00 ; 2
|
eor #$0D ; 2
|
||||||
sta FIRE_COLOR ; 3
|
sta FIRE_COLOR ; 3
|
||||||
sta $9A8+34 ; 4
|
sta $9A8+34 ; 4
|
||||||
sta $9A8+35 ; 4
|
sta $9A8+35 ; 4
|
||||||
|
@ -344,6 +346,12 @@ done_cycle_count:
|
||||||
no_music:
|
no_music:
|
||||||
|
|
||||||
|
|
||||||
|
;=========================
|
||||||
|
; main fireplace loop
|
||||||
|
|
||||||
|
lda #$DD
|
||||||
|
sta FIRE_COLOR
|
||||||
|
|
||||||
new_loop:
|
new_loop:
|
||||||
; bring in wait_until_interrupt
|
; bring in wait_until_interrupt
|
||||||
|
|
||||||
|
@ -371,8 +379,39 @@ frame_noflo2:
|
||||||
totally_done_fireplace:
|
totally_done_fireplace:
|
||||||
bit KEYRESET
|
bit KEYRESET
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;=================================
|
||||||
|
; scroller
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta OFFSET
|
||||||
|
|
||||||
|
lda #<greets_raw_zx02
|
||||||
|
sta zx_src_l+1
|
||||||
|
lda #>greets_raw_zx02
|
||||||
|
sta zx_src_h+1
|
||||||
|
lda #$20
|
||||||
|
jsr zx02_full_decomp
|
||||||
|
|
||||||
|
bit FULLGR
|
||||||
|
do_scroll:
|
||||||
|
|
||||||
|
jsr scroll_loop
|
||||||
|
|
||||||
|
lda #255
|
||||||
|
jsr wait
|
||||||
|
|
||||||
|
jmp do_scroll
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
.include "gr_scroll.s"
|
||||||
|
|
||||||
|
greets_raw_zx02:
|
||||||
|
.incbin "graphics/greets.raw.zx02"
|
||||||
|
|
||||||
fireplace_data:
|
fireplace_data:
|
||||||
|
|
||||||
.byte SET_COLOR | YELLOW
|
.byte SET_COLOR | YELLOW
|
||||||
|
|
67
demos/xmas_2023/gr_scroll.s
Normal file
67
demos/xmas_2023/gr_scroll.s
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
scroll_row1 = $2000
|
||||||
|
scroll_row2 = $2100
|
||||||
|
scroll_row3 = $2200
|
||||||
|
scroll_row4 = $2300
|
||||||
|
|
||||||
|
;SCROLL_LENGTH = $63
|
||||||
|
;OFFSET = $62
|
||||||
|
|
||||||
|
|
||||||
|
; 5 + (45*40) +4 + 13 + 7 + 6 = 1835
|
||||||
|
|
||||||
|
scroll_loop:
|
||||||
|
|
||||||
|
ldx #0 ; 2
|
||||||
|
ldy OFFSET ; 3
|
||||||
|
|
||||||
|
draw_loop:
|
||||||
|
|
||||||
|
lda scroll_row1,Y ; 4
|
||||||
|
sta $A50,X ; 5
|
||||||
|
lda scroll_row2,Y ; 4
|
||||||
|
sta $Ad0,X ; 5
|
||||||
|
lda scroll_row3,Y ; 4
|
||||||
|
sta $B50,X ; 5
|
||||||
|
lda scroll_row4,Y ; 4
|
||||||
|
sta $Bd0,X ; 5
|
||||||
|
|
||||||
|
iny ; 2
|
||||||
|
inx ; 2
|
||||||
|
cpx #40 ; 2
|
||||||
|
bne draw_loop ; 2nt/3
|
||||||
|
;===============
|
||||||
|
; 45
|
||||||
|
|
||||||
|
|
||||||
|
; -1
|
||||||
|
inc OFFSET ; 5
|
||||||
|
;============
|
||||||
|
; 4
|
||||||
|
;==================
|
||||||
|
; wrap scrolltext
|
||||||
|
;==================
|
||||||
|
clc ; 2
|
||||||
|
lda OFFSET ; 3
|
||||||
|
adc #40 ; 2
|
||||||
|
cmp SCROLL_LENGTH ; 3
|
||||||
|
|
||||||
|
bne no_wrap ; 3
|
||||||
|
;============
|
||||||
|
; 13
|
||||||
|
|
||||||
|
; -1
|
||||||
|
lda #0 ; 2
|
||||||
|
sta OFFSET ; 3
|
||||||
|
jmp done_wrap ; 3
|
||||||
|
no_wrap:
|
||||||
|
lda $0 ; 3
|
||||||
|
nop ; 2
|
||||||
|
nop ; 2
|
||||||
|
;===========
|
||||||
|
; 7
|
||||||
|
|
||||||
|
done_wrap:
|
||||||
|
rts ; 6
|
||||||
|
|
||||||
|
|
||||||
|
;.assert >scroll_loop = >done_wrap, error, "gr_scroll crosses page"
|
|
@ -8,7 +8,12 @@ all: tree01.gr.zx02 tree03.gr.zx02 \
|
||||||
tree05.gr.zx02 tree07.gr.zx02 \
|
tree05.gr.zx02 tree07.gr.zx02 \
|
||||||
tree09.gr.zx02 tree11.gr.zx02 \
|
tree09.gr.zx02 tree11.gr.zx02 \
|
||||||
tree13.gr.zx02 tree15.gr.zx02 \
|
tree13.gr.zx02 tree15.gr.zx02 \
|
||||||
merry.hgr.zx02
|
merry.hgr.zx02 greets.raw.zx02
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
greets.raw.zx02: greets.raw
|
||||||
|
$(ZX02) greets.raw greets.raw.zx02
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
|
BIN
demos/xmas_2023/graphics/greets.raw
Normal file
BIN
demos/xmas_2023/graphics/greets.raw
Normal file
Binary file not shown.
|
@ -248,6 +248,11 @@ HGR_COPY_Y1 = $F1
|
||||||
HGR_COPY_Y2 = $F2
|
HGR_COPY_Y2 = $F2
|
||||||
FIRE_COLOR = $F3
|
FIRE_COLOR = $F3
|
||||||
|
|
||||||
|
SCROLL_LENGTH = $F4
|
||||||
|
OFFSET = $F5
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;==============================================
|
;==============================================
|
||||||
; $FC-$FF we use for in/out pointers
|
; $FC-$FF we use for in/out pointers
|
||||||
;==============================================
|
;==============================================
|
||||||
|
|
|
@ -104,28 +104,27 @@ static unsigned char font[256][9]={
|
||||||
0x80, // **
|
0x80, // **
|
||||||
0xe0, // ******
|
0xe0, // ******
|
||||||
},
|
},
|
||||||
|
{4,
|
||||||
|
0x00,
|
||||||
|
0xC0, // ****
|
||||||
|
0x20, // **
|
||||||
|
0x20, // **
|
||||||
|
0x40, // **
|
||||||
|
0x20, // **
|
||||||
|
0x20, // **
|
||||||
|
0xC0, // ****
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
**** ** ** ****** **** ******
|
** ** ****** **** ******
|
||||||
** ** ** ** ** **
|
** ** ** ** **
|
||||||
** ** ** ** ** **
|
** ** ** ** **
|
||||||
** ****** **** **** **
|
****** **** **** **
|
||||||
** ** ** ** ** **
|
** ** ** ** **
|
||||||
** ** ** ** ** **
|
** ** ** ** **
|
||||||
**** ** **** ** **
|
** **** ** **
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
{4,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
0x00,
|
|
||||||
},
|
|
||||||
{4,0,0,0,0,0,0,0,0},
|
{4,0,0,0,0,0,0,0,0},
|
||||||
{4,0,0,0,0,0,0,0,0},
|
{4,0,0,0,0,0,0,0,0},
|
||||||
{4,0,0,0,0,0,0,0,0},
|
{4,0,0,0,0,0,0,0,0},
|
||||||
|
@ -541,7 +540,8 @@ int main(int argc, char **argv) {
|
||||||
// char string[]=" \001DEATER \002WAS \003HERE!!! ";
|
// char string[]=" \001DEATER \002WAS \003HERE!!! ";
|
||||||
// char string[]=" \001BY DEATER... \002A \010 PRODUCTION ";
|
// char string[]=" \001BY DEATER... \002A \010 PRODUCTION ";
|
||||||
// char string[]=" \003\011APPLE ][ FOREVER\011 ";
|
// char string[]=" \003\011APPLE ][ FOREVER\011 ";
|
||||||
char string[]=" \012 \001MERRY XMAS 2018 \003FROM DEATER \013 ";
|
// char string[]=" \012 \001MERRY XMAS 2018 \003FROM DEATER \013 ";
|
||||||
|
char string[]=" \012 \001MERRY XMAS 2023 \003FROM DESIRE \013 ";
|
||||||
int length=0,width=0,x,y,i,j;
|
int length=0,width=0,x,y,i,j;
|
||||||
int color,color1,color2;
|
int color,color1,color2;
|
||||||
int which_color=0;
|
int which_color=0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user