1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-20 17:20:49 +00:00

Merge pull request #2508 from polluks/waitvsync

[ATMOS] waitvsync
This commit is contained in:
Bob Andrews
2024-09-08 16:14:51 +02:00
committed by GitHub
3 changed files with 24 additions and 0 deletions
+3
View File
@@ -155,6 +155,7 @@ function.
<item><ref id="atmos_tick" name="atmos_tick">
<item><ref id="atmos_tock" name="atmos_tock">
<item><ref id="atmos_zap" name="atmos_zap">
<item><ref id="waitvsync" name="waitvsync">
</itemize>
@@ -8358,6 +8359,7 @@ only in the presence of a prototype.
<descrip>
<tag/Function/Wait until the start of the next video frame.
<tag/Header/<tt/
<ref id="atmos.h" name="atmos.h">,
<ref id="cbm.h" name="cbm.h">,
<ref id="gamate.h" name="gamate.h">,
<ref id="nes.h" name="nes.h">,
@@ -8365,6 +8367,7 @@ only in the presence of a prototype.
<tag/Declaration/<tt/void waitvsync (void);/
<tag/Description/Wait for vertical sync, to reduce flickering.
<tag/Availability/Platforms served by the headers above
(Atmos requires the VSync hack)
<tag/Example/None.
</descrip>
</quote>
+3
View File
@@ -169,6 +169,9 @@ void atmos_tock (void);
void atmos_zap (void);
/* Raygun sound effect */
void waitvsync (void);
/* Wait for start of next frame */
/* End of atmos.h */
+18
View File
@@ -0,0 +1,18 @@
;
; Written by Stefan Haubenthal <polluks@sdf.org>, requires VSync hack
;
; void waitvsync (void);
;
.export _waitvsync
.include "atmos.inc"
.proc _waitvsync
lda #%00010000 ; CB1
wait: and VIA::PRA2
bne wait
rts
.endproc