Make use of C library waitvsync().
This commit is contained in:
parent
6034b68f06
commit
ab54f92024
1 changed files with 5 additions and 4 deletions
|
@ -17,6 +17,7 @@
|
||||||
#include <string.h> /* for memset */
|
#include <string.h> /* for memset */
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
|
#include <cbm.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,9 +61,9 @@
|
||||||
|
|
||||||
|
|
||||||
#ifdef DOVSYNC
|
#ifdef DOVSYNC
|
||||||
# define waitvsync() while ((signed char)VIC.ctrl1 >= 0)
|
# define WAITVSYNC() waitvsync()
|
||||||
#else
|
#else
|
||||||
# define waitvsync()
|
# define WAITVSYNC()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -203,12 +204,12 @@ int main (void)
|
||||||
while (!kbhit()) {
|
while (!kbhit()) {
|
||||||
/* Build page 1, then make it visible */
|
/* Build page 1, then make it visible */
|
||||||
fire (SCREEN1);
|
fire (SCREEN1);
|
||||||
waitvsync ();
|
WAITVSYNC ();
|
||||||
outb (&VIC.addr, PAGE1);
|
outb (&VIC.addr, PAGE1);
|
||||||
|
|
||||||
/* Build page 2, then make it visible */
|
/* Build page 2, then make it visible */
|
||||||
fire (SCREEN2);
|
fire (SCREEN2);
|
||||||
waitvsync ();
|
WAITVSYNC ();
|
||||||
outb (&VIC.addr, PAGE2);
|
outb (&VIC.addr, PAGE2);
|
||||||
|
|
||||||
/* Count frames */
|
/* Count frames */
|
||||||
|
|
Loading…
Add table
Reference in a new issue