4 unsigned short *EmuScreen=NULL;
\r
5 int EmuWidth=320,EmuHeight=224;
\r
6 RECT EmuScreenRect = { 0, 0, 320, 224 };
\r
9 static int EmuScan(unsigned int num);
\r
10 unsigned char *PicoDraw2FB = NULL;
\r
19 EmuWidth=320; EmuHeight=224;
\r
20 len=EmuWidth*EmuHeight; len<<=1;
\r
21 EmuScreen=(unsigned short *)malloc(len); if (EmuScreen==NULL) return 1;
\r
22 PicoDraw2FB=(unsigned char *)malloc((8+320)*(8+224+8)*2);
\r
23 memset(EmuScreen,0,len);
\r
25 PicoDrawSetColorFormat(1);
\r
26 PicoScanBegin=EmuScan;
\r
34 free(EmuScreen); EmuScreen=NULL; // Deallocate screen
\r
36 EmuWidth=EmuHeight=0;
\r
41 // Megadrive scanline callback:
\r
42 static int EmuScan(unsigned int num)
\r
44 DrawLineDest=EmuScreen+(num<<8)+(num<<6);
\r
51 char map[12]={0,1,2,3,8,9,10,4,11,12,13,14}; // Joypads, format is UDLR BCAS ZYXM
\r
54 // Set Megadrive buttons:
\r
58 if (m>=0) if (Inp.button[m]>30) input|=1<<a;
\r
62 PicoPad[0]|=PicoPadAdd;
\r
64 PsndOut=(short *)DSoundNext;
\r
72 void mp3_update(int *buffer, int length, int stereo)
\r
76 void mp3_start_play(FILE *f, int pos)
\r
80 int mp3_get_bitrate(FILE *f, int size)
\r