splash screen

This commit is contained in:
alpine9000
2016-04-22 17:39:54 +10:00
parent 86d137c8cf
commit a6d1de7501
4 changed files with 75 additions and 3 deletions
+8 -2
View File
@@ -11,7 +11,7 @@ BASE_ADDRESS=4000
NUM_COLORS=8
BOOTBLOCK_ASM=alpine_bootblock.s
OBJS=out/init.o out/utils.o out/image.o out/blit.o out/joystick.o out/pig.o out/items.o out/blittext.o
OBJS=out/init.o out/utils.o out/image.o out/blit.o out/joystick.o out/pig.o out/items.o out/blittext.o out/splash.o
IMAGES=foreground.png \
background.png \
@@ -29,7 +29,8 @@ IMAGES=foreground.png \
sprite_coin-1.png \
sprite_coin-2.png \
sprite_coin-3.png\
font8x8.png
font8x8.png\
splash.png
IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin))
@@ -73,6 +74,11 @@ out/sprite_coin%.png: assets/assets.png
out/font%.bin: assets/font%.png
$(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/font$* --colors=16 --use-palette assets/mpanel.pal --full-color-palette-file --output-mask --transparent-color=0,0,0 --output-png
out/splash.bin: assets/splash.png
$(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/splash --colors=32 --full-color-palette-file --output-png --output-copperlist
out/fade.s: assets/bottom_section.pal out/fade
./out/fade assets/bottom_section.pal bottom > out/fade.s
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

+5 -1
View File
@@ -27,6 +27,8 @@ Entry:
move #$7ff,DMACON(a6) ; disable all dma
move #$7fff,INTENA(a6) ; disable all interrupts
jsr ShowSplash
lea Level3InterruptHandler,a3
move.l a3,LVL3_INT_VECTOR
@@ -374,8 +376,10 @@ message:
dc.b 0
align 4
copperList:
copperList:
panelCopperListBpl1Ptr:
dc.w BPL1PTL,0
dc.w BPL1PTH,0
+62
View File
@@ -0,0 +1,62 @@
include "includes.i"
xdef ShowSplash
SPLASH_COLOR_DEPTH equ 5
SPLASH_SCREEN_WIDTH_BYTES equ 40
SplashPokeBitplanePointers:
; a0 = BPLP copper list address
; a1 = bitplanes pointer
lea splashCopperListBplPtr,a0
lea splash,a1
moveq #SPLASH_COLOR_DEPTH-1,d0
.bitplaneloop:
move.l a1,d1
move.w d1,2(a0)
swap d1
move.w d1,6(a0)
lea SPLASH_SCREEN_WIDTH_BYTES(a1),a1
addq #8,a0
dbra d0,.bitplaneloop
rts
ShowSplash:
bsr SplashPokeBitplanePointers
lea CUSTOM,a1
lea splashCopperList(pc),a0
move.l a0,COP1LC(a1)
move.w COPJMP1(a1),d0
move.w #(DMAF_SETCLR!DMAF_COPPER!DMAF_RASTER!DMAF_MASTER),dmacon(a1)
.wait:
jsr WaitVerticalBlank
jsr ProcessJoystick
btst.b #0,joystick
beq .wait
rts
splashCopperList:
splashCopperListBplPtr:
dc.w BPL1PTL,0
dc.w BPL1PTH,0
dc.w BPL2PTL,0
dc.w BPL2PTH,0
dc.w BPL3PTL,0
dc.w BPL3PTH,0
dc.w BPL4PTL,0
dc.w BPL4PTH,0
dc.w BPL5PTL,0
dc.w BPL5PTH,0
dc.w DIWSTRT,$2c81
dc.w DIWSTOP,$2cc1
dc.w BPLCON0,(SPLASH_COLOR_DEPTH<<12)|$200 ; set color depth and enable COLOR
dc.w BPL1MOD,SPLASH_SCREEN_WIDTH_BYTES*SPLASH_COLOR_DEPTH-SPLASH_SCREEN_WIDTH_BYTES
dc.w BPL2MOD,SPLASH_SCREEN_WIDTH_BYTES*SPLASH_COLOR_DEPTH-SPLASH_SCREEN_WIDTH_BYTES
include "out/splash-copper-list.s"
dc.l $fffffffe
splash:
incbin "out/splash.bin"