Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; =====================================================================================================================
- ; Intro Splash Screen, Sonic ZX - Code made by Marc
- ; =====================================================================================================================
- Splash_MusicID EQU $81 ; Music to play
- Splash_NxtScr EQU $04 ; Screen mode to go to next (look in "GameModeArray:" for more info)
- Splash_Wait EQU $90 ; Time to wait
- ; ---------------------------------------------------------------------------------------------------------------------
- Splash:
- move.b #$E4,d0
- jsr PlaySound_Special ; Stop music
- jsr ClearPLC ; Clear PLCs
- jsr Pal_FadeFrom ; Fade out previous palette
- move #$2700,sr
- Splash_VDP:
- lea ($C00004).l,a6 ; Setup VDP
- move.w #$8004,(a6)
- move.w #$8230,(a6)
- move.w #$8407,(a6)
- move.w #$9001,(a6)
- move.w #$9200,(a6)
- move.w #$8B03,(a6)
- move.w #$8720,(a6)
- clr.b ($FFFFF64E).w
- jsr ClearScreen ; Clear screen
- Splash_Art:
- move.l #$40000000,($C00004).l ; Load art
- lea (Art_Splash).l,a0
- jsr NemDec
- Splash_Mappings:
- lea ($FF0000).l,a1 ; Load screen mappings
- lea (Map_Splash).l,a0
- move.w #0,d0
- jsr EniDec
- Splash_ShowOnVDP:
- lea ($FF0000).l,a1 ; Show screen
- move.l #$40000003,d0
- moveq #$27,d1
- moveq #$1B,d2
- jsr ShowVDPGraphics
- Splash_Palette:
- lea (Pal_Splash).l,a1 ; Load palette
- lea ($FFFFFB80).w,a2
- move.b #$40,d0
- Splash_PalLoop:
- move.l (a1)+,(a2)+
- tst.w d0
- beq.s Splash_Music
- sub.w #1,d0
- bra.s Splash_PalLoop
- Splash_Music:
- move.w #Splash_MusicID,d0 ; Play music
- jsr PlaySound
- Splash_SetWait:
- move.w #Splash_Wait,($FFFFF614).w ; Wait time
- jsr Pal_FadeTo ; Fade palette in
- ; ---------------------------------------------------------------------------------------------------------------------
- Splash_Loop:
- move.b #2,($FFFFF62A).w ; Function 2 in vInt
- jsr DelayProgram ; Run delay program
- tst.w ($FFFFF614).w ; Test wait time
- beq.s Splash_Next ; is it over? branch
- andi.b #$80,($FFFFF605).w ; is Start button pressed?
- beq.s Splash_Loop ; if not, loop
- Splash_Next:
- move.b #Splash_NxtScr,($FFFFF600).w ; go to next screen
- rts
- ; ---------------------------------------------------------------------------------------------------------------------
- Art_Splash: incbin "Screen/Tiles.bin"
- even
- Map_Splash: incbin "Screen/Maps.bin"
- even
- Pal_Splash: incbin "Screen/Palette.bin"
- even
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement