mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-12 15:30:55 +00:00
appleiibot: failed star fields
This commit is contained in:
parent
09d531e4af
commit
c9835427bc
@ -10,7 +10,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
|
||||
CONCERT.BAS NYAN.BAS RASTER.BAS RASTER2.BAS RASTER3.BAS LOTS.BAS LOAD \
|
||||
RASTER4.BAS RASTER5.BAS PUMPKIN.BAS PUMPKIN_SMALL.BAS LADY.BAS \
|
||||
A2.BAS FOURAM.BAS FLOPPY.BAS QR.BAS A2_4EVER.BAS RLE.BAS RLE2.BAS \
|
||||
RLEASM.BAS HORIZON.BAS FLYER.BAS
|
||||
RLEASM.BAS HORIZON.BAS FLYER.BAS STAR.BAS HYPER.BAS FASTAR.BAS
|
||||
cp empty.dsk appleiibot.dsk
|
||||
$(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
|
||||
$(DOS33) -y appleiibot.dsk SAVE A E2.BAS
|
||||
@ -43,6 +43,9 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
|
||||
$(DOS33) -y appleiibot.dsk SAVE A RLEASM.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A HORIZON.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A FLYER.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A STAR.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A HYPER.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A FASTAR.BAS
|
||||
|
||||
###
|
||||
|
||||
@ -248,5 +251,21 @@ FLYER.BAS: flyer.bas
|
||||
|
||||
####
|
||||
|
||||
STAR.BAS: star.bas
|
||||
$(TOKENIZE) < star.bas > STAR.BAS
|
||||
|
||||
####
|
||||
|
||||
FASTAR.BAS: fastar.bas
|
||||
$(TOKENIZE) < fastar.bas > FASTAR.BAS
|
||||
|
||||
|
||||
####
|
||||
|
||||
HYPER.BAS: hyper.bas
|
||||
$(TOKENIZE) < hyper.bas > HYPER.BAS
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst convert_to convert_from convert_qkumba make_boxes convert_back LOAD *.BAS
|
||||
|
10
appleiibot/fastar.bas
Normal file
10
appleiibot/fastar.bas
Normal file
@ -0,0 +1,10 @@
|
||||
0 DIM X(17),Y(17):FOR I=0 TO 16:READ X(I),Y(I):NEXT
|
||||
1HGR:HGR2:HCOLOR=3
|
||||
4FORI=1TO16:POKE230,32+32*P:P=NOTP:POKE49236+P,0:CALL-3086
|
||||
5FORJ=1TO1
|
||||
6IFX(I-1)ANDX(I)THENHPLOTX(I-1),Y(I-1)TOX(I),Y(I)
|
||||
7NEXTJ,I:GOTO4
|
||||
100 DATA 97,111,96,111,95,111,94,111,92,112
|
||||
105 DATA 90,113,87,114,83,115,79,117,73,119
|
||||
110 DATA 66,121,58,124,49,127,37,131
|
||||
115 DATA 22,136,5,143,0,0
|
@ -1,5 +1,5 @@
|
||||
1HGR2:Z=96:K=279
|
||||
2FORJ=0TO7:HCOLOR=2:S=Z+12*J:POKE230,32+32*P:P=NOTP:POKE49236+P,0:CALL-3086
|
||||
3S=S/2:Y=Z+S:HPLOT0,YTOK,Y:IFS>1THEN3
|
||||
4HCOLOR=3:HPLOT0,ZTO140,80TOK,0:Y=101:G=2.5:FORI=1TO8:A=16*I:IFY>191THENY=191
|
||||
7X=(A*3-268)*(I>5):HPLOTX,YTO4+A,ZTO272-A,ZTOK-X,Y:G=G+G:Y=Y+G:NEXTI,J:GOTO2
|
||||
4HPLOT0,ZTO133,80TOK,Z:HCOLOR=3:Y=99:G=2:FORI=1TO8:A=16*I:IFY>191THENY=191
|
||||
7X=(A*3-268)*(I>5):HPLOTX,YTOA,ZTO276-A,ZTOK-X,Y:G=G+G:Y=Y+G:NEXTI,J:GOTO2
|
||||
|
6
appleiibot/hyper.bas
Normal file
6
appleiibot/hyper.bas
Normal file
@ -0,0 +1,6 @@
|
||||
1HGR:HGR2:HCOLOR=3
|
||||
2POKE230,32+32*P:P=NOTP:POKE49236+P,0
|
||||
3FORI=1TO10:A=X(I):B=Y(I):C=Z(I)*.1:X(I)=A+(A-140)*C:Y(I)=B+(B-96)*C:Z(I)=Z(I)+.1
|
||||
5IFX(I)<0ORX(I)>279ORY(I)<0ORY(I)>191THENX(I)=70+RND(1)*140:Y(I)=48+RND(1)*96:Z(I)=0:GOTO7
|
||||
6HPLOTA,BTOX(I),Y(I)
|
||||
7NEXTI:GOTO2
|
6
appleiibot/star.bas
Normal file
6
appleiibot/star.bas
Normal file
@ -0,0 +1,6 @@
|
||||
1HGR:HGR2:HCOLOR=3
|
||||
2POKE230,32+32*P:P=NOTP:POKE49236+P,0:CALL-3086
|
||||
3FORI=1TO10:A=X(I):B=Y(I):C=Z(I)*.1:X(I)=A+(A-140)*C:Y(I)=B+(B-96)*C:Z(I)=Z(I)+.1
|
||||
5IFX(I)<0ORX(I)>279ORY(I)<0ORY(I)>191THENX(I)=RND(1)*280:Y(I)=RND(1)*192:Z(I)=0:GOTO7
|
||||
6HPLOTA,BTOX(I),Y(I)
|
||||
7NEXTI:GOTO2
|
44
appleiibot/star.c
Normal file
44
appleiibot/star.c
Normal file
@ -0,0 +1,44 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SIZE 10
|
||||
#define REPEAT 100
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
int i,j;
|
||||
double a,b,c;
|
||||
double x[SIZE],y[SIZE],z[SIZE];
|
||||
double speed=0.1;
|
||||
|
||||
double outputx[SIZE][REPEAT];
|
||||
double outputy[SIZE][REPEAT];
|
||||
|
||||
for(j=1;j<REPEAT;j++) {
|
||||
for(i=1;i<SIZE;i++) {
|
||||
a=x[i];
|
||||
b=y[i];
|
||||
c=z[i]*speed;
|
||||
x[i]=a+(a-140)*c;
|
||||
y[i]=b+(b-96)*c;
|
||||
z[i]=z[i]+speed;
|
||||
|
||||
if ((x[i]<0) || (x[i]>279) || (y[i]<0) || (y[i]>191)) {
|
||||
x[i]=rand()%279;
|
||||
y[i]=rand()%191;
|
||||
z[i]=0;
|
||||
}
|
||||
else {
|
||||
outputx[i][j]=x[i];
|
||||
outputy[i][j]=y[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(i=1;i<SIZE;i++) {
|
||||
for(j=1;j<REPEAT;j++) {
|
||||
printf("%i:%i: %.1f %.1f\n",i,j,outputx[i][j],outputy[i][j]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,2 +1,2 @@
|
||||
5 HOME
|
||||
10 HIMEM:24576
|
||||
|
||||
|
61
bot_demo/load.s
Normal file
61
bot_demo/load.s
Normal file
@ -0,0 +1,61 @@
|
||||
|
||||
CURLIN = $75
|
||||
ERRFLG = $D8
|
||||
TXTPTR = $B8
|
||||
CHRGET = $00B1
|
||||
|
||||
RESTART = $D43C
|
||||
INLIN2 = $D52E
|
||||
PARSE_INPUT_LINE = $d559
|
||||
TRACE_ = $D805
|
||||
|
||||
load_file:
|
||||
|
||||
|
||||
do_list:
|
||||
lda #'L'
|
||||
sta $200
|
||||
lda #'I'
|
||||
sta $201
|
||||
lda #'S'
|
||||
sta $202
|
||||
lda #'T'
|
||||
sta $203
|
||||
lda #0
|
||||
sta $204
|
||||
jmp run_command
|
||||
|
||||
|
||||
run_command:
|
||||
; calls MON_GETLN
|
||||
; length in X
|
||||
; nul terminates
|
||||
; turns off sign bits
|
||||
;(Y,X) points at buffer - 1 (so $1FF?)
|
||||
|
||||
|
||||
; jsr INLIN2
|
||||
; stx TXTPTR ; set up CHRGET to scan the line
|
||||
; sty TXTPTR+1
|
||||
; lsr ERRFLG ;clear flag
|
||||
; jsr CHRGET
|
||||
; tax
|
||||
; beq RESTART ;empty line
|
||||
;d450: a2 ff ldx #$ff ;$ff in hi-byte of CURLIN means
|
||||
;d452: 86 76 stx CURLIN+1 ; we are in direct mode
|
||||
;d454: 90 06 bcc NUMBERED_LINE ;CHRGET saw digit, numbered line
|
||||
;d456: 20 59 d5 jsr PARSE_INPUT_LINE ;no number, so parse it
|
||||
;d459: 4c 05 d8 jmp TRACE_ ;and try executing it
|
||||
|
||||
|
||||
ldx #$ff
|
||||
stx TXTPTR
|
||||
ldy #$1
|
||||
sty TXTPTR+1
|
||||
jsr CHRGET
|
||||
|
||||
ldx #$ff
|
||||
stx CURLIN+1
|
||||
jsr PARSE_INPUT_LINE
|
||||
jmp TRACE_
|
||||
|
Loading…
x
Reference in New Issue
Block a user