2016-02-28 21:35:46 +00:00
|
|
|
|
|
|
|
.export _waitvblank
|
|
|
|
|
2017-06-17 00:26:54 +00:00
|
|
|
.include "c128.inc"
|
2016-02-28 21:35:46 +00:00
|
|
|
|
|
|
|
_waitvblank:
|
2017-06-21 21:18:00 +00:00
|
|
|
|
2017-06-21 22:19:39 +00:00
|
|
|
bit MODE
|
2017-06-21 21:18:00 +00:00
|
|
|
bmi @c80
|
|
|
|
|
2016-02-28 21:35:46 +00:00
|
|
|
@l1:
|
2017-06-21 21:18:00 +00:00
|
|
|
bit VIC_CTRL1
|
2017-06-17 00:26:54 +00:00
|
|
|
bpl @l1
|
2016-02-28 21:35:46 +00:00
|
|
|
@l2:
|
2017-06-21 21:18:00 +00:00
|
|
|
bit VIC_CTRL1
|
2017-06-17 00:26:54 +00:00
|
|
|
bmi @l2
|
2016-02-28 21:35:46 +00:00
|
|
|
rts
|
2017-06-21 21:18:00 +00:00
|
|
|
|
|
|
|
@c80:
|
|
|
|
;FIXME: do we have to switch banks?
|
|
|
|
@l3:
|
|
|
|
lda VDC_INDEX
|
|
|
|
and #$20
|
|
|
|
beq @l3
|
|
|
|
rts
|