diff --git a/026.tile_hscroll/Makefile b/026.tile_hscroll/Makefile index eec292f..9dd8613 100644 --- a/026.tile_hscroll/Makefile +++ b/026.tile_hscroll/Makefile @@ -23,7 +23,7 @@ include ../shared/base.mk out/%.sized.png: ../assets/%.png - $(RESIZE) --width=336 --height=256 --blur=0.75 --input=$< --output=$@ + $(RESIZE) --width=352 --height=256 --blur=0.75 --input=$< --output=$@ out/%.bin: out/%.sized.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --quantize --colors $(NUM_COLORS) --output-bitplanes --output-palette-asm --output-grey-palette --output-palette $(DITHER) --output out/$* diff --git a/026.tile_hscroll/blit.s b/026.tile_hscroll/blit.s index 5727d7c..aa63c8a 100644 --- a/026.tile_hscroll/blit.s +++ b/026.tile_hscroll/blit.s @@ -109,8 +109,8 @@ BlitTile: move.w #0,BLTCON1(a6) ; move.w #BC0F_SRCA|BC0F_DEST|$f0,BLTCON0(a6) - move.w #SCREEN_WIDTH_BYTES,BLTAMOD(a6) - move.w #SCREEN_WIDTH_BYTES,BLTDMOD(a6) ; + move.w #BITPLANE_WIDTH_BYTES-2,BLTAMOD(a6) + move.w #BITPLANE_WIDTH_BYTES-2,BLTDMOD(a6) ; move.l a1,BLTAPTH(a6) ; source move.l a0,BLTDPTH(a6) ; dest move.w #$ffff,BLTAFWM(a6) diff --git a/026.tile_hscroll/constants.i b/026.tile_hscroll/constants.i index 0c3859a..b38853e 100644 --- a/026.tile_hscroll/constants.i +++ b/026.tile_hscroll/constants.i @@ -2,7 +2,7 @@ SCREEN_WIDTH equ 320 SCREEN_HEIGHT equ 256 SCREEN_WIDTH_BYTES equ (SCREEN_WIDTH/8) SCREEN_WIDTH_WORDS equ SCREEN_WIDTH_BYTES/2 -BITPLANE_WIDTH equ 336 +BITPLANE_WIDTH equ 352 BITPLANE_WIDTH_BYTES equ BITPLANE_WIDTH/8 BITPLANE_WIDTH_WORDS equ BITPLANE_WIDTH_BYTES/2 diff --git a/026.tile_hscroll/scroll.s b/026.tile_hscroll/scroll.s index 98f0011..54c7398 100644 --- a/026.tile_hscroll/scroll.s +++ b/026.tile_hscroll/scroll.s @@ -9,7 +9,7 @@ HoriScrollPlayfield: movem.l d1-a6,-(sp) move.l d0,d1 lsr.l #3,d0 ; bytes to scroll - move.l d0,d3 ; save bitplane pointer increment (bytes) for return value + move.l d0,d3 ; save bitplane pointer increment (bytes) for return value and.l #$F,d1 ; pixels = 0xf - (hpos - (hpos_bytes*8)) move.l #$F,d0 sub.l d1,d0 ; bits to delay diff --git a/026.tile_hscroll/tile_hscroll.s b/026.tile_hscroll/tile_hscroll.s index 932aa6d..9088791 100644 --- a/026.tile_hscroll/tile_hscroll.s +++ b/026.tile_hscroll/tile_hscroll.s @@ -36,20 +36,20 @@ MainLoop: jsr HoriScrollPlayfield ; returns bitplane pointer offset in d0 jsr SwitchBuffers ; takes bitplane pointer offset in d0 add.l #1,d1 - cmp.l #15,d2 - bne .s1 + ;; cmp.l #15,d2 + ;; bne .s1 .backfill: move.l onscreen,a1 add.l d0,a1 ;; sub.l #2,a1 move.l a1,a0 - add.l #BITPLANE_WIDTH_BYTES,a0 ; dest + add.l #BITPLANE_WIDTH_BYTES-2,a0 ; dest jsr BlitTile move.l offscreen,a1 add.l d0,a1 - ;; sub.l #2,a1 + ;; sub.l #2,a1 move.l a1,a0 - add.l #BITPLANE_WIDTH_BYTES,a0 + add.l #BITPLANE_WIDTH_BYTES-2,a0 jsr BlitTile move.l #0,d2 bra .s2 @@ -110,10 +110,10 @@ offscreen: bitplanes1: incbin "out/gigi_full.bin" - ds.b BITPLANE_WIDTH_BYTES*10 + ds.b BITPLANE_WIDTH_BYTES*20 bitplanes2: incbin "out/gigi_full.bin" - ds.b BITPLANE_WIDTH_BYTES*10 + ds.b BITPLANE_WIDTH_BYTES*20 section .bss startUserstack: