appleiibot: oops

This commit is contained in:
Vince Weaver 2022-02-27 23:53:06 -05:00
parent c14d20ca27
commit d24ed0f461
8 changed files with 47 additions and 21 deletions

View File

@ -21,7 +21,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
FIREWORKS.BAS THINKING.BAS ARCS.BAS WIRE_HGR.BAS STATIC.BAS \
OVAL.BAS OVAL_HGR.BAS MOVING.BAS THICK_SINE.BAS TURKEY.BAS \
FLAME_HGR.BAS RECT.BAS SNOWY.BAS EDGAR.BAS OOPS4.BAS OOPS3.BAS \
HORROR.BAS DIAMOND.BAS LEMM.BAS
HORROR.BAS DIAMOND.BAS LEMM.BAS OOPS.BAS
# cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk
cp empty.dsk appleiibot.dsk
$(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
@ -114,6 +114,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
$(DOS33) -y appleiibot.dsk SAVE A HORROR.BAS
$(DOS33) -y appleiibot.dsk SAVE A DIAMOND.BAS
$(DOS33) -y appleiibot.dsk SAVE A LEMM.BAS
$(DOS33) -y appleiibot.dsk SAVE A OOPS.BAS
####
@ -620,6 +621,11 @@ OOPS4.BAS: oops4.bas
OOPS3.BAS: oops3.bas
$(TOKENIZE) < oops3.bas > OOPS3.BAS
####
OOPS.BAS: oops.bas
$(TOKENIZE) < oops.bas > OOPS.BAS
####

View File

@ -14,14 +14,22 @@
int main(int argc, char **argv) {
int mode=END_AT_3F5;
// int mode=BEGIN_AT_3F5;
int mode=BEGIN_AT_3F5;
int i = 0;
int e = 0,filesize;
int val,pv,final;
unsigned char in[1024];
unsigned char enc[1024],enc2[1024];
int third,enc_ptr=0;
int filesize_digits;
if (argc>1) {
if (argv[1][0]=='-') {
if (argv[1][1]=='e') {
mode=END_AT_3F5;
}
}
}
// printf("1REM");
@ -113,15 +121,20 @@ int main(int argc, char **argv) {
printf("2CALL768\"%s%s\n",enc2,enc);
#endif
if ((filesize-1)<10) filesize_digits=1;
else if ((filesize-1)<100) filesize_digits=2;
else filesize_digits=3;
if (mode==END_AT_3F5) {
fprintf(stderr,"Ending at $3F5\n");
printf("1FORI=0TO%d:POKE%d+I,4*PEEK(%d+I)-"
"%d+(PEEK(%d+I/3)-%d)/4^(I-INT(I/3)*3):NEXT\n",
filesize-1,
0x3f5-filesize+3,
2125,
64+4*OFFSET,
2125+filesize,OFFSET2);
filesize-1, // filesize for loop
0x3f5-filesize+3, // destination
2122+filesize_digits, // read from 6
64+4*OFFSET, // ??
2122+filesize+filesize_digits, // read from 2
OFFSET2);
printf("2&\"%s%s\n",enc2,enc);
}
@ -129,14 +142,14 @@ int main(int argc, char **argv) {
// if using & to jump to beginning (over-writing text page)
if (mode==BEGIN_AT_3F5) {
fprintf(stderr,"Beginning at $3F5\n");
printf("1FORI=0TO%d:POKE%d+I,4*PEEK(%d+I)-"
"%d+(PEEK(%d+I/3)-%d)/4^(I-INT(I/3)*3):NEXT\n",
filesize-1,
0x3f5,
2126,
4*OFFSET+64,
2126+filesize,OFFSET2);
filesize-1, // filesize for loop
0x3f5, // destination
2123+filesize_digits, // read from 6
4*OFFSET+64, // ?
2123+filesize+filesize_digits, // read from 2
OFFSET2);
printf("2&\"%s%s\n",enc2,enc);
}

View File

@ -0,0 +1,2 @@
1FORI=0TO82:POKE1013+I,4*PEEK(2125+I)-204+(PEEK(2208+I/3)-35)/4^(I-INT(I/3)*3):NEXT
2&"/foT5aXnE?DYO2XBBr@M3Y[3TV]+ceom7iTl[3Tp[3Nq\e:B\`O4MKYr['8Hfjrirgcl:,:rA3\_BrTlF94SAJ=3W'$4C#.#.=Y))1SK1LC;W$$

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -4,7 +4,10 @@ all: inventory_sprites.inc ending_sprites.inc trogdor_sprites.inc \
boat_sprites.inc boat_sprites_fish.inc peasant_sprites.inc ned_sprites.inc \
peasant_robe_sprites.inc kerrek_sprites.inc \
waterfall_sprites.inc bubble_sprites_w.inc bubble_sprites_e.inc \
river_bubble_sprites.inc gary_sprites.inc
river_bubble_sprites.inc gary_sprites.inc archery_sprites.inc
archery_sprites.inc: archery_sprites.png
$(HGR_SPRITE) -s -l mendelev1_sprite archery_sprites.png 7 29 20 33 > archery_sprites.inc
peasant_sprites.inc: peasant_sprites.png
$(HGR_SPRITE) -l peasant_right1_sprite peasant_sprites.png 35 1 35 29 > peasant_sprites.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -16,7 +16,7 @@ sines.dsk: HELLO APPROX_SINE THICK_SINE THICK_COS TABLE_SINE ROM_SINE \
$(DOS33) -y sines.dsk BSAVE -a 0xc00 ROM_SINE
$(DOS33) -y sines.dsk BSAVE -a 0xc00 THICK_SINE
$(DOS33) -y sines.dsk BSAVE -a 0xc00 THICK_COS
$(DOS33) -y sines.dsk BSAVE -a 0xc00 OOPS_COS
$(DOS33) -y sines.dsk BSAVE -a 0x3f5 OOPS_COS
$(DOS33) -y sines.dsk BSAVE -a 0xc00 OOPS2_COS
$(DOS33) -y sines.dsk BSAVE -a 0x3f5 OOPS3_COS
$(DOS33) -y sines.dsk BSAVE -a 0x3f5 OOPS4_COS
@ -64,7 +64,7 @@ thick.o: thick.s
###
OOPS_COS: oops_cos.o
ld65 -o OOPS_COS oops_cos.o -C $(LINKERSCRIPTS)/apple2_c00.inc
ld65 -o OOPS_COS oops_cos.o -C $(LINKERSCRIPTS)/apple2_3f5.inc
oops_cos.o: oops_cos.s
ca65 -o oops_cos.o oops_cos.s -l oops_cos.lst

View File

@ -61,7 +61,7 @@ rectangle:
jsr HGR2 ; set hi-res 140x192, page2, fullscreen
; A and Y both 0 at end
over:
again:
; clear our zp things to 0
ldx #15
@ -112,7 +112,7 @@ main_loop:
end:
txa ; put zero into A
inc color_smc+1
bne over
bne again
;=================================
@ -145,6 +145,7 @@ out_loop:
lda GBASH_SAVED
sta GBASH
ldy XX
in_loop:
color_smc:
@ -160,8 +161,9 @@ output_smc:
dex
bne in_loop
lda #25 ; wait a bit
jsr WAIT
; A here is $40 - $60 (64 - 96)
; lda #25 ; wait a bit
; jsr WAIT
check_x:
clc