update some graphics examples
This commit is contained in:
parent
d5b7c3cc6e
commit
3c91576c90
|
@ -1,13 +1,14 @@
|
|||
; Checkers, based on the code in Hellmood's Memories
|
||||
; Checkers
|
||||
; vaguely based on a scene in Hellmood's Memories
|
||||
|
||||
; 42 bytes
|
||||
; could be shorter if you're not picky about colors
|
||||
; 32 bytes, for Lovebyte 2021
|
||||
|
||||
; by deater (Vince Weaver) <vince@deater.net>
|
||||
|
||||
; 42 -- original
|
||||
; 39 -- not fullscreen
|
||||
; 36 -- now marches oddly
|
||||
; 32 -- colors now rainbow
|
||||
|
||||
; Zero Page
|
||||
BASL = $28
|
||||
|
@ -55,8 +56,7 @@ checkers:
|
|||
; init screen
|
||||
jsr SETGR ; 3
|
||||
; bit FULLGR ; 3
|
||||
;====
|
||||
; 6
|
||||
|
||||
checkers_forever:
|
||||
|
||||
inc FRAME ; 2
|
||||
|
@ -79,7 +79,8 @@ xloop:
|
|||
; sbc #0
|
||||
|
||||
eor X2
|
||||
; ora #$DB
|
||||
|
||||
; ora #$DB ; needed for solid colors
|
||||
; adc #1
|
||||
|
||||
jsr SETCOL
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,10 @@
|
|||
; do a (hopefully fast) plasma type demo
|
||||
; A 123-byte Apple II Lo-res Fake Palette Rotation Demo
|
||||
; The Apple II has no Palette rotation hardware, so we fake it
|
||||
|
||||
; For Lovebyte 2021
|
||||
|
||||
; by Vince `deater` Weaver (vince@deater.net) / dSr
|
||||
; with some help from qkumba
|
||||
|
||||
; 151 -- original
|
||||
; 137 -- optimize generation
|
||||
|
@ -22,11 +28,14 @@
|
|||
; 132 -- make lookup 8*sin+7
|
||||
; 131 -- re-arrange sine table
|
||||
; 128 -- call into PLOT for MASK seting
|
||||
|
||||
; urgh lovebyte wants 124 byte (counts header)
|
||||
|
||||
; 127 -- base YY<<16 by adding smc, not by shifting
|
||||
; 125 -- realize that the top byte wraps so no need to and
|
||||
; 124 -- re-arrange code to make an CLC unnecessary
|
||||
; 123 -- qkumba noticed we can use the $FF offset directly in page flip
|
||||
|
||||
; urgh lovebyte wants 124 byte (counts header)
|
||||
|
||||
; zero page
|
||||
GBASL = $26
|
||||
|
@ -115,13 +124,15 @@ flip_pages:
|
|||
|
||||
; ldy #0
|
||||
|
||||
iny ; y is $FF, make it 0
|
||||
; iny ; y is $FF, make it 0
|
||||
|
||||
lda draw_page_smc+1 ; DRAW_PAGE
|
||||
beq done_page
|
||||
iny
|
||||
bne done_page
|
||||
dey
|
||||
done_page:
|
||||
ldx PAGE1,Y ; set display page to PAGE1 or PAGE2
|
||||
; ldx PAGE1,Y ; set display page to PAGE1 or PAGE2
|
||||
|
||||
ldx $BF56,Y ; PAGE1 - $FF
|
||||
|
||||
eor #$4 ; flip draw page between $400/$800
|
||||
sta draw_page_smc+1 ; DRAW_PAGE
|
||||
|
|
|
@ -3,11 +3,12 @@ include ../../../Makefile.inc
|
|||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
LINKERSCRIPTS = ../../../linker_scripts
|
||||
EMPTY_DISK = ../../../empty_disk/empty.dsk
|
||||
|
||||
all: sier.dsk
|
||||
|
||||
sier.dsk: HELLO SIER SIER_TINY SIER_64
|
||||
cp empty.dsk sier.dsk
|
||||
cp $(EMPTY_DISK) sier.dsk
|
||||
$(DOS33) -y sier.dsk SAVE A HELLO
|
||||
$(DOS33) -y sier.dsk BSAVE -a 0x36C SIER
|
||||
$(DOS33) -y sier.dsk BSAVE -a 0x300 SIER_TINY
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,7 @@
|
|||
; fake sierpinski
|
||||
; 64-byte Apple II demo
|
||||
|
||||
; scrolling and colors
|
||||
; with scrolling and colors
|
||||
|
||||
; by Vince `deater` Weaver, dSr, Lovebyte 2021
|
||||
|
||||
|
@ -55,30 +56,24 @@ sier_xloop:
|
|||
clc
|
||||
adc FRAME
|
||||
|
||||
; sta X2
|
||||
; lda XX
|
||||
; adc FRAME
|
||||
; and X2
|
||||
|
||||
and XX
|
||||
|
||||
bne black
|
||||
; lda #$11 ; red
|
||||
lda FRAME
|
||||
lda FRAME ; color is based on frame
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
bne not_zero
|
||||
lda #3
|
||||
bne not_zero ; but no color 0 (would be all black)
|
||||
lda #3 ; how about purple instead
|
||||
|
||||
not_zero:
|
||||
|
||||
.byte $2C ; bit trick
|
||||
black:
|
||||
lda #$00
|
||||
; sta COLOR
|
||||
jsr SETCOL
|
||||
|
||||
jsr SETCOL ; set top/bottom nibble same color
|
||||
|
||||
ldy XX
|
||||
txa
|
||||
|
|
Loading…
Reference in New Issue