diff --git a/basic/appleiibot/Makefile b/basic/appleiibot/Makefile index 0e1d0672..234e9f2c 100644 --- a/basic/appleiibot/Makefile +++ b/basic/appleiibot/Makefile @@ -26,7 +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 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 + TARGET.BAS ELITE.BAS MYSTERY.BAS OFFICE.BAS GR_XOR.BAS \ + LARGE_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 @@ -141,6 +142,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \ $(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 + $(DOS33) -y appleiibot.dsk SAVE A LARGE_XOR.BAS #### @@ -793,6 +795,11 @@ OFFICE.BAS: office.bas GR_XOR.BAS: gr_xor.bas $(TOKENIZE) < gr_xor.bas > GR_XOR.BAS +#### + +LARGE_XOR.BAS: large_xor.bas + $(TOKENIZE) < large_xor.bas > LARGE_XOR.BAS + #### diff --git a/basic/appleiibot/large_xor.bas b/basic/appleiibot/large_xor.bas new file mode 100644 index 00000000..15a6ff0c --- /dev/null +++ b/basic/appleiibot/large_xor.bas @@ -0,0 +1,2 @@ +1FORI=0TO113:POKE902+I,4*PEEK(2125+I)-204+(PEEK(2239+I/3)-35)/4^(I-INT(I/3)*3):NEXT +2&"/@q HELLO diff --git a/graphics/gr/parallax/large.s b/graphics/gr/parallax/large.s new file mode 100644 index 00000000..13500cab --- /dev/null +++ b/graphics/gr/parallax/large.s @@ -0,0 +1,170 @@ + +; by deater (Vince Weaver) + + +; Zero Page +GBASL = $26 +GBASH = $27 +H2 = $2C +COLOR = $30 + + +X2 = $FB +COLORS = $FC +FRAME = $EA ; also a nop +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 + + ;======================== + ; update directions + + lda FRAME + + lsr + lsr + lsr + lsr + lsr + and #$3 + + tax + lda colors,X + sta COLORS + + lda dir_horiz_lookup,X + sta horiz_smc + lda dir_vert_lookup,X + sta vert_smc + + + ;========================== + ; flip page + + lda PAGE + pha + + lsr + lsr + tay + lda PAGE1,Y + + pla + + eor #$4 + sta PAGE + + + ;======================== + ; setup for 23 lines + + ldx #23 ; 2 + +yloop: + + ;============== + ; point GBASL/GBSAH to current line + + txa + jsr GBASCALC + lda GBASH + clc + adc PAGE + sta GBASH + + ;============== + ; current column (work backwards) + + ldy #39 ; 2 +xloop: + + ; calculate color + + ; color = (XX-FRAME)^(YY) + + sec ; subtract frame from Y + tya + +horiz_smc: + adc FRAME + + sta X2 + + txa + +vert_smc: + adc FRAME + + eor X2 + and #$4 + + beq clear_it + + lda COLORS + bne done_set_color +clear_it: + lda #$0 +done_set_color: + + sta (GBASL),Y + + dey ; 1 + bpl xloop ; 2 + + dex ; 1 + + bpl yloop ; 2 + + bmi boxes_forever ; 2 + + ; 00 = right + ; 01 = up + ; 10 = left + ; 11 = down + ; adc = $65 + ; sbc = $E5 +dir_horiz_lookup: + .byte $65,$EA,$E5,$EA +dir_vert_lookup: + .byte $EA,$E5,$EA,$65 +colors: + .byte $1B,$26,$4C,$9D + +; for bot + ; 3F5 - 111 = 6F = 386 + +; jmp boxes diff --git a/graphics/gr/parallax/large_bot.s b/graphics/gr/parallax/large_bot.s new file mode 100644 index 00000000..501b327b --- /dev/null +++ b/graphics/gr/parallax/large_bot.s @@ -0,0 +1,170 @@ + +; by deater (Vince Weaver) + + +; Zero Page +GBASL = $26 +GBASH = $27 +H2 = $2C +COLOR = $30 + + +X2 = $FB +COLORS = $FC +FRAME = $EA ; also a nop +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 + + ;======================== + ; update directions + + lda FRAME + + lsr + lsr + lsr + lsr + lsr + and #$3 + + tax + lda colors,X + sta COLORS + + lda dir_horiz_lookup,X + sta horiz_smc + lda dir_vert_lookup,X + sta vert_smc + + + ;========================== + ; flip page + + lda PAGE ; if disp page == 0 (page1) + pha ; make draw_page1, disp_page2 + ; if displ_page == 4 (page2) + lsr ; make draw_page2, disp_page1 + lsr + tay + lda PAGE1,Y + + pla + + eor #$4 + sta PAGE + + + ;======================== + ; setup for 23 lines + + ldx #23 ; 2 + +yloop: + + ;============== + ; point GBASL/GBSAH to current line + + txa + jsr GBASCALC + lda GBASH + clc + adc PAGE + sta GBASH + + ;============== + ; current column (work backwards) + + ldy #39 ; 2 +xloop: + + ; calculate color + + ; color = (XX-FRAME)^(YY) + + sec ; subtract frame from Y + tya + +horiz_smc: + adc FRAME + + sta X2 + + txa + +vert_smc: + adc FRAME + + eor X2 + and #$4 + + beq clear_it + + lda COLORS + bne done_set_color +clear_it: + lda #$0 +done_set_color: + + sta (GBASL),Y + + dey ; 1 + bpl xloop ; 2 + + dex ; 1 + + bpl yloop ; 2 + + bmi boxes_forever ; 2 + + ; 00 = right + ; 01 = up + ; 10 = left + ; 11 = down + ; adc = $65 + ; sbc = $E5 +dir_horiz_lookup: + .byte $65,$EA,$E5,$EA +dir_vert_lookup: + .byte $EA,$E5,$EA,$65 +colors: + .byte $1B,$26,$4C,$9D + +; for bot + ; 3F5 - 111 = 6F = 386 + + jmp boxes diff --git a/linker_scripts/apple2_200.inc b/linker_scripts/apple2_200.inc new file mode 100644 index 00000000..b312977d --- /dev/null +++ b/linker_scripts/apple2_200.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $200, size = $8000, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro, align = $100; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +} diff --git a/linker_scripts/apple2_386.inc b/linker_scripts/apple2_386.inc new file mode 100644 index 00000000..9dbe74d1 --- /dev/null +++ b/linker_scripts/apple2_386.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $386, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +} diff --git a/linker_scripts/apple2_389.inc b/linker_scripts/apple2_389.inc new file mode 100644 index 00000000..3472b4d7 --- /dev/null +++ b/linker_scripts/apple2_389.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $389, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +} diff --git a/linker_scripts/apple2_3b7.inc b/linker_scripts/apple2_3b7.inc new file mode 100644 index 00000000..f5d3a338 --- /dev/null +++ b/linker_scripts/apple2_3b7.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $00, size = $1A, type = rw; + RAM: start = $3b7, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = zp; +} diff --git a/linker_scripts/apple2_80_zp.inc b/linker_scripts/apple2_80_zp.inc new file mode 100644 index 00000000..af4af039 --- /dev/null +++ b/linker_scripts/apple2_80_zp.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $80, size = $80, type = rw; + RAM: start = $90, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro; +RODATA: load = RAM, type = ro; +DATA: load = RAM, type = rw; +BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = ro; +}