appleiibot: add elite

This commit is contained in:
Vince Weaver 2022-09-06 00:30:11 -04:00
parent 301eb86fc6
commit e37873de3b
10 changed files with 152 additions and 43 deletions

View File

@ -26,8 +26,8 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
PARTICLE_HGR.BAS DIAMOND_SCROLL.BAS RANDOM_SCROLL.BAS STAR_BOUNCE.BAS\
OOZE.BAS HORIZ_STAR.BAS SECRET_COLLECT.BAS PLANET.BAS PLANET_GR.BAS \
BOXES.BAS SOLARIS.BAS SOLARIS2.BAS ASPLODE.BAS SOLARIS3.BAS \
TARGET.BAS
cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk
TARGET.BAS ELITE.BAS
cp $(EMPTY_DISK)/empty_lots_of_dirents.dsk appleiibot.dsk
# cp empty.dsk appleiibot.dsk
# $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
$(DOS33) -y appleiibot.dsk SAVE A HELLO
@ -132,16 +132,12 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
$(DOS33) -y appleiibot.dsk SAVE A PLANET.BAS
$(DOS33) -y appleiibot.dsk SAVE A PLANET_GR.BAS
$(DOS33) -y appleiibot.dsk SAVE A BOXES.BAS
# $(DOS33) -y appleiibot.dsk SAVE A SOLARIS.BAS
# $(DOS33) -y appleiibot.dsk SAVE A SOLARIS2.BAS
$(DOS33) -y appleiibot.dsk SAVE A SOLARIS.BAS
$(DOS33) -y appleiibot.dsk SAVE A SOLARIS2.BAS
$(DOS33) -y appleiibot.dsk SAVE A ASPLODE.BAS
$(DOS33) -y appleiibot.dsk SAVE A SOLARIS3.BAS
$(DOS33) -y appleiibot.dsk SAVE A TARGET.BAS
#appleiibot2.dsk: BOXES.BAS HELLO
# cp empty.dsk appleiibot2.dsk
# $(DOS33) -y appleiibot2.dsk SAVE A HELLO
# $(DOS33) -y appleiibot2.dsk SAVE A BOXES.BAS
$(DOS33) -y appleiibot.dsk SAVE A ELITE.BAS
####
@ -773,6 +769,11 @@ ASPLODE.BAS: asplode.bas
TARGET.BAS: target.bas
$(TOKENIZE) < target.bas > TARGET.BAS
####
ELITE.BAS: elite.bas
$(TOKENIZE) < elite.bas > ELITE.BAS
####

View File

@ -0,0 +1,7 @@
0REM~*:B6S6l;`ALB5@):~B9B>I?I8B9~L8L?T>T:L8"~4-;8NEaNnPZ?L74-N5Y<kLnP~L7O6~Z?Y<~G=I9Q<NAG=~S=YBWFQCS=!
1HGR:DEFFNP(X)=3*PEEK(2054+I+X)-99
2IFFNP(0)=279THENHPLOTFNP(1),FNP(2):I=I+3
6HPLOTTOFNP(0),FNP(1):I=I+2
7IFFNP(0)=3THENHGR2:I=I+1
8IFFNP(0)GOTO2
9P=NOTP:POKE49236+P,0:?CHR$(7):GOTO9

View File

@ -0,0 +1,41 @@
# 40
#279 27 75 99 63 # Ship1 body
# 150 63 #
# 225 78 #
# 189 96 #
# 129 99 #
# 60 93 #
# 26 75 #
#279 99 72 99 87 # Ship1 left thruster
# 120 90
# 120 69
# 99 72
#279 129 69 129 90 # Ship1 left thruster
# 153 87
# 153 75
# 129 69
#3
# 56
279 57 36 78 69 # ship 2 body
135 108
192 135
231 141
171 90
129 66
57 36
135 60
168 81
222 129
231 141
279 129 66 138 63
279 171 90 168 81
279 114 84 120 72 # left
144 81
135 96
114 84
279 150 84 168 99 # right
162 111
144 102
150 84
0

View File

@ -0,0 +1,8 @@
0REM~*:B6S6l;`ALB5@):~B9B>I?I8B9~L8L?T>T:L8"~4-;8NEaNnPZ?L74-N5Y<kLnP~L7O6~Z?Y<~G=I9Q<NAG=~S=YBWFQCS=!
1HGR2:DEFFNP(X)=3*PEEK(2054+I+X)-99
2POKE230,32+32*P:P=NOTP:POKE49236+P,0:CALL-3086
3V=FNP(0):IFV=3THENI=I+1:GOTO2
4IFV=0THENI=0:GOTO2
5IFV=279THENHPLOTFNP(1),FNP(2):I=I+3
6HPLOTTOFNP(0),FNP(1):I=I+2
7GOTO3

