- if ((ret&BTN_UP) && (ret&BTN_LEFT)) ret &= ~BTN_LEFT;
- if ((ret&BTN_UP) && (ret&BTN_RIGHT)) ret &= ~BTN_RIGHT;
- if ((ret&BTN_DOWN) && (ret&BTN_LEFT)) ret &= ~BTN_LEFT;
- if ((ret&BTN_DOWN) && (ret&BTN_RIGHT)) ret &= ~BTN_RIGHT;
+ if ((ret&PBTN_UP) && (ret&PBTN_LEFT)) ret &= ~PBTN_LEFT;
+ if ((ret&PBTN_UP) && (ret&PBTN_RIGHT)) ret &= ~PBTN_RIGHT;
+ if ((ret&PBTN_DOWN) && (ret&PBTN_LEFT)) ret &= ~PBTN_LEFT;
+ if ((ret&PBTN_DOWN) && (ret&PBTN_RIGHT)) ret &= ~PBTN_RIGHT;
for (;;)
{
draw_dirlist(curr_path, namelist, n, sel);
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, 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_CIRCLE) // enter dir/select
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_L|PBTN_R|PBTN_X|PBTN_CIRCLE, 0);
+ if(inp & PBTN_UP ) { sel--; if (sel < 0) sel = n-2; }
+ if(inp & PBTN_DOWN) { sel++; if (sel > n-2) sel = 0; }
+ if(inp & PBTN_LEFT) { sel-=10; if (sel < 0) sel = 0; }
+ if(inp & PBTN_L) { sel-=24; if (sel < 0) sel = 0; }
+ if(inp & PBTN_RIGHT) { sel+=10; if (sel > n-2) sel = n-2; }
+ if(inp & PBTN_R) { sel+=24; if (sel > n-2) sel = n-2; }
+ if(inp & PBTN_CIRCLE) // enter dir/select
- 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_CIRCLE) { // action
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_L|PBTN_R|PBTN_X|PBTN_CIRCLE, 0);
+ if(inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = PicoPatchCount; }
+ if(inp & PBTN_DOWN) { menu_sel++; if (menu_sel > PicoPatchCount) menu_sel = 0; }
+ if(inp &(PBTN_LEFT|PBTN_L)) { menu_sel-=10; if (menu_sel < 0) menu_sel = 0; }
+ if(inp &(PBTN_RIGHT|PBTN_R)) { menu_sel+=10; if (menu_sel > PicoPatchCount) menu_sel = PicoPatchCount; }
+ if(inp & PBTN_CIRCLE) { // action
do {
menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max;
} while (!(state_slot_flags & (1 << menu_sel)) && menu_sel != menu_sel_max && is_loading);
}
do {
menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max;
} while (!(state_slot_flags & (1 << menu_sel)) && menu_sel != menu_sel_max && is_loading);
}
do {
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);
}
do {
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);
}
for (;;)
{
draw_key_config(opts, opt_cnt, player_idx, sel);
for (;;)
{
draw_key_config(opts, opt_cnt, player_idx, sel);
- inp = wait_for_input(CONFIGURABLE_KEYS|BTN_SELECT, 1);
- if (!(inp & BTN_SELECT)) {
+ inp = wait_for_input(CONFIGURABLE_KEYS|PBTN_SELECT, 1);
+ if (!(inp & PBTN_SELECT)) {
- if(inp & BTN_UP ) { sel--; if (sel < 0) sel = menu_sel_max; continue; }
- if(inp & BTN_DOWN) { sel++; if (sel > menu_sel_max) sel = 0; continue; }
+ if(inp & PBTN_UP ) { sel--; if (sel < 0) sel = menu_sel_max; continue; }
+ if(inp & PBTN_DOWN) { sel++; if (sel > menu_sel_max) sel = 0; continue; }
- if (inp & (BTN_LEFT|BTN_RIGHT)) // multi choise
- me_process(ctrlopt_entries, CTRLOPT_ENTRY_COUNT, selected_id, (inp&BTN_RIGHT) ? 1 : 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_CIRCLE) {
+ if (inp & (PBTN_LEFT|PBTN_RIGHT)) // multi choise
+ me_process(ctrlopt_entries, CTRLOPT_ENTRY_COUNT, selected_id, (inp&PBTN_RIGHT) ? 1 : 0);
+ if (inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
+ if (inp & PBTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
+ if (inp & PBTN_CIRCLE) {
int is_6button = PicoOpt & POPT_6BTN_PAD;
switch (selected_id) {
case MA_CTRL_PLAYER1: key_config_loop(me_ctrl_actions, is_6button ? 15 : 11, 0); return;
int is_6button = PicoOpt & POPT_6BTN_PAD;
switch (selected_id) {
case MA_CTRL_PLAYER1: key_config_loop(me_ctrl_actions, is_6button ? 15 : 11, 0); return;
{ NULL, MB_NONE, MA_CDOPT_TESTBIOS_EUR, NULL, 0, 0, 0, 1, 0 },
{ NULL, MB_NONE, MA_CDOPT_TESTBIOS_JAP, NULL, 0, 0, 0, 1, 0 },
{ "CD LEDs", MB_ONOFF, MA_CDOPT_LEDS, ¤tConfig.EmuOpt, 0x0400, 0, 0, 1, 1 },
{ NULL, MB_NONE, MA_CDOPT_TESTBIOS_EUR, NULL, 0, 0, 0, 1, 0 },
{ NULL, MB_NONE, MA_CDOPT_TESTBIOS_JAP, NULL, 0, 0, 0, 1, 0 },
{ "CD LEDs", MB_ONOFF, MA_CDOPT_LEDS, ¤tConfig.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 },
{ "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 },
- inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE|BTN_START, 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; }
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_X|PBTN_CIRCLE|PBTN_START, 0);
+ if (inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
+ if (inp & PBTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
- if (inp & (BTN_LEFT|BTN_RIGHT)) { // multi choise
- if (!me_process(cdopt_entries, CDOPT_ENTRY_COUNT, selected_id, (inp&BTN_RIGHT) ? 1 : 0) &&
+ if (inp & (PBTN_LEFT|PBTN_RIGHT)) { // multi choise
+ if (!me_process(cdopt_entries, CDOPT_ENTRY_COUNT, selected_id, (inp&PBTN_RIGHT) ? 1 : 0) &&
if (!me_process(cdopt_entries, CDOPT_ENTRY_COUNT, selected_id, 1) &&
selected_id == MA_CDOPT_DONE) {
return;
}
if (!me_process(cdopt_entries, CDOPT_ENTRY_COUNT, selected_id, 1) &&
selected_id == MA_CDOPT_DONE) {
return;
}
switch (selected_id) { // BIOS testers
case MA_CDOPT_TESTBIOS_USA:
if (emu_findBios(4, &bios)) { // test US
switch (selected_id) { // BIOS testers
case MA_CDOPT_TESTBIOS_USA:
if (emu_findBios(4, &bios)) { // test US
- 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; }
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_X|PBTN_CIRCLE, 0);
+ if (inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
+ if (inp & PBTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
selected_id = me_index2id(opt3_entries, OPT3_ENTRY_COUNT, menu_sel);
if (selected_id == MA_OPT3_HSCALE40 && is_32col) { is_32col = 0; menu_opt3_preview(is_32col); }
if (selected_id == MA_OPT3_HSCALE32 && !is_32col) { is_32col = 1; menu_opt3_preview(is_32col); }
selected_id = me_index2id(opt3_entries, OPT3_ENTRY_COUNT, menu_sel);
if (selected_id == MA_OPT3_HSCALE40 && is_32col) { is_32col = 0; menu_opt3_preview(is_32col); }
if (selected_id == MA_OPT3_HSCALE32 && !is_32col) { is_32col = 1; menu_opt3_preview(is_32col); }
- me_process(opt3_entries, OPT3_ENTRY_COUNT, selected_id, (inp&BTN_RIGHT) ? 1 : 0);
+ me_process(opt3_entries, OPT3_ENTRY_COUNT, selected_id, (inp&PBTN_RIGHT) ? 1 : 0);
switch (selected_id) {
case MA_OPT3_SCALE: setting = ¤tConfig.scale; break;
case MA_OPT3_HSCALE40: setting = ¤tConfig.hscale40; is_32col = 0; break;
switch (selected_id) {
case MA_OPT3_SCALE: setting = ¤tConfig.scale; break;
case MA_OPT3_HSCALE40: setting = ¤tConfig.hscale40; is_32col = 0; break;
case MA_OPT3_BLACKLVL: menu_opt3_preview(is_32col); break;
case MA_OPT3_VSYNC:
tmp = ((currentConfig.EmuOpt>>13)&1) | ((currentConfig.EmuOpt>>15)&2);
case MA_OPT3_BLACKLVL: menu_opt3_preview(is_32col); break;
case MA_OPT3_VSYNC:
tmp = ((currentConfig.EmuOpt>>13)&1) | ((currentConfig.EmuOpt>>15)&2);
- while ((inp = psp_pad_read(0)) & (BTN_LEFT|BTN_RIGHT)) {
- *setting += (inp & BTN_LEFT) ? -0.01 : 0.01;
+ while ((inp = psp_pad_read(0)) & (PBTN_LEFT|PBTN_RIGHT)) {
+ *setting += (inp & PBTN_LEFT) ? -0.01 : 0.01;
if (*setting <= 0) *setting = 0.01;
menu_opt3_preview(is_32col);
draw_dispmenu_options(menu_sel); // will wait vsync
}
}
}
if (*setting <= 0) *setting = 0.01;
menu_opt3_preview(is_32col);
draw_dispmenu_options(menu_sel); // will wait vsync
}
}
}
me_process(opt3_entries, OPT3_ENTRY_COUNT, selected_id, 1);
switch (selected_id) {
case MA_OPT3_DONE:
me_process(opt3_entries, OPT3_ENTRY_COUNT, selected_id, 1);
switch (selected_id) {
case MA_OPT3_DONE:
- 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; }
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_X|PBTN_CIRCLE, 0);
+ if (inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
+ if (inp & PBTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
- if (inp & (BTN_LEFT|BTN_RIGHT)) { // multi choise
- if (!me_process(opt2_entries, OPT2_ENTRY_COUNT, selected_id, (inp&BTN_RIGHT) ? 1 : 0) &&
+ if (inp & (PBTN_LEFT|PBTN_RIGHT)) { // multi choise
+ if (!me_process(opt2_entries, OPT2_ENTRY_COUNT, selected_id, (inp&PBTN_RIGHT) ? 1 : 0) &&
if (!me_process(opt2_entries, OPT2_ENTRY_COUNT, selected_id, 1) &&
selected_id == MA_OPT2_DONE) {
return;
}
}
if (!me_process(opt2_entries, OPT2_ENTRY_COUNT, selected_id, 1) &&
selected_id == MA_OPT2_DONE) {
return;
}
}
- 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; }
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_X|PBTN_CIRCLE, 0);
+ if (inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
+ if (inp & PBTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
- if (inp & (BTN_LEFT|BTN_RIGHT)) { // multi choise
- if (!me_process(opt_entries, OPT_ENTRY_COUNT, selected_id, (inp&BTN_RIGHT) ? 1 : 0)) {
+ if (inp & (PBTN_LEFT|PBTN_RIGHT)) { // multi choise
+ if (!me_process(opt_entries, OPT_ENTRY_COUNT, selected_id, (inp&PBTN_RIGHT) ? 1 : 0)) {
break;
case MA_OPT_CONFIRM_STATES: {
int n = ((currentConfig.EmuOpt>>9)&1) | ((currentConfig.EmuOpt>>10)&2);
break;
case MA_OPT_CONFIRM_STATES: {
int n = ((currentConfig.EmuOpt>>9)&1) | ((currentConfig.EmuOpt>>10)&2);
state_slot++; if (state_slot > 9) state_slot = 0;
} else {state_slot--; if (state_slot < 0) state_slot = 9;
}
break;
case MA_OPT_CPU_CLOCKS:
state_slot++; if (state_slot > 9) state_slot = 0;
} else {state_slot--; if (state_slot < 0) state_slot = 9;
}
break;
case MA_OPT_CPU_CLOCKS:
- while ((inp = psp_pad_read(0)) & (BTN_LEFT|BTN_RIGHT)) {
- currentConfig.CPUclock += (inp & BTN_LEFT) ? -1 : 1;
+ while ((inp = psp_pad_read(0)) & (PBTN_LEFT|PBTN_RIGHT)) {
+ currentConfig.CPUclock += (inp & PBTN_LEFT) ? -1 : 1;
if (currentConfig.CPUclock < 19) currentConfig.CPUclock = 19;
if (currentConfig.CPUclock > 333) currentConfig.CPUclock = 333;
draw_menu_options(menu_sel); // will wait vsync
if (currentConfig.CPUclock < 19) currentConfig.CPUclock = 19;
if (currentConfig.CPUclock > 333) currentConfig.CPUclock = 333;
draw_menu_options(menu_sel); // will wait vsync
if (config_slot > 9) config_slot = 0;
if (config_slot < 0) config_slot = 9;
me_enable(opt_entries, OPT_ENTRY_COUNT, MA_OPT_LOADCFG, config_slot != config_slot_current);
if (config_slot > 9) config_slot = 0;
if (config_slot < 0) config_slot = 9;
me_enable(opt_entries, OPT_ENTRY_COUNT, MA_OPT_LOADCFG, config_slot != config_slot_current);
if (!me_process(opt_entries, OPT_ENTRY_COUNT, selected_id, 1))
{
switch (selected_id)
if (!me_process(opt_entries, OPT_ENTRY_COUNT, selected_id, 1))
{
switch (selected_id)
- 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_X)) {
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_X|PBTN_CIRCLE|PBTN_SELECT|PBTN_L|PBTN_R, 0);
+ if(inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
+ if(inp & PBTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
+ if((inp & (PBTN_L|PBTN_R)) == (PBTN_L|PBTN_R)) debug_menu_loop();
+ if( inp & (PBTN_SELECT|PBTN_X)) {
menuErrorMsg[0] = 0; // clear error msg
switch (me_index2id(main_entries, MAIN_ENTRY_COUNT, menu_sel))
{
case MA_MAIN_RESUME_GAME:
if (rom_loaded) {
menuErrorMsg[0] = 0; // clear error msg
switch (me_index2id(main_entries, MAIN_ENTRY_COUNT, menu_sel))
{
case MA_MAIN_RESUME_GAME:
if (rom_loaded) {
- while (!(inp & (BTN_X|BTN_CIRCLE)))
- inp = wait_for_input(BTN_X|BTN_CIRCLE, 0);
+ while (!(inp & (PBTN_X|PBTN_CIRCLE)))
+ inp = wait_for_input(PBTN_X|PBTN_CIRCLE, 0);
- inp = wait_for_input(BTN_UP|BTN_DOWN|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_CIRCLE) {
+ inp = wait_for_input(PBTN_UP|PBTN_DOWN|PBTN_CIRCLE, 0);
+ if(inp & PBTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
+ if(inp & PBTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
+ if(inp & PBTN_CIRCLE) {
if (cd_type != CIT_NOT_CD)
ret = Insert_CD(romFileName, cd_type);
if (ret != 0) {
if (cd_type != CIT_NOT_CD)
ret = Insert_CD(romFileName, cd_type);
if (ret != 0) {