mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-05 21:34:30 +00:00
driven: add wipe to graphics
This commit is contained in:
parent
b609d26440
commit
8dfec9a114
@ -102,25 +102,8 @@ qload.inc: generate_common QLOAD
|
||||
./generate_common -a 0x1200 -s hgr_draw_sprite qload.lst >> qload.inc
|
||||
./generate_common -a 0x1200 -s wait_50xms qload.lst >> qload.inc
|
||||
./generate_common -a 0x1200 -s random8 qload.lst >> qload.inc
|
||||
./generate_common -a 0x1200 -s wait_vblank qload.lst >> qload.inc
|
||||
|
||||
####
|
||||
|
||||
qload2.inc: generate_common QLOAD2
|
||||
./generate_common -a 0x1200 -s load_file qload2.lst > qload2.inc
|
||||
./generate_common -a 0x1200 -s detect_appleii_model qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s clear_all qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s clear_all_color qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s set_normal qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s set_inverse qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s wait qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s wait_a_bit qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s move_and_print qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s detect_language_card qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s mockingboard_detect qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s clear_bottom qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s clear_bottoms qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s clear_screens qload2.lst >> qload2.inc
|
||||
./generate_common -a 0x1200 -s hgr_make_tables qload2.lst >> qload2.inc
|
||||
|
||||
####
|
||||
|
||||
|
@ -15,7 +15,8 @@ graphics.o: graphics.s \
|
||||
graphics/atrus_light_iipix.hgr.zx02 \
|
||||
graphics/a2_atrus.hgr.zx02 \
|
||||
graphics/riven_233.aux.zx02 \
|
||||
graphics/riven_233.bin.zx02
|
||||
graphics/riven_233.bin.zx02 \
|
||||
wipes/fx.hgr.center.by.pixel.s
|
||||
ca65 -o graphics.o graphics.s -l graphics.lst
|
||||
|
||||
###
|
||||
|
@ -45,7 +45,6 @@ graphics:
|
||||
lda #$20
|
||||
jsr zx02_full_decomp
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
;=================================
|
||||
; spires
|
||||
@ -55,9 +54,14 @@ graphics:
|
||||
sta zx_src_l+1
|
||||
lda #>spires_graphics
|
||||
sta zx_src_h+1
|
||||
lda #$20
|
||||
lda #$40
|
||||
jsr zx02_full_decomp
|
||||
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
jsr do_wipe_center
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
|
||||
@ -225,3 +229,6 @@ atrus_message2:
|
||||
.byte 0,21,"written.",0
|
||||
.byte 0,22,"Perhaps that's because we ran out of",0
|
||||
.byte 0,23,"time before the submission deadline.",0
|
||||
|
||||
.include "wipes/fx.hgr.center.by.pixel.s"
|
||||
|
||||
|
181
demos/driven/part10_graphics/wipes/fx.hgr.center.by.pixel.s
Normal file
181
demos/driven/part10_graphics/wipes/fx.hgr.center.by.pixel.s
Normal file
@ -0,0 +1,181 @@
|
||||
;license:MIT
|
||||
;(c) 2019 by 4am
|
||||
;
|
||||
; vmw: re-formatted and moved to ca65 syntax and un-macroed a bit
|
||||
|
||||
; Wipe from page1 to what's on page2 toward the center
|
||||
|
||||
; Make sure these are in the "wipe range" in zp.inc
|
||||
|
||||
; also uses WIPEL / GBASL?
|
||||
|
||||
COPYMASK1 = $C2
|
||||
COPYMASK2 = $C3
|
||||
SKIPCOUNTER = $C7
|
||||
TOP = $C9
|
||||
BOTTOM = $CA
|
||||
COUNTER = $CB
|
||||
MASKINDEX = $CC
|
||||
ROW = $CD
|
||||
COL1 = $CE
|
||||
COL2 = $CF
|
||||
|
||||
|
||||
do_wipe_center:
|
||||
lda #44
|
||||
sta SKIPCOUNTER
|
||||
lda #$5F
|
||||
sta COUNTER
|
||||
lda #0
|
||||
sta TOP
|
||||
lda #$BF
|
||||
sta BOTTOM
|
||||
lda #0
|
||||
sta COL1
|
||||
lda #39
|
||||
sta COL2
|
||||
ColLoop:
|
||||
lda #6
|
||||
sta MASKINDEX
|
||||
jsr wait_vblank
|
||||
MaskLoop:
|
||||
ldx MASKINDEX
|
||||
lda copymasks1,X
|
||||
sta COPYMASK1
|
||||
lda copymasks2,X
|
||||
sta COPYMASK2
|
||||
|
||||
lda #23
|
||||
sta ROW
|
||||
RowLoop:
|
||||
lda ROW
|
||||
|
||||
jsr hgr_row_calc ; HGR_ROW_CALC
|
||||
ldx #8
|
||||
BlockLoop:
|
||||
ldy COL1
|
||||
lda (GBASL),Y
|
||||
eor (WIPEL),Y
|
||||
and COPYMASK1
|
||||
eor (GBASL),Y
|
||||
sta (GBASL),Y
|
||||
|
||||
ldy COL2
|
||||
lda (GBASL),Y
|
||||
eor (WIPEL),Y
|
||||
and COPYMASK2
|
||||
eor (GBASL),Y
|
||||
sta (GBASL),Y
|
||||
|
||||
clc
|
||||
jsr hgr_inc_within_block ; HGR_INC_WITHIN_BLOCK
|
||||
dex
|
||||
bne BlockLoop
|
||||
|
||||
dec ROW
|
||||
bpl RowLoop
|
||||
|
||||
dec SKIPCOUNTER
|
||||
|
||||
bmi skip1 ; LBPL SkipTopAndBottom
|
||||
jmp SkipTopAndBottom
|
||||
skip1:
|
||||
|
||||
lda TOP
|
||||
|
||||
jsr hgr_calc ; HGR_CALC
|
||||
|
||||
ldy #39
|
||||
cbpm:
|
||||
lda (WIPEL),Y
|
||||
sta (GBASL),Y
|
||||
dey
|
||||
bpl cbpm
|
||||
inc TOP
|
||||
|
||||
lda BOTTOM
|
||||
|
||||
jsr hgr_calc ; HGR_CALC
|
||||
ldy #39
|
||||
cbpm2:
|
||||
lda (WIPEL),Y
|
||||
sta (GBASL),Y
|
||||
dey
|
||||
bpl cbpm2
|
||||
dec BOTTOM
|
||||
|
||||
dec COUNTER
|
||||
bmi cExit
|
||||
SkipTopAndBottom:
|
||||
lda $c000
|
||||
bmi cExit
|
||||
dec MASKINDEX
|
||||
|
||||
; LBPL MaskLoop
|
||||
|
||||
bmi skip2
|
||||
jmp MaskLoop
|
||||
skip2:
|
||||
|
||||
inc COL1
|
||||
dec COL2
|
||||
; LBNE ColLoop
|
||||
|
||||
beq skip3
|
||||
jmp ColLoop
|
||||
skip3:
|
||||
|
||||
cExit:
|
||||
; jmp UnwaitForVBL
|
||||
rts
|
||||
|
||||
copymasks1:
|
||||
.byte %11111111
|
||||
.byte %10111111
|
||||
.byte %10011111
|
||||
.byte %10001111
|
||||
.byte %10000111
|
||||
.byte %10000011
|
||||
.byte %10000001
|
||||
copymasks2:
|
||||
.byte %11111111
|
||||
.byte %11111110
|
||||
.byte %11111100
|
||||
.byte %11111000
|
||||
.byte %11110000
|
||||
.byte %11100000
|
||||
.byte %11000000
|
||||
|
||||
hgr_row_calc:
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
|
||||
hgr_calc:
|
||||
; in: A = HGR row (0x00..0xBF)
|
||||
; out: A/X clobbered
|
||||
; Y preserved
|
||||
; (GBASL) points to first byte of given HGR row on hi-res page 1
|
||||
; (WIPEL) points to same byte on hi-res page 2
|
||||
|
||||
tax
|
||||
lda hposn_low,X
|
||||
sta GBASL
|
||||
sta WIPEL
|
||||
lda hposn_high,X
|
||||
sta GBASH
|
||||
eor #$60
|
||||
sta WIPEH
|
||||
|
||||
rts
|
||||
|
||||
|
||||
; /!\ C must be clear before using this macro
|
||||
|
||||
hgr_inc_within_block:
|
||||
lda GBASH
|
||||
adc #$04
|
||||
sta GBASH
|
||||
eor #$60
|
||||
sta WIPEH
|
||||
rts
|
@ -381,7 +381,7 @@ done_draw_objects:
|
||||
.include "../irq_wait.s"
|
||||
.include "../hgr_page_flip.s"
|
||||
|
||||
.include "../vblank.s"
|
||||
; .include "../vblank.s"
|
||||
|
||||
; .include "../hgr_sprite.s"
|
||||
|
||||
|
@ -216,6 +216,7 @@ PT3_ENABLE_APPLE_IIC = 1
|
||||
.include "hgr_table.s"
|
||||
.include "hgr_sprite.s"
|
||||
.include "random8.s"
|
||||
.include "vblank.s"
|
||||
|
||||
qload_end:
|
||||
|
||||
|
@ -33,6 +33,9 @@ MASK = $2E
|
||||
COLOR = $30
|
||||
;INVFLG = $32
|
||||
|
||||
WIPEL = $3C ; used by input for wipes?
|
||||
WIPEH = $3D
|
||||
|
||||
WHICH_TRACK = $54
|
||||
|
||||
;==========================
|
||||
@ -93,13 +96,18 @@ DRAW_PAGE = $8E
|
||||
TOTAL_RAM = $8F
|
||||
|
||||
;=============================
|
||||
; $90-$CF currently free
|
||||
; $90-$BF currently free
|
||||
;=============================
|
||||
|
||||
; for plasma?
|
||||
;Table1 = $A0 ; 40 bytes ($28) A0-C7
|
||||
;Table2 = $C8 ; 40 bytes ($28) C8-EF
|
||||
|
||||
;===========================
|
||||
; $C0-$CF = wipe
|
||||
;===========================
|
||||
; use $C0-$CF for wipes
|
||||
|
||||
;=============================
|
||||
; $D0-$D9 = hgr move
|
||||
;=============================
|
||||
@ -156,20 +164,6 @@ NUMBER_HIGH = $F2
|
||||
NUMBER_LOW = $F3
|
||||
DRAW_NUMBER = $FA
|
||||
|
||||
;OUT1 = $F0
|
||||
;OUT1H = $F1
|
||||
;OUT2 = $F2
|
||||
;OUT2H = $F3
|
||||
;COMPT1 = $F4
|
||||
;COMPT2 = $F5
|
||||
;PARAM1 = $F6
|
||||
;PARAM2 = $F7
|
||||
;PARAM3 = $F8
|
||||
;PARAM4 = $F9
|
||||
;GRLINE = $FA
|
||||
;GRLINEH = $FB
|
||||
|
||||
|
||||
|
||||
; Credits
|
||||
CURSOR_X = $EE
|
||||
|
Loading…
x
Reference in New Issue
Block a user