Main > Main Forum

Any new info on how to get TWO lightguns (Aimtrak) to work with M2 and/or Demul?

Pages: << < (2/3) > >>

BadMouth:


--- Quote from: RamjetR on August 17, 2012, 08:33:31 am ---and to be honest it's a nasty way to do it since the overlayed cursors don't match the injected data.

--- End quote ---

Doesn't matter for those of us using real light guns on a CRT.   :P
(never use on-screen crosshairs anyway)

I'd like to have a copy if you get the memory locations figured out.

This solution is how "The Troubleshooter" works with pc games and epsxe.
I know end users have tried to contact the author and haven't gotten a response,
but they might be more receptive to someone who is actually working on code.

RamjetR:

I haven't tried Troubleshooter at all (again for the lack of owning a lightgun), but memory locations weren't hard to find, it's just that they changed everytime the emulator is launched. I've looked into writing HID code into the LUA script of each frame to manually pull out game controller inputs. At this stage learning USB/HID interfacing is a subject a little beyond my ability at this time. It could however cause some delay to writing frames to the screen so I'd like to keep the performance of the game running nicely rather than trying to do too much between frames.

The are a couple of really cool instructables I stumbled on whilst surfing my arduino stuff which related to using the optical sensor of a mouse as a low res but high speed camera. And I thought, what about the left over mouse controller? It does everything the game wants natively! So I pulled up data sheets on the optical sensor and it's simple single wire serial with a clock for +/- XY movement... heck thats what the arduino is asking from it... perhaps I can fake the optical sensor part and get the mouse to convert and inject the rawinputs for me? So I'm going through the script for the optical sensor and pulling out the serial library and will turn the arduino into a fake optical sensor. I can take the XY position through AHK easily enough and send it to the arduino which has enough pins to send that to two optical $4 mice.

The problem at the game end will be that you can lift the mouse and move it without moving the retical, causing a desync of the onscreen retical and the absolute XY from the gun, so there needs to be a little cross referencing going on to make sure they sync up. This is why relative mouse movement isn't the best for optical tracking, but at the time of the technology, ray tracing was how it worked and everything was relative to the trace beam on the screen.

Actually I am suprised that there isn't further discussion from the lightgun manufacturers on the forum to how they may be able to make their guns into a True mouse input. Surely it's a driver that could be written?

Ironically the best qualified people in the world to fix this is Elsemi himself, or one of his crew with code, or even the equally as great CarlKenner from glovepie. From all my reading, there isn't a way for windows to fake a RawInput device, but you can fake a Dinput device as glovepie can do. It appears to get a real RawInput device, it needs to be a real mouse... hence the mouse idea.

This has become a project for me, a great way to learn windows scripting languages. It won't be overnight but I have a couple idea's that might get there. It's a real shame it didn't get completed before Elsemi left off, but kudos for his (and crews) efforts. And if I got an offer from Sega like that, I'd have taken the deal exactly the same way :)


Endprodukt:

Any news on this? Would be so awesome to play m2 games with dual light guns...

btw... we should contact the demul team before anyone of them get's hired by sega, too ;)

AndyWarne:


The Aimtrak switched to analog joystick mode should work.

BadMouth:


--- Quote from: AndyWarne on October 06, 2012, 07:07:16 pm ---
The Aimtrak switched to analog joystick mode should work.

--- End quote ---

There is no option to map an analogue joystick input in the gun games on M2.  :-\
There is an x-input option in the ini file, but I haven't tried it.

There still might be a workaround there with a joy2mouse type program, but I tried that with positional guns and the result was jerky crosshair movement.
(like they snapping from point to point on a grid)

Pages: << < (2/3) > >>

Go to full version