2000-12-04 20:20:16 +00:00
|
|
|
;
|
2004-07-09 19:23:13 +00:00
|
|
|
; Christian Groessler, July 2004
|
2000-12-04 20:20:16 +00:00
|
|
|
;
|
2004-07-09 19:23:13 +00:00
|
|
|
; unsigned char get_tv(void)
|
2000-12-04 20:20:16 +00:00
|
|
|
;
|
|
|
|
; returns the TV system the machine is using
|
2001-11-06 01:22:54 +00:00
|
|
|
; 0 - NTSC
|
|
|
|
; 1 - PAL
|
2000-12-04 20:20:16 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
.include "atari.inc"
|
2004-10-26 19:15:23 +00:00
|
|
|
.include "get_tv.inc"
|
2000-12-04 20:20:16 +00:00
|
|
|
|
2004-07-09 19:23:13 +00:00
|
|
|
.proc _get_tv
|
2000-12-04 20:20:16 +00:00
|
|
|
|
2004-10-26 19:15:23 +00:00
|
|
|
ldx #TV::NTSC ; Assume NTSC
|
|
|
|
lda PAL ; use hw register, PALNTS is only supported on XL/XE ROM
|
2001-11-06 01:22:54 +00:00
|
|
|
and #$0e
|
|
|
|
bne @NTSC
|
2004-10-26 19:15:23 +00:00
|
|
|
inx ; = TV::PAL
|
2001-11-06 01:22:54 +00:00
|
|
|
@NTSC: txa
|
2004-10-26 19:15:23 +00:00
|
|
|
ldx #0 ; Expand to int
|
2000-12-04 20:20:16 +00:00
|
|
|
rts
|
|
|
|
|
|
|
|
.endproc
|