View File

@ -1,6 +1,18 @@
#include <stdio.h>
#include <stdlib.h>
static int debug=1;
/* if div=3 */
/* can't plot at 0 or 279 */
/* min is 3 = 1 to 276 = 92 */
/* add = 33 so from 34 to 125 */
/* if div=2 */
/* can't plot at 0 or 184 */
/* min is 2 = 1 to 184 = 92 */
/* centered on screen that's roughly 50 - 234 */
int main(int argc, char **argv) {
char buffer[1024];
@ -9,9 +21,20 @@ int main(int argc, char **argv) {
char output[1024];
int out_ptr=0;
int add=33;
int xadjust=0;
int div=3;
if (argc>1) {
add=atoi(argv[1]);
div=atoi(argv[1]);
}
if (div==2) {
xadjust=-50;
}
if (debug) {
fprintf(stderr,"Using div=%d add=%d xadjust=%d\n",
div,add,xadjust);
}
while(1) {
@ -21,23 +44,27 @@ int main(int argc, char **argv) {
if (buffer[0]=='#') continue;
sscanf(buffer,"%d %d %d %d %d",
&a1,&a2,&a3,&a4,&a5);
printf("%d %d %d %d %d\n",a1,a2,a3,a4,a5);
if (debug) fprintf(stderr,"%d %d %d %d %d\n",a1,a2,a3,a4,a5);
if (a1==279) {
output[out_ptr]=(a1/3)+add;
output[out_ptr+1]=(a2/3)+add;
output[out_ptr+2]=(a3/3)+add;
output[out_ptr+3]=(a4/3)+add;
output[out_ptr+4]=(a5/3)+add;
output[out_ptr]=((a1-xadjust)/div)+add;
output[out_ptr+1]=((a2-xadjust)/div)+add;
output[out_ptr+2]=((a3-xadjust)/div)+add;
output[out_ptr+3]=((a4-xadjust)/div)+add;
output[out_ptr+4]=((a5-xadjust)/div)+add;
out_ptr+=5;
}
else if (a1==3) {
output[out_ptr]=((a1-xadjust)/div)+add;
out_ptr+=1;
}
else if (a1==0) {
output[out_ptr]=(a1/3)+add;
output[out_ptr]=((a1-xadjust)/div)+add;
out_ptr+=1;
break;
}
else {
output[out_ptr]=(a1/3)+add;
output[out_ptr+1]=(a2/3)+add;
output[out_ptr]=((a1-xadjust)/div)+add;
output[out_ptr+1]=((a2-xadjust)/div)+add;
out_ptr+=2;
}
}

Binary file not shown.

View File

@ -1,3 +1,6 @@
be sure that clicking on digger twice doesn't decrement twice
Improve explosions
+ offset the frames when nuking so not simultaneous
+ on explosion, start with invisible 6 so we always get a full 5s

View File

@ -7,13 +7,14 @@ EMPTYDISK = ../../../empty_disk/empty.dsk
all: solaris.dsk
solaris.dsk: HELLO SOLARIS SOLARIS2 SOLARIS3 SOLARIS4
solaris.dsk: HELLO SOLARIS SOLARIS2 SOLARIS3 SOLARIS4 SOLARIS_BOT
cp $(EMPTYDISK) solaris.dsk
$(DOS33) -y solaris.dsk SAVE A HELLO
$(DOS33) -y solaris.dsk BSAVE -a 0xc00 SOLARIS
$(DOS33) -y solaris.dsk BSAVE -a 0xc00 SOLARIS2
$(DOS33) -y solaris.dsk BSAVE -a 0xc00 SOLARIS3
$(DOS33) -y solaris.dsk BSAVE -a 0xc00 SOLARIS4
$(DOS33) -y solaris.dsk BSAVE -a 0x3F5 SOLARIS_BOT
###
@ -54,9 +55,18 @@ SOLARIS4: solaris4.o
solaris4.o: solaris4.s
ca65 -o solaris4.o solaris4.s -l solaris4.lst
###
SOLARIS_BOT: solaris_bot.o
ld65 -o SOLARIS_BOT solaris_bot.o -C $(LINKERSCRIPTS)/apple2_3f5.inc
solaris_bot.o: solaris_bot.s
ca65 -o solaris_bot.o solaris_bot.s -l solaris_bot.lst
###
clean:
rm -f *~ *.o *.lst HELLO SOLARIS SOLARIS2 SOLARIS3 SOLARIS4
rm -f *~ *.o *.lst HELLO SOLARIS SOLARIS2 SOLARIS3 SOLARIS4 SOLARIS_BOT

View File

@ -7,10 +7,11 @@ EMPTYDISK = ../../empty_disk/empty.dsk
all: cd.dsk
cd.dsk: HELLO HORIZ
cd.dsk: HELLO HORIZ HORIZ_BOT
cp $(EMPTYDISK) cd.dsk
$(DOS33) -y cd.dsk SAVE A HELLO
$(DOS33) -y cd.dsk BSAVE -a 0xC00 HORIZ
$(DOS33) -y cd.dsk BSAVE -a 0x370 HORIZ_BOT
###
@ -25,7 +26,16 @@ HORIZ: horiz.o
horiz.o: horiz.s
ca65 -o horiz.o horiz.s -l horiz.lst
###
HORIZ_BOT: horiz_bot.o
ld65 -o HORIZ_BOT horiz_bot.o -C $(LINKERSCRIPTS)/apple2_370.inc
horiz_bot.o: horiz_bot.s
ca65 -o horiz_bot.o horiz_bot.s -l horiz_bot.lst
####
clean:
rm -f *~ *.o *.lst HORIZ
rm -f *~ *.o *.lst HORIZ HORIZ_BOT

View File

@ -6,6 +6,8 @@
; 156 bytes = BIT trick
; 154 bytes = set offsets properly
; 151 bytes = redo init
; 145 bytes = leave OFFSET_POINTER in X
; 136 bytes = get rid of end offsets
GBASL = $26
GBASH = $27
@ -45,8 +47,8 @@ horiz:
forever_loop:
lda #$0 ; offset into the length pointers
sta OFFSET_POINTER
lda #$0
tax ; X = OFFSET_POINTER into length pointers
; A = screen line, 0..24
big_loop:
@ -55,7 +57,6 @@ big_loop:
jsr BASCALC ; calculate address of line in BASL/BASH
ldy #39 ; draw 40 pixels on screen
ldx OFFSET_POINTER ; get pointer to the offsets
hlin:
tya
@ -71,7 +72,8 @@ gurg:
tya
clc
sbc endoffsets,X
sbc offsets,X
sbc #30
bvs gurg2
eor #$80
gurg2:
@ -103,10 +105,12 @@ blah:
adc offsets,X
sta BASL
ldx LINE ; which line of bitmap to use
ldy LINE ; which line of bitmap to use
lda star_bitmap-1,Y ; get low bit of bitmap into carry
ldy #7 ; 8-bits wide
lda star_bitmap-1,X ; get low bit of bitmap into carry
draw_line_loop:
lsr
@ -125,10 +129,6 @@ its_transparent:
skip_star:
ldx OFFSET_POINTER
; see if new offset (meaning, we've gone three lines)
dec LINE
@ -142,10 +142,15 @@ skip_star:
lda #$b3
sta color_smc+1 ; add shadow to (top?) of line
dec offsets,X ; scroll the line length
dec endoffsets,X
inc OFFSET_POINTER ; point to next set of offsets
dec offsets,X ; scroll the line length
; lda offsets,X
; and #$7f
; sta offsets,X
inx ; point to next set of offsets
lda #3 ; reset line vlue
sta LINE
@ -156,12 +161,9 @@ not3:
pla ; restore line count
clc
adc #1
cmp #24
; tax
adc #1 ; increment
; inx
; cpx #24 ; see if reached bottom
cmp #24 ; see if reached bottom
bne big_loop
@ -179,8 +181,8 @@ not3:
offsets:
.byte 30,29,31,38,31,34,32,35
endoffsets:
.byte 60,50,61,68,61,64,62,65
;endoffsets:
; .byte 60,50,61,68,61,64,62,65
; 76543210