2016-02-28 21:35:46 +00:00
|
|
|
|
2017-07-17 21:15:05 +00:00
|
|
|
.export _waitvsync
|
2016-02-28 21:35:46 +00:00
|
|
|
.import PALFLAG
|
|
|
|
.import sys_bank, restore_bank
|
|
|
|
|
|
|
|
.importzp vic
|
|
|
|
|
2017-06-17 00:26:54 +00:00
|
|
|
.include "cbm510.inc"
|
2016-02-28 21:35:46 +00:00
|
|
|
|
2017-07-17 21:15:05 +00:00
|
|
|
_waitvsync:
|
2017-07-17 22:41:54 +00:00
|
|
|
jsr sys_bank ; Switch to the system bank
|
2016-02-28 21:35:46 +00:00
|
|
|
sei
|
2017-06-17 00:26:54 +00:00
|
|
|
|
2016-02-28 21:35:46 +00:00
|
|
|
ldy #VIC_CTRL1
|
2017-06-17 00:26:54 +00:00
|
|
|
@l1:
|
|
|
|
lda (vic),y
|
|
|
|
bpl @l1
|
|
|
|
@l2:
|
2016-02-28 21:35:46 +00:00
|
|
|
lda (vic),y
|
2017-06-17 00:26:54 +00:00
|
|
|
bmi @l2
|
2016-02-28 21:35:46 +00:00
|
|
|
|
|
|
|
cli
|
|
|
|
jmp restore_bank
|