]> git.sur5r.net Git - cc65/blobdiff - testcode/lib/atari/ostype.c
get_ostype() was split into get_ostype() and get_tv() a long time
[cc65] / testcode / lib / atari / ostype.c
index 33f23f0f0841eccccbd1ec439f3d114d3d8963e9..a3569ec3d540ffb9db3446b2c5592bc9b3b1daf5 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * testprogram for get_ostype() function
+ * testprogram for get_ostype() and get_tv() functions
  *
- * 17-Jul-2000, cpg@aladdin.de
+ * 09-Jul-2004, cpg@aladdin.de
  */
 
 #include <stdio.h>
@@ -9,17 +9,18 @@
 
 int main(void)
 {
-    unsigned int t;
+    unsigned int t, v;
     unsigned char palntsc;
     unsigned char *rev;
     unsigned char minor;
     unsigned char c;
 
     t = get_ostype();    /* get computer type */
+    v = get_tv();        /* get tv system */
+
+    palntsc = (v == AT_PAL);
 
-    palntsc = (t & AT_OS_PALNTSC) >> 3;
     minor = (t & AT_OS_TYPE_MINOR) >> 5;
-    if (palntsc != AT_OS_PAL) palntsc = 0; /* 1 - PAL; 0 - NTSC */
     switch(t & AT_OS_TYPE_MAIN) {
         case AT_OS_UNKNOWN:
         default: