return 0;\r
}\r
\r
-static int name_cmp(const char *name)\r
+static int rom_strcmp(int rom_offset, const char *s1)\r
{\r
- int i, len = strlen(name);\r
- const char *name_rom = (const char *)Pico.rom+0x150;\r
+ int i, len = strlen(s1);\r
+ const char *s_rom = (const char *)Pico.rom + rom_offset;\r
for (i = 0; i < len; i++)\r
- if (name[i] != name_rom[i^1])\r
+ if (s1[i] != s_rom[i^1])\r
return 1;\r
return 0;\r
}\r
\r
+static int name_cmp(const char *name)\r
+{\r
+ return rom_strcmp(0x150, name);\r
+}\r
+\r
/* various cart-specific things, which can't be handled by generic code */\r
void PicoCartDetect(void)\r
{\r
if (name_cmp("DINO DINI'S SOCCER") == 0 ||\r
name_cmp("MICRO MACHINES II") == 0)\r
memset(SRam.data, 0xff, sram_size);\r
+\r
+ // Unusual region 'code'\r
+ if (rom_strcmp(0x1f0, "EUROPE") == 0)\r
+ *(int *) (Pico.rom+0x1f0) = 0x20204520;\r
}\r
\r
combo_keys = combo_acts = 0;
for (act = 0; act < 32; act++)
{
- int keyc = 0;
+ int keyc = 0, keyc2 = 0;
if (act == 16 || act == 17) continue; // player2 flag
- for (u = 0; u < 32; u++)
+ if (act > 17)
{
- if (currentConfig.KeyBinds[u] & (1 << act)) keyc++;
+ for (u = 0; u < 32; u++)
+ if (currentConfig.KeyBinds[u] & (1 << act)) keyc++;
+ }
+ else
+ {
+ for (u = 0; u < 32; u++)
+ if ((currentConfig.KeyBinds[u] & 0x30000) == 0 && // pl. 1
+ (currentConfig.KeyBinds[u] & (1 << act))) keyc++;
+ for (u = 0; u < 32; u++)
+ if ((currentConfig.KeyBinds[u] & 0x30000) == 1 && // pl. 2
+ (currentConfig.KeyBinds[u] & (1 << act))) keyc2++;
+ if (keyc2 > keyc) keyc = keyc2;
}
if (keyc > 1)
{
combo_keys = combo_acts = 0;\r
for (act = 0; act < 32; act++)\r
{\r
- int keyc = 0;\r
+ int keyc = 0, keyc2 = 0;\r
if (act == 16 || act == 17) continue; // player2 flag\r
- for (u = 0; u < 32; u++)\r
+ if (act > 17)\r
{\r
- if (currentConfig.KeyBinds[u] & (1 << act)) keyc++;\r
+ for (u = 0; u < 32; u++)\r
+ if (currentConfig.KeyBinds[u] & (1 << act)) keyc++;\r
+ }\r
+ else\r
+ {\r
+ for (u = 0; u < 32; u++)\r
+ if ((currentConfig.KeyBinds[u] & 0x30000) == 0 && // pl. 1\r
+ (currentConfig.KeyBinds[u] & (1 << act))) keyc++;\r
+ for (u = 0; u < 32; u++)\r
+ if ((currentConfig.KeyBinds[u] & 0x30000) == 1 && // pl. 2\r
+ (currentConfig.KeyBinds[u] & (1 << act))) keyc2++;\r
+ if (keyc2 > keyc) keyc = keyc2;\r
}\r
if (keyc > 1)\r
{\r
}\r
}\r
}\r
+\r
// printf("combo keys/acts: %08x %08x\n", combo_keys, combo_acts);\r
}\r
\r
combo_keys = combo_acts = 0;
for (act = 0; act < 32; act++)
{
- int keyc = 0;
+ int keyc = 0, keyc2 = 0;
if (act == 16 || act == 17) continue; // player2 flag
- for (u = 0; u < 32; u++)
+ if (act > 17)
{
- if (currentConfig.KeyBinds[u] & (1 << act)) keyc++;
+ for (u = 0; u < 32; u++)
+ if (currentConfig.KeyBinds[u] & (1 << act)) keyc++;
+ }
+ else
+ {
+ for (u = 0; u < 32; u++)
+ if ((currentConfig.KeyBinds[u] & 0x30000) == 0 && // pl. 1
+ (currentConfig.KeyBinds[u] & (1 << act))) keyc++;
+ for (u = 0; u < 32; u++)
+ if ((currentConfig.KeyBinds[u] & 0x30000) == 1 && // pl. 2
+ (currentConfig.KeyBinds[u] & (1 << act))) keyc2++;
+ if (keyc2 > keyc) keyc = keyc2;
}
if (keyc > 1)
{
sound_prepare();
}
+ sceDisplayWaitVblankStart();
+
// loop?
while (engineState == PGS_Running)
{
char *val = " never";
if (currentConfig.EmuOpt & 0x2000)
val = (currentConfig.EmuOpt & 0x10000) ? "sometimes" : " always";
- text_out16(x, y, "Wait for vsync %s", val);
+ text_out16(x, y, "Wait for vsync (slow) %s", val);
break;
}
default: break;
static void dispmenu_loop_options(void)
{
static int menu_sel = 0;
- int menu_sel_max, is_32col = 0;
+ int menu_sel_max, is_32col = (Pico.video.reg[12]&1)^1;
unsigned long inp = 0;
menu_id selected_id;