more Pandora porting work
[libpicofe.git] / common / menu.c
index 2775859..00afc34 100644 (file)
 char menuErrorMsg[64] = { 0, };\r
 \r
 // PicoPad[] format: MXYZ SACB RLDU\r
-me_bind_action me_ctrl_actions[12] =\r
+me_bind_action me_ctrl_actions[15] =\r
 {\r
-       { "UP     ", 0x001 },\r
-       { "DOWN   ", 0x002 },\r
-       { "LEFT   ", 0x004 },\r
-       { "RIGHT  ", 0x008 },\r
-       { "A      ", 0x040 },\r
-       { "B      ", 0x010 },\r
-       { "C      ", 0x020 },\r
-       { "START  ", 0x080 },\r
-       { "MODE   ", 0x800 },\r
-       { "X      ", 0x400 },\r
-       { "Y      ", 0x200 },\r
-       { "Z      ", 0x100 }\r
+       { "UP     ", 0x0001 },\r
+       { "DOWN   ", 0x0002 },\r
+       { "LEFT   ", 0x0004 },\r
+       { "RIGHT  ", 0x0008 },\r
+       { "A      ", 0x0040 },\r
+       { "B      ", 0x0010 },\r
+       { "C      ", 0x0020 },\r
+       { "A turbo", 0x4000 },\r
+       { "B turbo", 0x1000 },\r
+       { "C turbo", 0x2000 },\r
+       { "START  ", 0x0080 },\r
+       { "MODE   ", 0x0800 },\r
+       { "X      ", 0x0400 },\r
+       { "Y      ", 0x0200 },\r
+       { "Z      ", 0x0100 }\r
 };\r
 \r
 \r
@@ -418,7 +421,8 @@ void debug_menu_loop(void)
                        case 2: clear_screen();\r
                                emu_forcedFrame(0);\r
                                darken_screen();\r
-                               PDebugShowSpriteStats(SCREEN_BUFFER, SCREEN_WIDTH); break;\r
+                               PDebugShowSpriteStats((unsigned short *)SCREEN_BUFFER + (SCREEN_HEIGHT/2 - 240/2)*SCREEN_WIDTH +\r
+                                       SCREEN_WIDTH/2 - 320/2, SCREEN_WIDTH); break;\r
                        case 3: clear_screen();\r
                                PDebugShowPalette(SCREEN_BUFFER, SCREEN_WIDTH);\r
                                PDebugShowSprite((unsigned short *)SCREEN_BUFFER + SCREEN_WIDTH*120+SCREEN_WIDTH/2+16,\r
@@ -439,6 +443,7 @@ void debug_menu_loop(void)
                                if ((inp & (BTN_WEST|BTN_LEFT)) == (BTN_WEST|BTN_LEFT)) {\r
                                        mkdir("dumps", 0777);\r
                                        PDebugDumpMem();\r
+                                       while (inp & BTN_WEST) inp = read_buttons_async(BTN_WEST);\r
                                        dumped = 1;\r
                                }\r
                                break;\r
@@ -447,6 +452,13 @@ void debug_menu_loop(void)
                                if (inp & BTN_RIGHT) PicoDrawMask ^= PDRAW_LAYERA_ON;\r
                                if (inp & BTN_DOWN)  PicoDrawMask ^= PDRAW_SPRITES_LOW_ON;\r
                                if (inp & BTN_UP)    PicoDrawMask ^= PDRAW_SPRITES_HI_ON;\r
+                               if (inp & BTN_EAST) {\r
+                                       PsndOut = NULL; // just in case\r
+                                       PicoSkipFrame = 1;\r
+                                       PicoFrame();\r
+                                       PicoSkipFrame = 0;\r
+                                       while (inp & BTN_EAST) inp = read_buttons_async(BTN_EAST);\r
+                               }\r
                                break;\r
                        case 3:\r
                                if (inp & BTN_DOWN)  spr_offs++;\r