From: Marco van den Heuvel Date: Sat, 14 Apr 2018 18:31:28 +0000 (-0700) Subject: Fixed an issue with the changing the d040 value while detecting. X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cb04bc54655c0b6e66e54cf924a9cee017872af9;p=cc65 Fixed an issue with the changing the d040 value while detecting. --- diff --git a/libsrc/c64/acc_detect_c64dtv.s b/libsrc/c64/acc_detect_c64dtv.s index ce30806db..1734095b1 100755 --- a/libsrc/c64/acc_detect_c64dtv.s +++ b/libsrc/c64/acc_detect_c64dtv.s @@ -18,7 +18,7 @@ _detect_c64dtv: ldy C64DTV_Extended_Regs lda #$00 - tax + ldx $D000 ; Make sure the CPU is a 6510 .byte $1A ; NOP on 8502, INA on 65(S)C(E)02, 4510 and 65816 @@ -27,17 +27,18 @@ _detect_c64dtv: sta C64DTV_Extended_Regs ; Check if $D000 is mirrored at $D040 - lda $D040 - cmp $D000 + cpx $D040 bne found - inc $D040 - cmp $D000 + inc $D000 + cpx $D040 bne not_found found: lda #$01 .byte $2C not_found: lda #$00 + stx $D000 + ldx #$00 sty C64DTV_Extended_Regs rts