diff --git a/megademo/mode7_sprites.inc b/megademo/mode7_sprites.inc index 25130a3f..e402b76b 100644 --- a/megademo/mode7_sprites.inc +++ b/megademo/mode7_sprites.inc @@ -35,11 +35,19 @@ shadow_left: ship_forward: .byte $9,$5 - .byte $00,$00,$00,$00,$ff,$00,$00,$00,$00 - .byte $00,$00,$00,$66,$ff,$66,$00,$00,$00 - .byte $00,$00,$70,$2f,$12,$2f,$70,$00,$00 - .byte $f0,$f7,$f7,$f2,$d9,$f2,$f7,$f7,$f0 - .byte $00,$00,$00,$00,$0d,$00,$00,$00,$00 + .byte $00,$00,$00,$00,$ff,$00,$00,$00,$00 ; 00=8 0X=0 X0=0 XX=1 + .byte $00,$00,$00,$66,$ff,$66,$00,$00,$00 ; 00=6 0x=0 X0=0 XX=3 + .byte $00,$00,$70,$2f,$12,$2f,$70,$00,$00 ; 00=4 0x=0 X0=2 XX=3 + .byte $f0,$f7,$f7,$f2,$d9,$f2,$f7,$f7,$f0 ; 00=0 0x=0 X0=2 XX=7 + .byte $00,$00,$00,$00,$0d,$00,$00,$00,$00 ; 00=8 0x=1 X0=0 XX=0 + ;===================== + ; 26 1 4 14 + ; 00=26 0X=1 X0=4 XX=14 + ; = 33 + Y*(52)+ [30A + 64B + 69C + 54D]-Y + ; = 33 + 5*52 + 30*26 + 64*1 + 69*4 + 54*14 - 5 + ; = 2164 + + ship_right: .byte $9,$5 @@ -67,148 +75,5 @@ ship_tiny: .byte $3,$1 .byte $f0,$9f,$f0 -sphere_offset: - .byte 0,27,54,81, 108,135,162,189 - -.if 0 - -sphere0: - .byte $5,$5 - .byte $00,$b0,$b3,$b0,$00 - .byte $b0,$bb,$bb,$bb,$30 - .byte $bb,$bb,$bb,$bb,$33 - .byte $bb,$bb,$bb,$bb,$33 - .byte $00,$3b,$3b,$3b,$00 - -sphere1: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$b0 - .byte $bb,$bb,$bb,$bb,$bb - .byte $bb,$bb,$bb,$bb,$bb - .byte $00,$bb,$bb,$bb,$00 - -sphere2: - .byte $5,$5 - .byte $00,$30,$b3,$b0,$00 - .byte $30,$b3,$bb,$bb,$b0 - .byte $33,$bb,$bb,$bb,$bb - .byte $33,$bb,$bb,$bb,$bb - .byte $00,$33,$3b,$3b,$00 - -sphere3: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$b0 - .byte $33,$3b,$bb,$bb,$bb - .byte $33,$33,$3b,$bb,$bb - .byte $00,$33,$33,$3b,$00 - -sphere4: - .byte $5,$5 - .byte $00,$b0,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$b0 - .byte $33,$33,$3b,$bb,$bb - .byte $33,$33,$33,$33,$3b - .byte $00,$33,$33,$33,$00 - -sphere5: - .byte $5,$5 - .byte $00,$b0,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$30 - .byte $33,$3b,$3b,$3b,$33 - .byte $33,$33,$33,$33,$33 - .byte $00,$33,$33,$33,$00 - -sphere6: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$30 - .byte $bb,$bb,$bb,$3b,$33 - .byte $33,$3b,$33,$33,$33 - .byte $00,$33,$33,$33,$00 - -sphere7: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $b0,$bb,$bb,$bb,$30 - .byte $bb,$bb,$bb,$bb,$33 - .byte $bb,$bb,$bb,$3b,$33 - .byte $00,$33,$33,$33,$00 -.endif - -sphere0: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $b0,$bb,$bb,$bb,$30 - .byte $bb,$bb,$bb,$bb,$33 - .byte $bb,$bb,$bb,$3b,$33 - .byte $00,$33,$33,$33,$00 - -sphere1: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$30 - .byte $bb,$bb,$bb,$3b,$33 - .byte $33,$3b,$33,$33,$33 - .byte $00,$33,$33,$33,$00 - -sphere2: - .byte $5,$5 - .byte $00,$b0,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$30 - .byte $33,$3b,$3b,$3b,$33 - .byte $33,$33,$33,$33,$33 - .byte $00,$33,$33,$33,$00 - -sphere3: - .byte $5,$5 - .byte $00,$b0,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$b0 - .byte $33,$33,$3b,$bb,$bb - .byte $33,$33,$33,$33,$3b - .byte $00,$33,$33,$33,$00 - -sphere4: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$b0 - .byte $33,$3b,$bb,$bb,$bb - .byte $33,$33,$3b,$bb,$bb - .byte $00,$33,$33,$3b,$00 - -sphere5: - .byte $5,$5 - .byte $00,$30,$b3,$b0,$00 - .byte $30,$b3,$bb,$bb,$b0 - .byte $33,$bb,$bb,$bb,$bb - .byte $33,$bb,$bb,$bb,$bb - .byte $00,$33,$3b,$3b,$00 - -sphere6: - .byte $5,$5 - .byte $00,$30,$bb,$b0,$00 - .byte $30,$bb,$bb,$bb,$b0 - .byte $bb,$bb,$bb,$bb,$bb - .byte $bb,$bb,$bb,$bb,$bb - .byte $00,$bb,$bb,$bb,$00 - -sphere7: - .byte $5,$5 - .byte $00,$b0,$b3,$b0,$00 - .byte $b0,$bb,$bb,$bb,$30 - .byte $bb,$bb,$bb,$bb,$33 - .byte $bb,$bb,$bb,$bb,$33 - .byte $00,$3b,$3b,$3b,$00 - - -sphere_shadow1: - .byte $5,$1 - .byte $00,$a0,$a0,$a0,$00 - -sphere_shadow2: - .byte $5,$1 - .byte $00,$00,$a0,$00,$00 - diff --git a/space_bars/Makefile b/space_bars/Makefile index cd9c6dab..9adac625 100644 --- a/space_bars/Makefile +++ b/space_bars/Makefile @@ -7,13 +7,13 @@ B2D = ../bmp2dhr/b2d all: space_bars.dsk space_bars.dsk: SPACE_BARS - $(DOS33) -y space_bars.dsk BSAVE -a 0x1000 SPACE_BARS + $(DOS33) -y space_bars.dsk BSAVE -a 0x4000 SPACE_BARS #### SPACE_BARS: space_bars.o - ld65 -o SPACE_BARS space_bars.o -C ../linker_scripts/apple2_1000.inc + ld65 -o SPACE_BARS space_bars.o -C ../linker_scripts/apple2_4000.inc space_bars.o: space_bars.s instructions.s game.s \ game_over.s gr_copy.s text_print.s title.s \ @@ -37,6 +37,6 @@ SB_BACKGROUNDC.BIN: sb_background.bmp ### clean: - rm -f *~ *.o *.lst *.inc SPACE_BARS + rm -f *~ *.o *.lst SPACE_BARS diff --git a/space_bars/TODO b/space_bars/TODO new file mode 100644 index 00000000..5e7249ab --- /dev/null +++ b/space_bars/TODO @@ -0,0 +1,9 @@ +Is it possible to get 40x96 as well as HGR? + +Have same HGR background page0/page1 +Alternate PAGE0/PAGE1 every two lines... do this in SPLIT? + +Is it even possible to draw the lines/sprites fast enough in the +space remaining? + +Only draw the top half on odd frames, bottom on even? diff --git a/space_bars/game.s b/space_bars/game.s index c3f5b7d8..77974342 100644 --- a/space_bars/game.s +++ b/space_bars/game.s @@ -9,9 +9,10 @@ game: ;=================== ; init vars - - lda #0 - sta DRAW_PAGE + lda #15 + sta XPOS + lda #38 + sta YPOS ;============================= @@ -36,44 +37,29 @@ game: ;============================= - ; Load graphic page0 - - lda #8 - sta DRAW_PAGE - - lda #22 - jsr clear_gr - + ; Load graphic page1 $800 lda #4 sta DRAW_PAGE - jsr gr_copy_to_current ; copy to page1 + lda #$22 + jsr clear_gr - ; GR part - bit PAGE1 - bit LORES ; 4 - bit SET_GR ; 4 - bit FULLGR ; 4 ;============================= - ; Load graphic page1 + ; Load graphic page2 $c00 lda #8 sta DRAW_PAGE - lda #44 + lda #$44 jsr clear_gr - ;=================== - ; copy to page3 lda #0 sta DRAW_PAGE - jsr gr_copy_to_current - ; GR part bit PAGE0 @@ -186,13 +172,28 @@ sb_hgr_loop: bit SET_GR ; 4 bit HIRES ; 4 + + + ; draw sprite at same time + lda #>ship_forward ; 2 + sta INH ; 3 + lda #