10 int main(int argc, char *argv[])
13 gotoxy(0,0);cputs("Gamate C-Test");
15 textcolor(0);gotoxy(0,5);cputs("abcdABCD 0");
16 textcolor(1);gotoxy(0,6);cputs("abcdABCD 1");
17 textcolor(2);gotoxy(0,7);cputs("abcdABCD 2");
18 textcolor(3);gotoxy(0,8);cputs("abcdABCD 3");
21 textcolor(COLOR_BLACK);
25 gotoxy(0,2);cprintf("%04x %02x %02x %02x", n, x, y, *((unsigned char*)JOY_DATA));
27 switch((*((unsigned char*)JOY_DATA))) {
28 case 0xff ^ JOY_DATA_UP:
29 ++y; if (y == 0xc8) y = 0;
31 case 0xff ^ JOY_DATA_DOWN:
32 --y; if (y == 0xff) y = 0xc7;
34 case 0xff ^ JOY_DATA_LEFT:
37 case 0xff ^ JOY_DATA_RIGHT:
40 case 0xff ^ JOY_DATA_FIRE_A:
46 (*((unsigned char*)LCD_XPOS)) = x;
47 (*((unsigned char*)LCD_YPOS)) = y;