diff options
Diffstat (limited to 'src-68k/video/vsync.68k')
| -rw-r--r-- | src-68k/video/vsync.68k | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src-68k/video/vsync.68k b/src-68k/video/vsync.68k new file mode 100644 index 0000000..ed5ac17 --- /dev/null +++ b/src-68k/video/vsync.68k @@ -0,0 +1,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 |
