switch Cyclone to submodule on it's own git repo
[picodrive.git] / platform / uiq3 / emu.c
index 71bf872..22b2143 100644 (file)
@@ -4,7 +4,7 @@
 #include "../common/emu.h"
 #include "../common/config.h"
 #include "../common/menu.h"
-#include "Pico/PicoInt.h"
+#include "pico/pico_int.h"
 
 const char * const keyNames[] = {
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -13,7 +13,7 @@ const char * const keyNames[] = {
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 };
 
-int emu_getMainDir(char *dst, int len)
+int plat_get_root_dir(char *dst, int len)
 {
        strcpy(dst, "D:\\other\\PicoDrive\\");
        return strlen(dst);
@@ -34,7 +34,7 @@ void emu_Init(void)
 
        emu_prepareDefaultConfig();
        config_readlrom("D:\\other\\PicoDrive\\config.cfg");
-       emu_ReadConfig(0, 0);
+       emu_read_config(0, 0);
        //PicoInit();
 }
 
@@ -65,6 +65,25 @@ void emu_prepareDefaultConfig(void)
        defaultConfig.Frameskip = -1; // auto
        defaultConfig.volume = 80;
        defaultConfig.scaling = 0;
+       defaultConfig.KeyBinds[0xd5] = 1<<26; // back
+}
+
+void emu_pack_config(void)
+{
+       currentConfig.s_PicoOpt = PicoOpt;
+       currentConfig.s_PsndRate = PsndRate;
+       currentConfig.s_PicoRegion = PicoRegionOverride;
+       currentConfig.s_PicoAutoRgnOrder = PicoAutoRgnOrder;
+       currentConfig.s_PicoCDBuffers = PicoCDBuffers;
+}
+
+void emu_unpack_config(void)
+{
+       PicoOpt = currentConfig.s_PicoOpt;
+       PsndRate = currentConfig.s_PsndRate;
+       PicoRegionOverride = currentConfig.s_PicoRegion;
+       PicoAutoRgnOrder = currentConfig.s_PicoAutoRgnOrder;
+       PicoCDBuffers = currentConfig.s_PicoCDBuffers;
 }
 
 /* used by config engine only, not actual menus */
@@ -102,7 +121,7 @@ const int opt2_entry_count = OPT2_ENTRY_COUNT;
 menu_entry cdopt_entries[] =
 {
        { "CD LEDs",                   MB_ONOFF, MA_CDOPT_LEDS,         &currentConfig.EmuOpt, 0x0400, 0, 0, 1, 1 },
-       { "CDDA audio (using mp3s)",   MB_ONOFF, MA_CDOPT_CDDA,         &PicoOpt, 0x0800, 0, 0, 1, 1 },
+       { "CDDA audio",                MB_ONOFF, MA_CDOPT_CDDA,         &PicoOpt, 0x0800, 0, 0, 1, 1 },
        { "PCM audio",                 MB_ONOFF, MA_CDOPT_PCM,          &PicoOpt, 0x0400, 0, 0, 1, 1 },
        { NULL,                        MB_NONE,  MA_CDOPT_READAHEAD,    NULL, 0, 0, 0, 1, 1 },
        { "SaveRAM cart",              MB_ONOFF, MA_CDOPT_SAVERAM,      &PicoOpt, 0x8000, 0, 0, 1, 1 },