-\r
-void emu_Deinit(void)\r
-{\r
- // save SRAM\r
- if((currentConfig.EmuOpt & 1) && SRam.changed) {\r
- emu_SaveLoadGame(0, 1);\r
- SRam.changed = 0;\r
- }\r
-\r
- if (!(currentConfig.EmuOpt & 0x20)) {\r
- config_writelrom(PicoConfigFile);\r
-#ifndef NO_SYNC\r
- sync();\r
-#endif\r
- }\r
-\r
- free(PicoDraw2FB);\r
-\r
- PicoExit();\r
-}\r
-\r
-void emu_prepareDefaultConfig(void)\r
-{\r
- memset(&defaultConfig, 0, sizeof(defaultConfig));\r
- defaultConfig.EmuOpt = 0x8f | 0x00600; // | <- confirm_save, cd_leds\r
- defaultConfig.s_PicoOpt = 0x0f | POPT_EXT_FM|POPT_EN_MCD_PCM|POPT_EN_MCD_CDDA|POPT_EN_SVP_DRC;\r
- defaultConfig.s_PicoOpt |= POPT_ACC_SPRITES|POPT_EN_MCD_GFX;\r
- defaultConfig.EmuOpt &= ~8; // no save gzip\r
- defaultConfig.s_PsndRate = 44100;\r
- defaultConfig.s_PicoRegion = 0;\r
- defaultConfig.s_PicoAutoRgnOrder = 0x184; // US, EU, JP\r
- defaultConfig.s_PicoCDBuffers = 0;\r
- defaultConfig.Frameskip = 0;\r
- defaultConfig.CPUclock = 200;\r
- defaultConfig.volume = 50;\r
- defaultConfig.scaling = 0;\r
- defaultConfig.turbo_rate = 15;\r
-}\r
-\r
-static void textOut16(int x, int y, const char *text)\r
-{\r
- int i,l,len=strlen(text);\r
- unsigned int *screen = (unsigned int *)((unsigned short *)g_screen_ptr + (x&~1) + y*g_screen_width);\r
-\r
- for (i = 0; i < len; i++)\r
- {\r
- for (l=0;l<16;)\r
- {\r
- unsigned char fd = fontdata8x8[((text[i])*8)+l/2];\r
- unsigned int *d = &screen[l*g_screen_width/2];\r
- if (fd&0x80) d[0]=0xffffffff;\r
- if (fd&0x40) d[1]=0xffffffff;\r
- if (fd&0x20) d[2]=0xffffffff;\r
- if (fd&0x10) d[3]=0xffffffff;\r
- if (fd&0x08) d[4]=0xffffffff;\r
- if (fd&0x04) d[5]=0xffffffff;\r
- if (fd&0x02) d[6]=0xffffffff;\r
- if (fd&0x01) d[7]=0xffffffff;\r
- l++; d = &screen[l*g_screen_width/2];\r
- if (fd&0x80) d[0]=0xffffffff;\r
- if (fd&0x40) d[1]=0xffffffff;\r
- if (fd&0x20) d[2]=0xffffffff;\r
- if (fd&0x10) d[3]=0xffffffff;\r
- if (fd&0x08) d[4]=0xffffffff;\r
- if (fd&0x04) d[5]=0xffffffff;\r
- if (fd&0x02) d[6]=0xffffffff;\r
- if (fd&0x01) d[7]=0xffffffff;\r
- l++;\r
- }\r
- screen += 8;\r
- }\r
-}\r
-\r
-\r