From 178968cc2fc4c32fb918ebb4ccd24d78b64cd73f Mon Sep 17 00:00:00 2001 From: Javier Degirolmo Date: Fri, 7 Oct 2011 12:17:54 -0300 Subject: Initial upload, Echo 0.8 UNSTABLE VERSION --- src-68k/video/vsync.68k | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src-68k/video/vsync.68k (limited to 'src-68k/video/vsync.68k') 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 -- cgit v1.2.3