; /* Return the video mode the machine is using */
;
- .export _get_tv
-
+ .include "get_tv.inc"
.include "c128.inc"
.proc _get_tv
- ldx #$01 ; Assume PAL
+ ldx #TV::PAL ; Assume PAL
lda PALFLAG
bne pal
dex ; NTSC
; /* Return the video mode the machine is using */
;
- .export _get_tv
-
.include "../plus4/plus4.inc"
+ .include "get_tv.inc"
;--------------------------------------------------------------------------
.proc _get_tv
- ldx #$01 ; Assume PAL
+ ldx #TV::PAL ; Assume PAL
bit TED_MULTI1 ; Test bit 6
bvc pal
dex ; NTSC
; /* Return the video mode the machine is using */
;
- .export _get_tv
-
.include "c64.inc"
-
+ .include "get_tv.inc"
;--------------------------------------------------------------------------
; _get_tv
.endproc
-
+
; /* Return the video mode the machine is using */
;
- .export _get_tv
-
.include "plus4.inc"
+ .include "get_tv.inc"
;--------------------------------------------------------------------------
.proc _get_tv
- ldx #$01 ; Assume PAL
+ ldx #TV::PAL ; Assume PAL
bit TED_MULTI1 ; Test bit 6
bvc pal
dex ; NTSC
; /* Return the video mode the machine is using */
;
- .export _get_tv
-
.include "vic20.inc"
-
+ .include "get_tv.inc"
;--------------------------------------------------------------------------
; _get_tv
NTSC_LINES = 261
; detect the system
- lda #0
+ lda #TV::NTSC
tax
@L0: ldy VIC_HLINE
cpy #1
beq @L2 ; line 0 reached -> NTSC
cpy #NTSC_LINES/2+2
bne @L1
- lda #1
+ lda #TV::PAL
@L2: rts ; system detected: 0 for NTSC, 1 for PAL
.endproc