diff --git a/games/sb/asplode.s b/games/sb/asplode.s index d8ead8f0..e144d813 100644 --- a/games/sb/asplode.s +++ b/games/sb/asplode.s @@ -134,24 +134,32 @@ title_cycle_loop: ;=================== ;========================== - ; Load Background + ; Load Backgrounds ;=========================== + ; this is tricky as there's not enough room + ; so we are over-writing stuff carefully -load_background: +load_backgrounds: - ; size in ldsizeh:ldsizel (f1/f0) - - lda #comp_data + lda #>bg2_data sta ZX0_src+1 - lda #$A0 + jsr full_decomp + + lda #bg1_data + sta ZX0_src+1 + + lda #$80 jsr full_decomp + ;=================== ; set up variables @@ -186,7 +194,7 @@ load_background: title_data: .incbin "asplode_graphics/sb_title.hgr.zx02" -comp_data: +bg1_data: .incbin "asplode_graphics/sb_zone.hgr.zx02" sound_data: @@ -208,6 +216,16 @@ main_loop: ; copy over background ;======================== reset_loop: + + lda FRAME + and #$2 + beq odd_bg +even_bg: + lda #$A0 + bne do_bg +odd_bg: + lda #$80 +do_bg: jsr hgr_copy @@ -790,3 +808,6 @@ bullet_vals_center: ; 31= 139 ; 9,5 -> 22,14 = 12x9 roughly. 3 times smaller, 4x3? 2x6? + +bg2_data: + .incbin "asplode_graphics/sb_zone2.hgr.zx02" diff --git a/games/sb/asplode_graphics/Makefile b/games/sb/asplode_graphics/Makefile index d9da8811..4c2e71b1 100644 --- a/games/sb/asplode_graphics/Makefile +++ b/games/sb/asplode_graphics/Makefile @@ -10,7 +10,19 @@ PNG2GR = ../../../utils/gr-utils/png2gr PNG2SPRITES = ../../../utils/gr-utils/png2sprites HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite -all: sb_zone.hgr.zx02 sb_title.hgr.zx02 sb_sprites.inc +all: sb_zone.hgr.zx02 sb_zone2.hgr.zx02 \ + sb_combined.hgr.zx02 \ + sb_title.hgr.zx02 sb_sprites.inc + +#### + +sb_combined.hgr.zx02: sb_zone.hgr sb_zone2.hgr + cat sb_zone.hgr > sb_combined.hgr + cat sb_zone2.hgr >> sb_combined.hgr + $(ZX02) sb_combined.hgr sb_combined.hgr.zx02 + +sb_zone.hgr: sb_zone.png + $(PNG_TO_HGR) sb_zone.png > sb_zone.hgr #### @@ -22,6 +34,15 @@ sb_zone.hgr: sb_zone.png #### +sb_zone2.hgr.zx02: sb_zone2.hgr + $(ZX02) sb_zone2.hgr sb_zone2.hgr.zx02 + +sb_zone2.hgr: sb_zone2.png + $(PNG_TO_HGR) sb_zone2.png > sb_zone2.hgr + + +#### + sb_title.hgr.zx02: sb_title.hgr $(ZX02) sb_title.hgr sb_title.hgr.zx02 diff --git a/games/sb/asplode_graphics/sb_zone.png b/games/sb/asplode_graphics/sb_zone.png index dd62aa40..4e6964dc 100644 Binary files a/games/sb/asplode_graphics/sb_zone.png and b/games/sb/asplode_graphics/sb_zone.png differ diff --git a/games/sb/asplode_graphics/sb_zone2.png b/games/sb/asplode_graphics/sb_zone2.png new file mode 100644 index 00000000..c8d722c3 Binary files /dev/null and b/games/sb/asplode_graphics/sb_zone2.png differ diff --git a/games/sb/asplode_head.s b/games/sb/asplode_head.s index 8333eef2..985ace1e 100644 --- a/games/sb/asplode_head.s +++ b/games/sb/asplode_head.s @@ -20,6 +20,7 @@ asplode_loop: ; copy background ;=================== + lda #$a0 jsr hgr_copy ;========================== diff --git a/games/sb/hgr_copy_fast.s b/games/sb/hgr_copy_fast.s index 3b50cfa3..3fb6861b 100644 --- a/games/sb/hgr_copy_fast.s +++ b/games/sb/hgr_copy_fast.s @@ -1,25 +1,34 @@ + ; special case ;========================================================= - ; hgr copy from $2000 to $4000 + ; hgr copy from $A000/$8000 to current DRAW_PAGE ;========================================================= - ; copy $2000 to $4000 ; would be faster if we unroll it, but much bigger + ; old numbers + ; 14+ ((14*256)+20)*32 + 5 = 115347 = 8.6fps ; theoretical unrolled, 30*6 bytes bigger (180 bytes?) ; 2 + ((9*32)+5)*256 + 5 = 75015 = 13.3 fps hgr_copy: + ; copy from in A ($80/$A0) + + sta hgr_copy_smc+2 ; 4 + clc + adc #$20 + sta hgr_copy_end_smc+1 + +; lda #$A0 ; 2 ldx #0 ; 2 - lda #$A0 ; 2 - sta hgr_copy_smc+2 ; 4 + + lda DRAW_PAGE clc adc #$20 -; lda #$20 ; 2 sta hgr_copy_smc+5 ; 4 hgr_copy_column: @@ -37,6 +46,7 @@ hgr_copy_smc: inc hgr_copy_smc+5 ; 6 lda hgr_copy_smc+2 ; 4 +hgr_copy_end_smc: cmp #$C0 ; 2 bne hgr_copy_column ; 2/3 diff --git a/games/sb/qload.s b/games/sb/qload.s index 7df26b45..a525c6ae 100644 --- a/games/sb/qload.s +++ b/games/sb/qload.s @@ -185,7 +185,7 @@ sector_array: length_array: - .byte 40, 16, 16, 64 ; TITLE, DUCK, ROOF, ASPLODE + .byte 40, 16, 16, 70 ; TITLE, DUCK, ROOF, ASPLODE .byte 32, 32, 32 ; TARGET, CLIFF, RAT