2019-09-27 07:38:51 +00:00
|
|
|
;
|
2022-04-02 13:39:35 +00:00
|
|
|
; 2021-04-01, Greg King
|
2019-09-27 07:38:51 +00:00
|
|
|
;
|
|
|
|
; void waitvsync (void);
|
2019-12-25 15:56:32 +00:00
|
|
|
; /* Wait for the start of the next video field. */
|
2019-09-27 07:38:51 +00:00
|
|
|
;
|
2019-12-25 15:56:32 +00:00
|
|
|
; VERA's vertical sync causes IRQs which increment the jiffy timer.
|
2022-08-05 22:44:18 +00:00
|
|
|
;
|
|
|
|
; Updated by ZeroByteOrg to use Kernal API RDTIM to retreive the TIMER variable
|
2019-09-27 07:38:51 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
.export _waitvsync
|
2022-08-08 20:17:28 +00:00
|
|
|
.importzp tmp1
|
2022-08-08 20:21:30 +00:00
|
|
|
.import RDTIM
|
2019-09-27 07:38:51 +00:00
|
|
|
|
2022-08-05 22:44:18 +00:00
|
|
|
.proc _waitvsync: near
|
|
|
|
jsr RDTIM
|
2022-08-08 20:17:28 +00:00
|
|
|
sta tmp1
|
2022-08-05 22:44:18 +00:00
|
|
|
keep_waiting:
|
|
|
|
jsr RDTIM
|
2022-08-08 20:17:28 +00:00
|
|
|
cmp tmp1
|
2022-08-05 22:44:18 +00:00
|
|
|
beq keep_waiting
|
|
|
|
rts
|
|
|
|
.endproc
|