diff --git a/demos/second/Makefile b/demos/second/Makefile index 423971d7..c95901e2 100644 --- a/demos/second/Makefile +++ b/demos/second/Makefile @@ -13,6 +13,7 @@ second_d1.dsk: QBOOT QLOAD music.inc \ MUSIC \ ./part01_intropan/INTRO \ ./part05_dot_tunnel/TUNNEL \ + ./part09_leaves/LEAVES \ ./part10_lens_rotozoom/LENS \ ./part12_plasma/PLASMA \ ./part13_plasmacube/PLASMACUBE \ @@ -31,7 +32,7 @@ second_d1.dsk: QBOOT QLOAD music.inc \ # $(DOS33_RAW) second_d1.dsk 15 0 ./part04_chess_shapes/CHESS 0 0 # $(DOS33_RAW) second_d1.dsk 16 0 ./part05_dot_tunnel/TUNNEL 0 0 # $(DOS33_RAW) second_d1.dsk 19 0 ./part08_gorilla/GORILLA 0 0 -# $(DOS33_RAW) second_d1.dsk 21 0 ./part09_leaves_rotozoom/LEAVES 0 0 + $(DOS33_RAW) second_d1.dsk 21 0 ./part09_leaves/LEAVES 0 0 $(DOS33_RAW) second_d1.dsk 23 0 ./part10_lens_rotozoom/LENS 0 0 $(DOS33_RAW) second_d1.dsk 24 0 ./part12_plasma/PLASMA 0 0 $(DOS33_RAW) second_d1.dsk 25 0 ./part13_plasmacube/PLASMACUBE 0 0 @@ -43,6 +44,9 @@ second_d1.dsk: QBOOT QLOAD music.inc \ #### +part09_leaves/LEAVES: + cd part09_leaves && make + part10_lens_rotozoom/LENS: cd part10_lens_rotozoom && make @@ -289,6 +293,7 @@ generate_common.o: generate_common.c clean: rm -f *~ *.o *.lst HELLO SECOND QBOOT QLOAD MUSIC START + cd part09_leaves && make clean cd part10_lens_rotozoom && make clean cd part12_plasma && make clean cd part13_plasmacube && make clean diff --git a/demos/second/TODO b/demos/second/TODO index d26487d6..cdbb826a 100644 --- a/demos/second/TODO +++ b/demos/second/TODO @@ -1,6 +1,14 @@ +TODO CREDITS ++ credit french touch for plasma ++ credit ZX02 + DISK I ++ Lens / Rotozoom + - add lo-res LENS sprite to bounce around + - for rotozoom, wrap around + note, this might mean 32x32 + Plasma - switch to purple green diff --git a/demos/second/part09_leaves/Makefile b/demos/second/part09_leaves/Makefile new file mode 100644 index 00000000..17da8f1f --- /dev/null +++ b/demos/second/part09_leaves/Makefile @@ -0,0 +1,34 @@ +include ../../../Makefile.inc + +DOS33 = ../../../utils/dos33fs-utils/dos33 +DOS33_RAW = ../../../utils/dos33fs-utils/dos33_raw +EMPTY_DISK = ../../../empty_disk/empty.dsk +TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft +LINKER_SCRIPTS = ../../../linker_scripts/ + + +all: LEAVES + +#### + +LEAVES: leaves.o + ld65 -o LEAVES leaves.o -C $(LINKER_SCRIPTS)/apple2_8000.inc + +leaves.o: leaves.s \ + ../zx02_optim.s \ + ../hgr_copy_fast.s \ + ../zp.inc ../hardware.inc ../qload.inc \ + graphics/final3.hgr.zx02 + ca65 -o leaves.o leaves.s -l leaves.lst + +### + +graphics/final3.hgr.zx02: + cd graphics && make + +### + + +clean: + rm -f *~ *.o *.lst LEAVES + cd graphics && make clean diff --git a/demos/second/part09_leaves/graphics/Makefile b/demos/second/part09_leaves/graphics/Makefile index 63f4dbf5..285c781e 100644 --- a/demos/second/part09_leaves/graphics/Makefile +++ b/demos/second/part09_leaves/graphics/Makefile @@ -8,6 +8,9 @@ all: final3.hgr.zx02 #### +final3.hgr: final3.png + $(PNG_TO_HGR) final3.png > final3.hgr + final3.hgr.zx02: final3.hgr $(ZX02) final3.hgr final3.hgr.zx02 diff --git a/demos/second/part09_leaves/graphics/final3.hgr b/demos/second/part09_leaves/graphics/final3.hgr deleted file mode 100644 index 7538c4ae..00000000 Binary files a/demos/second/part09_leaves/graphics/final3.hgr and /dev/null differ diff --git a/demos/second/part09_leaves/graphics/final3.png b/demos/second/part09_leaves/graphics/final3.png new file mode 100644 index 00000000..ba3c3a41 Binary files /dev/null and b/demos/second/part09_leaves/graphics/final3.png differ diff --git a/demos/second/part09_leaves/leaves.s b/demos/second/part09_leaves/leaves.s new file mode 100644 index 00000000..c41b0895 --- /dev/null +++ b/demos/second/part09_leaves/leaves.s @@ -0,0 +1,82 @@ +; Leaves / New Way to Scroll + +; +; by deater (Vince Weaver) + +.include "../zp.inc" +.include "../hardware.inc" +.include "../qload.inc" + +mod7_table = $1c00 +div7_table = $1d00 +hposn_low = $1e00 +hposn_high = $1f00 + +leaves_start: + ;===================== + ; initializations + ;===================== + + ;=================== + ; Load graphics + ;=================== + + bit SET_GR + bit HIRES + bit FULLGR + bit PAGE1 + + lda #0 + jsr hgr_page1_clearscreen + jsr hgr_page2_clearscreen + + bit PAGE2 + + ; load image offscreen $6000 + + lda #leaves_data + sta zx_src_h+1 + lda #$60 + jsr zx02_full_decomp + + + lda #0 + sta COUNT + sta DRAW_PAGE + +ship_sprite_loop: + + lda #$60 + jsr hgr_copy + + bit PAGE1 + + jsr wait_until_keypress + +leaves_done: + rts + + +.align $100 + .include "../wait_keypress.s" + .include "../zx02_optim.s" +; .include "../hgr_table.s" + .include "../hgr_clear_screen.s" + .include "../hgr_copy_fast.s" + + + + ; wait A * 1/50s +wait_irq: +; lda #50 + sta IRQ_COUNTDOWN +wait_irq_loop: + lda IRQ_COUNTDOWN + bne wait_irq_loop + rts + +leaves_data: + .incbin "graphics/final3.hgr.zx02" + diff --git a/demos/second/start.s b/demos/second/start.s index 2f7d1b2c..6d8a1270 100644 --- a/demos/second/start.s +++ b/demos/second/start.s @@ -158,6 +158,18 @@ load_program_loop: ;========================== ;========================== + ;======================= + ; run LEAVES (#5) + ;======================= + ; copy LEAVES from AUX $5000 to MAIN $8000 + + lda #$50 ; AUX src $5000 + ldy #$80 ; MAIN dest $8000 + ldx #32 ; 16 pages + jsr copy_aux_main + jsr $8000 + + ;======================= ; run LENS/ROTOZOOM (#6) ;=======================