From fe850fece8d6352f695586e9c34830ae94f52ae3 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Mon, 17 Jul 2017 23:55:18 +0200 Subject: [PATCH] implement waitvsync for plus4/c16 --- include/cbm.h | 2 +- libsrc/plus4/waitvsync.s | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 libsrc/plus4/waitvsync.s diff --git a/include/cbm.h b/include/cbm.h index 4bbd278e3..f35f83828 100644 --- a/include/cbm.h +++ b/include/cbm.h @@ -153,7 +153,7 @@ struct cbm_dirent { unsigned char get_tv (void); /* Return the video mode the machine is using. */ -#if !defined(__PLUS4__) && !defined(__C16__) && !defined(__CBM610__) && !defined(__PET__) +#if !defined(__CBM610__) && !defined(__PET__) void waitvsync (void); /* wait for the start of the next frame */ #endif diff --git a/libsrc/plus4/waitvsync.s b/libsrc/plus4/waitvsync.s new file mode 100644 index 000000000..84654d996 --- /dev/null +++ b/libsrc/plus4/waitvsync.s @@ -0,0 +1,12 @@ + + .export _waitvsync + + .include "plus4.inc" + +_waitvsync: +@l1: + lda TED_VLINEHI + and #$01 + ora TED_VLINELO + bne @l1 + rts -- 2.39.5