ym2612 full saves wip
[picodrive.git] / platform / gizmondo / menu.c
index ce8e92f..64222e5 100644 (file)
@@ -561,7 +561,7 @@ static void draw_savestate_bg(int slot)
        }\r
 \r
        if (file) {\r
-               if (PicoMCD & 1) {\r
+               if (PicoAHW & 1) {\r
                        PicoCdLoadStateGfx(file);\r
                } else {\r
                        areaSeek(file, 0x10020, SEEK_SET);  // skip header and RAM in state file\r
@@ -807,7 +807,7 @@ static void kc_sel_loop(void)
                                case 0: key_config_loop(me_ctrl_actions, is_6button ? 12 : 8, 0); return;\r
                                case 1: key_config_loop(me_ctrl_actions, is_6button ? 12 : 8, 1); return;\r
                                case 2: key_config_loop(emuctrl_actions,\r
-                                               sizeof(emuctrl_actions)/sizeof(emuctrl_actions[0]), -1); return;\r
+                                               sizeof(emuctrl_actions)/sizeof(emuctrl_actions[0]) - 1, -1); return;\r
                                case 3: if (!rom_loaded) emu_WriteConfig(0); return;\r
                                default: return;\r
                        }\r
@@ -921,9 +921,9 @@ static void cd_menu_loop_options(void)
                            selected_id == MA_CDOPT_READAHEAD) {\r
                                if (inp & BTN_LEFT) {\r
                                        PicoCDBuffers >>= 1;\r
-                                       if (PicoCDBuffers < 64) PicoCDBuffers = 0;\r
+                                       if (PicoCDBuffers < 2) PicoCDBuffers = 0;\r
                                } else {\r
-                                       if (PicoCDBuffers < 64) PicoCDBuffers = 64;\r
+                                       if (PicoCDBuffers < 2) PicoCDBuffers = 2;\r
                                        else PicoCDBuffers <<= 1;\r
                                        if (PicoCDBuffers > 8*1024) PicoCDBuffers = 8*1024; // 16M\r
                                }\r
@@ -969,6 +969,7 @@ static void cd_menu_loop_options(void)
 \r
 menu_entry opt2_entries[] =\r
 {\r
+       { "Disable sprite limit",      MB_ONOFF, MA_OPT2_NO_SPRITE_LIM, &PicoOpt, 0x40000, 0, 0, 1, 1 },\r
        { "Emulate Z80",               MB_ONOFF, MA_OPT2_ENABLE_Z80,    &currentConfig.PicoOpt,0x0004, 0, 0, 1 },\r
        { "Emulate YM2612 (FM)",       MB_ONOFF, MA_OPT2_ENABLE_YM2612, &currentConfig.PicoOpt,0x0001, 0, 0, 1 },\r
        { "Emulate SN76496 (PSG)",     MB_ONOFF, MA_OPT2_ENABLE_SN76496,&currentConfig.PicoOpt,0x0002, 0, 0, 1 },\r
@@ -1224,7 +1225,7 @@ static int menu_loop_options(void)
                                                        currentConfig.PsndRate =  11025;\r
                                                        currentConfig.PicoOpt |=  8;\r
                                                } else if ((inp & BTN_LEFT) && currentConfig.PsndRate == 11025 &&\r
-                                                               (currentConfig.PicoOpt&0x08) && !(PicoMCD&1))\r
+                                                               (currentConfig.PicoOpt&0x08) && !(PicoAHW&1))\r
                                                {\r
                                                        currentConfig.PsndRate =  44100;\r
                                                        currentConfig.PicoOpt &= ~8;\r
@@ -1314,7 +1315,7 @@ static void draw_menu_credits(void)
        int tl_x = 15, tl_y = 64, y;\r
        menu_draw_begin(1);\r
 \r
-       text_out16(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006,2007");\r
+       text_out16(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006-2008");\r
 \r
        y = tl_y;\r
        text_out16(tl_x, y, "Credits:");\r
@@ -1617,10 +1618,11 @@ int menu_loop_tray(void)
                                case 0: // select image\r
                                        selfname = romsel_loop(curr_path);\r
                                        if (selfname) {\r
-                                               int ret = -1, cd_type;\r
+                                               int ret = -1;\r
+                                               cd_img_type cd_type;\r
                                                cd_type = emu_cdCheck(NULL);\r
-                                               if (cd_type > 0)\r
-                                                       ret = Insert_CD(romFileName, cd_type == 2);\r
+                                               if (cd_type != CIT_NOT_CD)\r
+                                                       ret = Insert_CD(romFileName, cd_type);\r
                                                if (ret != 0) {\r
                                                        sprintf(menuErrorMsg, "Load failed, invalid CD image?");\r
                                                        lprintf("%s\n", menuErrorMsg);\r