From: mrdudz Date: Wed, 21 Jun 2017 21:18:00 +0000 (+0200) Subject: dont trash akku if possible, use VDC register when in 80column mode X-Git-Tag: V2.17~116^2~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=49aad01bf105fb731270a964c6130c3f52165c0d;p=cc65 dont trash akku if possible, use VDC register when in 80column mode --- diff --git a/libsrc/c128/waitvblank.s b/libsrc/c128/waitvblank.s index 54699286c..e0a469d0e 100644 --- a/libsrc/c128/waitvblank.s +++ b/libsrc/c128/waitvblank.s @@ -4,10 +4,22 @@ .include "c128.inc" _waitvblank: + + lda MODE + bmi @c80 + @l1: - lda VIC_CTRL1 + bit VIC_CTRL1 bpl @l1 @l2: - lda VIC_CTRL1 + bit VIC_CTRL1 bmi @l2 rts + +@c80: + ;FIXME: do we have to switch banks? +@l3: + lda VDC_INDEX + and #$20 + beq @l3 + rts diff --git a/libsrc/c64/waitvblank.s b/libsrc/c64/waitvblank.s index 606f41681..dd9087841 100644 --- a/libsrc/c64/waitvblank.s +++ b/libsrc/c64/waitvblank.s @@ -5,9 +5,9 @@ _waitvblank: @l1: - lda VIC_CTRL1 + bit VIC_CTRL1 bpl @l1 @l2: - lda VIC_CTRL1 + bit VIC_CTRL1 bmi @l2 rts