X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=libsrc%2Fatari%2Ftvtype.s;h=76661bf7261ba29e7709502967330276928c55cd;hb=0bd97f5445a36d3e4e7b6685097bb10c63a0c338;hp=47f4afd45a1be37d194a54d95eed8c8f101de985;hpb=f6d59f6e176bcd0c43707080981b69b52df25fbd;p=cc65 diff --git a/libsrc/atari/tvtype.s b/libsrc/atari/tvtype.s index 47f4afd45..76661bf72 100644 --- a/libsrc/atari/tvtype.s +++ b/libsrc/atari/tvtype.s @@ -1,7 +1,7 @@ ; -; Christian Groessler, June 2004 +; Christian Groessler, July 2004 ; -; unsigned char _get_tv(void) +; unsigned char get_tv(void) ; ; returns the TV system the machine is using ; 0 - NTSC @@ -9,18 +9,18 @@ ; - .include "atari.inc" - .export __get_tv + .include "atari.inc" + .include "get_tv.inc" -.proc __get_tv +.proc _get_tv - lda PAL ; use hw register, PALNTS is only supported on XL/XE ROM - ldx #0 - and #$0e - bne @NTSC - lda #1 - rts -@NTSC: txa - rts + ldx #TV::NTSC ; Assume NTSC + lda PAL ; use hw register, PALNTS is only supported on XL/XE ROM + and #$0e + bne @NTSC + inx ; = TV::PAL +@NTSC: txa + ldx #0 ; Expand to int + rts .endproc