Advertisement
FireRat_Genesis

H-Int - Uploading scanlines to VScroll without registers

Aug 23rd, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ---------------------------------------------------------------------------
  2. ; Horizontal interrupt - Title Screen
  3. ; ---------------------------------------------------------------------------
  4.  
  5. ; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
  6.  
  7.  
  8. HBlank_Title:
  9.  
  10. @scanlines: =   $DF
  11. @startaddr: =   $FFFF8000
  12.  
  13.  
  14.         ; each entry is 1 word (2 bytes), with the position
  15.         ; to copy to VScroll. Table must be generated in
  16.         ; main loop, outside H-Int
  17. n:      =   0
  18.         rept    (@scanlines-1)
  19.         move.l  #$40020010,$C00004      ; 10 bytes 28(5/2)
  20.         move.w  (@startaddr+n).w,$C00000    ; 8 bytes 24(5/1)
  21.         addi.l  #28,v_hblank+2          ; 8 bytes 28(5/1)
  22.         rte                 ; 2 bytes 20(5/0)
  23.                             ; Total: 28 bytes
  24. n:      =   n+2
  25.         endr
  26.  
  27. @Final:     ;move.l #$40020010,$C00004
  28.         ;move.w (@startaddr+n).w,$C00000
  29.         move.w  #$8ADF,$C00004
  30.         move.l  #@Null,v_hblank+2
  31. @Null:      rte
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement