]> git.sur5r.net Git - cc65/commitdiff
dont trash akku if possible, use VDC register when in 80column mode
authormrdudz <mrdudz@users.noreply.github.com>
Wed, 21 Jun 2017 21:18:00 +0000 (23:18 +0200)
committermrdudz <mrdudz@users.noreply.github.com>
Wed, 21 Jun 2017 21:18:00 +0000 (23:18 +0200)
libsrc/c128/waitvblank.s
libsrc/c64/waitvblank.s

index 54699286c831b3deef1411f5a1fb191a189c8784..e0a469d0e9c93eb965c5f206e35fe5435b6c556d 100644 (file)
@@ -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
index 606f4168104f978516abcbe1a294ea24b2db0373..dd90878410682ad373bd6b55d9822042b88a4166 100644 (file)
@@ -5,9 +5,9 @@
 
 _waitvblank:
 @l1:
-        lda     VIC_CTRL1
+        bit     VIC_CTRL1
         bpl     @l1
 @l2:
-        lda     VIC_CTRL1
+        bit     VIC_CTRL1
         bmi     @l2
         rts