}\r
#endif\r
\r
+// ------------ debug menu ------------\r
+\r
+char *debugString(void);\r
+\r
+static void draw_debug(void)\r
+{\r
+ char *p, *str = debugString();\r
+ int len, line;\r
+\r
+ menu_draw_begin(1);\r
+\r
+ p = str;\r
+ for (line = 0; line < 24; line++)\r
+ {\r
+ while (*p && *p != '\n') p++;\r
+ len = p - str;\r
+ if (len > 55) len = 55;\r
+ smalltext_out16_lim(1, line*10, str, 0xffff, len);\r
+ if (*p == 0) break;\r
+ p++; str = p;\r
+ }\r
+ menu_draw_end();\r
+}\r
+\r
+static void debug_menu_loop(void)\r
+{\r
+ draw_debug();\r
+ wait_for_input(BTN_PLAY|BTN_STOP);\r
+}\r
+\r
// ------------ patch/gg menu ------------\r
\r
static void draw_patchlist(int sel)\r
\r
static int sndrate_prevnext(int rate, int dir)\r
{\r
- int i, rates[] = { 8000, 11025, 16000, 22050, 44100 };\r
+ int i, rates[] = { 11025, 22050, 44100 };\r
\r
for (i = 0; i < 5; i++)\r
if (rates[i] == rate) break;\r
\r
i += dir ? 1 : -1;\r
if (i > 4) return dir ? 44100 : 22050;\r
- if (i < 0) return dir ? 11025 : 8000;\r
+ if (i < 0) return dir ? 22050 : 11025;\r
return rates[i];\r
}\r
\r
break;\r
case MA_OPT_SOUND_QUALITY:\r
if ((inp & BTN_RIGHT) && currentConfig.PsndRate == 44100 && !(currentConfig.PicoOpt&0x08)) {\r
- currentConfig.PsndRate = 8000; currentConfig.PicoOpt|= 0x08;\r
- } else if ((inp & BTN_LEFT) && currentConfig.PsndRate == 8000 && (currentConfig.PicoOpt&0x08)) {\r
+ currentConfig.PsndRate = 11025; currentConfig.PicoOpt|= 0x08;\r
+ } else if ((inp & BTN_LEFT) && currentConfig.PsndRate == 11025 && (currentConfig.PicoOpt&0x08)) {\r
currentConfig.PsndRate = 44100; currentConfig.PicoOpt&=~0x08;\r
} else currentConfig.PsndRate = sndrate_prevnext(currentConfig.PsndRate, inp & BTN_RIGHT);\r
break;\r
menu_draw_begin(1);\r
\r
text_out16(tl_x, 20, "PicoDrive v" VERSION " (c) notaz, 2006,2007");\r
-text_out16(tl_x, 30, "alpha1");\r
+text_out16(tl_x, 30, "beta1");\r
y = tl_y;\r
text_out16(tl_x, y, "Credits:");\r
text_out16(tl_x, (y+=10), "Dave: Cyclone 68000 core,");\r
inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_PLAY|BTN_STOP|BTN_HOME|BTN_L|BTN_R);\r
if(inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }\r
if(inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }\r
- if(inp &(BTN_HOME|BTN_STOP)){\r
+ if((inp & (BTN_L|BTN_R)) == (BTN_L|BTN_R)) debug_menu_loop();\r
+ if( inp & (BTN_HOME|BTN_STOP)) {\r
if (rom_data) {\r
while (Framework_PollGetButtons() & (BTN_HOME|BTN_STOP)) Sleep(50); // wait until released\r
engineState = PGS_Running;\r