Derrick, let me understand ... do I have to change to x=0 y=0 to be compatible with more games ? I don't remember why I choosed y = MAX but I remember that I made some tests with a mouse to get the right coordinates values for mame, but I am sure I could do it better ... let me know and I'll change it too.
Lethal Justice is one game that will not reload with y=65535. Setting both X & Y to 0 should work with all games.
That is what my e-mail was about, so don't worry about not receiving it.
D.
After I checked all 'lightgun' games of Mame, I can tell you that the best coordinates are x=0 and y=65535, like Smog said.
According to all lightguns game that need shoot offscreen to reload, the results are:
x=0, y=0 => All games reload, except Lethal Enforces and Lethal Enforces II.
x=0, y=65535 => All game reload (Lethal Enforces and Lethal Justice included), except Lethal Enforces II.
(I think Lethal Enforces II is a known bug reported by R.Belmont)
I made this test with ActLabs and LCDTopgun+Smogdriver. All time with the shootoffscreen reload enabled.
Also changing this values in the src/windows/input.c:
In the function poll_lightguns(void), where it says:
if (return_offscreen)
{
gun_axis[player][0] = ANALOG_VALUE_MIN;
gun_axis[player][1] = ANALOG_VALUE_MIN;
continue;
}
I changed to this:
if (return_offscreen)
{
gun_axis[player][0] = ANALOG_VALUE_MIN;
gun_axis[player][1] = ANALOG_VALUE_MAX;
continue;
}
(I think this is the old mouse driver).
And at the end of the file, when it says:
// set X,Y to MIN values if offscreen reload is used and fire
if (use_lightgun_reload && mouse_state[i].rgbButtons[1] & 0x80)
{
mouse_state[i].lX = ANALOG_VALUE_MIN;
mouse_state[i].lY = ANALOG_VALUE_MIN;
mouse_state[i].rgbButtons[0] = 0x80;
}
// do not clear if absolute
I changed if for:
// set X,Y to MIN values if offscreen reload is used and fire
if (use_lightgun_reload && mouse_state[i].rgbButtons[1] & 0x80)
{
mouse_state[i].lX = ANALOG_VALUE_MIN;
mouse_state[i].lY = ANALOG_VALUE_MAX;
mouse_state[i].rgbButtons[0] = 0x80;
}
// do not clear if absolute
BTW, I don't know if the last comment "do not clear if absolute" is about this values. If this is the case, the answer is they are relative.
Please, Derrick, could you confirm this and if it's ok, could you submit to the MameTeam to be included in the regular Mame?(yes, I know you are part of the MameTeam

)