]> git.sur5r.net Git - cc65/commitdiff
fixed code a bit so it compiles again :)
authormrdudz <mrdudz@users.noreply.github.com>
Sat, 17 Jun 2017 00:26:54 +0000 (02:26 +0200)
committermrdudz <mrdudz@users.noreply.github.com>
Sat, 17 Jun 2017 00:26:54 +0000 (02:26 +0200)
libsrc/c128/waitvblank.s
libsrc/c64/waitvblank.s
libsrc/cbm510/waitvblank.s
libsrc/vic20/waitvblank.s

index a3904d858226ba477f2d6f29733f169fe955ef6b..54699286c831b3deef1411f5a1fb191a189c8784 100644 (file)
@@ -1,20 +1,13 @@
 
         .export         _waitvblank
 
-        .include        "c128/c128.inc"
+        .include        "c128.inc"
 
 _waitvblank:
-        lda     PALFLAG
-        beq     @ntsc
-        ldx     #(312-24)-256
-        .byte $2c
-@ntsc:
-        ldx     #(262-4)-256
 @l1:
         lda     VIC_CTRL1
-        and     #$80
-        beq     @l1
+        bpl     @l1
 @l2:
-        cpx     VIC_HLINE
-        bcs     @l2
+        lda     VIC_CTRL1
+        bmi     @l2
         rts
index 09570f873f583e7d2fabbedbb4a37d5f7fbabab5..606f4168104f978516abcbe1a294ea24b2db0373 100644 (file)
@@ -1,20 +1,13 @@
 
         .export         _waitvblank
 
-        .include        "c64/c64.inc"
+        .include        "c64.inc"
 
 _waitvblank:
-        lda     PALFLAG
-        beq     @ntsc
-        ldx     #(312-24)-256
-        .byte $2c
-@ntsc:
-        ldx     #(262-4)-256
 @l1:
         lda     VIC_CTRL1
-        and     #$80
-        beq     @l1
+        bpl     @l1
 @l2:
-        cpx     VIC_HLINE
-        bcs     @l2
+        lda     VIC_CTRL1
+        bmi     @l2
         rts
index 30cbf072fce59fde2c5c0ba0732945d9bf5e7d09..975861f2c43bf2b84537eafa15f299bad35c1d5d 100644 (file)
@@ -5,33 +5,22 @@
 
         .importzp       vic
 
-        .include        "cbm510/cbm510.inc"
+        .include        "cbm510.inc"
 
 _waitvblank:
         rts     ; FIXME
 
         jsr    sys_bank                ; Switch to the system bank
 
-        lda PALFLAG
-        beq ntsc
-        ldx #(312-24)-256
-        .byte $2c
-ntsc:
-        ldx #(262-2)-256
-
         sei
+
         ldy #VIC_CTRL1
-l1:
+@l1:
+        lda (vic),y
+        bpl @l1
+@l2:
         lda (vic),y
-        and #$80
-        beq l1
-
-;?!?
-;              ldy #VIC_HLINE
-;              txa
-;l2:
-;              cmp (vic),y
-;              bcs l2
+        bmi @l2
 
         cli
         jmp    restore_bank
index b99c74bed885f143d43be12229466a2249a08867..246c44640fc4869271949f9e3284f0803f8b9f4b 100644 (file)
@@ -1,6 +1,11 @@
         .export         _waitvblank
 
-        .include        "vic20/vic20.inc"
+        .include        "vic20.inc"
+
+; FIXME
+; this flag doesnt work on vic20!!!
+; it will have to be filled by a get_tv() constructor or so
+PALFLAG                = $2A6          ; $01 = PAL, $00 = NTSC
 
 _waitvblank:
         lda     PALFLAG