1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 03:29:39 +00:00

Fixed an issue with the changing the d040 value while detecting.

This commit is contained in:
Marco van den Heuvel 2018-04-14 11:31:28 -07:00
parent 6076316f38
commit cb04bc5465

View File

@ -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