Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: LCDTopGun, SMOG Driver and shotoffscreen reload  (Read 4963 times)

0 Members and 1 Guest are viewing this topic.

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
LCDTopGun, SMOG Driver and shotoffscreen reload
« on: March 24, 2006, 01:04:04 pm »
Well, with the new version of Mame (104u7), the driver that works well with Mame and the LCDTopGun is the SMOG Drivers.

All thing great in Mame. Only the remap key option doesn't work properly. Of course I have the guncon2flasher runnig. It seem that after you remapped a key (like '5') to the button 3, for example, if you press the button 3, you get a press down key '5', but not a press up. I ran the KeyThis program to watch this.

Another important request is the possibility to remap permanently the ShootOfScreen to the button 2.

I'm confused, because I don't know how the Smog driver manages the shotoffscreen.

I think all gun games, Mame inclusive, use the button 2 to reload. what it happens with Mame and some games like Area51 (don't have a second button)  is that Mame traslates automaticaly?????Derrick???? (before it was -Offscreen shot reload flag) a button2 pressed to a shotofscreen to reload.

But how does it work with the ActLabs? Yea, when you shoot offscreen with the ActLabs guns, the hardware of the gun traslates this to a button2 pressed.

So, what we have?

-> shot offscreen->button2 pressed---->to mame----->button2 pressed->shot offscreen->reload the gun


I hope it is clear.



Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:December 06, 2024, 04:31:44 pm
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #1 on: March 24, 2006, 01:20:12 pm »
With smog's driver just tell it to free the mouse if offscreen.  No -offscreen_reload needed.  Just shoot off screen.

If you use -offscreen_reload, then whatever button in smog's driver is mapped to button 2 is the re-load.

Not quite sure why you would use guncon2flasher with the LCD TopGun.

D.
« Last Edit: March 24, 2006, 01:24:51 pm by Derrick Renaud »

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #2 on: March 24, 2006, 01:52:40 pm »
With smog's driver just tell it to free the mouse if offscreen.  No -offscreen_reload needed.  Just shoot off screen.

If you use -offscreen_reload, then whatever button in smog's driver is mapped to button 2 is the re-load.

Not quite sure why you would use guncon2flasher with the LCD TopGun.

D.

Thanks, Derrick.

The main reason I asked this it doesn't involve to Mame. Because Smog driver doesn't register a button2 press when you shot off screen like the ActLabs guns do, you can't reload shooting off the screen in those PC games:

- House of the Dead
- House of the Dead 2
- VirtuaCop
- VirtuaCop2
- MadDod McCree
- etc.

With the Guncon2Flasher running you can remap the gun buttons to some keys.

Smog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 178
  • Last login:April 30, 2007, 06:50:51 am
  • .357
    • How to make a cheap GunCon2 work on your PC
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #3 on: March 26, 2006, 07:56:33 am »
ok, I think I understood what's the problem with actual way O handle off screen reload.

Actually you can :
1) Assign any gun's button to mouse button 2 => simulate the shootOffScreen in most games (act-lab way)
2) Aim off screen + "any gun's button" => Simulates mame off screen reload (low X coordinate / max Y coordinate + mouse press)
3) Assign the "mame shootoffscreen" to any button => Really does not help that much ... emulates in mame the HOD way of reloading ...

What You can't do, and I supose you want :

- Aim off screen + press trigger 1 => Send mouse button 2 to simulate the act-lab way

Am I right ?
« Last Edit: March 26, 2006, 10:05:22 am by Smog »
GunCon2PC Driver on http://guncon2pc.no-ip.org/

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #4 on: March 26, 2006, 09:21:57 am »
What You can't so, and I supose you want :

- Aim off screen + press trigger 1 => Send mouse button 2 to simulate the act-lab way

Am I right ?

Yes, this is the point. With this, you can reload in those games shooting offscreen.

Smog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 178
  • Last login:April 30, 2007, 06:50:51 am
  • .357
    • How to make a cheap GunCon2 work on your PC
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #5 on: March 26, 2006, 10:06:17 am »
Ok, easy to ADD .. expect it soon
GunCon2PC Driver on http://guncon2pc.no-ip.org/

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:December 06, 2024, 04:31:44 pm
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #6 on: March 26, 2006, 11:49:26 am »

What You can't so, and I supose you want :

- Aim off screen + press trigger 1 => Send mouse button 2 to simulate the act-lab way

Am I right ?

