diff --git a/023.slideshow/Makefile b/023.slideshow/Makefile index 8d78c75..d6dd452 100644 --- a/023.slideshow/Makefile +++ b/023.slideshow/Makefile @@ -8,7 +8,7 @@ USERSTACK_ADDRESS=7fffc # userstack used by bootblock BASE_ADDRESS=800 # if you change this you must also change link.script.x BOOTBLOCK_ASM=alpine_bootblock.s -OBJS=out/init.o out/utils.o out/trackloader.o out/image.o out/blitter.o out/module.o out/disk.o out/data.o +OBJS=out/init.o out/utils.o out/trackloader.o out/image.o out/module.o out/disk.o out/data.o ifeq ($(INTERLACE),0) NOINTERLACE_EXTRA=image8.png diff --git a/023.slideshow/blitter.s b/023.slideshow/blitter.s deleted file mode 100644 index d618026..0000000 --- a/023.slideshow/blitter.s +++ /dev/null @@ -1,68 +0,0 @@ - include "exec/types.i" - include "hardware/custom.i" - include "hardware/dmabits.i" - include "hardware/blit.i" - include "../include/registers.i" - - xdef ClearMemory - xdef WaitBlitter - -WaitBlitter: - btst.b #DMAB_BLTDONE-8,DMACONR(a1) -.wait: - btst.b #DMAB_BLTDONE-8,DMACONR(a1) - bne .wait - rts - - ;; - ;; This routine uses a side effect in the blitter. When each - ;; of the blits is finished, the pointer in the blitter is pointing - ;; to the next word to be blitted. - ;; - ;; When this routine returns, the last blit is started and might - ;; not be finished, so be sure to call waitblit above before - ;; assuming the data is clear. - ;; - ;; a0 = pointer to first word to clear - ;; d0 = number of bytes to clear (must be even) - ;; - -ClearMemory: - move.l CUSTOM,a1 ; Get pointer to chip registers - bsr WaitBlitter ; Make sure previous blit is done - move.l a0,BLTDPT(a1) ; Set up the D pointer to the region to clear - clr.w BLTDMOD(a1) ; Clear the D modulo (don't skip no bytes) - asr.l #1,d0 ; Get number of words from number of bytes - clr.w BLTCON1(a1) ; No special modes - move.w #DEST,BLTCON0(a1) ; only enable destination - ;; - ;; First we deal with the smaller blits - ;; - moveq #$3f,d1 ; Mask out mod 64 words - and.w d0,d1 - beq dorest ; none? good, do one blit - sub.l d1,d0 ; otherwise remove remainder - or.l #$40,d1 ; set the height to 1, width to n - move.w d1,BLTSIZE(a1) ; trigger the blit - ;; - ;; Here we do the rest of the words, as chunks of 128k - ;; -dorest: - move.w #$ffc0,d1 ; look at some more upper bits - and.w d0,d1 ; extract 10 more bits - beq dorest2 ; any to do? - sub.l d1,d0 ; pull of the ones we're doing here - bsr WaitBlitter ; wait for prev blit to complete - move.w d0,BLTSIZE(a1) ; do another blit -dorest2: - swap d0 ; more? - beq done ; nope. - clr.w d1 ; do a 1024x64 word blit (128K) -keepon: - bsr WaitBlitter ; finish up this blit - move.w d1,BLTSIZE(a1) ; and again, blit - subq.w #1,d0 ; still more? - bne keepon ; keep on going. -done: - rts ; finished. Blit still in progress. - end \ No newline at end of file diff --git a/023.slideshow/init.s b/023.slideshow/init.s index 4c7ae64..6a208fc 100644 --- a/023.slideshow/init.s +++ b/023.slideshow/init.s @@ -1,9 +1,7 @@ - include "includes.i" xdef Init - section CODE ;; custom chip base globally in a6 Init: movem.l d0-a6,-(sp) diff --git a/023.slideshow/slideshow.s b/023.slideshow/slideshow.s index 4c98c37..f4c603c 100644 --- a/023.slideshow/slideshow.s +++ b/023.slideshow/slideshow.s @@ -17,7 +17,7 @@ Entry: lea userstack,a7 lea CUSTOM,a6 - ;; move #$7ff,DMACON(a6) ; disable all dma + move #$7ff,DMACON(a6) ; disable all dma move #$7fff,INTENA(a6) ; disable all interrupts move.w d0,COLOR00(a6) ; black screen @@ -34,6 +34,7 @@ Entry: jsr P61_Init move.w #(INTF_SETCLR|INTF_VERTB|INTF_INTEN),INTENA(a6) + lea bitplanes2,a0 move.l #IMAGESIZE/4,d0 .clear: @@ -44,6 +45,8 @@ Entry: bsr SetupImage ; select it jsr WaitVerticalBlank + + jsr Init ; enable the playfield move.l #50*10,d0 @@ -173,8 +176,8 @@ bitplanes2: ds.b IMAGESIZE+(512*2) bitplanes3: ds.b IMAGESIZE+(512*3) +Module: + ds.b 111700 ; size of uncompressed module startUserstack: - ds.b $1000 -userstack: -endUserstack: -Module: \ No newline at end of file + ds.b $1000 ; size of stack +userstack: