From 9caf44b59bf20d0beb614d4249cf908c7fb7434d Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 10 Nov 2007 15:48:32 +0000 Subject: [PATCH] UI adjustments, nub support git-svn-id: file:///home/notaz/opt/svn/PicoDrive@291 be3aeb3a-fb24-0410-a615-afba39da0efa --- platform/common/emu.h | 2 +- platform/common/lprintf.h | 2 +- platform/common/menu.h | 1 + platform/psp/Makefile | 6 +- platform/psp/data/icon.png | Bin 19571 -> 12767 bytes platform/psp/emu.c | 31 +++++---- platform/psp/main.c | 2 + platform/psp/menu.c | 135 ++++++++++++++++++++----------------- platform/psp/menu.h | 3 +- platform/psp/psp.c | 49 ++++++++++++-- platform/psp/psp.h | 8 +++ 11 files changed, 152 insertions(+), 87 deletions(-) diff --git a/platform/common/emu.h b/platform/common/emu.h index 42a1bfba..b4f3c26e 100644 --- a/platform/common/emu.h +++ b/platform/common/emu.h @@ -9,7 +9,7 @@ typedef struct { // squidgehack, no_save_cfg_on_exit, , 16_bit_mode // craigix_ram, confirm_save, show_cd_leds, confirm_load // A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff - // vsync_mode + // vsync_mode, show_clock int PicoOpt; // used for config saving only, see Pico.h int PsndRate; // ditto int PicoRegion; // ditto diff --git a/platform/common/lprintf.h b/platform/common/lprintf.h index dc49c655..a8d9ee1c 100644 --- a/platform/common/lprintf.h +++ b/platform/common/lprintf.h @@ -2,7 +2,7 @@ #include #define lprintf printf #elif defined(PSP) - #if 1 + #ifdef LPRINTF_STDIO #include #define lprintf printf #else diff --git a/platform/common/menu.h b/platform/common/menu.h index 2635967d..df990d31 100644 --- a/platform/common/menu.h +++ b/platform/common/menu.h @@ -63,6 +63,7 @@ typedef enum MA_OPT2_NO_LAST_ROM, MA_OPT2_RAMTIMINGS, /* gp2x */ MA_OPT2_SQUIDGEHACK, /* gp2x */ + MA_OPT2_STATUS_LINE, /* psp */ MA_OPT2_DONE, MA_OPT3_SCALE, /* psp (all OPT3) */ MA_OPT3_HSCALE32, diff --git a/platform/psp/Makefile b/platform/psp/Makefile index 49f9f7b9..d60078ec 100644 --- a/platform/psp/Makefile +++ b/platform/psp/Makefile @@ -10,7 +10,7 @@ amalgamate = 0 #up = 1 -CFLAGS += -I../.. -I. -DNO_SYNC +CFLAGS += -I../.. -I. -DNO_SYNC -DLPRINTF_STDIO CFLAGS += -Wall -Winline -G0 ifeq ($(DEBUG),) CFLAGS += -O2 -ftracer -fstrength-reduce -ffast-math @@ -76,12 +76,12 @@ endif OBJS += data/bg32.o data/bg40.o -LIBS += -lpng -lm -lpspgu -lpsppower -Wl,-Map=PicoDrive.map -lpspaudio +LIBS += -lpng -lm -lpspgu -lpsppower -lpspaudio -lpsprtc -Wl,-Map=PicoDrive.map # target TARGET = PicoDrive EXTRA_TARGETS = EBOOT.PBP -PSP_EBOOT_TITLE = PICODRIVE +PSP_EBOOT_TITLE = PicoDrive PSP_EBOOT_ICON = data/icon.png #PSP_EBOOT_PIC1 = .png diff --git a/platform/psp/data/icon.png b/platform/psp/data/icon.png index 757a40b4dda3291b28e2753f4da1d38f7c4d1d1b..4bb5ac0018b4cb565e0c87f060dd83bb3e7e4c5a 100644 GIT binary patch literal 12767 zcmV<5F(A%~P)0RX)&v&lu?qh&jI7&%& zztpungPf6&aI zb(#(O)$tBWJ-~Fe<2(5y9dp zHw+~=Kr`Byk$CBvnrWgYRppk^Z0N^wfK^oQs+oD!xBs|ngk3C7Bwv=`BG*AcFRbXCTZlFS9|g_OXisI+k{}M636L9kYh?Sp}-u?*pwMr z8naks3f>hf%LyfBy6makTAipUBR_V`s}eHsSA3NcmJ43`7I-;^9__s;bxJasd~J?w zq7@DBt*Wz*OjuVMCfhL_0@B@DmB`Q|zIxn|X4xL9TuQ0po^#mXYzlez+Ve~8{x_Jk zNt#_cycv-M`pLTt)yT3`BbYedQ3NyxvZov02V>sUmmj4SE590{0aK;SjCnz=TwZ&K zRlMb<2H>Q`nX2$@&cMo)|E6lDpw^rwd12`XiAdA@QWg??P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8JpT(Q=ou!dfb_cn0000s68k_regs[0] ^ old_reg) & 3)) return; // no change - old_reg = Pico_mcd->s68k_regs[0]; + reg = Pico_mcd->s68k_regs[0]; p = (unsigned int *)((short *)psp_screen + 512*2+4+2); - col_g = (old_reg & 2) ? 0x06000600 : 0; - col_r = (old_reg & 1) ? 0x00180018 : 0; + col_g = (reg & 2) ? 0x06000600 : 0; + col_r = (reg & 1) ? 0x00180018 : 0; *p++ = col_g; *p++ = col_g; p+=2; *p++ = col_r; *p++ = col_r; p += 512/2 - 12/2; *p++ = col_g; *p++ = col_g; p+=2; *p++ = col_r; *p++ = col_r; p += 512/2 - 12/2; *p++ = col_g; *p++ = col_g; p+=2; *p++ = col_r; *p++ = col_r; @@ -798,23 +802,22 @@ static void find_combos(void) if (act == 16 || act == 17) continue; // player2 flag if (act > 17) { - for (u = 0; u < 32; u++) + for (u = 0; u < 28; u++) // 28 because nub can't produce combos if (currentConfig.KeyBinds[u] & (1 << act)) keyc++; } else { - for (u = 0; u < 32; u++) + for (u = 0; u < 28; u++) if ((currentConfig.KeyBinds[u] & 0x30000) == 0 && // pl. 1 (currentConfig.KeyBinds[u] & (1 << act))) keyc++; - for (u = 0; u < 32; u++) + for (u = 0; u < 28; u++) if ((currentConfig.KeyBinds[u] & 0x30000) == 1 && // pl. 2 (currentConfig.KeyBinds[u] & (1 << act))) keyc2++; - if (keyc2 > keyc) keyc = keyc2; } - if (keyc > 1) + if (keyc > 1 || keyc2 > 1) { // loop again and mark those keys and actions as combo - for (u = 0; u < 32; u++) + for (u = 0; u < 28; u++) { if (currentConfig.KeyBinds[u] & (1 << act)) { combo_keys |= 1 << u; diff --git a/platform/psp/main.c b/platform/psp/main.c index 606ca029..0d121965 100644 --- a/platform/psp/main.c +++ b/platform/psp/main.c @@ -4,9 +4,11 @@ #include "../common/menu.h" #include "../common/emu.h" #include "../common/lprintf.h" +#include "version.h" int main() { + lprintf("\nPicoDrive v" VERSION " " __DATE__ " " __TIME__ "\n"); psp_init(); emu_ReadConfig(0, 0); diff --git a/platform/psp/menu.c b/platform/psp/menu.c index cdcf1e69..ccb472bd 100644 --- a/platform/psp/menu.c +++ b/platform/psp/menu.c @@ -33,10 +33,10 @@ #define pspKeyUnkn "???" static const char * const pspKeyNames[] = { - "SELECT", pspKeyUnkn, pspKeyUnkn, "START", "UP", "RIGHT", "DOWN", "LEFT", - "L", "R", pspKeyUnkn, pspKeyUnkn, "TRIANGLE", "CIRCLE", "X", "SQUARE", - "HOME", "HOLD", "WLAN_UP", "REMOTE", "VOLUP", "VOLDOWN", "SCREEN", "NOTE", - pspKeyUnkn, pspKeyUnkn, pspKeyUnkn, pspKeyUnkn, pspKeyUnkn, pspKeyUnkn, pspKeyUnkn, pspKeyUnkn + "SELECT", pspKeyUnkn, pspKeyUnkn, "START", "UP", "RIGHT", "DOWN", "LEFT", + "L", "R", pspKeyUnkn, pspKeyUnkn, "TRIANGLE", "CIRCLE", "X", "SQUARE", + "HOME", "HOLD", "WLAN_UP", "REMOTE", "VOLUP", "VOLDOWN", "SCREEN", "NOTE", + pspKeyUnkn, pspKeyUnkn, pspKeyUnkn, pspKeyUnkn, "NUB UP", "NUB RIGHT", "NUB DOWN", "NUB LEFT" // fake }; static unsigned short bg_buffer[480*272] __attribute__((aligned(16))); @@ -48,11 +48,14 @@ static void menu_prepare_bg(int use_game_bg, int use_fg); static unsigned int inp_prev = 0; -static unsigned long wait_for_input(unsigned int interesting) +static unsigned long wait_for_input(unsigned int interesting, int is_key_config) { unsigned int ret; static int repeats = 0, wait = 50; - int release = 0, i; + int release = 0, count, i; + + if (!is_key_config) + interesting |= (interesting & 0xf0) << 24; // also use analog if (repeats == 2 || repeats == 4) wait /= 2; if (repeats == 6) wait = 15; @@ -62,7 +65,7 @@ static unsigned long wait_for_input(unsigned int interesting) psp_msleep(wait); } - while ( !((ret = psp_pad_read(1)) & interesting) ) { + for (count = 0; !((ret = psp_pad_read(1)) & interesting) && count < 100; count++) { psp_msleep(50); release = 1; } @@ -73,6 +76,9 @@ static unsigned long wait_for_input(unsigned int interesting) } inp_prev = ret; + if (!is_key_config) + ret |= (ret & 0xf0000000) >> 24; // use analog as d-pad + // we don't need diagonals in menus if ((ret&BTN_UP) && (ret&BTN_LEFT)) ret &= ~BTN_LEFT; if ((ret&BTN_UP) && (ret&BTN_RIGHT)) ret &= ~BTN_RIGHT; @@ -350,14 +356,14 @@ static char *romsel_loop(char *curr_path) for (;;) { draw_dirlist(curr_path, namelist, n, sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_L|BTN_R|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_L|BTN_R|BTN_X|BTN_CIRCLE, 0); if(inp & BTN_UP ) { sel--; if (sel < 0) sel = n-2; } if(inp & BTN_DOWN) { sel++; if (sel > n-2) sel = 0; } if(inp & BTN_LEFT) { sel-=10; if (sel < 0) sel = 0; } if(inp & BTN_L) { sel-=24; if (sel < 0) sel = 0; } if(inp & BTN_RIGHT) { sel+=10; if (sel > n-2) sel = n-2; } if(inp & BTN_R) { sel+=24; if (sel > n-2) sel = n-2; } - if(inp & BTN_X) { // enter dir/select + if(inp & BTN_CIRCLE) { // enter dir/select if (namelist[sel+1]->d_type & DT_REG) { strcpy(romFileName, curr_path); strcat(romFileName, "/"); @@ -386,7 +392,7 @@ static char *romsel_loop(char *curr_path) break; } } - if(inp & BTN_CIRCLE) break; // cancel + if(inp & BTN_X) break; // cancel } if (n > 0) { @@ -424,7 +430,7 @@ static void draw_debug(void) static void debug_menu_loop(void) { draw_debug(); - wait_for_input(BTN_X|BTN_CIRCLE); + wait_for_input(BTN_X|BTN_CIRCLE, 0); } // ------------ patch/gg menu ------------ @@ -461,17 +467,17 @@ static void patches_menu_loop(void) for(;;) { draw_patchlist(menu_sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_L|BTN_R|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_L|BTN_R|BTN_X|BTN_CIRCLE, 0); if(inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = PicoPatchCount; } if(inp & BTN_DOWN) { menu_sel++; if (menu_sel > PicoPatchCount) menu_sel = 0; } if(inp &(BTN_LEFT|BTN_L)) { menu_sel-=10; if (menu_sel < 0) menu_sel = 0; } if(inp &(BTN_RIGHT|BTN_R)) { menu_sel+=10; if (menu_sel > PicoPatchCount) menu_sel = PicoPatchCount; } - if(inp & BTN_X) { // action + if(inp & BTN_CIRCLE) { // action if (menu_sel < PicoPatchCount) PicoPatches[menu_sel].active = !PicoPatches[menu_sel].active; else return; } - if(inp & BTN_CIRCLE) return; + if(inp & BTN_X) return; } } @@ -591,7 +597,7 @@ static int savestate_menu_loop(int is_loading) for(;;) { draw_savestate_menu(menu_sel, is_loading); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X|BTN_CIRCLE, 0); if(inp & BTN_UP ) { do { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; @@ -602,7 +608,7 @@ static int savestate_menu_loop(int is_loading) menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } while (!(state_slot_flags & (1 << menu_sel)) && menu_sel != menu_sel_max && is_loading); } - if(inp & BTN_X) { // save/load + if(inp & BTN_CIRCLE) { // save/load if (menu_sel < 10) { state_slot = menu_sel; PicoStateProgressCB = emu_msg_cb; /* also suitable for menu */ @@ -613,7 +619,7 @@ static int savestate_menu_loop(int is_loading) return 0; } else return 1; } - if(inp & BTN_CIRCLE) return 1; + if(inp & BTN_X) return 1; } } @@ -630,7 +636,11 @@ static char *action_binds(int player_idx, int action_mask) if (currentConfig.KeyBinds[i] & action_mask) { if (player_idx >= 0 && ((currentConfig.KeyBinds[i] >> 16) & 3) != player_idx) continue; - if (strkeys[0]) { strcat(strkeys, " + "); strcat(strkeys, pspKeyNames[i]); break; } + if (strkeys[0]) { + strcat(strkeys, i >= 28 ? ", " : " + "); // nub "buttons" don't create combos + strcat(strkeys, pspKeyNames[i]); + break; + } else strcpy(strkeys, pspKeyNames[i]); } } @@ -683,14 +693,14 @@ static void draw_key_config(const bind_action_t *opts, int opt_cnt, int player_i text_out16(x, y, "Done"); if (sel < opt_cnt) { - text_out16(80+30, 180, "Press a button to bind/unbind"); - text_out16(80+30, 190, "Use SELECT to clear"); - text_out16(80+30, 200, "To bind UP/DOWN, hold SELECT"); - text_out16(80+30, 210, "Select \"Done\" to exit"); + text_out16(80+30, 220, "Press a button to bind/unbind"); + text_out16(80+30, 230, "Use SELECT to clear"); + text_out16(80+30, 240, "To bind UP/DOWN, hold SELECT"); + text_out16(80+30, 250, "Select \"Done\" to exit"); } else { - text_out16(80+30, 190, "Use Options -> Save cfg"); - text_out16(80+30, 200, "to save controls"); - text_out16(80+30, 210, "Press X or O to exit"); + text_out16(80+30, 230, "Use Options -> Save cfg"); + text_out16(80+30, 240, "to save controls"); + text_out16(80+30, 250, "Press X or O to exit"); } menu_draw_end(); } @@ -703,7 +713,7 @@ static void key_config_loop(const bind_action_t *opts, int opt_cnt, int player_i for (;;) { draw_key_config(opts, opt_cnt, player_idx, sel); - inp = wait_for_input(CONFIGURABLE_KEYS|BTN_SELECT); + inp = wait_for_input(CONFIGURABLE_KEYS|BTN_SELECT, 1); if (!(inp & BTN_SELECT)) { prev_select = 0; if(inp & BTN_UP ) { sel--; if (sel < 0) sel = menu_sel_max; continue; } @@ -776,8 +786,6 @@ static bind_action_t emuctrl_actions[] = { "Prev Save Slot ", 1<<25 }, { "Next Save Slot ", 1<<24 }, { "Switch Renderer", 1<<26 }, - { "Volume Down ", 1<<30 }, - { "Volume Up ", 1<<29 }, }; static void kc_sel_loop(void) @@ -789,10 +797,10 @@ static void kc_sel_loop(void) while (1) { draw_kc_sel(menu_sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X|BTN_CIRCLE, 0); if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; } if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } - if (inp & BTN_X) { + if (inp & BTN_CIRCLE) { switch (menu_sel) { case 0: key_config_loop(ctrl_actions, is_6button ? 12 : 8, 0); return; case 1: key_config_loop(ctrl_actions, is_6button ? 12 : 8, 1); return; @@ -802,7 +810,7 @@ static void kc_sel_loop(void) default: return; } } - if (inp & BTN_CIRCLE) return; + if (inp & BTN_X) return; } } @@ -870,7 +878,7 @@ static void draw_cd_menu_options(int menu_sel, struct bios_names_t *bios_names) if ((selected_id == MA_CDOPT_TESTBIOS_USA && strcmp(bios_names->us, "NOT FOUND")) || (selected_id == MA_CDOPT_TESTBIOS_EUR && strcmp(bios_names->eu, "NOT FOUND")) || (selected_id == MA_CDOPT_TESTBIOS_JAP && strcmp(bios_names->jp, "NOT FOUND"))) - text_out16(tl_x, 210, "Press start to test selected BIOS"); + text_out16(tl_x, 250, "Press start to test selected BIOS"); menu_draw_end(); } @@ -902,7 +910,7 @@ static void cd_menu_loop_options(void) for(;;) { draw_cd_menu_options(menu_sel, &bios_names); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE, 0); if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; } if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } selected_id = me_index2id(cdopt_entries, CDOPT_ENTRY_COUNT, menu_sel); @@ -919,7 +927,7 @@ static void cd_menu_loop_options(void) } } } - if (inp & BTN_X) { // toggleable options + if (inp & BTN_CIRCLE) { // toggleable options if (!me_process(cdopt_entries, CDOPT_ENTRY_COUNT, selected_id, 1) && selected_id == MA_CDOPT_DONE) { return; @@ -950,7 +958,7 @@ static void cd_menu_loop_options(void) break; } } - if (inp & BTN_CIRCLE) return; + if (inp & BTN_X) return; } } @@ -1054,7 +1062,7 @@ static void dispmenu_loop_options(void) for (;;) { draw_dispmenu_options(menu_sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE, 0); if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; } if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } selected_id = me_index2id(opt3_entries, OPT3_ENTRY_COUNT, menu_sel); @@ -1087,7 +1095,7 @@ static void dispmenu_loop_options(void) } } } - if (inp & BTN_X) { // toggleable options + if (inp & BTN_CIRCLE) { // toggleable options me_process(opt3_entries, OPT3_ENTRY_COUNT, selected_id, 1); switch (selected_id) { case MA_OPT3_DONE: @@ -1108,7 +1116,7 @@ static void dispmenu_loop_options(void) default: break; } } - if (inp & BTN_CIRCLE) return; + if (inp & BTN_X) return; } } @@ -1117,11 +1125,12 @@ static void dispmenu_loop_options(void) menu_entry opt2_entries[] = { - { "Emulate Z80", MB_ONOFF, MA_OPT2_ENABLE_Z80, ¤tConfig.PicoOpt,0x0004, 0, 0, 1 }, - { "Emulate YM2612 (FM)", MB_ONOFF, MA_OPT2_ENABLE_YM2612, ¤tConfig.PicoOpt,0x0001, 0, 0, 1 }, - { "Emulate SN76496 (PSG)", MB_ONOFF, MA_OPT2_ENABLE_SN76496,¤tConfig.PicoOpt,0x0002, 0, 0, 1 }, - { "gzip savestates", MB_ONOFF, MA_OPT2_GZIP_STATES, ¤tConfig.EmuOpt, 0x0008, 0, 0, 1 }, - { "Don't save last used ROM", MB_ONOFF, MA_OPT2_NO_LAST_ROM, ¤tConfig.EmuOpt, 0x0020, 0, 0, 1 }, + { "Emulate Z80", MB_ONOFF, MA_OPT2_ENABLE_Z80, ¤tConfig.PicoOpt,0x00004, 0, 0, 1 }, + { "Emulate YM2612 (FM)", MB_ONOFF, MA_OPT2_ENABLE_YM2612, ¤tConfig.PicoOpt,0x00001, 0, 0, 1 }, + { "Emulate SN76496 (PSG)", MB_ONOFF, MA_OPT2_ENABLE_SN76496,¤tConfig.PicoOpt,0x00002, 0, 0, 1 }, + { "gzip savestates", MB_ONOFF, MA_OPT2_GZIP_STATES, ¤tConfig.EmuOpt, 0x00008, 0, 0, 1 }, + { "Don't save last used ROM", MB_ONOFF, MA_OPT2_NO_LAST_ROM, ¤tConfig.EmuOpt, 0x00020, 0, 0, 1 }, + { "Status line in main menu", MB_ONOFF, MA_OPT2_STATUS_LINE, ¤tConfig.EmuOpt, 0x20000, 0, 0, 1 }, { "done", MB_NONE, MA_OPT2_DONE, NULL, 0, 0, 0, 1 }, }; @@ -1153,7 +1162,7 @@ static void amenu_loop_options(void) for(;;) { draw_amenu_options(menu_sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE, 0); if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; } if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } selected_id = me_index2id(opt2_entries, OPT2_ENTRY_COUNT, menu_sel); @@ -1163,13 +1172,13 @@ static void amenu_loop_options(void) // TODO? } } - if (inp & BTN_X) { // toggleable options + if (inp & BTN_CIRCLE) { // toggleable options if (!me_process(opt2_entries, OPT2_ENTRY_COUNT, selected_id, 1) && selected_id == MA_OPT2_DONE) { return; } } - if (inp & BTN_CIRCLE) return; + if (inp & BTN_X) return; } } @@ -1360,7 +1369,7 @@ static int menu_loop_options(void) while (1) { draw_menu_options(menu_sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE, 0); if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; } if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } selected_id = me_index2id(opt_entries, OPT_ENTRY_COUNT, menu_sel); @@ -1421,7 +1430,7 @@ static int menu_loop_options(void) } } } - if (inp & BTN_X) { + if (inp & BTN_CIRCLE) { if (!me_process(opt_entries, OPT_ENTRY_COUNT, selected_id, 1)) { switch (selected_id) @@ -1459,7 +1468,7 @@ static int menu_loop_options(void) } } } - if(inp & BTN_CIRCLE) { + if(inp & BTN_X) { menu_options_save(); return 0; // done (update, no write) } @@ -1512,11 +1521,15 @@ menu_entry main_entries[] = static void draw_menu_root(int menu_sel) { - const int tl_x = 80+70, tl_y = 16+70; + const int tl_x = 86+70, tl_y = 16+70; + char *stat = NULL; menu_draw_begin(); - text_out16(tl_x, 16+20, "PicoDrive v" VERSION); + if ((currentConfig.EmuOpt&0x20000) && (stat = psp_get_status_line())) + text_out16(287, 12, "%s", stat); + + text_out16(tl_x, 48, "PicoDrive v" VERSION); menu_draw_selection(tl_x - 16, tl_y + menu_sel*10, 146); @@ -1552,23 +1565,23 @@ static void menu_loop_root(void) for (;;) { draw_menu_root(menu_sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X|BTN_CIRCLE|BTN_SELECT|BTN_L|BTN_R); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X|BTN_CIRCLE|BTN_SELECT|BTN_L|BTN_R, 0); if(inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; } if(inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } if((inp & (BTN_L|BTN_R)) == (BTN_L|BTN_R)) debug_menu_loop(); - if( inp & (BTN_SELECT|BTN_CIRCLE)) { + if( inp & (BTN_SELECT|BTN_X)) { if (rom_data) { - while (psp_pad_read(1) & (BTN_SELECT|BTN_CIRCLE)) psp_msleep(50); // wait until released + while (psp_pad_read(1) & (BTN_SELECT|BTN_X)) psp_msleep(50); // wait until released engineState = PGS_Running; break; } } - if(inp & BTN_X) { + if(inp & BTN_CIRCLE) { switch (me_index2id(main_entries, MAIN_ENTRY_COUNT, menu_sel)) { case MA_MAIN_RESUME_GAME: if (rom_data) { - while (psp_pad_read(1) & BTN_X) psp_msleep(50); + while (psp_pad_read(1) & BTN_CIRCLE) psp_msleep(50); engineState = PGS_Running; return; } @@ -1627,7 +1640,9 @@ static void menu_loop_root(void) case MA_MAIN_CREDITS: draw_menu_credits(); psp_msleep(500); - inp = wait_for_input(BTN_X|BTN_CIRCLE); + inp = 0; + while (!(inp & (BTN_X|BTN_CIRCLE))) + inp = wait_for_input(BTN_X|BTN_CIRCLE, 0); break; case MA_MAIN_EXIT: engineState = PGS_Quit; @@ -1757,15 +1772,15 @@ int menu_loop_tray(void) /* make sure action buttons are not pressed on entering menu */ draw_menu_tray(menu_sel); - while (psp_pad_read(1) & BTN_X) psp_msleep(50); + while (psp_pad_read(1) & BTN_CIRCLE) psp_msleep(50); for (;;) { draw_menu_tray(menu_sel); - inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X); + inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_X, 0); if(inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; } if(inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; } - if(inp & BTN_X ) { + if(inp & BTN_CIRCLE) { switch (menu_sel) { case 0: // select image selfname = romsel_loop(curr_path); diff --git a/platform/psp/menu.h b/platform/psp/menu.h index fa6c90cc..a36b2a4d 100644 --- a/platform/psp/menu.h +++ b/platform/psp/menu.h @@ -9,5 +9,6 @@ void menu_romload_prepare(const char *rom_name); void menu_romload_end(void); -#define CONFIGURABLE_KEYS (BTN_UP|BTN_LEFT|BTN_RIGHT|BTN_DOWN|BTN_L|BTN_R|BTN_TRIANGLE|BTN_CIRCLE|BTN_X|BTN_SQUARE|BTN_START|BTN_NOTE) +#define CONFIGURABLE_KEYS (BTN_UP|BTN_LEFT|BTN_RIGHT|BTN_DOWN|BTN_L|BTN_R|BTN_TRIANGLE|BTN_CIRCLE|BTN_X|BTN_SQUARE|BTN_START| \ + BTN_NUB_UP|BTN_NUB_RIGHT|BTN_NUB_DOWN|BTN_NUB_LEFT|BTN_NOTE) diff --git a/platform/psp/psp.c b/platform/psp/psp.c index b2d0d727..a21507f0 100644 --- a/platform/psp/psp.c +++ b/platform/psp/psp.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "psp.h" @@ -18,7 +19,7 @@ unsigned int __attribute__((aligned(16))) guCmdList[GU_CMDLIST_SIZE]; void *psp_screen = VRAM_FB0; static int current_screen = 0; /* front bufer */ -static SceUID logfd = -1; +#define ANALOG_DEADZONE 80 /* Exit callback */ static int exit_callback(int arg1, int arg2, void *common) @@ -47,6 +48,7 @@ void psp_init(void) { SceUID thid; + lprintf("running in %08x kernel\n", sceKernelDevkitVersion()), lprintf("entered psp_init, threadId %i, priority %i\n", sceKernelGetThreadId(), sceKernelGetThreadCurrentPriority()); @@ -93,7 +95,7 @@ void psp_init(void) /* input */ sceCtrlSetSamplingCycle(0); - sceCtrlSetSamplingMode(0); + sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG); } void psp_finish(void) @@ -132,12 +134,21 @@ void psp_msleep(int ms) unsigned int psp_pad_read(int blocking) { + unsigned int buttons; SceCtrlData pad; if (blocking) sceCtrlReadBufferPositive(&pad, 1); else sceCtrlPeekBufferPositive(&pad, 1); + buttons = pad.Buttons; + + // analog.. + buttons &= ~(BTN_NUB_UP|BTN_NUB_DOWN|BTN_NUB_LEFT|BTN_NUB_RIGHT); + if (pad.Lx < 128 - ANALOG_DEADZONE) buttons |= BTN_NUB_LEFT; + if (pad.Lx > 128 + ANALOG_DEADZONE) buttons |= BTN_NUB_RIGHT; + if (pad.Ly < 128 - ANALOG_DEADZONE) buttons |= BTN_NUB_UP; + if (pad.Ly > 128 + ANALOG_DEADZONE) buttons |= BTN_NUB_DOWN; - return pad.Buttons; + return buttons; } int psp_get_cpu_clock(void) @@ -153,19 +164,42 @@ int psp_set_cpu_clock(int clock) return ret; } +char *psp_get_status_line(void) +{ + static char buff[64]; + int ret, bat_percent, bat_time; + pspTime time; + + ret = sceRtcGetCurrentClockLocalTime(&time); + bat_percent = scePowerGetBatteryLifePercent(); + bat_time = scePowerGetBatteryLifeTime(); + if (ret < 0 || bat_percent < 0 || bat_time < 0) return NULL; + + snprintf(buff, sizeof(buff), "%02i:%02i bat: %3i%%", time.hour, time.minutes, bat_percent); + if (!scePowerIsPowerOnline()) + snprintf(buff+strlen(buff), sizeof(buff)-strlen(buff), " (%i:%02i)", bat_time/60, bat_time%60); + return buff; +} + /* alt logging */ #define LOG_FILE "log.log" +static SceUID logfd = -1; + void lprintf_f(const char *fmt, ...) { va_list vl; char buff[256]; + if (logfd == -2) return; // disabled + if (logfd < 0) { logfd = sceIoOpen(LOG_FILE, PSP_O_WRONLY|PSP_O_APPEND, 0777); - if (logfd < 0) + if (logfd < 0) { + logfd = -2; return; + } } va_start(vl, fmt); @@ -173,9 +207,10 @@ void lprintf_f(const char *fmt, ...) va_end(vl); sceIoWrite(logfd, buff, strlen(buff)); -//sceKernelDelayThread(200 * 1000); -sceIoClose(logfd); -logfd = -1; + + // make sure it gets flushed + sceIoClose(logfd); + logfd = -1; } diff --git a/platform/psp/psp.h b/platform/psp/psp.h index 8a2828e3..7f2d70d0 100644 --- a/platform/psp/psp.h +++ b/platform/psp/psp.h @@ -36,6 +36,8 @@ unsigned int psp_pad_read(int blocking); int psp_get_cpu_clock(void); int psp_set_cpu_clock(int clock); +char *psp_get_status_line(void); + /* shorter btn names */ #define BTN_UP PSP_CTRL_UP #define BTN_LEFT PSP_CTRL_LEFT @@ -51,3 +53,9 @@ int psp_set_cpu_clock(int clock); #define BTN_START PSP_CTRL_START #define BTN_NOTE PSP_CTRL_NOTE // doesn't seem to work? +/* fake 'nub' btns */ +#define BTN_NUB_UP (1 << 28) +#define BTN_NUB_RIGHT (1 << 29) +#define BTN_NUB_DOWN (1 << 30) +#define BTN_NUB_LEFT (1 << 31) + -- 2.39.5