mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-27 07:29:29 +00:00
stargate: initial checkin
This commit is contained in:
parent
b83c393541
commit
c9ecfaf997
39
demos/l/stargate/Makefile
Normal file
39
demos/l/stargate/Makefile
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
include ../../../Makefile.inc
|
||||||
|
|
||||||
|
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||||
|
PNG2GR = ../../../utils/gr-utils/png2gr
|
||||||
|
PNG2RLE = ../../../utils/gr-utils/png2rle
|
||||||
|
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||||
|
LINKERSCRIPTS = ../../../linker_scripts
|
||||||
|
EMPTYDISK = ../../../empty_disk
|
||||||
|
|
||||||
|
all: stargate.dsk
|
||||||
|
|
||||||
|
$(DOS33):
|
||||||
|
cd ../../utils/dos33fs-utils && make
|
||||||
|
|
||||||
|
stargate.dsk: $(DOS33) HELLO STARGATE
|
||||||
|
cp $(EMPTYDISK)/empty.dsk stargate.dsk
|
||||||
|
$(DOS33) -y stargate.dsk SAVE A HELLO
|
||||||
|
$(DOS33) -y stargate.dsk BSAVE -a 0x37c STARGATE
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
HELLO: hello.bas
|
||||||
|
$(TOKENIZE) < hello.bas > HELLO
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
STARGATE: stargate.o
|
||||||
|
ld65 -o STARGATE stargate.o -C $(LINKERSCRIPTS)/apple2_37c.inc
|
||||||
|
|
||||||
|
stargate.o: stargate.s
|
||||||
|
ca65 -o stargate.o stargate.s -l stargate.lst
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ *.o HELLO TUNNEL.BAS TUNNEL TUNNEL2 STARGATE T.BAS T *.lst
|
||||||
|
|
2
demos/l/stargate/hello.bas
Normal file
2
demos/l/stargate/hello.bas
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
5 HOME
|
||||||
|
10 PRINT CHR$(4);"CATALOG"
|
150
demos/l/stargate/stargate.s
Normal file
150
demos/l/stargate/stargate.s
Normal file
|
@ -0,0 +1,150 @@
|
||||||
|
; 5 REM BY @hisham_hm Mar 7 @AppleIIBot
|
||||||
|
|
||||||
|
; buggy version that looks cool
|
||||||
|
|
||||||
|
; took a while, but there are two bugs. COUNT (and thus X) gets the wrong
|
||||||
|
; value and never resets, mostly due to the jmp at the end going
|
||||||
|
; to the wrong place. The init of COUNTMAX is wrong too
|
||||||
|
|
||||||
|
H2 = $2C
|
||||||
|
V2 = $2D
|
||||||
|
COLOR = $30
|
||||||
|
J = $FB
|
||||||
|
Z = $FC
|
||||||
|
COUNTMAX = $FD
|
||||||
|
COUNT = $FE
|
||||||
|
NEWCOLOR = $FF
|
||||||
|
|
||||||
|
FULLGR = $C052
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HLINE = $F819 ;; HLINE Y,$2C at A
|
||||||
|
VLINE = $F828 ;; VLINE A,$2D at Y
|
||||||
|
SETCOL = $F864 ; COLOR=A
|
||||||
|
SETGR = $FB40
|
||||||
|
WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
|
||||||
|
|
||||||
|
tunnel:
|
||||||
|
; 10 GR:N=7
|
||||||
|
|
||||||
|
jsr SETGR
|
||||||
|
bit FULLGR
|
||||||
|
|
||||||
|
lda #$7
|
||||||
|
sta NEWCOLOR
|
||||||
|
|
||||||
|
|
||||||
|
; 20 FOR X=0 TO 4
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta COUNT
|
||||||
|
|
||||||
|
clc
|
||||||
|
adc #16
|
||||||
|
sta COUNTMAX
|
||||||
|
cycle:
|
||||||
|
|
||||||
|
; 30 FOR I=X TO 15+X STEP 5:COLOR=0
|
||||||
|
|
||||||
|
ldx COUNT
|
||||||
|
iloop:
|
||||||
|
lda #0
|
||||||
|
sta COLOR
|
||||||
|
|
||||||
|
; 40 Z=39-I:J=I+1:W=Z-1
|
||||||
|
|
||||||
|
txa
|
||||||
|
eor #$ff
|
||||||
|
sec
|
||||||
|
adc #39
|
||||||
|
sta Z
|
||||||
|
sta H2
|
||||||
|
sta V2
|
||||||
|
dec H2
|
||||||
|
dec V2
|
||||||
|
|
||||||
|
txa
|
||||||
|
clc
|
||||||
|
adc #1
|
||||||
|
sta J
|
||||||
|
|
||||||
|
; HLIN J,W AT I ; HLINE Y,$2C at A
|
||||||
|
|
||||||
|
ldy J
|
||||||
|
txa
|
||||||
|
jsr HLINE
|
||||||
|
|
||||||
|
; HLIN J,W AT Z ; HLINE Y,$2C at A
|
||||||
|
|
||||||
|
ldy J
|
||||||
|
lda Z
|
||||||
|
jsr HLINE
|
||||||
|
|
||||||
|
; VLIN J,W AT I ; VLINE A,$2D at Y
|
||||||
|
; VLIN J,W AT Z ; VLINE A,$2D at Y
|
||||||
|
|
||||||
|
|
||||||
|
; COLOR=N
|
||||||
|
lda NEWCOLOR
|
||||||
|
jsr SETCOL
|
||||||
|
|
||||||
|
; HLIN J,W AT J ; HLINE Y,$2C at A
|
||||||
|
|
||||||
|
ldy J
|
||||||
|
lda J
|
||||||
|
jsr HLINE
|
||||||
|
|
||||||
|
; HLIN J,W AT W ; HLINE Y,$2C at A
|
||||||
|
ldy J
|
||||||
|
lda H2
|
||||||
|
jsr HLINE
|
||||||
|
|
||||||
|
; VLIN J,W AT J ; VLINE A,$2D at Y
|
||||||
|
; VLIN J,W AT W ; VLINE A,$2D at Y
|
||||||
|
|
||||||
|
; N=N+1
|
||||||
|
|
||||||
|
inc NEWCOLOR
|
||||||
|
|
||||||
|
|
||||||
|
lda #75
|
||||||
|
jsr WAIT
|
||||||
|
|
||||||
|
; 50 NEXT:N=N-4
|
||||||
|
|
||||||
|
txa
|
||||||
|
clc
|
||||||
|
adc #5
|
||||||
|
tax
|
||||||
|
|
||||||
|
cpx COUNTMAX
|
||||||
|
bcc iloop
|
||||||
|
|
||||||
|
sec
|
||||||
|
lda NEWCOLOR
|
||||||
|
sbc #4
|
||||||
|
sta NEWCOLOR
|
||||||
|
|
||||||
|
; 60 NEXT:N=N-1:IF N=0 THEN N=12
|
||||||
|
|
||||||
|
inc COUNT
|
||||||
|
lda COUNT
|
||||||
|
cmp #4
|
||||||
|
bne cycle
|
||||||
|
|
||||||
|
dec NEWCOLOR
|
||||||
|
bne end
|
||||||
|
|
||||||
|
lda #12
|
||||||
|
sta NEWCOLOR
|
||||||
|
|
||||||
|
end:
|
||||||
|
; 70 GOTO 20
|
||||||
|
|
||||||
|
jmp cycle
|
||||||
|
|
||||||
|
; want to load at $3f5, this originally at 379
|
||||||
|
; so load at $37c
|
||||||
|
|
||||||
|
jmp tunnel
|
Loading…
Reference in New Issue
Block a user