Advertisement
AkumaYin

Untitled

Aug 13th, 2021 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ===========================================================================
  2. ; ---------------------------------------------------------------------------
  3. ; H-blank interrupt - Scroll test
  4. ; ---------------------------------------------------------------------------
  5.  
  6. ST_HBICode:
  7.         move.w  ST_SH_Reg.w,VDP_Ctrl_Port.l     ; set shadow/highlight for this scanline
  8.         move.w  ST_Sprite_Table_Reg.w,VDP_Ctrl_Port.l   ; set location of sprite table
  9.         eor.b   #$06,ST_Sprite_Table_Reg+$01.w      ; switch between $F800 and $F400
  10.         move.w  d0,-(sp)                ; push d0.w (save)
  11.         move.w  ST_Scanline.w,d0            ; get scanline value
  12.         addq.w  #$01,d0                 ; increment
  13.         cmp.w   Floor_Pos.w,d0              ; have we reached the reflection floor?
  14.         bne.s   .Return                 ; if not, branch
  15.         move.w  #$8C00|%10001001,ST_SH_Reg.w        ; otherwise, switch (shadow/highlight will activate next frame)
  16.  
  17. .Return:
  18.         move.w  d0,ST_Scanline.w            ; save scanline counter
  19.         move.w  (sp)+,d0                ; pop d0.w (restore)
  20.         rte                     ; return
  21. ST_HBICode_End:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement