1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-16 09:29:32 +00:00

add waitvsync() for atari and atari5200

This commit is contained in:
Christian Groessler 2020-10-27 22:25:58 +01:00 committed by Oliver Schmidt
parent 79cf1e13a7
commit 3537210674
6 changed files with 36 additions and 1 deletions

View File

@ -332,6 +332,7 @@ See the <url url="funcref.html" name="function reference"> for declaration and u
<item>_scroll
<item>_setcolor
<item>_setcolor_low
<item>waitvsync
</itemize>

View File

@ -77,7 +77,7 @@ Programs containing Atari 5200 specific code may use the <tt/atari5200.h/ header
<sect1>Atari 5200 specific functions<p>
<itemize>
<item>TBD.
<item>waitvsync
</itemize>

View File

@ -227,6 +227,7 @@ extern unsigned char __fastcall__ _getcolor (unsigned char color_reg);
/* Other screen functions */
/*****************************************************************************/
extern void waitvsync (void); /* Wait for start of next frame */
extern int __fastcall__ _graphics (unsigned char mode); /* mode value same as in BASIC */
extern void __fastcall__ _scroll (signed char numlines);
/* numlines > 0 scrolls up */

View File

@ -89,5 +89,8 @@ extern void atr5200std_joy[]; /* referred to by joy_static_stddrv[] */
*/
#define _bordercolor(color) 0
extern void waitvsync (void);
/* Wait for start of next frame */
/* End of atari5200.h */
#endif

15
libsrc/atari/waitvsync.s Normal file
View File

@ -0,0 +1,15 @@
;
; Written by Christian Groessler <chris@groessler.org>
;
; void waitvsync (void);
;
.include "atari.inc"
.export _waitvsync
.proc _waitvsync
lda RTCLOK+2
@lp: cmp RTCLOK+2
beq @lp
rts
.endproc

View File

@ -0,0 +1,15 @@
;
; Written by Christian Groessler <chris@groessler.org>
;
; void waitvsync (void);
;
.include "atari5200.inc"
.export _waitvsync
.proc _waitvsync
lda RTCLOK+1
@lp: cmp RTCLOK+1
beq @lp
rts
.endproc