gr: scroll: diamond
This commit is contained in:
parent
5dda7169c1
commit
0949531644
|
@ -22,7 +22,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
|||
OVAL.BAS OVAL_HGR.BAS MOVING.BAS THICK_SINE.BAS TURKEY.BAS \
|
||||
FLAME_HGR.BAS RECT.BAS SNOWY.BAS EDGAR.BAS OOPS4.BAS OOPS3.BAS \
|
||||
HORROR.BAS DIAMOND.BAS LEMM.BAS OOPS.BAS SPLIT.BAS PARTICLE.BAS \
|
||||
PARTICLE_HGR.BAS
|
||||
PARTICLE_HGR.BAS DIAMOND_SCROLL.BAS
|
||||
# cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk
|
||||
cp empty.dsk appleiibot.dsk
|
||||
$(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
|
||||
|
@ -119,6 +119,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
|||
$(DOS33) -y appleiibot.dsk SAVE A SPLIT.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A PARTICLE.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A PARTICLE_HGR.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A DIAMOND_SCROLL.BAS
|
||||
|
||||
####
|
||||
|
||||
|
@ -672,5 +673,10 @@ PARTICLE_HGR.BAS: particle_hgr.bas
|
|||
|
||||
####
|
||||
|
||||
DIAMOND_SCROLL.BAS: diamond_scroll.bas
|
||||
$(TOKENIZE) < diamond_scroll.bas > DIAMOND_SCROLL.BAS
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst convert_to convert_from convert_qkumba convert_vmw make_boxes convert_back convert_tgreene LOAD *.BAS make_hgr_boxes
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
1FORI=0TO140:POKE875+I,4*PEEK(2125+I)-204+(PEEK(2266+I/3)-35)/4^(I-INT(I/3)*3):NEXT
|
||||
2&"/@q<GcY3VM2](QrPNU:4]Te3Z34Y4o.a38^T2MSJQ3L1nI1drgjR4[7Z?2egm:d*\O2E6HL3JY3?D=-\bDb]e;]ro^4]S2M5dpg.\hIP3K4CgFhC4CgF4?3FhChC4C4ChB3FhChF4C7J3S+4@WQ0X$UW'*TOP&P(+5J*\T=<3##7*(9X#'#'3###4#$_
|
|
@ -12,11 +12,11 @@ all: scroller.dsk
|
|||
$(DOS33):
|
||||
cd ../../../utils/dos33fs-utils && make
|
||||
|
||||
scroller.dsk: $(DOS33) HELLO HEXAGON
|
||||
scroller.dsk: $(DOS33) HELLO DIAMOND DIAMOND_BOT
|
||||
cp $(EMPTY_DISK)/empty.dsk scroller.dsk
|
||||
$(DOS33) -y scroller.dsk SAVE A HELLO
|
||||
$(DOS33) -y scroller.dsk BSAVE -a 0xc00 HEXAGON
|
||||
# $(DOS33) -y scroller.dsk BSAVE -a 0x36C PARTICLE_BOT
|
||||
$(DOS33) -y scroller.dsk BSAVE -a 0xc00 DIAMOND
|
||||
$(DOS33) -y scroller.dsk BSAVE -a 0x36B DIAMOND_BOT
|
||||
|
||||
###
|
||||
|
||||
|
@ -25,23 +25,23 @@ HELLO: hello.bas
|
|||
|
||||
###
|
||||
|
||||
HEXAGON: hexagon.o
|
||||
ld65 -o HEXAGON hexagon.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
DIAMOND: diamond.o
|
||||
ld65 -o DIAMOND diamond.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
|
||||
hexagon.o: hexagon.s
|
||||
ca65 -o hexagon.o hexagon.s -l hexagon.lst
|
||||
diamond.o: diamond.s
|
||||
ca65 -o diamond.o diamond.s -l diamond.lst
|
||||
|
||||
###
|
||||
|
||||
HEXAGON_BOT: hexagon_bot.o
|
||||
ld65 -o HEXAGON_BOT hexagon_bot.o -C $(LINKERSCRIPTS)/apple2_36c.inc
|
||||
DIAMOND_BOT: diamond_bot.o
|
||||
ld65 -o DIAMOND_BOT diamond_bot.o -C $(LINKERSCRIPTS)/apple2_36b.inc
|
||||
|
||||
hexagon_bot.o: hexagon_bot.s
|
||||
ca65 -o hexagon_bot.o hexagon_bot.s -l hexagon_bot.lst
|
||||
diamond_bot.o: diamond_bot.s
|
||||
ca65 -o diamond_bot.o diamond_bot.s -l diamond_bot.lst
|
||||
|
||||
|
||||
###
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO HEXAGON HEXAGON_BOT
|
||||
rm -f *~ *.o *.lst HELLO DIAMOND DIAMOND_BOT
|
||||
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
; hexagon scroll?
|
||||
|
||||
; 144 start counting
|
||||
; 141 extrapolate Y from X
|
||||
; 130 make scroll_pattern a function
|
||||
; 141 add horizontal line drawing
|
||||
|
||||
; by Vince `deater` Weaver
|
||||
|
||||
FULLGR = $C052
|
||||
PAGE1 = $C054
|
||||
PAGE2 = $C055
|
||||
LORES = $C056 ; Enable LORES graphics
|
||||
|
||||
PLOT = $F800 ; PLOT AT Y,A (A colors output, Y preserved)
|
||||
SETGR = $FB40
|
||||
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||
|
||||
LINE = $FF
|
||||
|
||||
hexagon:
|
||||
|
||||
jsr SETGR
|
||||
bit FULLGR
|
||||
|
||||
hexagon_loop:
|
||||
|
||||
|
||||
; 4 -> 8 0100 1000 eor $C
|
||||
page_smc:
|
||||
lda #$4 ; reset to beginning
|
||||
sta inner_loop_smc+2
|
||||
|
||||
lda #8 ; lines to count (*3=24)
|
||||
sta LINE
|
||||
|
||||
;============================
|
||||
; draw an interleaved line
|
||||
|
||||
line_loop:
|
||||
ldx #119
|
||||
|
||||
screen_loop:
|
||||
|
||||
txa ; extrapolate Y from X
|
||||
and #$7
|
||||
tay
|
||||
|
||||
pattern_smc:
|
||||
lda pattern1,Y
|
||||
|
||||
inner_loop_smc:
|
||||
sta $400,X
|
||||
|
||||
dex
|
||||
bpl screen_loop
|
||||
|
||||
;=================================
|
||||
; move to next pattern
|
||||
; assume we are in same 256 byte page (so high byte never change)
|
||||
|
||||
jsr scroll_pattern
|
||||
|
||||
; move to next line
|
||||
|
||||
clc
|
||||
lda inner_loop_smc+1
|
||||
adc #$80
|
||||
sta inner_loop_smc+1 ; FIXME just inc if carry set
|
||||
bcc noflo
|
||||
inc inner_loop_smc+2
|
||||
noflo:
|
||||
|
||||
dec LINE
|
||||
bne line_loop
|
||||
|
||||
;=======================================
|
||||
; done drawing frame
|
||||
;=======================================
|
||||
|
||||
; draw line pattern
|
||||
|
||||
lda #$0F ; white bar
|
||||
ldx #21
|
||||
draw_line_loop:
|
||||
|
||||
dll_smc:
|
||||
sta $430,X ; partway down screen
|
||||
dex
|
||||
bne draw_line_loop
|
||||
|
||||
|
||||
;=========================
|
||||
; scroll one line
|
||||
|
||||
jsr scroll_pattern
|
||||
|
||||
; switch page
|
||||
lda page_smc+1
|
||||
eor #$c
|
||||
sta page_smc+1
|
||||
sta dll_smc+2
|
||||
; is 4 or 8
|
||||
lsr
|
||||
lsr ; now 0 or 1 (C is 1 or 0)
|
||||
and #$1
|
||||
tax
|
||||
lda PAGE1,X
|
||||
|
||||
lda #200
|
||||
jsr WAIT
|
||||
|
||||
; A is 0 after
|
||||
|
||||
beq hexagon_loop
|
||||
|
||||
|
||||
scroll_pattern:
|
||||
clc
|
||||
lda pattern_smc+1
|
||||
adc #8
|
||||
cmp #(<pattern1+32)
|
||||
bne pattern_ok
|
||||
lda #<pattern1
|
||||
pattern_ok:
|
||||
sta pattern_smc+1
|
||||
rts
|
||||
|
||||
|
||||
pattern1:
|
||||
.byte $04,$40,$d4,$4d,$d4,$40,$04,$40
|
||||
pattern2:
|
||||
.byte $d4,$4d,$04,$40,$04,$4d,$d4,$40
|
||||
pattern3:
|
||||
.byte $d4,$40,$04,$40,$04,$40,$d4,$4d
|
||||
pattern4:
|
||||
.byte $04,$4d,$d4,$40,$d4,$4d,$04,$40
|
||||
|
||||
;pattern5:
|
||||
; .byte $40,$d4,$4d,$04,$4d,$d4,$40,$04
|
||||
;pattern6:
|
||||
; .byte $4d,$04,$40,$04,$40,$04,$4d,$d4
|
||||
;pattern7:
|
||||
; .byte $4d,$d4,$40,$04,$40,$d4,$4d,$0d
|
||||
;pattern8:
|
||||
; .byte $40,$04,$4d,$d4,$4d,$04,$40,$04
|
||||
|
||||
|
||||
; for bot
|
||||
|
||||
jmp hexagon
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
; hexagon scroll?
|
||||
|
||||
; 144 start counting
|
||||
; 141 extrapolate Y from X
|
||||
; 130 make scroll_pattern a function
|
||||
; 141 add horizontal line drawing
|
||||
|
||||
; by Vince `deater` Weaver
|
||||
|
||||
FULLGR = $C052
|
||||
PAGE1 = $C054
|
||||
PAGE2 = $C055
|
||||
LORES = $C056 ; Enable LORES graphics
|
||||
|
||||
PLOT = $F800 ; PLOT AT Y,A (A colors output, Y preserved)
|
||||
SETGR = $FB40
|
||||
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||
|
||||
LINE = $FF
|
||||
|
||||
hexagon:
|
||||
|
||||
jsr SETGR
|
||||
bit FULLGR
|
||||
|
||||
hexagon_loop:
|
||||
|
||||
|
||||
; 4 -> 8 0100 1000 eor $C
|
||||
page_smc:
|
||||
lda #$4 ; reset to beginning
|
||||
sta inner_loop_smc+2
|
||||
|
||||
lda #8 ; lines to count (*3=24)
|
||||
sta LINE
|
||||
|
||||
;============================
|
||||
; draw an interleaved line
|
||||
|
||||
line_loop:
|
||||
ldx #119
|
||||
|
||||
screen_loop:
|
||||
|
||||
txa ; extrapolate Y from X
|
||||
and #$7
|
||||
tay
|
||||
|
||||
pattern_smc:
|
||||
lda pattern1,Y
|
||||
|
||||
inner_loop_smc:
|
||||
sta $400,X
|
||||
|
||||
dex
|
||||
bpl screen_loop
|
||||
|
||||
;=================================
|
||||
; move to next pattern
|
||||
; assume we are in same 256 byte page (so high byte never change)
|
||||
|
||||
jsr scroll_pattern
|
||||
|
||||
; move to next line
|
||||
|
||||
clc
|
||||
lda inner_loop_smc+1
|
||||
adc #$80
|
||||
sta inner_loop_smc+1 ; FIXME just inc if carry set
|
||||
bcc noflo
|
||||
inc inner_loop_smc+2
|
||||
noflo:
|
||||
|
||||
dec LINE
|
||||
bne line_loop
|
||||
|
||||
;=======================================
|
||||
; done drawing frame
|
||||
;=======================================
|
||||
|
||||
; draw line pattern
|
||||
|
||||
lda #$0F ; white bar
|
||||
ldx #21
|
||||
draw_line_loop:
|
||||
|
||||
dll_smc:
|
||||
sta $430,X ; partway down screen
|
||||
dex
|
||||
bne draw_line_loop
|
||||
|
||||
|
||||
;=========================
|
||||
; scroll one line
|
||||
|
||||
jsr scroll_pattern
|
||||
|
||||
; switch page
|
||||
lda page_smc+1
|
||||
eor #$c
|
||||
sta page_smc+1
|
||||
sta dll_smc+2
|
||||
; is 4 or 8
|
||||
lsr
|
||||
lsr ; now 0 or 1 (C is 1 or 0)
|
||||
and #$1
|
||||
tax
|
||||
lda PAGE1,X
|
||||
|
||||
lda #200
|
||||
jsr WAIT
|
||||
|
||||
; A is 0 after
|
||||
|
||||
beq hexagon_loop
|
||||
|
||||
|
||||
scroll_pattern:
|
||||
clc
|
||||
lda pattern_smc+1
|
||||
adc #8
|
||||
cmp #(<pattern1+32)
|
||||
bne pattern_ok
|
||||
lda #<pattern1
|
||||
pattern_ok:
|
||||
sta pattern_smc+1
|
||||
rts
|
||||
|
||||
|
||||
pattern1:
|
||||
.byte $04,$40,$d4,$4d,$d4,$40,$04,$40
|
||||
pattern2:
|
||||
.byte $d4,$4d,$04,$40,$04,$4d,$d4,$40
|
||||
pattern3:
|
||||
.byte $d4,$40,$04,$40,$04,$40,$d4,$4d
|
||||
pattern4:
|
||||
.byte $04,$4d,$d4,$40,$d4,$4d,$04,$40
|
||||
|
||||
;pattern5:
|
||||
; .byte $40,$d4,$4d,$04,$4d,$d4,$40,$04
|
||||
;pattern6:
|
||||
; .byte $4d,$04,$40,$04,$40,$04,$4d,$d4
|
||||
;pattern7:
|
||||
; .byte $4d,$d4,$40,$04,$40,$d4,$4d,$0d
|
||||
;pattern8:
|
||||
; .byte $40,$04,$4d,$d4,$4d,$04,$40,$04
|
||||
|
||||
|
||||
; 141 bytes, want this at 138
|
||||
; so 36b
|
||||
|
||||
; for bot
|
||||
|
||||
jmp hexagon
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
; hexagon scroll?
|
||||
|
||||
; by Vince `deater` Weaver
|
||||
|
||||
PARTICLES = 128
|
||||
SCALE = 2
|
||||
|
||||
COLOR = $30
|
||||
|
||||
QUOTIENT = $FA
|
||||
DIVISOR = $FB
|
||||
DIVIDEND = $FC
|
||||
XX = $FD
|
||||
YY = $FE
|
||||
FRAME = $FF
|
||||
|
||||
FULLGR = $C052
|
||||
LORES = $C056 ; Enable LORES graphics
|
||||
|
||||
PLOT = $F800 ; PLOT AT Y,A (A colors output, Y preserved)
|
||||
SETGR = $FB40
|
||||
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||
|
||||
hexagon:
|
||||
|
||||
jsr SETGR
|
||||
bit FULLGR
|
||||
|
||||
|
||||
hexagon_loop:
|
||||
|
||||
|
||||
; 104 to beat
|
||||
|
||||
lda #$4
|
||||
sta inner_loop_smc+2
|
||||
|
||||
line_loop:
|
||||
|
||||
ldx #120
|
||||
ldy #0
|
||||
screen_loop:
|
||||
|
||||
|
||||
inner_loop:
|
||||
|
||||
pattern_smc:
|
||||
lda pattern1,Y
|
||||
inner_loop_smc:
|
||||
sta $400,X
|
||||
|
||||
iny
|
||||
tya
|
||||
and #$7
|
||||
tay
|
||||
|
||||
dex
|
||||
bpl screen_loop
|
||||
|
||||
;=================================
|
||||
|
||||
; move to next pattern
|
||||
|
||||
clc
|
||||
lda pattern_smc+1
|
||||
adc #8
|
||||
sta pattern_smc+1
|
||||
cmp #(<pattern1+32)
|
||||
bne pattern_ok
|
||||
lda #<pattern1
|
||||
sta pattern_smc+1
|
||||
|
||||
pattern_ok:
|
||||
|
||||
; move to next line
|
||||
|
||||
clc
|
||||
lda inner_loop_smc+1
|
||||
adc #$80
|
||||
sta inner_loop_smc+1 ; FIXME just inc if carry set
|
||||
lda #$00
|
||||
adc inner_loop_smc+2
|
||||
sta inner_loop_smc+2
|
||||
|
||||
cmp #$8
|
||||
bne line_loop
|
||||
|
||||
; scroll!
|
||||
|
||||
|
||||
clc
|
||||
lda pattern_smc+1
|
||||
adc #8
|
||||
sta pattern_smc+1
|
||||
cmp #(<pattern1+32)
|
||||
bne pattern_ok2
|
||||
lda #<pattern1
|
||||
sta pattern_smc+1
|
||||
|
||||
pattern_ok2:
|
||||
|
||||
|
||||
lda #200
|
||||
jsr WAIT
|
||||
|
||||
jmp hexagon_loop
|
||||
|
||||
pattern1:
|
||||
.byte $04,$40,$d4,$4d,$d4,$40,$04,$40
|
||||
pattern2:
|
||||
.byte $d4,$4d,$04,$40,$04,$4d,$d4,$40
|
||||
pattern3:
|
||||
.byte $d4,$40,$04,$40,$04,$40,$d4,$4d
|
||||
pattern4:
|
||||
.byte $04,$4d,$d4,$40,$d4,$4d,$04,$40
|
||||
|
||||
; for bot
|
||||
|
||||
jmp hexagon
|
||||
|
||||
|
||||
|
||||
|
||||
; lda pattern1,Y
|
||||
; sta $400,X
|
||||
; lda pattern2,Y
|
||||
; sta $480,X
|
||||
; lda pattern3,Y
|
||||
; sta $500,X
|
||||
; lda pattern4,Y
|
||||
; sta $580,X
|
||||
|
||||
; lda pattern1,Y
|
||||
; sta $600,X
|
||||
; lda pattern2,Y
|
||||
; sta $680,X
|
||||
; lda pattern3,Y
|
||||
; sta $700,X
|
||||
; lda pattern4,Y
|
||||
; sta $780,X
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue