some wipes

This commit is contained in:
4am
2019-10-18 11:50:47 -04:00
parent 2ff277b5a0
commit e23a9aa7b9
2 changed files with 97 additions and 1 deletions

View File

@@ -1 +1 @@
RIPPLE
RIPPLE

96
src/fx/fx.hgr.diagonal3.a Normal file
View File

@@ -0,0 +1,96 @@
;license:MIT
;(c) 2019 by 4am
;
!cpu 6502
!to "build/FX/DIAGONAL3",plain
*=$6000
row = $fd
col = $fe
tmp = $ff
lda #$FF ; -1
sta col
@colloop
lda #0
sta row
ldy col
@rowloop
tya
bmi +
cpy #40
bcs +
lda row
jsr HGRBlockCopy
+ iny
bmi +
cpy #40
bcs +
lda row
jsr HGRDiagonalBlockCopyWithGuards
+ dey
dey
inc row
lda row
cmp #24
bcc @rowloop
lda #64
jsr WaitForKeyWithTimeout
bmi @exit
inc col
lda col
cmp #64
bcc @colloop
@exit rts
HGRDiagonalBlockCopyWithGuards
; in: A = HGR row / 8 (0x00..0x17)
; Y = HGR column (0x00..0x27)
; out: Y preserved
; A/X clobbered
; tmp clobbered
asl
asl
asl
jsr HGRCalc
clc
tya
bmi @exit
ldx #7
@loop
lda ($26),y
and sourcemasks,x
sta tmp
lda ($3c),y
and copymasks,x
ora tmp
sta ($26),y
lda $27
adc #$04
sta $27
eor #$60
sta $3d
dex
bpl @loop
@exit rts
sourcemasks ; copymasks EOR #$FF
!byte %01111111
!byte %01111110
!byte %01111100
!byte %01111000
!byte %01110000
!byte %01100000
!byte %01000000
!byte %00000000
copymasks
!byte %10000000
!byte %10000001
!byte %10000011
!byte %10000111
!byte %10001111
!byte %10011111
!byte %10111111
!byte %11111111
!source "src/wait.a"
!source "src/fx/fx.hgr.common.a"