1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-16 02:10:52 +00:00
cc65/samples/geos/geosver.c

63 lines
1.5 KiB
C
Raw Normal View History

2018-02-14 03:19:40 +00:00
#include <geos.h>
#include <conio.h>
// Let's define the window we're operating
struct window wholeScreen = {0, SC_PIX_HEIGHT-1, 0, SC_PIX_WIDTH-1};
void main (void)
{
unsigned char os = get_ostype();
2021-05-16 16:29:45 +00:00
char *machine = NULL;
char *version = NULL;
2018-02-14 03:19:40 +00:00
unsigned char good = 1;
SetPattern(0);
InitDrawWindow(&wholeScreen);
Rectangle();
gotoxy(0, 4);
if (os == GEOS4) {
machine = "plus4";
version = "GEOS v3.5";
2018-02-14 03:19:40 +00:00
} else {
if ((os & GEOS128) == GEOS128) {
machine = "c128";
} else {
machine = "c64";
}
os &= 0x7f;
if (os == GEOS_V10) {
version = "GEOS v1.0";
2018-02-14 03:19:40 +00:00
} else if (os == GEOS_V11) {
version = "GEOS v1.1";
2018-02-14 03:19:40 +00:00
} else if (os == GEOS_V12) {
version = "GEOS v1.2";
2018-02-15 23:24:58 +00:00
} else if (os == GEOS_V13) {
version = "GEOS v1.3";
} else if (os == GEOS_V15) {
version = "GEOS v1.5";
2018-02-14 03:19:40 +00:00
} else if (os == GEOS_V20) {
version = "GEOS v2.0";
2018-02-14 03:19:40 +00:00
} else if (os == MEGAPATCH3) {
version = "MegaPatch 3";
} else if (os == GATEWAY) {
version = "GateWay";
} else if ((os & WHEELS) == WHEELS) {
version = "Wheels";
} else {
version = "Unknown GEOS version";
2018-02-14 03:19:40 +00:00
good = 0;
}
}
if (good) {
cprintf("%s (%s)", version, machine);
} else {
cprintf("%s (%s) (%d)", version, machine, os);
}
Sleep(10*50);
2022-04-17 14:06:45 +00:00
2018-02-14 03:19:40 +00:00
return;
}