/*** (c) Jim Pitts 1997 *** sigill@geocities.com -=- www.playstation.co.uk/~Sig1LL *** jim@micronetics.com *** real info is in frame.s *** This .c file is just a place holder *** until I found out how the start up *** code works, then I'll go 100% asm. *** This was written for gcc do not *** expect this to work with CodeWarrior. ***/ #include #include "pad.h" #define RGB(r,g,b) ((r)|((g)<<5)|((b)<<10)) long *Cols = (long *)0x1f800000; int *theta = (int *) 0x1f800010; RECT *rect = (RECT *)0x1f800014; int Page; extern void DrawFrame(); volatile unsigned char *Pad1, *Pad2; unsigned long ReadPad(void) { return(~(*(Pad1+3) | *(Pad1+2) << 8 | *(Pad2+3) << 16 | *(Pad2+2) << 24)); } int main (void){ SetVideoMode (MODE_PAL); GsInitGraph(256 ,256, GsOFSGPU|GsNONINTER, 1, 0); GsDefDispBuff(0,0,0,256); GetPadBuf (&Pad1, &Pad2); Page = GsGetActiveBuff(); *theta = 0; Cols[0] = RGB(0,0,5); //bg Cols[1] = RGB(0,0,17); //fg Cols[2] = RGB(0,0,15); //bg Cols[3] = RGB(0,0,27); //fg rect->x = 0; rect->y = 0; rect->w = 256; rect->h = 512; ClearImage(rect,0,0,0); for (;;){ if (ReadPad() & 256) break; DrawFrame(); } ResetGraph (3); return 0; }