diff --git a/demos/second/part01_intropan/Makefile b/demos/second/part01_intropan/Makefile index 35bdac36..dff32f13 100644 --- a/demos/second/part01_intropan/Makefile +++ b/demos/second/part01_intropan/Makefile @@ -11,13 +11,13 @@ all: INTRO #### INTRO: intro.o - ld65 -o INTRO intro.o -C $(LINKER_SCRIPTS)/apple2_6000.inc + ld65 -o INTRO intro.o -C $(LINKER_SCRIPTS)/apple2_8000.inc intro.o: intro.s ../zx02_optim.s \ graphics/igl.hgr.zx02 \ graphics/igr.hgr.zx02 \ graphics/fc_sr_logo.hgr.zx02 \ - horiz_scroll.s \ + horiz_scroll.s hgr_partial.s \ ../zp.inc ../hardware.inc ../qload.inc ca65 -o intro.o intro.s -l intro.lst diff --git a/demos/second/part01_intropan/graphics/Makefile b/demos/second/part01_intropan/graphics/Makefile index 5b781011..8cb3cf1c 100644 --- a/demos/second/part01_intropan/graphics/Makefile +++ b/demos/second/part01_intropan/graphics/Makefile @@ -6,7 +6,7 @@ PNG2GR = ../../../../utils/gr-utils/png2gr all: igl.hgr.zx02 igr.hgr.zx02 fc_sr_logo.hgr.zx02 \ demosplash.hgr.zx02 mockingboard.hgr.zx02 \ - vmw.hgr.zx02 + vmw.hgr.zx02 ship_sprites.hgr.zx02 #### @@ -26,6 +26,14 @@ igl.hgr: igl.png #### +ship_sprites.hgr.zx02: ship_sprites.hgr + $(ZX02) ship_sprites.hgr ship_sprites.hgr.zx02 + +ship_sprites.hgr: ship_sprites.png + $(PNG_TO_HGR) ship_sprites.png > ship_sprites.hgr + +#### + mockingboard.hgr.zx02: mockingboard.hgr $(ZX02) mockingboard.hgr mockingboard.hgr.zx02 diff --git a/demos/second/part01_intropan/graphics/ship_sprites.png b/demos/second/part01_intropan/graphics/ship_sprites.png new file mode 100644 index 00000000..0e352d5a Binary files /dev/null and b/demos/second/part01_intropan/graphics/ship_sprites.png differ diff --git a/demos/second/part01_intropan/hgr_partial.s b/demos/second/part01_intropan/hgr_partial.s new file mode 100644 index 00000000..54f8fc3d --- /dev/null +++ b/demos/second/part01_intropan/hgr_partial.s @@ -0,0 +1,46 @@ +; copy partial part of screen from $6000 to DRAW_PAGE + ; HGR_X1,HGR_Y1 to HGR_X2,HGR_Y2 source + ; destination = Y at HGR_DEST + +hgr_partial: + lda HGR_DEST + sta dest_y_smc+1 + + ldx HGR_Y1 ; Y1 +hgr_partial_outer_loop: + lda hposn_low,X + sta INL + lda hposn_high,X + ora #$40 ; convert to $6000 + sta INH + + txa + pha + +dest_y_smc: + ldx #100 ; DEST_Y + lda hposn_low,X + sta OUTL + lda hposn_high,X + clc + adc DRAW_PAGE + sta OUTH + + pla + tax + + ldy HGR_X1 ; X1 +hgr_partial_inner_loop: + lda (INL),Y + sta (OUTL),Y + iny + cpy HGR_X2 ; X2 + bne hgr_partial_inner_loop + + inc dest_y_smc+1 + + inx + cpx HGR_Y2 ; Y2 + bne hgr_partial_outer_loop + + rts diff --git a/demos/second/part01_intropan/intro.s b/demos/second/part01_intropan/intro.s index fff1aca8..42387a45 100644 --- a/demos/second/part01_intropan/intro.s +++ b/demos/second/part01_intropan/intro.s @@ -182,6 +182,7 @@ done_intro: .include "../hgr_table.s" .include "../hgr_clear_screen.s" .include "horiz_scroll.s" + .include "hgr_partial.s" .include "../irq_wait.s" @@ -198,3 +199,5 @@ fc_sr_logo_data: .incbin "graphics/fc_sr_logo.hgr.zx02" vmw_data: .incbin "graphics/vmw.hgr.zx02" +sprite_data: + .incbin "graphics/ship_sprites.hgr.zx02" diff --git a/demos/second/part10_lens_rotozoom/Makefile b/demos/second/part10_lens_rotozoom/Makefile index e96f5567..a272bac3 100644 --- a/demos/second/part10_lens_rotozoom/Makefile +++ b/demos/second/part10_lens_rotozoom/Makefile @@ -33,4 +33,4 @@ graphics/lens_sprites.inc: clean: rm -f *~ *.o *.lst LENS cd graphics && make clean - cd audio && make clean + diff --git a/demos/second/qload.s b/demos/second/qload.s index d9ec95ec..6ef6260c 100644 --- a/demos/second/qload.s +++ b/demos/second/qload.s @@ -169,13 +169,13 @@ which_disk_array: .byte 1,1 ; POLAR,FAKE_BIOS load_address_array: - .byte $D0,$D0,$60,$80 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CHESS + .byte $D0,$D0,$80,$80 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CHESS .byte $60,$60,$60,$60 ; GORILLA,LEAVES,LENS,PLASMA .byte $60,$60,$60,$60 ; CUBE,DOTS,SPHERES,OCEAN .byte $60,$60 ; POLAR,FAKE_BIOS start_address: - .byte $D0,$D0,$60,$80 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CHESS + .byte $D0,$D0,$80,$80 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CHESS .byte $60,$60,$60,$80 ; GORILLA,LEAVES,LENS,PLASMA .byte $80,$80,$80,$60 ; CUBE,DOTS,SPHERES,OCEAN .byte $80,$60 ; POLAR,FAKE_BIOS @@ -200,7 +200,7 @@ sector_array: length_array: - .byte 32,48,80,48 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CHESS + .byte 32,48,64,48 ; MUSIC_INTRO, MUSIC_MAIN, INTRO, CHESS .byte 32,32,16,16 ; GORILLA,LEAVES,LENS,PLASMA .byte 16,16,16,96 ; CUBE,DOTS,SPHERES,OCEAN .byte 16,16 ; POLAR,FAKE_BIOS diff --git a/demos/second/start.s b/demos/second/start.s index 25000166..7ffa841e 100644 --- a/demos/second/start.s +++ b/demos/second/start.s @@ -154,7 +154,7 @@ load_program_loop: cli ; start music - jsr $6000 + jsr $8000 ;=======================