2 ; Marco van den Heuvel, 2018-04-14
5 ; unsigned char detect_c64dtv (void);
7 ;/* Check for the presence of the C64DTV.
9 ; * Possible return values:
10 ; * 0x00 : C64DTV not present
11 ; * 0x01 : C64DTV present
14 .export _detect_c64dtv
16 .include "accelerator.inc"
19 ldy C64DTV_Extended_Regs
23 ; Make sure the CPU is a 6510
24 .byte $1A ; NOP on 8502, INA on 65(S)C(E)02, 4510 and 65816
27 sta C64DTV_Extended_Regs
29 ; Check if $D000 is mirrored at $D040
42 sty C64DTV_Extended_Regs