Efectivamente, no funcionaban las diagonales. Sólo las 4 direcciones principales (arriba, derecha, abajo, izquierda). En el Mortal Kombat estaba claro que no se podía saltar ni hacia adelante ni hacia atrás. Sólo hacia arriba. En el Sonic 3D Blast! no podía moverme en diagonal, etc.
Me dispuse entonces a ver el emulador, y como estaba el código fuente disponible... me decidí a corregir el problema, que de paso, ví mencionado infinidad de veces a lo largo de los años. Por ej:
en el FAQ del mismísimo Gens: http://www.gens.me/faq.shtml
Totalmente erróneo. Eso no soluciona el problema. El problema está en el código del emulador.Q : I can't get diagonals using my joypad, or diagonals have stopped working how do I fix it?
A : Several people have reported this problem and it seems to be a Gens.cfg problem. Quit Gens, find and delete your Gens.cfg file. Now restart Gens and set your joypads up again, hopefully you should now be able to get diagonals.
Otro link: https://forum.rpg.net/showthread.php?53 ... oller-work
Otro más (y no jodo más): https://forums.emulator-zone.com/showthread.php?t=3410
ETC.
Entonces, mirando el código me encontré con el error:
Código original de la función int Check_Key_Pressed(unsigned int key) del archivo G_dinput.cpp):
Código: Seleccionar todo
switch(key & 0xF)
{
case 1:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == 0) return(1); break;
case 2:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == 9000) return(1); break;
case 3:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == 18000) return(1); break;
case 4:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == 27000) return(1); break;
}
Luego de modificar el código y mejorar un poco los valores numéricos por etiquetas, quedó:
Código: Seleccionar todo
switch(key & 0xF)
{
case 1:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVFORWARD_POVLEFT) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVFORWARD) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVFORWARD_POVRIGHT) return(1);
break;
case 2:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVFORWARD_POVRIGHT) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVRIGHT) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVBACKWARD_POVRIGHT) return(1);
break;
case 3:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVBACKWARD_POVRIGHT) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVBACKWARD) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVBACKWARD_POVLEFT) return(1);
break;
case 4:
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVBACKWARD_POVLEFT) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVLEFT) return(1);
if (Joy_State[Num_Joy].rgdwPOV[(key >> 4) & 3] == JOY_POVFORWARD_POVLEFT) return(1);
break;
}
Código: Seleccionar todo
#define JOY_POVFORWARD 0
#define JOY_POVFORWARD_POVRIGHT 4500
#define JOY_POVRIGHT 9000
#define JOY_POVBACKWARD_POVRIGHT 13500
#define JOY_POVBACKWARD 18000
#define JOY_POVBACKWARD_POVLEFT 22500
#define JOY_POVLEFT 27000
#define JOY_POVFORWARD_POVLEFT 31500
Última release pública (2.14):
http://www.gens.me/downloads.shtml
Les dejo el link de descarga a la nueva versión compilada, con el fix (2.14.1):
https://mega.nz/#!fcoyWKCL!fdaUuDZmeiqE ... -uhWf9Zfo0