Advertisement
Guest User

Untitled

a guest
Sep 27th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; =====================================================================================================================
  2. ; Intro Splash Screen, Sonic ZX - Code made by Marc
  3. ; =====================================================================================================================
  4. Splash_MusicID      EQU $81     ; Music to play
  5. Splash_NxtScr       EQU $04     ; Screen mode to go to next (look in "GameModeArray:" for more info)
  6. Splash_Wait     EQU $90     ; Time to wait
  7.  
  8. ; ---------------------------------------------------------------------------------------------------------------------
  9. Splash:
  10.         move.b  #$E4,d0
  11.         jsr PlaySound_Special       ; Stop music
  12.         jsr ClearPLC            ; Clear PLCs
  13.         jsr Pal_FadeFrom            ; Fade out previous palette
  14.         move    #$2700,sr
  15.  
  16. Splash_VDP:
  17.         lea ($C00004).l,a6          ; Setup VDP
  18.         move.w  #$8004,(a6)
  19.         move.w  #$8230,(a6)
  20.         move.w  #$8407,(a6)
  21.         move.w  #$9001,(a6)
  22.         move.w  #$9200,(a6)
  23.         move.w  #$8B03,(a6)
  24.         move.w  #$8720,(a6)
  25.         clr.b   ($FFFFF64E).w
  26.         jsr ClearScreen         ; Clear screen
  27.        
  28. Splash_Art:
  29.         move.l  #$40000000,($C00004).l      ; Load art
  30.         lea (Art_Splash).l,a0
  31.         jsr NemDec
  32.        
  33. Splash_Mappings:
  34.         lea ($FF0000).l,a1          ; Load screen mappings
  35.         lea (Map_Splash).l,a0
  36.         move.w  #0,d0
  37.         jsr EniDec
  38.        
  39. Splash_ShowOnVDP:
  40.         lea ($FF0000).l,a1          ; Show screen
  41.         move.l  #$40000003,d0
  42.         moveq   #$27,d1
  43.         moveq   #$1B,d2
  44.         jsr ShowVDPGraphics    
  45.        
  46. Splash_Palette:
  47.         lea (Pal_Splash).l,a1       ; Load palette
  48.         lea ($FFFFFB80).w,a2
  49.         move.b  #$40,d0
  50. Splash_PalLoop:
  51.         move.l  (a1)+,(a2)+
  52.         tst.w   d0
  53.         beq.s   Splash_Music
  54.         sub.w   #1,d0
  55.         bra.s   Splash_PalLoop
  56.        
  57. Splash_Music:
  58.         move.w  #Splash_MusicID,d0      ; Play music
  59.         jsr PlaySound
  60.        
  61. Splash_SetWait:
  62.         move.w  #Splash_Wait,($FFFFF614).w  ; Wait time
  63.         jsr Pal_FadeTo          ; Fade palette in
  64.  
  65. ; ---------------------------------------------------------------------------------------------------------------------
  66. Splash_Loop:
  67.         move.b  #2,($FFFFF62A).w        ; Function 2 in vInt
  68.         jsr DelayProgram            ; Run delay program
  69.         tst.w   ($FFFFF614).w           ; Test wait time
  70.         beq.s   Splash_Next         ; is it over? branch
  71.         andi.b  #$80,($FFFFF605).w      ; is Start button pressed?
  72.         beq.s   Splash_Loop         ; if not, loop
  73.  
  74. Splash_Next:
  75.         move.b  #Splash_NxtScr,($FFFFF600).w ; go to next screen
  76.         rts
  77.  
  78. ; ---------------------------------------------------------------------------------------------------------------------
  79. Art_Splash: incbin  "Screen/Tiles.bin"
  80.         even
  81.  
  82. Map_Splash: incbin  "Screen/Maps.bin"
  83.         even
  84.  
  85. Pal_Splash: incbin  "Screen/Palette.bin"
  86.         even
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement