aboutsummaryrefslogtreecommitdiff
path: root/src-68k/video/vsync.68k
blob: ed5ac17c7e61e6cb5c64ee8a18095a8cf16a7cd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
;****************************************************************************
; VSync
; Waits until the next frame
;****************************************************************************

VSync:
    lea     ($C00004), a6

@Loop1:                             ; Wait until current VBlank is over
    move.w  (a6), d7
    btst.l  #3, d7
    bne.s   @Loop1

@Loop2:                             ; Wait until next VBlank starts
    move.w  (a6), d7
    btst.l  #3, d7
    beq.s   @Loop2

    rts                             ; End of subroutine