Main > Lightguns
SAMCO DIY Arduino Powered IR Light Gun
<< < (35/37) > >>
ThatOneSeong:

--- Quote from: famichiki on June 06, 2023, 09:55:48 pm ---Do both the 3v and 5v 32u4 comfortably run with additional processor headroom for custom tweaks to the code, such as adding recoil solenoids etc? Or are they already maxxed out handling the tracking? I have a few ideas I want to incorporate.

--- End quote ---
Late to this I know, but if you're still working on this, I would be highly interested in the results. I plan to have a solenoid option on my second gun, so it would be nice to have recoil support in SAMCO (and further close the gap between it and Gun4IR).Perhaps it could be contributed to Prow7's fork, since it's more performant and supports some of the more powerful/bigger code space boards compared to the 32u4.
samco:
Hi Guys, from my experience most of the emulators I use (PCSX2, pretty much everything in Recalbox) 2 guns at the same time isn't a problem with a bit of configuration. However I have heard of people having trouble in Teknoparot which does want an individual VID for each gun. If you need to you can do it by updated the board.txt file in Arduino for each gun. Found a tutorial here, if ya need it...

https://www.shellhacks.com/arduino-change-devices-vid-pid-name/

I have been doing a bit of coding lately working with a few other guys so hopefully some of those features that everyone been after for so long are too far off.
ThatOneSeong:

--- Quote from: samco on September 06, 2023, 10:06:54 pm ---Hi Guys, from my experience most of the emulators I use (PCSX2, pretty much everything in Recalbox) 2 guns at the same time isn't a problem with a bit of configuration. However I have heard of people having trouble in Teknoparot which does want an individual VID for each gun. If you need to you can do it by updated the board.txt file in Arduino for each gun. Found a tutorial here, if ya need it...

https://www.shellhacks.com/arduino-change-devices-vid-pid-name/

I have been doing a bit of coding lately working with a few other guys so hopefully some of those features that everyone been after for so long are too far off.

--- End quote ---
You tease!  ;D Ah, but I look forward to it. I should be getting my second gun in tomorrow to do a custom mod, which should be fun.
On a sidenote, I did finally get around to upgrading my IR lights setup: borrowing from the GUN4IR spec, I tied together some high power black LED emitters, triplets of three tied to 5.6 ohm resistors each on a split power config, all run through one USB port on my TV. In lieu of proper mounting equipment I didn't have, to keep them steady I gutted the boards from the knockoff Wii sensor bars and put in the new boards - just needing some cable management and a bit of patience. Hacky, but eff it if it works. Pics here. I guess the plus side of this is I could also try GUN4IR at some point now?
But yeah, been super fun getting back to playing these games (again, again). Always happy to hear more's happening on this front, love to see good open source projects blossom.
dabone:
Ok, another quick question.

Is it possible to do chorded key combos?
Like the ipac? i.e. press and hold select, and then press start = esc, but select and start having different values.

ThatOneSeong:

--- Quote from: dabone on October 24, 2023, 10:01:34 am ---Ok, another quick question.

Is it possible to do chorded key combos?
Like the ipac? i.e. press and hold select, and then press start = esc, but select and start having different values.

--- End quote ---
Prow's fork uses button masks, which does exactly that (combinations of buttons access different functions). They're all hooked into different subroutines atm, but I imagine you could probably add one that sends an escape keypress. I myself have yet to try this.
UPDATE: if you're so interested in adding this (again, specific to the aforementioned Prow's fork), in the early section declaring the button combo masks, add:

--- Code: ---// button combo to send an escape keypress
constexpr uint32_t EscapeKeyBtnMask = BtnMask_Reload | BtnMask_Start;
--- End code ---
(Note: This is just an example for my Guncon 2-compatible gun, you could change the combination to whatever you like. Works best if the EnterPauseModeBtnMask is a different key combo, like BtnMask_Reload | BtnMask_Select

And then in the ExecRunMode function (the main code), preferably before the EnterPauseModeButtonMask, add:

--- Code: ---        if(buttons.pressedReleased == EscapeKeyBtnMask) {
            Keyboard.releaseAll();                                  // Clear out keyboard keys (since Seong's default is pressing start, which is num1)
            delay(1);                                               // Wait a bit. Required for the escape keypress to actually register.
            Keyboard.press(KEY_ESC);                                // PUSH THE BUTTON.
            delay(100);                                             // Wait another bit. Required for the escape keypress to actually register, and mitigate sticking.
            Keyboard.release(KEY_ESC);                              // Aaaaand release.
        }
--- End code ---
It should work. Granted, I've noticed the button combos need a few tries to register sometimes, but it'll activate after the last button in the sequence is pressed.

As an aside, I have been working on adding rumble motor and solenoid activation support to the fork myself. So far I have the former working for feedback when shooting off-screen (needs tuning just fixed it in fact!); with the latter coded up and ready in theory, but I'm still missing parts for the solenoid breakout board itself. Things keep getting lost in transit. :< But ideally, it should close the gap in functionality with GUN4IR.
Navigation
Message Index
Next page
Previous page

Go to full version