mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
hgr: starfield works
This commit is contained in:
parent
c9ce996ad4
commit
1d158c1b11
@ -17,7 +17,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
||||
COMBO.BAS WIRES.BAS PATTERN.BAS BALL.BAS LINES.BAS MOD9.BAS \
|
||||
XOR_ZOOM.BAS MOD9_HGR.BAS SIER_HGR.BAS MOVE.BAS SINE.BAS XDRAW128.BAS \
|
||||
GATOR.BAS CURSOR.BAS STARGATE.BAS TUNNEL.BAS STARFIELD.BAS \
|
||||
STAROOPS.BAS
|
||||
STAROOPS.BAS HGRSTARFIELD.BAS
|
||||
|
||||
# cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk
|
||||
cp empty.dsk appleiibot.dsk
|
||||
@ -88,6 +88,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
||||
$(DOS33) -y appleiibot.dsk SAVE A TUNNEL.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A STARFIELD.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A STAROOPS.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A HGRSTARFIELD.BAS
|
||||
|
||||
####
|
||||
|
||||
@ -489,6 +490,10 @@ BALL.BAS: ball.bas
|
||||
LINES.BAS: lines.bas
|
||||
$(TOKENIZE) < lines.bas > LINES.BAS
|
||||
|
||||
####
|
||||
|
||||
HGRSTARFIELD.BAS: hgrstarfield.bas
|
||||
$(TOKENIZE) < hgrstarfield.bas > HGRSTARFIELD.BAS
|
||||
|
||||
|
||||
####
|
||||
|
2
basic/appleiibot/hgrstarfield.bas
Normal file
2
basic/appleiibot/hgrstarfield.bas
Normal file
@ -0,0 +1,2 @@
|
||||
1FORI=0TO139:POKE876+I,4*PEEK(2125+I)-192+(PEEK(2265+I/3)-35)/4^(I-INT(I/3)*3):NEXT
|
||||
2&",clU68V.b*lX6XD,fnV/QgQn]LBUBZJX05EmUm]X7g/JHKnUK]T+d0JSZMBe(j4YgQfTZWoX$5EkYn7]0+^0V1^:\Yn^0kUTZ/lQ[^,k:210M.ioH2/0Bk5J$Uo^=m(2nV:4#?o6HCH0S1PK&S4+$D#/53*<'W$CCEC,S+SWU+*'445:D&76T3C#Y#/
|
@ -1,2 +1,2 @@
|
||||
1FORI=0TO131:POKE884+I,4*PEEK(2125+I)-192+(PEEK(2257+I/3)-35)/4^(I-INT(I/3)*3):NEXT
|
||||
2&",clU68V.b*lX.V7,fnV/Qh]\+d0FGb`\:b0T0OoQK]P7g/JPZUDe0l2aiQnVQWoX08=kYnC`,7a.b4X:^Rn^,kUS^0kU\\0l3N2/U0foH.31?o6I0Xob>m04nV:./Bo6H7J0S1PKFS4'W4#$G43*#%-%I#F#6.F?3'(,@(130(&$%;&S
|
||||
2&",clU68V.b*lX.V7,fnV/Qh]\+d0FGb`\:b0T0OoQK]P7g/JSZUDe0l2aiQnVQWoX08=kYnC`,7a.b4X:^Rn^,kUS^0kU\\0l3N2/U0foH.31?o6I0Xob>m04nV:./Bo6H7J0S1PKFS4'W4#$G43*#%-%I#F#6.F?3'(,@(130(&$%;&S
|
||||
|
@ -12,7 +12,7 @@ starfield.dsk: HELLO STARS FASTAR STARBOT STARTINY STAROOPS
|
||||
$(DOS33) -y starfield.dsk SAVE A HELLO
|
||||
$(DOS33) -y starfield.dsk BSAVE -a 0x0300 STARS
|
||||
$(DOS33) -y starfield.dsk BSAVE -a 0x0C00 FASTAR
|
||||
$(DOS33) -y starfield.dsk BSAVE -a 0x0C00 STARBOT
|
||||
$(DOS33) -y starfield.dsk BSAVE -a 0x036C STARBOT
|
||||
$(DOS33) -y starfield.dsk BSAVE -a 0x0C00 STARTINY
|
||||
$(DOS33) -y starfield.dsk BSAVE -a 0x0374 STAROOPS
|
||||
|
||||
@ -41,7 +41,7 @@ stars.o: stars.s
|
||||
###
|
||||
|
||||
STARBOT: starbot.o
|
||||
ld65 -o STARBOT starbot.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
|
||||
ld65 -o STARBOT starbot.o -C $(LINKER_SCRIPTS)/apple2_36c.inc
|
||||
|
||||
starbot.o: starbot.s
|
||||
ca65 -o starbot.o starbot.s -l starbot.lst
|
||||
|
@ -7,6 +7,8 @@
|
||||
; 155 bytes -- scale to more of full screen
|
||||
; 153 bytes -- blue/orange instead of purple/green
|
||||
; 149 bytes -- optimize 2nd plot arg shuffling
|
||||
; 148 bytes -- optimize 1st plot arg shuffling
|
||||
; 140 bytes -- turn off all range checking except Z
|
||||
|
||||
NUMSTARS = 27 ; 27 good, 28+ not work ($1C)
|
||||
|
||||
@ -85,7 +87,7 @@ big_loop:
|
||||
; lda #100
|
||||
; jsr WAIT
|
||||
|
||||
ldy #30
|
||||
ldy #80
|
||||
jsr BELL2 ; BEEP delays too
|
||||
|
||||
; A now 0
|
||||
@ -104,12 +106,11 @@ star_loop:
|
||||
|
||||
stx SAVEX
|
||||
|
||||
ldy oldx,X ; get X valu into Y
|
||||
; tya
|
||||
; tax
|
||||
sty TEMP
|
||||
lda oldy,X
|
||||
ldx TEMP
|
||||
pha
|
||||
lda oldx,X ; get X valu into Y
|
||||
tax
|
||||
pla
|
||||
|
||||
ldy #0
|
||||
|
||||
@ -139,10 +140,10 @@ star_loop:
|
||||
|
||||
; if off-screen then need new star
|
||||
|
||||
cmp #192
|
||||
bcs new_star ; bge >39
|
||||
cmp #0
|
||||
bcc new_star ; if <0
|
||||
; cmp #192
|
||||
; bcs new_star ; bge >39
|
||||
; cmp #0
|
||||
; bcc new_star ; if <0
|
||||
|
||||
|
||||
sta YY ; YY
|
||||
@ -158,7 +159,7 @@ star_loop:
|
||||
lda star_x,X ; get X of start
|
||||
|
||||
jsr do_divide
|
||||
adc #128
|
||||
adc #140 ; center
|
||||
|
||||
tay ; put XX in Y
|
||||
sty oldx,X ; save for next time to erase
|
||||
@ -239,7 +240,7 @@ color_lookup:
|
||||
sta star_y,X ; random YY
|
||||
|
||||
lda $F002,Y
|
||||
and #$7f ; random ZZ 0..127 (can't go negative or stars move backward)
|
||||
and #$1f ; random ZZ 0..127 (can't go negative or stars move backward)
|
||||
ora #$1 ; avoid 0
|
||||
sta star_z,X
|
||||
|
||||
@ -294,5 +295,5 @@ early_out:
|
||||
; for BASIC bot load
|
||||
|
||||
; need this to be at $3F5
|
||||
; it's at 8C, so 6D
|
||||
; it's at 89, so 6C
|
||||
jmp small_starfield
|
||||
|
@ -158,7 +158,7 @@ star_loop:
|
||||
lda star_x,X ; get X of start
|
||||
|
||||
jsr do_divide
|
||||
adc #128
|
||||
adc #140 ; center
|
||||
|
||||
tay ; put XX in Y
|
||||
sty oldx,X ; save for next time to erase
|
||||
|
Loading…
Reference in New Issue
Block a user