mirror of
https://github.com/cc65/cc65.git
synced 2025-01-17 20:30:36 +00:00
commit
0be5f8f9e1
@ -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>
|
||||
|
@ -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
libsrc/atmos/waitvsync.s
Normal file
18
libsrc/atmos/waitvsync.s
Normal 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
|
Loading…
x
Reference in New Issue
Block a user