Removed autodocs of arch specific variants of ROM modules.
[AROS.git] / arch / m68k-amiga / graphics / vbeampos.c
blob29cc3b185c2d15ebbd16057d96c00ecda39674f0
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Read the current vertical position of the beam
6 Lang: english
7 */
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
11 #include <clib/graphics_protos.h>
13 /* See rom/graphics/vbeampos.c for documentation */
15 AROS_LH0(LONG, VBeamPos,
16 struct GfxBase *, GfxBase, 64, Graphics)
18 AROS_LIBFUNC_INIT
20 volatile struct Custom *custom = (struct Custom*)0xdff000;
21 UWORD v1, v2;
23 for (;;) {
24 v1 = custom->vhposr >> 8;
25 v2 = custom->vposr;
26 if (v1 == (custom->vhposr >> 8))
27 break;
30 return v1 | ((v2 & 7) << 8);
32 AROS_LIBFUNC_EXIT
33 } /* VBeamPos */