mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-13 04:13:19 +00:00
Added some comments
This commit is contained in:
+36
-36
@@ -16,8 +16,8 @@ LoadNextImage:
|
|||||||
move.l 4(a3),a1 ; address of compressed image on disk
|
move.l 4(a3),a1 ; address of compressed image on disk
|
||||||
move.l 8(a3),d0 ; size of compressed image
|
move.l 8(a3),d0 ; size of compressed image
|
||||||
move.l 12(a3),a3 ; address of LoadImage(X)
|
move.l 12(a3),a3 ; address of LoadImage(X)
|
||||||
jsr (a3)
|
jsr (a3) ; call the appropriate LoadImage
|
||||||
add.l #16,imageIndex
|
add.l #16,imageIndex ; 4 words of data in LUT per image
|
||||||
movem.l (sp)+,d0-a6
|
movem.l (sp)+,d0-a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -27,17 +27,17 @@ LoadImage1:
|
|||||||
;; a1 - start address
|
;; a1 - start address
|
||||||
;; a2 - InstallColorPalette(X) address
|
;; a2 - InstallColorPalette(X) address
|
||||||
|
|
||||||
move.l bitplanesp3,a0 ; Load compressed data into bitplanes3
|
move.l bitplanesp3,a0 ; load compressed data into bitplanes3
|
||||||
bsr DoLoadImage
|
bsr DoLoadImage ; load data from disk
|
||||||
|
|
||||||
move.l bitplanesp1,a1
|
move.l bitplanesp1,a1 ; decompress into bitplanesp1
|
||||||
movem.l d0-a6,-(sp)
|
movem.l d0-a6,-(sp)
|
||||||
bsr doynaxdepack
|
bsr doynaxdepack ; decompress data
|
||||||
movem.l (sp)+,d0-a6
|
movem.l (sp)+,d0-a6
|
||||||
|
|
||||||
jsr WaitVerticalBlank
|
jsr WaitVerticalBlank ; avoid tearing when we show the new image
|
||||||
jsr (a2)
|
jsr (a2) ; install new color palette
|
||||||
bsr SetupImage
|
bsr SetupImage ; display new image
|
||||||
rts
|
rts
|
||||||
|
|
||||||
LoadImage2:
|
LoadImage2:
|
||||||
@@ -45,17 +45,17 @@ LoadImage2:
|
|||||||
;; a1 - start address
|
;; a1 - start address
|
||||||
;; a2 - InstallColorPalette(X) address
|
;; a2 - InstallColorPalette(X) address
|
||||||
|
|
||||||
move.l bitplanesp3,a0 ; Load compressed data into bitplanes3
|
move.l bitplanesp3,a0 ; load compressed data into bitplanes3
|
||||||
bsr DoLoadImage
|
bsr DoLoadImage ; load data from disk
|
||||||
|
|
||||||
move.l bitplanesp2,a1
|
move.l bitplanesp2,a1 ; decompress into bitplanesp2
|
||||||
movem.l d0-a6,-(sp)
|
movem.l d0-a6,-(sp)
|
||||||
bsr doynaxdepack
|
bsr doynaxdepack ; decompress data
|
||||||
movem.l (sp)+,d0-a6
|
movem.l (sp)+,d0-a6
|
||||||
|
|
||||||
jsr WaitVerticalBlank
|
jsr WaitVerticalBlank ; avoid tearing when we show the new image
|
||||||
jsr (a2)
|
jsr (a2) ; install new color palette
|
||||||
bsr SetupImage
|
bsr SetupImage ; display new image
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ DoLoadImage:
|
|||||||
;; a1 - start address
|
;; a1 - start address
|
||||||
;; d0 - size
|
;; d0 - size
|
||||||
movem.l d0-a6,-(sp)
|
movem.l d0-a6,-(sp)
|
||||||
lea $dff002,a6 ;Loader uses this custom base addr
|
lea $dff002,a6 ; LoadMFMB uses this custom base addr
|
||||||
|
|
||||||
move.l d0,d1
|
move.l d0,d1
|
||||||
|
|
||||||
@@ -96,16 +96,16 @@ DoLoadImage:
|
|||||||
lsr.l #6,d1 ; bytes -> sectors
|
lsr.l #6,d1 ; bytes -> sectors
|
||||||
lsr.l #3,d1
|
lsr.l #3,d1
|
||||||
neg.w d1
|
neg.w d1
|
||||||
jsr LoadMFMB
|
jsr LoadMFMB ; load the data!
|
||||||
|
|
||||||
movem.l (sp)+,d0-a6
|
movem.l (sp)+,d0-a6
|
||||||
rts
|
rts
|
||||||
|
|
||||||
imageLookupTable:
|
imageLookupTable: ; configure slideshow here
|
||||||
dc.l InstallColorPalette
|
dc.l InstallColorPalette ; palette installation routine
|
||||||
dc.l imageData1
|
dc.l imageData1 ; compressed image data
|
||||||
dc.l endImageData1-imageData1
|
dc.l endImageData1-imageData1 ; compressed image data size
|
||||||
dc.l LoadImage2
|
dc.l LoadImage2 ; TODO: this will go when I am not as lazy
|
||||||
|
|
||||||
dc.l InstallColorPalette2
|
dc.l InstallColorPalette2
|
||||||
dc.l imageData2
|
dc.l imageData2
|
||||||
@@ -141,7 +141,7 @@ imageLookupTable:
|
|||||||
dc.l imageData8
|
dc.l imageData8
|
||||||
dc.l endImageData8-imageData8
|
dc.l endImageData8-imageData8
|
||||||
dc.l LoadImage1
|
dc.l LoadImage1
|
||||||
dc.l 0
|
dc.l 0 ; terminate list
|
||||||
|
|
||||||
imageIndex:
|
imageIndex:
|
||||||
dc.l 0
|
dc.l 0
|
||||||
@@ -171,12 +171,12 @@ InstallColorPalette8:
|
|||||||
include "out/mr8-palette.s"
|
include "out/mr8-palette.s"
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
;; this is one FAST decompression routine!
|
||||||
include "../tools/external/doynamite68k/depacker_doynax.asm"
|
include "../tools/external/doynamite68k/depacker_doynax.asm"
|
||||||
|
|
||||||
section .photo
|
section .photo ; data in this section will not be loaded by the bootloader
|
||||||
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
cnop 0,512
|
imageData1: ; because I am too lazy to read non aligned data
|
||||||
imageData1:
|
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr-ham.lz"
|
incbin "out/mr-ham.lz"
|
||||||
else
|
else
|
||||||
@@ -184,8 +184,8 @@ imageData1:
|
|||||||
endif
|
endif
|
||||||
endImageData1:
|
endImageData1:
|
||||||
|
|
||||||
cnop 0,512
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
imageData2:
|
imageData2: ; because I am too lazy to read non aligned data
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr2-ham.lz"
|
incbin "out/mr2-ham.lz"
|
||||||
else
|
else
|
||||||
@@ -193,7 +193,7 @@ imageData2:
|
|||||||
endif
|
endif
|
||||||
endImageData2:
|
endImageData2:
|
||||||
|
|
||||||
cnop 0,512
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
imageData3:
|
imageData3:
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr3-ham.lz"
|
incbin "out/mr3-ham.lz"
|
||||||
@@ -202,7 +202,7 @@ imageData3:
|
|||||||
endif
|
endif
|
||||||
endImageData3:
|
endImageData3:
|
||||||
|
|
||||||
cnop 0,512
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
imageData4:
|
imageData4:
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr4-ham.lz"
|
incbin "out/mr4-ham.lz"
|
||||||
@@ -211,7 +211,7 @@ imageData4:
|
|||||||
endif
|
endif
|
||||||
endImageData4:
|
endImageData4:
|
||||||
|
|
||||||
cnop 0,512
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
imageData5:
|
imageData5:
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr5-ham.lz"
|
incbin "out/mr5-ham.lz"
|
||||||
@@ -220,7 +220,7 @@ imageData5:
|
|||||||
endif
|
endif
|
||||||
endImageData5:
|
endImageData5:
|
||||||
|
|
||||||
cnop 0,512
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
imageData6:
|
imageData6:
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr6-ham.lz"
|
incbin "out/mr6-ham.lz"
|
||||||
@@ -229,7 +229,7 @@ imageData6:
|
|||||||
endif
|
endif
|
||||||
endImageData6:
|
endImageData6:
|
||||||
|
|
||||||
cnop 0,512
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
imageData7:
|
imageData7:
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr7-ham.lz"
|
incbin "out/mr7-ham.lz"
|
||||||
@@ -238,7 +238,7 @@ imageData7:
|
|||||||
endif
|
endif
|
||||||
endImageData7:
|
endImageData7:
|
||||||
|
|
||||||
cnop 0,512
|
cnop 0,512 ; each image must be aligned to a sector boundary
|
||||||
imageData8:
|
imageData8:
|
||||||
if HAM_MODE==1
|
if HAM_MODE==1
|
||||||
incbin "out/mr8-ham.lz"
|
incbin "out/mr8-ham.lz"
|
||||||
|
|||||||
Reference in New Issue
Block a user