diff --git a/basic/appleiibot/Makefile b/basic/appleiibot/Makefile index e5bbb8e2..93ebdcc2 100644 --- a/basic/appleiibot/Makefile +++ b/basic/appleiibot/Makefile @@ -27,7 +27,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ OOZE.BAS HORIZ_STAR.BAS PLANET.BAS SECRET_COLLECT.BAS PLANET_GR.BAS \ BOXES.BAS SOLARIS.BAS SOLARIS2.BAS ASPLODE.BAS SOLARIS3.BAS \ TARGET.BAS ELITE.BAS MYSTERY.BAS OFFICE.BAS GR_XOR.BAS \ - LARGE_XOR.BAS PAR_XOR.BAS PAR_HGR.BAS + LARGE_XOR.BAS PAR_XOR.BAS PAR_HGR.BAS SIER_XOR.BAS PATTERN_LOGO.BAS cp $(EMPTY_DISK)/empty_lots_of_dirents.dsk appleiibot.dsk # cp empty.dsk appleiibot.dsk # $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD @@ -145,6 +145,8 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ $(DOS33) -y appleiibot.dsk SAVE A LARGE_XOR.BAS $(DOS33) -y appleiibot.dsk SAVE A PAR_XOR.BAS $(DOS33) -y appleiibot.dsk SAVE A PAR_HGR.BAS + $(DOS33) -y appleiibot.dsk SAVE A SIER_XOR.BAS + $(DOS33) -y appleiibot.dsk SAVE A PATTERN_LOGO.BAS #### @@ -812,6 +814,17 @@ PAR_XOR.BAS: par_xor.bas PAR_HGR.BAS: par_hgr.bas $(TOKENIZE) < par_hgr.bas > PAR_HGR.BAS +#### + +SIER_XOR.BAS: sier_xor.bas + $(TOKENIZE) < sier_xor.bas > SIER_XOR.BAS + +#### + +PATTERN_LOGO.BAS: pattern_logo.bas + $(TOKENIZE) < pattern_logo.bas > PATTERN_LOGO.BAS + + #### diff --git a/basic/appleiibot/pattern_logo.bas b/basic/appleiibot/pattern_logo.bas new file mode 100644 index 00000000..7f7a6eca --- /dev/null +++ b/basic/appleiibot/pattern_logo.bas @@ -0,0 +1,2 @@ +1FORI=0TO124:POKE1013+I,4*PEEK(2126+I)-204+(PEEK(2251+I/3)-35)/4^(I-INT(I/3)*3):NEXT +2&"/foW4TdRmW];/n[G[4\3;Do\adoVQTc[5Mk]2TrkC4mD4;C4drgn]3Pk]2Tr;C4kC4mD4drggmrS1[B[X:7p[H[3]@=1p(0<5>V8=@a5<5>b5;7>>5<<=?@>3S HELLO + +### + +GEAR.BAS: gear.bas + $(TOKENIZE) < gear.bas > GEAR.BAS + +### + +APPLE.BAS: apple.bas + $(TOKENIZE) < apple.bas > APPLE.BAS + + +### + +GEAR: gear.o + ld65 -o GEAR gear.o -C $(LINKERSCRIPTS)/apple2_c00.inc + +gear.o: gear.s + ca65 -o gear.o gear.s -l gear.lst + +### + +APPLE2: apple2.o + ld65 -o APPLE2 apple2.o -C $(LINKERSCRIPTS)/apple2_c00.inc + +apple2.o: apple2.s + ca65 -o apple2.o apple2.s -l apple2.lst + +### + +LINE32: line32.o + ld65 -o LINE32 line32.o -C $(LINKERSCRIPTS)/apple2_c00.inc + +line32.o: line32.s + ca65 -o line32.o line32.s -l line32.lst + +### + +PATTERN: pattern.o + ld65 -o PATTERN pattern.o -C $(LINKERSCRIPTS)/apple2_c00.inc + +pattern.o: pattern.s + ca65 -o pattern.o pattern.s -l pattern.lst + +### + +PATTERN_LOGO: pattern_logo.o + ld65 -o PATTERN_LOGO pattern_logo.o -C $(LINKERSCRIPTS)/apple2_3f5.inc + +pattern_logo.o: pattern_logo.s + ca65 -o pattern_logo.o pattern_logo.s -l pattern_logo.lst + +### + +clean: + rm -f *~ *.o *.lst HELLO GEAR.BAS GEAR PATTERN APPLE.BAS PATTERN_LOGO diff --git a/graphics/hgr/shape_table/apple.bas b/graphics/hgr/shape_table/apple.bas new file mode 100644 index 00000000..8f2d8022 --- /dev/null +++ b/graphics/hgr/shape_table/apple.bas @@ -0,0 +1,10 @@ +10 HIMEM:8142 +20 POKE 232,206:POKE 233,31 +30 FOR L=8142 TO 8175: READ B:POKE L,B:NEXT L +35 HGR:ROT=0:SCALE=2 +40 FOR I=1 TO 1: XDRAW I AT I*10,100:NEXT I +90 END +100 DATA 1,0,4,0,39,44,53,142,36,44 +101 DATA 53,190,9,36,44,53,190,9,32,36 +102 DATA 140,18,45,60,55,46,13,37,36,79 +103 DATA 57,54,46,0 diff --git a/graphics/hgr/shape_table/apple.table b/graphics/hgr/shape_table/apple.table new file mode 100644 index 00000000..803760d3 --- /dev/null +++ b/graphics/hgr/shape_table/apple.table @@ -0,0 +1,71 @@ +# Number of shapes +1 +# "Apple ][" +START +LT +UP +UP +RT +RT +DN +DN +# +NRT +NDN +UP +UP +UP +RT +RT +DN +DN +LT +# +NDN +NRT +NRT +UP +UP +UP +RT +RT +DN +DN +LT +NDN +NRT +NRT +NUP +UP +UP +UP +UP +NRT +NDN +NDN +NDN +RT +RT +UP +LT +LT +DN +DN +RT +RT +NRT +RT +UP +UP +UP +LT +NRT +NRT +NRT +LT +DN +DN +DN +RT +STOP + diff --git a/graphics/hgr/shape_table/apple2.s b/graphics/hgr/shape_table/apple2.s new file mode 100644 index 00000000..4d869922 --- /dev/null +++ b/graphics/hgr/shape_table/apple2.s @@ -0,0 +1,135 @@ +; Tiny Xdraw + +; zero page locations +HGR_SHAPE = $1A +HGR_SHAPE2 = $1B +HGR_BITS = $1C +GBASL = $26 +GBASH = $27 +A5H = $45 +XREG = $46 +YREG = $47 + ; C0-CF should be clear + ; D0-DF?? D0-D5 = HGR scratch? +HGR_DX = $D0 ; HGLIN +HGR_DX2 = $D1 ; HGLIN +HGR_DY = $D2 ; HGLIN +HGR_QUADRANT = $D3 +HGR_E = $D4 +HGR_E2 = $D5 +HGR_X = $E0 +HGR_X2 = $E1 +HGR_Y = $E2 +HGR_COLOR = $E4 +HGR_HORIZ = $E5 +HGR_SCALE = $E7 +HGR_SHAPE_TABLE = $E8 +HGR_SHAPE_TABLE2= $E9 +HGR_COLLISIONS = $EA +HGR_ROTATION = $F9 +FRAME = $FC +FRAMEH = $FD +XPOS = $FE +YPOS = $FF + +; ROM calls +HGR2 = $F3D8 +HGR = $F3E2 +HPOSN = $F411 +DRAW0 = $F601 +XDRAW0 = $F65D +XDRAW1 = $F661 +RESTORE = $FF3F + + +gear: + + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call +.if 0 + lda #10 + sta HGR_SCALE + + ; A and Y are 0 here. + ; X is left behind by the boot process? + + sty FRAME + sty FRAMEH + + ldy #0 + ldx #100 + lda #100 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + ; saves X,Y,A to zero page + ; after Y= orig X/7 + ; A and X are ?? +tiny_loop: + + ; values for shape table + ; Y X + ; 00 E7 = neat + ; 00 EB = OK + ; 00 EF = good + ; F0 01 = cool, let's go with it + + ldx #shape_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #1 ; ROT=0 + jsr XDRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + + inc FRAME + bne skip_frameh_inc + inc FRAMEH +skip_frameh_inc: + lda FRAMEH + cmp #13 + bne tiny_loop ; bra + + lda FRAME + cmp #32 + bne tiny_loop +oog: + +.endif + lda #10 + sta HGR_SCALE + + ldy #0 + ldx #96 + lda #150 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + + + ldx #apple_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #56 ; ROT=0 + jsr XDRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + +blah: + jmp blah + +shape_table: +; .byte $01,$00, + .byte $04,$00,$25,$35,$00 + +apple_table: +.byte $27,$2c,$35,$8e,$24,$2c +.byte $35,$be,$09,$24,$2c,$35,$be,$09 +.byte $20,$24,$8c,$12,$2d,$3c,$37,$2e +.byte $0d,$25,$24,$4f,$39,$36,$2e,$00 diff --git a/graphics/hgr/shape_table/gear.s b/graphics/hgr/shape_table/gear.s new file mode 100644 index 00000000..bc3c8a5f --- /dev/null +++ b/graphics/hgr/shape_table/gear.s @@ -0,0 +1,158 @@ +; Pattern Logo + +; by Vince `deater` Weaver + +; zero page locations +HGR_SHAPE = $1A +HGR_SHAPE2 = $1B +HGR_BITS = $1C +GBASL = $26 +GBASH = $27 +A5H = $45 +XREG = $46 +YREG = $47 + ; C0-CF should be clear + ; D0-DF?? D0-D5 = HGR scratch? +HGR_DX = $D0 ; HGLIN +HGR_DX2 = $D1 ; HGLIN +HGR_DY = $D2 ; HGLIN +HGR_QUADRANT = $D3 +HGR_E = $D4 +HGR_E2 = $D5 +HGR_X = $E0 +HGR_X2 = $E1 +HGR_Y = $E2 +HGR_COLOR = $E4 +HGR_HORIZ = $E5 +HGR_SCALE = $E7 +HGR_SHAPE_TABLE = $E8 +HGR_SHAPE_TABLE2= $E9 +HGR_COLLISIONS = $EA +HGR_ROTATION = $F9 +FRAME = $FC +FRAMEH = $FD +XPOS = $FE +YPOS = $FF + +; ROM calls +HGR2 = $F3D8 +HGR = $F3E2 +HPOSN = $F411 +DRAW0 = $F601 +XDRAW0 = $F65D +XDRAW1 = $F661 +RESTORE = $FF3F + + +gear: + + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call + + lda #10 + sta HGR_SCALE + + ; A and Y are 0 here. + ; X is left behind by the boot process? + + sty HGR_COLLISIONS + + tya + tax ; load X with 0 +; ldy #0 +; ldx #00 +; lda #00 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + ; saves X,Y,A to zero page + ; after Y= orig X/7 + ; A and X are ?? +pattern_loop: + + ldx #pattern_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #1 ; ROT=0 + jsr XDRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + lda HGR_COLLISIONS + bne pattern_loop + +oog: + + lda #$7f + sta HGR_COLOR + + lda #10 + sta HGR_SCALE + + lda #3 + sta FRAME +logo_loop1: + + inc xsmc+1 + inc ysmc+1 + + jsr draw_logo + + dec FRAME + bne logo_loop1 + + lda #$00 + sta HGR_COLOR + + lda #3 + sta FRAME +logo_loop2: + + jsr draw_logo + + inc xsmc+1 + inc ysmc+1 + + dec FRAME + bne logo_loop2 + +blah: + beq blah + + ;=============== + ; draw shape table logo +draw_logo: + ldy #0 +xsmc: + ldx #96 +ysmc: + lda #150 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + + + ldx #apple_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #52 ; ROT=0 + jmp DRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + + + +pattern_table: +.byte $04,$00 + +apple_table: +.byte $27,$2c,$35,$8e,$24,$2c +.byte $35,$be,$09,$24,$2c,$35,$be,$09 +.byte $20,$24,$8c,$12,$2d,$3c,$37,$2e +.byte $0d,$25,$24,$4f,$39,$36,$2e,$00 diff --git a/graphics/hgr/shape_table/gear.table b/graphics/hgr/shape_table/gear.table new file mode 100644 index 00000000..caf2cffe --- /dev/null +++ b/graphics/hgr/shape_table/gear.table @@ -0,0 +1,10 @@ +# Number of shapes +1 +# "Engine" +START +RT +UP +RT +DN +STOP + diff --git a/graphics/hgr/shape_table/line32.s b/graphics/hgr/shape_table/line32.s new file mode 100644 index 00000000..38a442bf --- /dev/null +++ b/graphics/hgr/shape_table/line32.s @@ -0,0 +1,90 @@ +; Tiny Xdraw + +; zero page locations +HGR_SHAPE = $1A +HGR_SHAPE2 = $1B +HGR_BITS = $1C +GBASL = $26 +GBASH = $27 +A5H = $45 +XREG = $46 +YREG = $47 + ; C0-CF should be clear + ; D0-DF?? D0-D5 = HGR scratch? +HGR_DX = $D0 ; HGLIN +HGR_DX2 = $D1 ; HGLIN +HGR_DY = $D2 ; HGLIN +HGR_QUADRANT = $D3 +HGR_E = $D4 +HGR_E2 = $D5 +HGR_X = $E0 +HGR_X2 = $E1 +HGR_Y = $E2 +HGR_COLOR = $E4 +HGR_HORIZ = $E5 +HGR_SCALE = $E7 +HGR_SHAPE_TABLE = $E8 +HGR_SHAPE_TABLE2= $E9 +HGR_COLLISIONS = $EA +HGR_ROTATION = $F9 +FRAME = $FC +XPOS = $FD +YPOS = $FF + +; ROM calls +HGR2 = $F3D8 +HGR = $F3E2 +HPOSN = $F411 +XDRAW0 = $F65D +XDRAW1 = $F661 +RESTORE = $FF3F + + +tiny_xdraw: + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call + + lda #10 + sta HGR_SCALE + + ; A and Y are 0 here. + ; X is left behind by the boot process? + + + ldy #0 + ldx #100 + lda #100 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + ; saves X,Y,A to zero page + ; after Y= orig X/7 + ; A and X are ?? +tiny_loop: + + ; values for shape table + ; Y X + ; 00 E7 = neat + ; 00 EB = OK + ; 00 EF = good + ; F0 01 = cool, let's go with it + + ldx #shape_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #1 ; ROT=0 + jsr XDRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + beq tiny_loop ; bra + + +shape_table: +; .byte $01,$00, + .byte $04,$00,$25,$35,$00 + + diff --git a/graphics/hgr/shape_table/pattern.s b/graphics/hgr/shape_table/pattern.s new file mode 100644 index 00000000..a4268641 --- /dev/null +++ b/graphics/hgr/shape_table/pattern.s @@ -0,0 +1,114 @@ +; Cool Pattern + +; zero page locations +HGR_SHAPE = $1A +HGR_SHAPE2 = $1B +HGR_BITS = $1C +GBASL = $26 +GBASH = $27 +A5H = $45 +XREG = $46 +YREG = $47 + ; C0-CF should be clear + ; D0-DF?? D0-D5 = HGR scratch? +HGR_DX = $D0 ; HGLIN +HGR_DX2 = $D1 ; HGLIN +HGR_DY = $D2 ; HGLIN +HGR_QUADRANT = $D3 +HGR_E = $D4 +HGR_E2 = $D5 +HGR_X = $E0 +HGR_X2 = $E1 +HGR_Y = $E2 +HGR_COLOR = $E4 +HGR_HORIZ = $E5 +HGR_SCALE = $E7 +HGR_SHAPE_TABLE = $E8 +HGR_SHAPE_TABLE2= $E9 +HGR_COLLISIONS = $EA +HGR_ROTATION = $F9 +FRAME = $FC +FRAMEH = $FD +XPOS = $FE +YPOS = $FF + +; ROM calls +HGR2 = $F3D8 +HGR = $F3E2 +HPOSN = $F411 +DRAW0 = $F601 +XDRAW0 = $F65D +XDRAW1 = $F661 +RESTORE = $FF3F + + +tiny_xdraw: + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call + + lda #10 + sta HGR_SCALE + + ; A and Y are 0 here. + ; X is left behind by the boot process? + +; sty FRAME +; sty FRAMEH + + sty HGR_COLLISIONS + + tya + tax + +; ldy #0 +; ldx #100 +; lda #100 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + ; saves X,Y,A to zero page + ; after Y= orig X/7 + ; A and X are ?? +tiny_loop: + + ; values for shape table + ; Y X + ; 00 E7 = neat + ; 00 EB = OK + ; 00 EF = good + ; F0 01 = cool, let's go with it + + ldx #shape_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #1 ; ROT=0 + jsr XDRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + +; inc FRAME +; bne skip_frameh_inc +; inc FRAMEH +;skip_frameh_inc: +; lda FRAMEH +; cmp #13 +; bne tiny_loop ; bra + +; lda FRAME +; cmp #32 + + lda HGR_COLLISIONS + bne tiny_loop + +blah: + beq blah + +shape_table: +; .byte $01,$00, + .byte $04,$00 ;,$25,$35,$00 + + diff --git a/graphics/hgr/shape_table/pattern_logo.s b/graphics/hgr/shape_table/pattern_logo.s new file mode 100644 index 00000000..bc3c8a5f --- /dev/null +++ b/graphics/hgr/shape_table/pattern_logo.s @@ -0,0 +1,158 @@ +; Pattern Logo + +; by Vince `deater` Weaver + +; zero page locations +HGR_SHAPE = $1A +HGR_SHAPE2 = $1B +HGR_BITS = $1C +GBASL = $26 +GBASH = $27 +A5H = $45 +XREG = $46 +YREG = $47 + ; C0-CF should be clear + ; D0-DF?? D0-D5 = HGR scratch? +HGR_DX = $D0 ; HGLIN +HGR_DX2 = $D1 ; HGLIN +HGR_DY = $D2 ; HGLIN +HGR_QUADRANT = $D3 +HGR_E = $D4 +HGR_E2 = $D5 +HGR_X = $E0 +HGR_X2 = $E1 +HGR_Y = $E2 +HGR_COLOR = $E4 +HGR_HORIZ = $E5 +HGR_SCALE = $E7 +HGR_SHAPE_TABLE = $E8 +HGR_SHAPE_TABLE2= $E9 +HGR_COLLISIONS = $EA +HGR_ROTATION = $F9 +FRAME = $FC +FRAMEH = $FD +XPOS = $FE +YPOS = $FF + +; ROM calls +HGR2 = $F3D8 +HGR = $F3E2 +HPOSN = $F411 +DRAW0 = $F601 +XDRAW0 = $F65D +XDRAW1 = $F661 +RESTORE = $FF3F + + +gear: + + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call + + lda #10 + sta HGR_SCALE + + ; A and Y are 0 here. + ; X is left behind by the boot process? + + sty HGR_COLLISIONS + + tya + tax ; load X with 0 +; ldy #0 +; ldx #00 +; lda #00 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + ; saves X,Y,A to zero page + ; after Y= orig X/7 + ; A and X are ?? +pattern_loop: + + ldx #pattern_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #1 ; ROT=0 + jsr XDRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + lda HGR_COLLISIONS + bne pattern_loop + +oog: + + lda #$7f + sta HGR_COLOR + + lda #10 + sta HGR_SCALE + + lda #3 + sta FRAME +logo_loop1: + + inc xsmc+1 + inc ysmc+1 + + jsr draw_logo + + dec FRAME + bne logo_loop1 + + lda #$00 + sta HGR_COLOR + + lda #3 + sta FRAME +logo_loop2: + + jsr draw_logo + + inc xsmc+1 + inc ysmc+1 + + dec FRAME + bne logo_loop2 + +blah: + beq blah + + ;=============== + ; draw shape table logo +draw_logo: + ldy #0 +xsmc: + ldx #96 +ysmc: + lda #150 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + + + ldx #apple_table ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise + lda #52 ; ROT=0 + jmp DRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + + + +pattern_table: +.byte $04,$00 + +apple_table: +.byte $27,$2c,$35,$8e,$24,$2c +.byte $35,$be,$09,$24,$2c,$35,$be,$09 +.byte $20,$24,$8c,$12,$2d,$3c,$37,$2e +.byte $0d,$25,$24,$4f,$39,$36,$2e,$00