diff --git a/basic/appleiibot/Makefile b/basic/appleiibot/Makefile index e09a791a..0e1d0672 100644 --- a/basic/appleiibot/Makefile +++ b/basic/appleiibot/Makefile @@ -26,7 +26,7 @@ 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 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 + TARGET.BAS ELITE.BAS MYSTERY.BAS OFFICE.BAS GR_XOR.BAS cp $(EMPTY_DISK)/empty_lots_of_dirents.dsk appleiibot.dsk # cp empty.dsk appleiibot.dsk # $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD @@ -140,6 +140,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ $(DOS33) -y appleiibot.dsk SAVE A ELITE.BAS $(DOS33) -y appleiibot.dsk SAVE A MYSTERY.BAS $(DOS33) -y appleiibot.dsk SAVE A OFFICE.BAS + $(DOS33) -y appleiibot.dsk SAVE A GR_XOR.BAS #### @@ -787,6 +788,11 @@ MYSTERY.BAS: mystery.bas OFFICE.BAS: office.bas $(TOKENIZE) < office.bas > OFFICE.BAS +#### + +GR_XOR.BAS: gr_xor.bas + $(TOKENIZE) < gr_xor.bas > GR_XOR.BAS + #### diff --git a/basic/appleiibot/gr_xor.bas b/basic/appleiibot/gr_xor.bas new file mode 100644 index 00000000..dbe3239c --- /dev/null +++ b/basic/appleiibot/gr_xor.bas @@ -0,0 +1,2 @@ +1FORI=0TO64:POKE951+I,4*PEEK(2124+I)-204+(PEEK(2189+I/3)-35)/4^(I-INT(I/3)*3):NEXT +2&"/@q HELLO + +#### + + +clean: + rm -f *~ *.o *.lst HELLO BOXES *.zip + diff --git a/graphics/gr/parallax/boxes.s b/graphics/gr/parallax/boxes.s new file mode 100644 index 00000000..6ddc512c --- /dev/null +++ b/graphics/gr/parallax/boxes.s @@ -0,0 +1,112 @@ + +; by deater (Vince Weaver) + + +; Zero Page +GBASL = $26 +GBASH = $27 +H2 = $2C +COLOR = $30 + +X2 = $FB +FRAME = $FC +PAGE = $FD + +; Soft Switches +KEYPRESS= $C000 +KEYRESET= $C010 +SET_GR = $C050 ; Enable graphics +FULLGR = $C052 ; Full screen, no text +PAGE1 = $C054 ; Page1 +PAGE2 = $C055 ; Page2 +LORES = $C056 ; Enable LORES graphics + +; ROM routines + +PLOT = $F800 ; plot, horiz=y, vert=A (A trashed, XY Saved) +SETCOL = $F864 +GBASCALC= $F847 ;; take Y-coord/2 in A, put address in GBASL/H ( a trashed, C clear) + +SETGR = $FB40 +HOME = $FC58 ;; Clear the text screen +WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us +HLINE = $F819 + + + +boxes: + + ;=================== + ; init screen + jsr SETGR ; 3 + bit FULLGR ; 3 + + lda #$0 + sta PAGE + +boxes_forever: + + inc FRAME ; 2 + + ldx #23 ; 2 + +; 65 + + ; flip page + + lda PAGE + pha + + lsr + lsr + tay + lda PAGE1,Y + + pla + + eor #$4 + sta PAGE + +yloop: + txa + jsr GBASCALC + lda GBASH + clc + adc PAGE + sta GBASH + + ldy #39 ; 2 +xloop: + + ; calculate color + + ; color = (XX-FRAME)^(A) | DB+1 + + sec ; subtract frame from Y + tya + sbc FRAME + sta X2 + + txa + + and #$Fc + + eor X2 + + +; jsr SETCOL + + sta (GBASL),Y + + dey ; 1 + bpl xloop ; 2 + + dex ; 1 + + bpl yloop ; 2 + + bmi boxes_forever ; 2 + + +; for bot +; jmp boxes diff --git a/graphics/gr/parallax/boxes_bot.s b/graphics/gr/parallax/boxes_bot.s new file mode 100644 index 00000000..199408f7 --- /dev/null +++ b/graphics/gr/parallax/boxes_bot.s @@ -0,0 +1,112 @@ + +; by deater (Vince Weaver) + + +; Zero Page +GBASL = $26 +GBASH = $27 +H2 = $2C +COLOR = $30 + +X2 = $FB +FRAME = $FC +PAGE = $FD + +; Soft Switches +KEYPRESS= $C000 +KEYRESET= $C010 +SET_GR = $C050 ; Enable graphics +FULLGR = $C052 ; Full screen, no text +PAGE1 = $C054 ; Page1 +PAGE2 = $C055 ; Page2 +LORES = $C056 ; Enable LORES graphics + +; ROM routines + +PLOT = $F800 ; plot, horiz=y, vert=A (A trashed, XY Saved) +SETCOL = $F864 +GBASCALC= $F847 ;; take Y-coord/2 in A, put address in GBASL/H ( a trashed, C clear) + +SETGR = $FB40 +HOME = $FC58 ;; Clear the text screen +WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us +HLINE = $F819 + + + +boxes: + + ;=================== + ; init screen + jsr SETGR ; 3 + bit FULLGR ; 3 + + lda #$0 + sta PAGE + +boxes_forever: + + inc FRAME ; 2 + + ldx #23 ; 2 + + ; flip page + + lda PAGE + pha + + lsr + lsr + tay + lda PAGE1,Y + + pla + + eor #$4 + sta PAGE + +yloop: + txa + jsr GBASCALC + lda GBASH + clc + adc PAGE + sta GBASH + + ldy #39 ; 2 +xloop: + + ; calculate color + + ; color = (XX-FRAME)^(A) | DB+1 + + sec ; subtract frame from Y + tya + sbc FRAME + sta X2 + + txa + + and #$Fc + + eor X2 + + +; jsr SETCOL + + sta (GBASL),Y + + dey ; 1 + bpl xloop ; 2 + + dex ; 1 + + bpl yloop ; 2 + + bmi boxes_forever ; 2 + + +; for bot + ; want this to be at 3F5-62 = 3B7??? + + jmp boxes diff --git a/graphics/gr/parallax/hello.bas b/graphics/gr/parallax/hello.bas new file mode 100644 index 00000000..0e3aae36 --- /dev/null +++ b/graphics/gr/parallax/hello.bas @@ -0,0 +1,2 @@ +5 HOME +40 PRINT CHR$(4)"CATALOG"