2000-07-17 00:35:12 +00:00
|
|
|
/*
|
2014-06-30 09:10:35 +00:00
|
|
|
** testprogram for get_ostype() and get_tv() functions
|
|
|
|
**
|
|
|
|
** 09-Jul-2004, chris@groessler.org
|
|
|
|
*/
|
2000-07-17 00:35:12 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <atari.h>
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2021-10-05 17:19:54 +00:00
|
|
|
char *rev;
|
2004-07-09 19:56:55 +00:00
|
|
|
unsigned int t, v;
|
2000-07-17 00:35:12 +00:00
|
|
|
unsigned char palntsc;
|
|
|
|
unsigned char minor;
|
|
|
|
unsigned char c;
|
|
|
|
|
|
|
|
t = get_ostype(); /* get computer type */
|
2004-07-09 19:56:55 +00:00
|
|
|
v = get_tv(); /* get tv system */
|
|
|
|
|
|
|
|
palntsc = (v == AT_PAL);
|
2000-07-17 00:35:12 +00:00
|
|
|
|
|
|
|
minor = (t & AT_OS_TYPE_MINOR) >> 5;
|
|
|
|
switch(t & AT_OS_TYPE_MAIN) {
|
|
|
|
case AT_OS_UNKNOWN:
|
|
|
|
default:
|
|
|
|
printf("unknown system type !!\n");
|
|
|
|
break;
|
|
|
|
case AT_OS_400800:
|
|
|
|
if (minor == 1) rev = "A";
|
|
|
|
else rev = "B";
|
|
|
|
printf("it's a 400/800, %s, Rev. %s\n",palntsc ? "PAL" : "NTSC",rev);
|
|
|
|
break;
|
|
|
|
case AT_OS_1200XL:
|
|
|
|
if (minor == 1) rev = "10";
|
|
|
|
else rev = "11";
|
|
|
|
printf("it's a 1200XL, %s, Rev. %s\n",palntsc ? "PAL" : "NTSC",rev);
|
|
|
|
break;
|
|
|
|
case AT_OS_XLXE:
|
|
|
|
printf("is'a a XL/XE, %s, Rev. %d\n",palntsc ? "PAL" : "NTSC",minor);
|
|
|
|
break;
|
|
|
|
}
|
2013-08-26 10:16:26 +00:00
|
|
|
printf("hit <RETURN> to continue...\n");
|
2000-07-17 00:35:12 +00:00
|
|
|
c = getchar();
|
2013-08-26 10:16:26 +00:00
|
|
|
return 0;
|
2000-07-17 00:35:12 +00:00
|
|
|
}
|