Make waitvsync available on apple2
This commit is contained in:
committed by
Oliver Schmidt
parent
d3ef3e1b62
commit
a9ab23ad51
@@ -104,6 +104,7 @@ function.
|
||||
<item><ref id="mktime_dt" name="mktime_dt">
|
||||
<item>rebootafterexit
|
||||
<item><ref id="videomode" name="videomode">
|
||||
<item><ref id="waitvsync" name="waitvsync">
|
||||
</itemize>
|
||||
|
||||
|
||||
@@ -119,6 +120,7 @@ function.
|
||||
<item><ref id="mktime_dt" name="mktime_dt">
|
||||
<item>rebootafterexit
|
||||
<item><ref id="videomode" name="videomode">
|
||||
<item><ref id="waitvsync" name="waitvsync">
|
||||
</itemize>
|
||||
|
||||
|
||||
@@ -8516,14 +8518,20 @@ if the mode is not supported due to lack of hardware.
|
||||
<descrip>
|
||||
<tag/Function/Wait until the start of the next video frame.
|
||||
<tag/Header/<tt/
|
||||
<ref id="apple2enh.h" name="apple2enh.h">,
|
||||
<ref id="apple2.h" name="apple2.h">,
|
||||
<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">,
|
||||
<ref id="pce.h" name="pce.h">/
|
||||
<tag/Declaration/<tt/void waitvsync (void);/
|
||||
<tag/Declaration/
|
||||
<tt>void waitvsync (void);</tt><newline>
|
||||
<tt>signed char waitvsync (void); /* For Apple II */</tt><newline>
|
||||
<tag/Description/Wait for vertical sync, to reduce flickering.
|
||||
<tag/Notes/<itemize>
|
||||
<item>The function will return -1 when the feature is not supported,
|
||||
like on the Apple ][+.
|
||||
</itemize>
|
||||
<tag/Availability/Platforms served by the headers above
|
||||
(Atmos requires the VSync hack)
|
||||
<tag/Example/None.
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
;
|
||||
; void waitvsync (void);
|
||||
;
|
||||
.ifdef __APPLE2ENH__
|
||||
|
||||
.export _waitvsync
|
||||
.import ostype
|
||||
|
||||
.ifndef __APPLE2ENH__
|
||||
.import machinetype
|
||||
.endif
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
_waitvsync:
|
||||
@@ -15,18 +17,27 @@ _waitvsync:
|
||||
bmi iigs ; $8x
|
||||
bvs iic ; $4x
|
||||
|
||||
.ifndef __APPLE2ENH__
|
||||
bit machinetype ; IIe/enh?
|
||||
bmi :+
|
||||
|
||||
lda #$FF ; ][+ Unsupported
|
||||
tax
|
||||
rts
|
||||
.endif
|
||||
|
||||
: bit RDVBLBAR
|
||||
bpl :- ; Blanking
|
||||
: bit RDVBLBAR
|
||||
bmi :- ; Drawing
|
||||
rts
|
||||
bpl out
|
||||
|
||||
; Apple IIgs TechNote #40, VBL Signal
|
||||
iigs: bit RDVBLBAR
|
||||
bmi iigs ; Blanking
|
||||
: bit RDVBLBAR
|
||||
bpl :- ; Drawing
|
||||
rts
|
||||
bmi out
|
||||
|
||||
; Apple IIc TechNote #9, Detecting VBL
|
||||
iic: php
|
||||
@@ -42,6 +53,6 @@ iic: php
|
||||
bit DISVBL
|
||||
: sta IOUDISON ; IIc Tech Ref Man: The firmware normally leaves IOUDIS on.
|
||||
plp
|
||||
out: lda #$00
|
||||
tax
|
||||
rts
|
||||
|
||||
.endif ; __APPLE2ENH__
|
||||
|
||||
Reference in New Issue
Block a user