]> git.sur5r.net Git - cc65/blobdiff - libsrc/atari/tvtype.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / atari / tvtype.s
index 96d672247c08d3a969692110174ba7c152d0ea70..84540b898e02f0ab1b56a3633472d9ca76982184 100644 (file)
@@ -1,5 +1,5 @@
 ;
-; Christian Groessler, November 2001
+; Christian Groessler, July 2004
 ;
 ; unsigned char get_tv(void)
 ;
 
 
        .include        "atari.inc"
-       .export         _get_tv
+       .include        "get_tv.inc"
 
 .proc  _get_tv
 
-       lda     PAL             ; use hw register, PALNTS is only supported on XL/XE ROM
-       ldx     #0
+       ldx     #TV::NTSC       ; Assume NTSC
+       lda     PAL             ; use hw register, PALNTS is only supported on XL/XE ROM
        and     #$0e
        bne     @NTSC
-       lda     #1
-       rts
+       inx                     ; = TV::PAL
 @NTSC: txa
+       ldx     #0              ; Expand to int
        rts
 
 .endproc