From 035621aa95e2be6a6f5f0fc091e9fc4c7df2047d Mon Sep 17 00:00:00 2001 From: mrdudz Date: Sat, 17 Jun 2017 02:26:54 +0200 Subject: [PATCH] fixed code a bit so it compiles again :) --- libsrc/c128/waitvblank.s | 15 ++++----------- libsrc/c64/waitvblank.s | 15 ++++----------- libsrc/cbm510/waitvblank.s | 25 +++++++------------------ libsrc/vic20/waitvblank.s | 7 ++++++- 4 files changed, 21 insertions(+), 41 deletions(-) diff --git a/libsrc/c128/waitvblank.s b/libsrc/c128/waitvblank.s index a3904d858..54699286c 100644 --- a/libsrc/c128/waitvblank.s +++ b/libsrc/c128/waitvblank.s @@ -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 diff --git a/libsrc/c64/waitvblank.s b/libsrc/c64/waitvblank.s index 09570f873..606f41681 100644 --- a/libsrc/c64/waitvblank.s +++ b/libsrc/c64/waitvblank.s @@ -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 diff --git a/libsrc/cbm510/waitvblank.s b/libsrc/cbm510/waitvblank.s index 30cbf072f..975861f2c 100644 --- a/libsrc/cbm510/waitvblank.s +++ b/libsrc/cbm510/waitvblank.s @@ -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 diff --git a/libsrc/vic20/waitvblank.s b/libsrc/vic20/waitvblank.s index b99c74bed..246c44640 100644 --- a/libsrc/vic20/waitvblank.s +++ b/libsrc/vic20/waitvblank.s @@ -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 -- 2.39.2