#include <reg51.h>
#include <string.h>
#include <math.h>
#include <uart.h>
#include <sd.h>
sbit DATA =P2^5;
sbit CLK =P2^4;
sbit XCS =P2^3 ;
sbit XRESET=P2^2 ;
sbit DREQ =P2^1 ;
sbit XDCS =P2^0 ;
#define VOL_VALUE 0x0000
unsigned char get[64];
//unsigned char xdata mp3[512];
/*
unsigned char code swap[256] =
{
0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,8,136,
72,200,40,168,104,232,24,152,88,216,56,184,120,248,4,132,68,196,36,164,100,
228,20,148,84,212,52,180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,
60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,
138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,
102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,
222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,
137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,
101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,
221,61,189,125,253,3,131,67,195,35,163,99,227,19,147,83,211,51,179,115,243,11,
139,75,203,43,171,107,235,27,155,91,219,59,187,123,251,7,135,71,199,39,167,
103,231,23,151,87,215,55,183,119,247,15,143,79,207,47,175,111,239,31,159,95,
223,63,191,127,255
};
unsigned char code vsBeepMP31[20480] = {
0xff,
0xe3,0x44,0x64,0x0,0xe,0x2a,0x3,0x3e,0x1,0xc6,0xc0,0x0,0x8d,0x90,0xd6,0x80,
0x1,0x8a,0x28,0x0,0x0,0xf8,0x13,0x30,0x91,0xf9,0x90,0x0,0x7f,0xc0,0x93,0x4b,
0xf1,0x29,0x93,0xc3,0x83,0xfc,0x1b,0x66,0x17,0x36,0x3b,0xcb,0xff,0xfa,0x71,0x98,
0x44,0xdf,0xff,0xc4,0x10,0x20,0x85,0x43,0x31,0x97,0x1d,0xff,0xff,0x90,0x43,0xa6,
0xe2,0xe3,0x74,0xc3,0xe4,0xff,0xff,0xc5,0xc0,0x54,0x1c,0xf1,0x5b,0x8e,0x34,0xc,
0xa,0x84,0x1f,0xff,0xff,0xfc,0xbe,0x6e,0x39,0x84,0x41,0x32,0x28,0x5c,0x63,0x4c,
0xbf,0xff,0xff,0xff,0xfa,0x69,0x90,0x42,0x28,0x54,0x2f,0x90,0x31,0xc6,0x89,0xbd,
0x34,0xd3,0x27,0x3f,0xff,0xff,0xff,0xff,0xcb,0x88,0x11,0x72,0xfb,0xa1,0x74,0xd3,
0x76,0x4e,0x4f,0xbe,0x2,0x3c,0xe,0x0,0xbf,0x85,0x38,0x15,0x3c,0x44,0x12,0x7e,
0x1,0x87,0xc5,0xff,0xc3,0x82,0x84,0xf,0xff,0xe7,0x38,0xa1,0xe,0x7c,0xb8,0x7c,
0x10,0x77,0xe5,0xc3,0xe0,0x80,0xf,0xfe,0x1f,0x4,0x0,0x61,0xf3,0x9f,0xfc,0xa0,
0xd,0xe0,0x80,0xc,0xf9,0xcf,0xff,0xca,0x17,0x79,0xce,0x94,0xc4,0x14,0xd5,0xff,
0xe3,0x44,0x64,0x0,0xe,0x1d,0xe7,0x68,0x2f,0xc3,0x8,0x0,0xd,0xe0,0xa2,0x74,
0x1,0x9a,0x10,0x0,0x50,0x18,0x42,0x8d,0xb8,0xe3,0xd,0xc5,0xbf,0x59,0x4b,0x29,
0x26,0xa0,0x77,0xc2,0x30,0xbb,0x5a,0x28,0x1c,0x81,0x90,0xa0,0xcc,0xe6,0x2e,0x2e,
0xea,0x3d,0xc1,0x9a,0x8c,0x56,0x2d,0x33,0x32,0x3a,0x23,0x76,0xae,0x85,0x8a,0xaa,
0x2,0xd8,0xc6,0x52,0x84,0xa8,0x34,0x30,0x64,0xc2,0xb1,0x48,0x61,0xa5,0x60,0x85,
0x35,0x1a,0x8c,0x56,0x79,0xde,0x41,0x90,0x33,0x57,0xa8,0x87,0xff,0xcb,0xfd,0xb4,
0x19,0xbe,0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x83,0xa7,0x98,0x5b,0x35,0xfa,0xc5,0xd,0x7f,0xb7,0x47,0xf1,0x1b,0x9d,0x49,
0xdb,0xbe,0xad,0x75,0xff,0xa6,0xaa,0xa4,0xbf,0x42,0x62,0xa,0x6a,0x2d,0x55,0xff,
0xe3,0x44,0x64,0x0,0xd,0xf9,0xef,0x5c,0x3b,0x2d,0x5,0x2c,0xe,0x10,0x26,0x61,
0x44,0xd8,0x44,0x0,0xa1,0x82,0x4d,0x34,0xee,0x1a,0xa9,0xbe,0x3f,0xf2,0x26,0x41,
0x29,0x40,0xe,0x11,0x3e,0x55,0x35,0x9e,0x2a,0x15,0xe5,0x81,0xe1,0x17,0xe3,0x60,
0xad,0xff,0xb6,0xca,0x0,0x37,0x39,0x1c,0x58,0x51,0xd3,0xfe,0x30,0x60,0xa,0xdf,
0xde,0x30,0x7b,0x63,0xaf,0x41,0xc9,0x39,0x37,0xe8,0x64,0x6d,0x44,0x10,0xe3,0x45,
0x6,0x8a,0xf5,0x51,0x46,0xfd,0xba,0xa8,0xa0,0x7c,0x50,0x49,0xbf,0x46,0xff,0x43,
0x21,0xd1,0x94,0x77,0xa2,0x23,0x5f,0xad,0x86,0x85,0x9,0xd0,0xa8,0xae,0x65,0xff,
0xc6,0x35,0xc5,0xdb,0xfc,0xc3,0xcd,0x67,0xdf,0x46,0x7f,0xfe,0x65,0x13,0x47,0x43,
0xe2,0xad,0xd2,0x6c,0x0,0x80,0xb2,0x9a,0xce,0xe5,0xbc,0x52,0xc4,0x67,0x86,0x2e,
0x56,0xa7,0x67,0x7d,0x1d,0x4e,0xfa,0x9f,0xf7,0xfd,0x1e,0xea,0x1c,0x82,0xba,0x3f,
0x5a,0xe,0xfa,0xb9,0x64,0xff,0xe4,0x9f,0x4f,0xf7,0xa4,0xff,0xb0,0x98,0x66,0x35,
0x94,0xe1,0x45,0x97,0x3a,0xe1,0x63,0x6a,0x6b,0x52,0x6d,0x2a,0x4c,0x41,0x4d,0xff,
0xe3,0x44,0x64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