Yes, this is the point. With this, you can reload in those games shooting offscreen.

The TopGun should be able to work in MAME without this.  Though it would still be usefull to have this as a per game option so PC games will reload.  Eg: House of the dead and Chicken Village.

Ok, easy to ADD .. expect it soon

Currently your driver uses x=0, y=65535 when a shot is off screen.  If both x&y=0, there would be no need to remap the off screen shot to button 2.  The MAME game would receive the data it wants without the -offscreen_reload hack.

D.

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #7 on: March 26, 2006, 12:11:14 pm »
Quote
The TopGun should be able to work in MAME without this.  Though it would still be usefull to have this as a per game option so PC games will reload.  Eg: House of the dead and Chicken Village.

Yes, and it works in MAME perfectly.

To sum up after the tests:

- MAME+LCDTopGun+Smog drivers-> able to reload shooting offscreen without offscreen reload flag. 'Real shootoffscreen reload'.

- PCGames that use the mouse like a gun+LCDTopGun+Actual Smog drivers -> unable to reload shooting offscreen. You need to press the button2 to reload.

Quote
Currently your driver uses x=0, y=65535 when a shot is off screen.  If both x&y=0, there would be no need to remap the off screen shot to button 2.  The MAME game would receive the data it wants without the -offscreen_reload hack.

Well... I don't know if the coordinates are (0,0) or (0,65535), but when you shoot offscreen with the Smog drivers (always without hack) the cursor goes to the lower-left corner. And it works, so Smog drivers is able to reload shooting offscreen without the hack.

Quote
Ok, easy to ADD .. expect it soon
Great!!

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:December 06, 2024, 04:31:44 pm
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #8 on: March 26, 2006, 12:31:19 pm »
Quote
Currently your driver uses x=0, y=65535 when a shot is off screen.  If both x&y=0, there would be no need to remap the off screen shot to button 2.  The MAME game would receive the data it wants without the -offscreen_reload hack.

Well... I don't know if the coordinates are (0,0) or (0,65535), but when you shoot offscreen with the Smog drivers (always without hack) the cursor goes to the lower-left corner. And it works, so Smog drivers is able to reload shooting offscreen without the hack.


The reason it goes to the lower left is because the driver changes Y to =65535 as soon as a button is pressed off screen.  Some games require Y=0 for off screen reload to work.

Off the top off my head, Bang!, Zero Point (when using a revolver), and Zombie Raid.  You can not reload in these games with the current smog driver, without using -offscreen_reload and button 2.  If Y=0 instead of 65535, then the shot would be at the top left, where those games need it.

D.
« Last Edit: April 22, 2009, 08:10:49 am by Derrick Renaud »

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #9 on: March 26, 2006, 03:44:26 pm »
Quote
Off the top off my head, Bang!, Zero Point (when using a revolver), and Zombie Raid.  You can not reload in these games with the current smog driver, without using -offscreen_reload and button 2.  If Y=0 instead of 65535, then the shot would be at the top left, where those games need it.

D.

I will check all games, but...

Bang! have not reload function and Zombie Raid use positional guns, so there is not shot offscreen reload (It has a button to reload).

With Zero Point 1&2 and offscreen hack enabled, I must press two times the button2. :o

In any case, I hope Smog change this value... ;)
« Last Edit: April 06, 2006, 05:08:45 pm by Cananas »

Smog

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 178
  • Last login:April 30, 2007, 06:50:51 am
  • .357
    • How to make a cheap GunCon2 work on your PC
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #10 on: March 26, 2006, 06:55:28 pm »
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.

Quote
Though it would still be usefull to have this as a per game option so PC games will reload

Unfortunately the per game profile switch won't work with lcd guns because they need to be unplugged for changes to apply ...
GunCon2PC Driver on http://guncon2pc.no-ip.org/

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:December 06, 2024, 04:31:44 pm
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #11 on: March 26, 2006, 07:48:47 pm »
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.

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: LCDTopGun, SMOG Driver and shotoffscreen reload
« Reply #12 on: May 06, 2006, 01:05:47 pm »
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:
Code: [Select]
if (return_offscreen)
{
gun_axis[player][0] = ANALOG_VALUE_MIN;
gun_axis[player][1] = ANALOG_VALUE_MIN;
continue;
}

I changed to this:
Code: [Select]
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:
Code: [Select]
// 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:
Code: [Select]
// 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  :notworthy:)
« Last Edit: May 06, 2006, 01:09:53 pm by Cananas »