Main > Lightguns |
GUN4IR - The Ultimate 4 Points Lightgun System |
<< < (17/227) > >> |
Zebra:
--- Quote from: JayBee on November 06, 2019, 08:44:09 pm --- --- Quote from: Zebra on November 06, 2019, 01:19:22 pm --- --- Quote from: JayBee on November 05, 2019, 02:03:48 am ---This kind of fixed gun tech has nothing to do with the IR cam tech we are using here, it would require a totally different firmware. --- End quote --- That's not 100% accurate. Most arcade IR gun I/O boards output as regular analog joysticks. In most cases you can use a positional gun instead of an IR gun with the same arcade PCB. The I/O boards just translate the positional data to the same 0-5v signal you would have got from a pot for the X and Y axis. The is a video on Youtube of some guy using a Taito positional gun in place of the IR gun on that Rambo arcade game. --- End quote --- I'm not saying that's impossible, I'm just saying my setup isn't compatible with it nor will be, that's not the purpose of it at all. It would require to do a special version that pretty much remove 90% or my code (IR detection and all), and change the rest significantly. So a brand new sketch... And before you ask, no it's not possible to add it to this sketch, because 1. All the analog pins are already in use for something else and 2. The sketch is already taking more than 80% of the Arduino flash, and I want to add more functions in the future. ;) Edit: By the way don't mix input and output. My sketch always had a joystick output, since the very first version :lol But it doesn't support joystick input that bypass the IR detection. However anyone who want to have a special version for that is free to use my 2 IR points sketch, which should work fine after removing the IR detection code. --- End quote --- I'm not sure I understand what you're saying on input VS output. All the PC light guns and IR guns I have seen output as either a mouse or an analog joystick (or both) in Windows. Most arcade guns from PC-based arcades output as an analog joystick (including both real light guns and IR guns). It makes the most sense for arcade gun set-ups as the 10-12 led boards define the screen perimeter while each coordinate is expressed as voltage from 0 to 5v. I.e. 0v at one side, 5v at the other edge and 2.5v for the center of each axis (or something like that). It's simple and universally compatible. What does this four sensor IR gun set-up output as? If it's seen as a mouse, how is it finding the coordinates of where you are aiming? My understanding of how a mouse works in Windows is limited but I assumed the mouse just tracks movement and not coordinates. Can Windows be fed coordinates to position a mouse cursor? I have high hopes for the 4 sensor set-up as, in theory, one at each corner should be able to define the screen perimeter almost as well as arcade IR guns. I think the main weakness of the Aimtrak set-up is that nothing defines the screen edge so when you aim at the out edge of the screen, the crosshairs no longer lines up with your iron sights. I just spent a fortune on Sega arcade IR gun parts so I can play House of the Dead 4 and Rambo with the original arcade gun in Teknoparrot. It would be nice to sell it an get some money back once there is a viable cheaper alternative.... |
Howard_Casto:
I'll throw some cents in here: Mice in windows can be setup two ways. Either as a relative position device, which works as you think it does (x number of ticks in a given direction) or absolute position... which I believe gives the x/y position in a 0 to 1024 value in both x and y. Imho neither of these should be used as output to make a modern light gun. Why? Well windows handles mouse input surprisingly poorly. One mouse read in relative position does just fine but absolute position or multiple mice aren't universally supported in games. As a matter of fact, the reason troubleshooter, troubleshooter 2 and demulshooter exist is due to the poor mice support in the typical gun game released on the pc... even some emulators. This is due to the fact that the various apis used to interface with multiple mice are outdated and/or cumbersome. On the other hand if your gun shows up as a joystick you are golden. Most modern games can handle two gamepads just fine and as a quick kludge to support older games, it's pretty easy to use middle ware to move the mouse cursor with a joystick. Multiple mice aren't officially supported in any commercially available games due to the api issues, so going forward, any gun games released on the pc are probably going to have gamepad support, with developers assuming you'll actually use a gamepad since true pc guns are dead atm. That's just fine if you make a new light gun show up as a joystick, but it means more hacking if you have it show up as a mouse. |
Zebra:
That explains why arcade developers almost always choose to have the gun I/O board output as an analog joystick, regardless of the gun tech. Modern arcades are PC's under the hood so they probably have to deal with all the same challenges Also, if the plan is to make a gun work with older consoles on HD flat screens, most light gun games already have analog joystick support. A few of the PS2 rail shooters I have tried even offer a choice of relative or absolute positioning (they call it "regular" and "pro" mode). I am relying on this to add light gun support to the few PS2 rail shooters with no gun support once my Sega arcade IR gun is set up. House of the Dead 4 on the PS3 even offers calibration and an option to turn off visible crosshairs when played with an analog joystick. I have high hopes for using my HOD4 arcade gun with it (with the I/O wired to a PS3 six axis pad). Do you have any insight on which mouse mode the Aimtrak uses when set to work as a mouse? It kinds seems like it works in relative mode as it doesn't seem to have the capability of recording accurate coordinates. |
Howard_Casto:
I don't have one but it's probably relative to maximize compatibility. |
JayBee:
--- Quote from: Mysli0210 on November 07, 2019, 07:24:09 pm ---Well i cant really see whats going on behind that hot-snot glue (which you can remove with rubbing alcohol, if need be ;)) But the microswitch (the one you call arcade) is super easy to solder several wires onto, as it has got a hole in the lead which you can hook the end of the wire around before soldering... heck even after if you heat the solder up before. BTW they are easily obtained, they go by the name 1c25, there are other types such as DB1, DB2 & DB3 but they have a different size, just if need be :D and the pcb with the red button(s)? should be pretty easy to wire up with a common ground wire aswell. Here's a couple of pics of my gun, which surely could use some tidying up. https://drive.google.com/open?id=1-2D4oAQEHhFUM4F9ROmfW6oOpiYpz_iA Though there are 2 wires connected on one pin of the trigger pcb, the rest are daisychained from there. Just as it was from the factory. Also should you need spare pcb's, provide me with a drawing with measurements and holesizes. and i'll design a new one for ya ;) I could even make one that extends rearward which can hold the arduino, mosfet and all the supporting components. You wouldnt happen to have a scanner and a ruler would you? Cause if you lay the gun, or even guns on their (in)side next to the ruler and send me the picture i'll design it to work for that gun. You'd ofcourse have to make sure that it is clean against the glass, so that there's no warping or out of focus places. and i'll make it so you have several through-holes where you can attach the ground wires :D EDIT: @JayBee, if you wanted to have me take a look at your code, make a user on github and make a private repository for it and share it with me :D EDIT2: I dont think you should have the camera board act as the ground for the solenoid as that could actually deprive the camera of power on activation (read. inrush current) what you'd ought to have is a beefy capacitor, maybe even a super capacitor to conserve space right next to the mosfet. --- End quote --- Yeah despite what many people say, hot glue is so convenient when you don't have 3D printer or anything like that. Easy to put, easy to remove, and hold things very well. There is simply a push button for calibration and other functions behind it. Yeah I guess I could have soldered everything on the switch, but again it would have been a pain everytime I want to modify/add anything, and the placement in the gun is not the best to pull all grounds to it (not enough space). This is not the original switch by the way (those kind of gun don't have microswitches), I added them along with a 3D printed supports I bought online :laugh: Nice to know the ref if I need to replace them, thanks ;) Your gun is so tidy compared to mine, good idea to reuse the thick cable to bring all your wires to the board. I guess having a solenoid doesn't help :lol For the common ground with the cam don't worry, the solenoid circuit prevent any of those issues. Sorry I don't have access to my computer lately, couldn't do the schematics or clean my code before sharing it with you yet, it might have to wait 2 more weeks for that :-\ I will send you a PM as soon as it's ready ;) --- Quote from: Howard_Casto on November 15, 2019, 09:16:07 pm ---I'll throw some cents in here: Mice in windows can be setup two ways. Either as a relative position device, which works as you think it does (x number of ticks in a given direction) or absolute position... which I believe gives the x/y position in a 0 to 1024 value in both x and y. Imho neither of these should be used as output to make a modern light gun. Why? Well windows handles mouse input surprisingly poorly. One mouse read in relative position does just fine but absolute position or multiple mice aren't universally supported in games. As a matter of fact, the reason troubleshooter, troubleshooter 2 and demulshooter exist is due to the poor mice support in the typical gun game released on the pc... even some emulators. This is due to the fact that the various apis used to interface with multiple mice are outdated and/or cumbersome. On the other hand if your gun shows up as a joystick you are golden. Most modern games can handle two gamepads just fine and as a quick kludge to support older games, it's pretty easy to use middle ware to move the mouse cursor with a joystick. Multiple mice aren't officially supported in any commercially available games due to the api issues, so going forward, any gun games released on the pc are probably going to have gamepad support, with developers assuming you'll actually use a gamepad since true pc guns are dead atm. That's just fine if you make a new light gun show up as a joystick, but it means more hacking if you have it show up as a mouse. --- End quote --- Thanks, you summed up things quite well. 2 mouses support is indeed a pain to work with, but at the same time there are also many games that don't support absolute coordinate joystick, only relative joystick. When using only one gun, mouse mode it's a lot more simple, and you can use it natively in windows or with any devices that use a mouse. That's mainly why I left the mouse mode as default. During my test, I felt like the joystick mode was also slightly less precise and had more input latency than the mouse, but that might depends on the app, and the library I am using. --- Quote from: Zebra on November 16, 2019, 11:25:50 am ---That explains why arcade developers almost always choose to have the gun I/O board output as an analog joystick, regardless of the gun tech. Modern arcades are PC's under the hood so they probably have to deal with all the same challenges Also, if the plan is to make a gun work with older consoles on HD flat screens, most light gun games already have analog joystick support. A few of the PS2 rail shooters I have tried even offer a choice of relative or absolute positioning (they call it "regular" and "pro" mode). I am relying on this to add light gun support to the few PS2 rail shooters with no gun support once my Sega arcade IR gun is set up. House of the Dead 4 on the PS3 even offers calibration and an option to turn off visible crosshairs when played with an analog joystick. I have high hopes for using my HOD4 arcade gun with it (with the I/O wired to a PS3 six axis pad). Do you have any insight on which mouse mode the Aimtrak uses when set to work as a mouse? It kinds seems like it works in relative mode as it doesn't seem to have the capability of recording accurate coordinates. --- End quote --- Why do people seems to think my firmware only work in mouse mode? Is my first post not clear? It works as a mouse/keyboard, a joystick, or hybrid (mouse motion and joy buttons, useful for the MiSTer FPGA). All using absolute coordinates of course. You can change the mode on the fly at any time with a button combo (see my first post). For the input/output subject, I was speaking about it from the arduino board point of view. So the input here are the IR cam and gun buttons, and the output are the USB port, solenoid & rumble motor. The USB output can be change in any way I want, in this case it simulates a mouse, a keyboard and a joystick, all at the same time. On the IR cam side, as you can imagine it doesn't provide any screen coordinates, but instead gives me up to 4 IR led 2D coordinate (which are placed in the middle of each TV side, which is way better than putting them in the corners). So with those I have to do a lot of calculation (mostly trigonometry) to do the aspect ratio/angle correction and get the aiming coordinates, while keeping everything fast enough to not add input latency. It was the main challenge and what took me countless hours, since keeping those calculation accurate in any situation with the limited arduino power is far from easy. What hyo2012 was asking was to plug a real analog gun as input instead of the cam. Doing that would require to completely bypass all the IR cam calculation, which is pretty much the core of my firmware. It's doable of course, but then I would have to reserve 2 analog input (which I can't because of all the input the GCon 2 needs) for it and deeply modify my code. It would be faster to do a whole new firmware instead. By the way, I received the lightgun I ordered from ebay (the one from the link you sent me), and it's actually using a motor instead of a solenoid to trigger to recoil. It's awesome for auto mode, but not that great for one shot. Due to the way the motor has to turn to trigger it, it's slower to react and the impact backward is weaker than forward. But overall it's a great gun to use with my CRT and PSX/Saturn, I think I will just use it like that instead of modding it :lol |
Navigation |
Message Index |
Next page |
Previous page |