mirror of
https://github.com/cc65/cc65.git
synced 2025-01-04 23:33:05 +00:00
Make use of C library waitvsync().
This commit is contained in:
parent
6034b68f06
commit
ab54f92024
@ -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…
Reference in New Issue
Block a user