mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-05-31 21:41:32 +00:00
second: add in circles effect
This commit is contained in:
parent
54a764b537
commit
d1956248a5
|
@ -6,13 +6,13 @@ PNG_TO_40x48D = ../../utils/gr-utils/png_to_40x48d
|
||||||
PNG2RLE = ../../utils/gr-utils/png2rle
|
PNG2RLE = ../../utils/gr-utils/png2rle
|
||||||
B2D = ../../utils/bmp2dhr/b2d
|
B2D = ../../utils/bmp2dhr/b2d
|
||||||
TOKENIZE = ../../utils/asoft_basic-utils/tokenize_asoft
|
TOKENIZE = ../../utils/asoft_basic-utils/tokenize_asoft
|
||||||
|
EMPTY = ../../empty_disk/
|
||||||
|
|
||||||
all: memories.dsk
|
all: memories.dsk
|
||||||
|
|
||||||
memories.dsk: HELLO CIRCLES.BAS CIRCLES CHECKERS CHECKERS_SMALL PLANE \
|
memories.dsk: HELLO CIRCLES.BAS CIRCLES CHECKERS CHECKERS_SMALL PLANE \
|
||||||
SIER TUNNEL TNM CIRCLES_NORMAL
|
SIER TUNNEL TNM CIRCLES_NORMAL
|
||||||
cp empty.dsk memories.dsk
|
cp $(EMPTY)empty.dsk memories.dsk
|
||||||
$(DOS33) -y memories.dsk SAVE A HELLO
|
$(DOS33) -y memories.dsk SAVE A HELLO
|
||||||
$(DOS33) -y memories.dsk SAVE A CIRCLES.BAS
|
$(DOS33) -y memories.dsk SAVE A CIRCLES.BAS
|
||||||
$(DOS33) -y memories.dsk BSAVE -a 0x070 CIRCLES
|
$(DOS33) -y memories.dsk BSAVE -a 0x070 CIRCLES
|
||||||
|
|
Binary file not shown.
|
@ -1,3 +1,9 @@
|
||||||
|
|
||||||
|
; monitor, horizontal=Y vert=a
|
||||||
|
plot_compat:
|
||||||
|
sty XPOS
|
||||||
|
sta YPOS
|
||||||
|
|
||||||
;================================
|
;================================
|
||||||
; plot routine
|
; plot routine
|
||||||
;================================
|
;================================
|
||||||
|
|
|
@ -72,7 +72,8 @@ pil_smc2:
|
||||||
cpx #$ff
|
cpx #$ff
|
||||||
bne pan_outer_loop
|
bne pan_outer_loop
|
||||||
|
|
||||||
; jsr wait_until_keypress
|
lda KEYPRESS
|
||||||
|
bmi done_pan
|
||||||
|
|
||||||
inc COUNT
|
inc COUNT
|
||||||
lda COUNT
|
lda COUNT
|
||||||
|
@ -80,6 +81,9 @@ pil_smc2:
|
||||||
|
|
||||||
bne pan_outer_outer_loop
|
bne pan_outer_outer_loop
|
||||||
|
|
||||||
|
done_pan:
|
||||||
|
bit KEYRESET
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.include "scroll_tables.s"
|
.include "scroll_tables.s"
|
||||||
|
|
|
@ -18,6 +18,7 @@ chess.o: chess.s \
|
||||||
../zx02_optim.s \
|
../zx02_optim.s \
|
||||||
../hgr_copy_fast.s \
|
../hgr_copy_fast.s \
|
||||||
interference.s \
|
interference.s \
|
||||||
|
circles.s \
|
||||||
../zp.inc ../hardware.inc ../qload.inc \
|
../zp.inc ../hardware.inc ../qload.inc \
|
||||||
graphics/chess_object2.hgr.zx02
|
graphics/chess_object2.hgr.zx02
|
||||||
ca65 -o chess.o chess.s -l chess.lst
|
ca65 -o chess.o chess.s -l chess.lst
|
||||||
|
|
|
@ -263,6 +263,18 @@ tunnel_loop:
|
||||||
main_tunnel_done:
|
main_tunnel_done:
|
||||||
bit KEYRESET
|
bit KEYRESET
|
||||||
|
|
||||||
|
;==================
|
||||||
|
;==================
|
||||||
|
;==================
|
||||||
|
; DO circles HERE
|
||||||
|
;==================
|
||||||
|
;==================
|
||||||
|
;==================
|
||||||
|
|
||||||
|
jsr zooming_circles
|
||||||
|
|
||||||
|
; todo, fade to white
|
||||||
|
|
||||||
;==================
|
;==================
|
||||||
;==================
|
;==================
|
||||||
;==================
|
;==================
|
||||||
|
@ -271,6 +283,7 @@ main_tunnel_done:
|
||||||
;==================
|
;==================
|
||||||
;==================
|
;==================
|
||||||
|
|
||||||
|
|
||||||
jsr interference
|
jsr interference
|
||||||
|
|
||||||
|
|
||||||
|
@ -289,6 +302,7 @@ main_interference_done:
|
||||||
.include "../hgr_sprite_big.s"
|
.include "../hgr_sprite_big.s"
|
||||||
|
|
||||||
.include "interference.s"
|
.include "interference.s"
|
||||||
|
.include "circles.s"
|
||||||
.include "../hgr_page_flip.s"
|
.include "../hgr_page_flip.s"
|
||||||
|
|
||||||
; wait A * 1/50s
|
; wait A * 1/50s
|
||||||
|
|
106
demos/second/part04_chess_shapes/circles.s
Normal file
106
demos/second/part04_chess_shapes/circles.s
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
; Zooming Circles, based on the code in Hellmood's Memories
|
||||||
|
|
||||||
|
; by deater (Vince Weaver) <vince@deater.net>
|
||||||
|
|
||||||
|
; 103 bytes
|
||||||
|
|
||||||
|
;.globalzp squares_table_y
|
||||||
|
;.globalzp color_lookup
|
||||||
|
;.globalzp smc1,smc2,smc3,smc4
|
||||||
|
|
||||||
|
|
||||||
|
zooming_circles:
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; init screen
|
||||||
|
bit LORES
|
||||||
|
bit FULLGR
|
||||||
|
bit PAGE1
|
||||||
|
lda #0
|
||||||
|
sta DRAW_PAGE
|
||||||
|
; 3
|
||||||
|
;====
|
||||||
|
; 6
|
||||||
|
circle_forever:
|
||||||
|
|
||||||
|
inc FRAME ; 2
|
||||||
|
|
||||||
|
ldx #24 ; 2
|
||||||
|
stx Y2 ; 2
|
||||||
|
dex ; 1
|
||||||
|
|
||||||
|
yloop:
|
||||||
|
ldy #20 ; 2
|
||||||
|
sty X2 ; 2
|
||||||
|
dey ; 1
|
||||||
|
|
||||||
|
xloop:
|
||||||
|
|
||||||
|
clc ; 1
|
||||||
|
lda squares_table_y+4,y ; 3
|
||||||
|
asl ; 1
|
||||||
|
asl ; 1
|
||||||
|
adc squares_table_y,x ; 2
|
||||||
|
|
||||||
|
lsr ; 1
|
||||||
|
adc FRAME ; 2
|
||||||
|
and #$1f ; 2
|
||||||
|
|
||||||
|
; and #$18
|
||||||
|
; 00, 10 = black
|
||||||
|
; 01 = grey 55 or aa
|
||||||
|
; 11 = light blue 77
|
||||||
|
|
||||||
|
lsr ; 1
|
||||||
|
lsr ; 1
|
||||||
|
lsr ; 1
|
||||||
|
sty TEMPY ; 2
|
||||||
|
tay ; 1
|
||||||
|
lda color_lookup,Y ; 3
|
||||||
|
sta COLOR ; 2
|
||||||
|
|
||||||
|
ldy X2 ; Y==X2 ; 2
|
||||||
|
txa ; A==Y1 ; 1
|
||||||
|
jsr plot_compat ; (X2,Y1) ; 3
|
||||||
|
lda Y2 ; A==Y2 ; 2
|
||||||
|
jsr plot_compat ; (X2,Y2) ; 3
|
||||||
|
|
||||||
|
ldy TEMPY ; Y==X1 ; 2
|
||||||
|
txa ; A==Y1 ; 1
|
||||||
|
jsr plot_compat ; (X1,Y1) ; 3
|
||||||
|
lda Y2 ; A==Y2 ; 2
|
||||||
|
jsr plot_compat ; (X1,Y2) ; 3
|
||||||
|
|
||||||
|
inc X2 ; 2
|
||||||
|
|
||||||
|
dey ; 1
|
||||||
|
bpl xloop ; 2
|
||||||
|
|
||||||
|
inc Y2 ; 2
|
||||||
|
|
||||||
|
dex ; 1
|
||||||
|
bpl yloop ; 2
|
||||||
|
|
||||||
|
lda KEYPRESS
|
||||||
|
bmi done_circles
|
||||||
|
|
||||||
|
bpl circle_forever ; bra
|
||||||
|
|
||||||
|
done_circles:
|
||||||
|
bit KEYRESET
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; 24 bytes
|
||||||
|
squares_table_y:
|
||||||
|
.byte $24,$21,$1e,$1b,$19,$16,$14,$12
|
||||||
|
.byte $10,$0e,$0c,$0a,$09,$07,$06,$05
|
||||||
|
.byte $04,$03,$02,$01,$01,$00,$00
|
||||||
|
|
||||||
|
color_lookup:
|
||||||
|
.byte $00 ; also last byte of squares table
|
||||||
|
.byte $55,$00,$77
|
||||||
|
|
||||||
|
.include "../gr_plot.s"
|
||||||
|
.include "../gr_offsets.s"
|
|
@ -39,13 +39,13 @@ plot_setup:
|
||||||
lsr ; shift bottom bit into carry ; 2
|
lsr ; shift bottom bit into carry ; 2
|
||||||
tay
|
tay
|
||||||
|
|
||||||
bcc plot_even ; 2nt/3
|
bcc do_plot_even ; 2nt/3
|
||||||
plot_odd:
|
do_plot_odd:
|
||||||
lda #$f0 ; 2
|
lda #$f0 ; 2
|
||||||
bcs plot_c_done ; 2nt/3
|
bcs do_plot_c_done ; 2nt/3
|
||||||
plot_even:
|
do_plot_even:
|
||||||
lda #$0f ; 2
|
lda #$0f ; 2
|
||||||
plot_c_done:
|
do_plot_c_done:
|
||||||
sta mask_smc2+1 ;
|
sta mask_smc2+1 ;
|
||||||
eor #$FF ; 2
|
eor #$FF ; 2
|
||||||
sta mask_invert_smc1+1 ;
|
sta mask_invert_smc1+1 ;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user