Advertisement
Guest User

Untitled

a guest
Jul 19th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. ; ============================================================================================
  2. ; Sega Screen example
  3. ; 2014, Hitaxas
  4. ; ============================================================================================
  5. Hitaxas_splashScreen: ;Stop previous music, clear vram and screen to set up this new screen
  6. moveq #$FD,d0 ; set music ID to stop
  7. jsr (PlayMusic).w ; play music ID
  8. jsr (Pal_FadeFrom).w ; fade palette out
  9. move #$2700,sr ; disable interrupts
  10. move.w ($FFFFF60C).w,d0 ; load VDP register 81XX data
  11. andi.b #%10111111,d0 ; set display to "disable"
  12. move.w d0,(VDP_control_port).l ; save to VDP
  13. jsr (ClearPLC).w ; clear pattern load cues
  14. jsr (ClearScreen).w ; clear VRAM planes, sprite buffer and scroll buffer
  15. lea (Metablock_Table).l,a1 ; load dump location
  16. lea (MAPS_SEGA).l,a0 ; load compressed mappings address
  17. move.w #$2000|($2800/$20),d0 ; prepare pattern index value to patch to mappings
  18. jsr (EniDec).w ; decompress and dump
  19. move.l #$60000003,d0 ; prepare VRAM write mode address (Plane B E000)
  20. moveq #$28-$01,d1 ; set map box draw width
  21. moveq #$1E-$01,d2 ; set map box draw height
  22. jsr ShowVDPGraphics ; flush mappings to VRAM in a square like manner
  23. lea (VDP_control_port).l,a6 ; load VDP control port
  24. move.l #$68000000,(a6) ; set VDP to VRAM write mode (Address 2800)
  25. lea (ART_SEGA).l,a0 ; load compressed art address
  26. jsr (NemDec).w ; decompress and dump to VDP memory
  27. lea (Pal_SEGANew).l,a0 ; load palette address
  28. lea (Second_palette_line2).w,a1 ; load palette buffer address
  29. moveq #$0E,d0 ; set repeat times
  30.  
  31. Hitaxas_splashScreen_PalLoop:
  32. move.l (a0)+,(a1)+ ; copy colours to buffer
  33. move.l (a0)+,(a1)+ ; ''
  34. dbf d0,Hitaxas_splashScreen_PalLoop ; repeat until done
  35. move.w ($FFFFF60C).w,d0 ; load VDP register 81XX data
  36. ori.b #%01000000,d0 ; set display to "enable"
  37. move.w d0,(a6) ; save to VDP
  38. jsr Pal_FadeTo ; fade palette in
  39. move.w #3*60,(Demo_Time_left).w ; set delay time (3 seconds on a 60hz system)
  40.  
  41. Hitaxas_splashMainLoop:
  42. move.b #$02,(Delay_Time).w ; set V-blank routine to run
  43. jsr (DelayProgram).w ; wait for V-blank (decreases "Demo_Time_left")
  44. tst.b ($FFFFF605).w ; has player 1 pressed start button?
  45. bmi.s Hitaxas_splashGotoTitle ; if so, branch
  46. tst.w (Demo_Time_left).w ; has the delay time finished?
  47. bne.s Hitaxas_splashMainLoop ; if not, branch
  48.  
  49. Hitaxas_splashGotoTitle:
  50. move.b #$04,(Game_Mode).w ; set the screen mode to Title Screen
  51. rts ; return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement