/* =================================================================== ** File: card.c ** Purpose: Load and save the Tetixx Hiscore list and Screen ** adjust values to memory card. ** The code is based on the Sony Computer Entertainment Inc. ** card.c source. */ #include #include #include "tetixx.h" #include "cardio.h" // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // P R O T O T Y P E S // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - long List_Card(char *drv, struct DIRENTRY *d); asm void Get_Data(void); asm void Make_Save_Data(unsigned long); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // V A R I A B L E S // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - char *DevName[]={"bu00:","bu10:"}; static unsigned long CardBuffer[2048]; struct DIRENTRY cd[15]; unsigned char StonePattern[128] = { 0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,0xB8,0xEE,0x9B,0xA9,0xAB,0x79,0xBA, 0x81,0xA8,0xFC,0xAB,0xA9,0x79,0x57,0x37,0x82,0xA8,0xCD,0x9B,0x79,0x79,0x57,0x37, 0x83,0xB8,0xDD,0xAB,0x55,0x77,0x77,0x39,0x83,0xA8,0xCC,0x5A,0x97,0x79,0x99,0x27, 0x82,0xA8,0xAD,0x59,0x77,0x99,0x79,0x15,0x81,0xC8,0xAE,0x55,0x57,0x97,0x37,0x13, 0x81,0xB8,0x9A,0x53,0x57,0x77,0x35,0x25,0x82,0xB8,0x9A,0x53,0x57,0x77,0x35,0x25, 0x82,0xA8,0xAD,0x59,0x77,0x99,0x79,0x15,0x81,0xC8,0xAE,0x55,0x57,0x97,0x37,0x13, 0x81,0xB8,0x9A,0x53,0x57,0x77,0x35,0x25,0x82,0xA8,0x39,0x73,0x77,0x57,0x55,0x37, 0x83,0x98,0x11,0x11,0x32,0x23,0x32,0x22,0x82,0x88,0x88,0x88,0x88,0x88,0x88,0x88, 0x88 }; char TetixxTitle[]="KAMIX HISCORE"; /* --------------------------------------------------------------------- ** Function: Load_Tetixx ** Purpose: Try to load the file. If Tetixx not exits then reutnr 1 */ int Load_Tetixx(int n) { long ret,howmany,fd; short i; char name[32]; ret = 0; howmany = List_Card(DevName[n], &cd[0]); if (howmany) { for (i=0; i