#include #include #include "pad.h" #define vb (0x80090000) #define vh (0x80100000) u_long GameRunning; u_long KeyPressed; void main() { short vbret,vnum; u_long ProgNumber = 0; GameRunning = 1; KeyPressed = 0; InitialisePad(); vbret = SsVabTransfer((unsigned char *) vh,(unsigned char *) vb,-1,1); printf("\n\nVB val = %d\n\n",vbret); SsSetMVol(127, 127); while (GameRunning == 1) { long PAD = PadRead(); if (PAD == 0) KeyPressed = 0; if ((PAD& PADstart) && (KeyPressed == 0)) {SsUtAllKeyOff(0); KeyPressed = 1;}; if ((PAD& PADcross) && (KeyPressed == 0)) {SsUtKeyOn(vbret, 0, 0, 48, 0, 127, 127); KeyPressed = 1;}; if ((PAD& PADcircle) && (KeyPressed == 0)) {SsUtKeyOn(vbret, 1, 0, 48, 0, 127, 127); KeyPressed = 1;}; // if ((PAD& PADtriangle) && (KeyPressed == 0)) // {SsUtKeyOn(vbret, 1, 0, 48, 0, 127, 127); KeyPressed = 1;}; if (PAD& PADselect) {GameRunning = 0;}; }; SsVabClose(vbret); };