mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 18:12:28 +00:00
Converted to use doynamite68k compression
This commit is contained in:
@@ -3,13 +3,13 @@ EXAMPLE_NAME=slideshow
|
||||
SHRINKLER=0
|
||||
INTERLACE=1
|
||||
HAM_MODE=1
|
||||
COMPRESSED_IMAGES=0
|
||||
COMPRESSED_IMAGES=1
|
||||
|
||||
BOOTBLOCK_ASM=alpine_bootblock.s
|
||||
|
||||
OBJS=out/init.o out/utils.o out/trackloader.o out/image.o
|
||||
|
||||
IMAGES=mr.png mr2.png mr3.png mr4.png mr5.png mr6.png mr7.png
|
||||
IMAGES=mr.png mr2.png mr3.png mr4.png mr5.png mr6.png mr7.png mr8.png
|
||||
|
||||
USERSTACK_ADDRESS=7fffc
|
||||
BASE_ADDRESS=10000
|
||||
@@ -27,7 +27,7 @@ IMAGECON_ARGS=--colors 32 --quantize
|
||||
IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin))
|
||||
endif
|
||||
|
||||
SHRUNKDATA=$(IMAGEDATA:.bin=.bin.sz)
|
||||
SHRUNKDATA=$(IMAGEDATA:.bin=.lz)
|
||||
SIZEDIMAGEDATA=$(addprefix out/, $(IMAGES:.png=.sized.png))
|
||||
|
||||
ifeq ($(INTERLACE),1)
|
||||
@@ -46,9 +46,8 @@ out/%.sized.png: ../assets/%.png
|
||||
out/%.bin: out/%.sized.png
|
||||
$(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-palette-asm --output-palette $(DITHER) --output out/$*
|
||||
|
||||
out/%.bin.sz: out/%.bin
|
||||
$(SHRINKLEREXE) -d $< $@
|
||||
|
||||
out/%.lz: out/%.bin
|
||||
$(DOYNAMITE68K) $<
|
||||
|
||||
out/%-ham.bin: out/%.sized.png
|
||||
$(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-palette-asm --output-palette $(DITHER) --output out/$*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SCREEN_WIDTH equ 320
|
||||
SCREEN_HEIGHT equ (256+(256*INTERLACE))
|
||||
SCREEN_WIDTH_BYTES equ (SCREEN_WIDTH/8)
|
||||
if HAM_MODE == 1
|
||||
if HAM_MODE==1
|
||||
SCREEN_BIT_DEPTH equ 6
|
||||
else
|
||||
SCREEN_BIT_DEPTH equ 5
|
||||
|
||||
+39
-129
@@ -21,52 +21,21 @@ LoadNextImage:
|
||||
movem.l (sp)+,d0-a6
|
||||
rts
|
||||
|
||||
Callback:
|
||||
;; d0 = Number of bytes decompressed so far
|
||||
;; a0 = Callback argument
|
||||
move.l a6,-(sp)
|
||||
lea CUSTOM,a6
|
||||
move.w d0,COLOR00(a6) ; Set wild background colors as we decompress
|
||||
move.l (sp)+,a6
|
||||
rts
|
||||
|
||||
LoadImage1:
|
||||
;; d0 - size
|
||||
;; a1 - start address
|
||||
;; a2 - InstallColorPalette(X) address
|
||||
if COMPRESSED_IMAGES==1
|
||||
|
||||
move.l a2,a3
|
||||
move.l bitplanesp3,a0 ; Load compressed data into bitplanes3
|
||||
|
||||
else; COMPRESSED_IMAGES==0
|
||||
|
||||
move.l bitplanesp1,a0
|
||||
|
||||
endif; COMPRESSED_IMAGES==1
|
||||
|
||||
|
||||
bsr DoLoadImage
|
||||
|
||||
if COMPRESSED_IMAGES==1
|
||||
|
||||
;; Decompress
|
||||
; a0 = compressed data
|
||||
; a1 = decompressed data destination
|
||||
move.l bitplanesp1,a1
|
||||
; a2 = progress callback, can be zero if no callback is desired.
|
||||
lea Callback(pc),a2
|
||||
bsr ShrinklerDecompress ; -> decompress!
|
||||
jsr (a3)
|
||||
|
||||
else; COMPRESSED_IMAGES==10
|
||||
|
||||
jsr (a2)
|
||||
|
||||
endif; COMPRESSED_IMAGES==1
|
||||
movem.l d0-a6,-(sp)
|
||||
bsr doynaxdepack
|
||||
movem.l (sp)+,d0-a6
|
||||
|
||||
|
||||
move.l bitplanesp1,a1
|
||||
jsr (a2)
|
||||
bsr SetupImage
|
||||
rts
|
||||
|
||||
@@ -74,34 +43,16 @@ LoadImage2:
|
||||
;; d0 - size
|
||||
;; a1 - start address
|
||||
;; a2 - InstallColorPalette(X) address
|
||||
if COMPRESSED_IMAGES==1
|
||||
move.l a2,a3
|
||||
move.l bitplanesp3,a0 ; Load compressed data into bitplanes3
|
||||
else; COMPRESSED_IMAGES==0
|
||||
move.l bitplanesp2,a0
|
||||
endif; COMPRESSED_IMAGES==1
|
||||
|
||||
move.l bitplanesp3,a0 ; Load compressed data into bitplanes3
|
||||
bsr DoLoadImage
|
||||
|
||||
if COMPRESSED_IMAGES==1
|
||||
|
||||
;; Decompress
|
||||
; a0 = compressed data
|
||||
; a1 = decompressed data destination
|
||||
move.l bitplanesp2,a1
|
||||
; a2 = progress callback, can be zero if no callback is desired.
|
||||
lea Callback(pc),a2
|
||||
bsr ShrinklerDecompress ; -> decompress!
|
||||
jsr (a3)
|
||||
|
||||
else; COMPRESSED_IMAGES==0
|
||||
movem.l d0-a6,-(sp)
|
||||
bsr doynaxdepack
|
||||
movem.l (sp)+,d0-a6
|
||||
|
||||
jsr (a2)
|
||||
|
||||
endif; COMPRESSED_IMAGES==1
|
||||
|
||||
|
||||
move.l bitplanesp2,a1
|
||||
bsr SetupImage
|
||||
rts
|
||||
|
||||
@@ -178,12 +129,16 @@ imageLookupTable:
|
||||
dc.l imageData6
|
||||
dc.l endImageData6-imageData6
|
||||
dc.l LoadImage1
|
||||
dc.l 0
|
||||
|
||||
dc.l InstallColorPalette7
|
||||
dc.l imageData7
|
||||
dc.l endImageData7-imageData7
|
||||
dc.l LoadImage2
|
||||
|
||||
dc.l InstallColorPalette8
|
||||
dc.l imageData8
|
||||
dc.l endImageData8-imageData8
|
||||
dc.l LoadImage1
|
||||
dc.l 0
|
||||
|
||||
imageIndex:
|
||||
@@ -209,128 +164,83 @@ InstallColorPalette6:
|
||||
rts
|
||||
InstallColorPalette7:
|
||||
include "out/mr7-palette.s"
|
||||
rts
|
||||
rts
|
||||
InstallColorPalette8:
|
||||
include "out/mr8-palette.s"
|
||||
rts
|
||||
|
||||
|
||||
include "../tools/external/shrinkler/ShrinklerDecompress.S"
|
||||
include "../tools/external/doynamite68k/depacker_doynax.asm"
|
||||
|
||||
section .photo
|
||||
|
||||
cnop 0,512
|
||||
imageData1:
|
||||
if COMPRESSED_IMAGES==1
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr-ham.bin.sz"
|
||||
incbin "out/mr-ham.lz"
|
||||
else
|
||||
incbin "out/mr.bin.sz"
|
||||
endif
|
||||
else
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr-ham.bin"
|
||||
else
|
||||
incbin "out/mr.bin"
|
||||
endif
|
||||
incbin "out/mr.lz"
|
||||
endif
|
||||
endImageData1:
|
||||
|
||||
cnop 0,512
|
||||
imageData2:
|
||||
if COMPRESSED_IMAGES==1
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr2-ham.bin.sz"
|
||||
incbin "out/mr2-ham.lz"
|
||||
else
|
||||
incbin "out/mr2.bin.sz"
|
||||
endif
|
||||
else
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr2-ham.bin"
|
||||
else
|
||||
incbin "out/mr2.bin"
|
||||
endif
|
||||
incbin "out/mr2.lz"
|
||||
endif
|
||||
endImageData2:
|
||||
|
||||
cnop 0,512
|
||||
imageData3:
|
||||
if COMPRESSED_IMAGES==1
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr3-ham.bin.sz"
|
||||
incbin "out/mr3-ham.lz"
|
||||
else
|
||||
incbin "out/mr3.bin.sz"
|
||||
endif
|
||||
else
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr3-ham.bin"
|
||||
else
|
||||
incbin "out/mr3.bin"
|
||||
endif
|
||||
incbin "out/mr3.lz"
|
||||
endif
|
||||
endImageData3:
|
||||
|
||||
cnop 0,512
|
||||
imageData4:
|
||||
if COMPRESSED_IMAGES==1
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr4-ham.bin.sz"
|
||||
incbin "out/mr4-ham.lz"
|
||||
else
|
||||
incbin "out/mr4.bin.sz"
|
||||
endif
|
||||
else
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr4-ham.bin"
|
||||
else
|
||||
incbin "out/mr4.bin"
|
||||
endif
|
||||
incbin "out/mr4.lz"
|
||||
endif
|
||||
endImageData4:
|
||||
|
||||
cnop 0,512
|
||||
imageData5:
|
||||
if COMPRESSED_IMAGES==1
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr5-ham.bin.sz"
|
||||
incbin "out/mr5-ham.lz"
|
||||
else
|
||||
incbin "out/mr5.bin.sz"
|
||||
endif
|
||||
else
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr5-ham.bin"
|
||||
else
|
||||
incbin "out/mr5.bin"
|
||||
endif
|
||||
incbin "out/mr5.lz"
|
||||
endif
|
||||
endImageData5:
|
||||
|
||||
cnop 0,512
|
||||
imageData6:
|
||||
if COMPRESSED_IMAGES==1
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr6-ham.bin.sz"
|
||||
incbin "out/mr6-ham.lz"
|
||||
else
|
||||
incbin "out/mr6.bin.sz"
|
||||
endif
|
||||
else
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr6-ham.bin"
|
||||
else
|
||||
incbin "out/mr6.bin"
|
||||
endif
|
||||
incbin "out/mr6.lz"
|
||||
endif
|
||||
endImageData6:
|
||||
|
||||
cnop 0,512
|
||||
imageData7:
|
||||
if COMPRESSED_IMAGES==1
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr7-ham.bin.sz"
|
||||
incbin "out/mr7-ham.lz"
|
||||
else
|
||||
incbin "out/mr7.bin.sz"
|
||||
incbin "out/mr7.lz"
|
||||
endif
|
||||
else
|
||||
endImageData7:
|
||||
|
||||
cnop 0,512
|
||||
imageData8:
|
||||
if HAM_MODE==1
|
||||
incbin "out/mr7-ham.bin"
|
||||
incbin "out/mr8-ham.lz"
|
||||
else
|
||||
incbin "out/mr7.bin"
|
||||
incbin "out/mr8.lz"
|
||||
endif
|
||||
endif
|
||||
endImageData7:
|
||||
endImageData8:
|
||||
@@ -0,0 +1,16 @@
|
||||
9ac
|
||||
244
|
||||
cef
|
||||
28a
|
||||
744
|
||||
122
|
||||
3ce
|
||||
267
|
||||
cbd
|
||||
978
|
||||
422
|
||||
b8c
|
||||
def
|
||||
133
|
||||
19c
|
||||
111
|
||||
Reference in New Issue
Block a user