1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-19 14:29:40 +00:00

Make use of C library waitvsync().

This commit is contained in:
Oliver Schmidt 2017-11-21 23:03:50 +01:00
parent 6034b68f06
commit ab54f92024

View File

@ -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 */