]> git.sur5r.net Git - cc65/commitdiff
implement waitvsync for plus4/c16
authormrdudz <mrdudz@users.noreply.github.com>
Mon, 17 Jul 2017 21:55:18 +0000 (23:55 +0200)
committermrdudz <mrdudz@users.noreply.github.com>
Mon, 17 Jul 2017 21:55:18 +0000 (23:55 +0200)
include/cbm.h
libsrc/plus4/waitvsync.s [new file with mode: 0644]

index 4bbd278e38dacefd0506431db5b94e40e760bb43..f35f838287ac3305ddd0094a9ae79ae86741bfba 100644 (file)
@@ -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 (file)
index 0000000..84654d9
--- /dev/null
@@ -0,0 +1,12 @@
+
+        .export         _waitvsync
+
+        .include        "plus4.inc"
+
+_waitvsync:
+@l1:
+        lda     TED_VLINEHI
+        and     #$01
+        ora     TED_VLINELO
+        bne     @l1
+        rts