Main > Main Forum
TopGun LCD - Yes another thread
BioFreak:
I really don't want to be a jerk about this but could we please try to keep this on topic.
I don't want to run into the issues we've had with the main top gun post running into 43 pages where there is a ton of usefull info but no one can find it amongst all the useless my gun is better than yours talk.
The issue that some people seem to be having, including me, is that
mapping buttons from the LCD gun from SMOGs ctrl panel, buttons that are registering as working in the ctrl panel, are not being recognized when playing games in Mame32, and I assume other versions of mame also.
I know many people have this working, just looking for info of who has what working for attempting to use the start and select buttons or for that matter any of the buttons as p1 coin and p1 start.
Thanks
Biofreak
Cananas:
aljupy wrote:
--- Quote ---With Smog
--- End quote ---
BioFreak:
Thanks Cananas for helping us get back on point!
I'm going to try these settings out as soon as I have a chance,
hopefully this weekend at the latest.
u_rebelscum:
The way mame's windows OSD (OS Dependent) code is written, directX is only showing 4 buttons. This can be changed fairly easily by using DIMOUSESTATE2 instead of DIMOUSESTATE. This change will give you 8 buttons.
I'm not sure with the current coding, but I think that's all that's needed to be able to use the extra mouse buttons; Notice how linux AdvanceMame can use the 5+ buttons with only different OSD code. But I'm not sure if ctrlr files and the like will work seamlessly without other changes since ctrlr also involves OSD code.
Cananas:
--- Quote from: u_rebelscum on May 04, 2006, 06:28:21 pm ---The way mame's windows OSD (OS Dependent) code is written, directX is only showing 4 buttons. This can be changed fairly easily by using DIMOUSESTATE2 instead of DIMOUSESTATE. This change will give you 8 buttons.
I'm not sure with the current coding, but I think that's all that's needed to be able to use the extra mouse buttons; Notice how linux AdvanceMame can use the 5+ buttons with only different OSD code. But I'm not sure if ctrlr files and the like will work seamlessly without other changes since ctrlr also involves OSD code.
--- End quote ---
Yes, but it seems limited by the Rawstructure structure (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/rawinput/rawinputreference/rawinputstructures/rawmouse.asp) to only 5 buttons.
For me it's enough:
Button1: Trigger of the gun
Button2: Reload, pressing Button B of the gun or shooting offscreen (All with Smog driver, of course).
Button3: Button A and Button C (second trigger) of the gun
Button4: Credits. Select button of the gun
Button5: Start. Start button of the gun.
You only need to remap the credit and start keys in Mame.
The changes (in bold) I have made are in scr/windows/input.c:
{ JOYCODE(0, CODETYPE_MOUSEBUTTON, 0), MOUSECODE_1_BUTTON1 },
{ JOYCODE(0, CODETYPE_MOUSEBUTTON, 1), MOUSECODE_1_BUTTON2 },
{ JOYCODE(0, CODETYPE_MOUSEBUTTON, 2), MOUSECODE_1_BUTTON3 },
{ JOYCODE(0, CODETYPE_MOUSEBUTTON, 3), MOUSECODE_1_BUTTON4 },
{ JOYCODE(0, CODETYPE_MOUSEBUTTON, 4), MOUSECODE_1_BUTTON5 },
{ JOYCODE(0, CODETYPE_MOUSEAXIS, 0), MOUSECODE_1_ANALOG_X },
{ JOYCODE(0, CODETYPE_MOUSEAXIS, 1), MOUSECODE_1_ANALOG_Y },
{ JOYCODE(0, CODETYPE_MOUSEAXIS, 2), MOUSECODE_1_ANALOG_Z },
-------------------------------------------------------------------------------------
// add mouse buttons
for (button = 0; button < 5; button++)
{
-------------------------------------------------------------------------------------
// Update the button values for the specified mouse
if (button_flags & RI_MOUSE_BUTTON_1_DOWN) buttons[0] = 0x80;
if (button_flags & RI_MOUSE_BUTTON_1_UP) buttons[0] = 0;
if (button_flags & RI_MOUSE_BUTTON_2_DOWN) buttons[1] = 0x80;
if (button_flags & RI_MOUSE_BUTTON_2_UP) buttons[1] = 0;
if (button_flags & RI_MOUSE_BUTTON_3_DOWN) buttons[2] = 0x80;
if (button_flags & RI_MOUSE_BUTTON_3_UP) buttons[2] = 0;
if (button_flags & RI_MOUSE_BUTTON_4_DOWN) buttons[3] = 0x80;
if (button_flags & RI_MOUSE_BUTTON_4_UP) buttons[3] = 0;
if (button_flags & RI_MOUSE_BUTTON_5_DOWN) buttons[4] = 0x80;
if (button_flags & RI_MOUSE_BUTTON_5_UP) buttons[4] = 0;