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

Poll

-- deleted poll --

-- deleted poll --
0 (0%)
-- deleted poll --
0 (0%)

Total Members Voted: 0

  

Author Topic: GUN4IR - The Ultimate 4 Points Lightgun System  (Read 390905 times)

0 Members and 2 Guests are viewing this topic.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #400 on: February 18, 2020, 02:34:01 pm »
I have this problem flashing new firmware:

Flash Normal or Test firmware (N: Normal/T: Test)?n

Stato del dispositivo COM6:
---------------------------
    Baud:                 1200
    Parità:               None
    Bit di dati:          8
    Bit di stop:          1
    Timeout:              OFF
    XON/XOFF:             OFF
    Sincronizzazione CTS: OFF
    Sincronizzazione DSR: OFF
    Sensibilità DSR:      OFF
    Circuito DTR:         OFF
    Circuito RTS:         ON


In attesa da 0 secondi. Per uscire, premere CTRL+C...

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
avrdude: ser_open(): can't open device "\\.\COM4": Impossibile trovare il file specificato.

avrdude done.  Thank you.

with 1.75 flasher renaming file hex:


Flash Normal or Test firmware (N: Normal/T: Test)?n

Stato del dispositivo COM6:
---------------------------
    Baud:                 1200
    Parità:               None
    Bit di dati:          8
    Bit di stop:          1
    Timeout:              OFF
    XON/XOFF:             OFF
    Sincronizzazione CTS: OFF
    Sincronizzazione DSR: OFF
    Sensibilità DSR:      OFF
    Circuito DTR:         OFF
    Circuito RTS:         ON


In attesa da 0 secondi. Per uscire, premere CTRL+C...

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: ser_drain(): read error: Operazione di I/O terminata a causa dell'uscita dal thread oppure della richiesta di un'applicazione.

avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

avrdude: butterfly_recv(): programmer is not responding
Reading | ################################################## | 100% 0.18s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

Reading |                                                    | 0% 0.00savrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

avrdude: butterfly_recv(): programmer is not responding
Reading | ################################################## | 100% 0.10s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

Reading |                                                    | 0% 0.00savrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

avrdude: butterfly_recv(): programmer is not responding
Reading | ################################################## | 100% 1.14s

avrdude: Device signature = 0xffffff (probably .avr8x_mega)
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: ser_send(): write error: sorry no info avail
avrdude: ser_recv(): read error: Il dispositivo non riconosce il comando.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader

avrdude done.  Thank you.


Helpmeeeeee please... :D

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #401 on: February 18, 2020, 02:46:39 pm »
Kill_one, the timeout has changed to 6 seconds, and it looks like it's a problem with your setup.
Change the timeout to 3 seconds in the bat file.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #402 on: February 18, 2020, 03:00:57 pm »
The rumble motor i'm using functions like a solenoid, when it rumbles it moves three gears which in turn pull the gun shell back to simulate the recoil.
Since i am only using rumble, then i should use the solenoid pin instead of the rumble pin, right?
Otherwise it won't work when shooting on screen?
I'd test this myself but i'm still waiting for the parts to arrive, so i'd like to make sure i'm doing this right.
Btw, the transistor isn't available at the moment, i can get the mosfet instead, do you think that would be an issue?
« Last Edit: February 18, 2020, 03:06:29 pm by Foxhole »

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #403 on: February 18, 2020, 04:10:30 pm »
Kill_one, the timeout has changed to 6 seconds, and it looks like it's a problem with your setup.
Change the timeout to 3 seconds in the bat file.

It gave me error even with the version 1.75 set to 3s, I solved it using the flasher 1.70 on the second attempt ...I have no idea why :)


kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #404 on: February 18, 2020, 04:24:09 pm »
The rumble motor i'm using functions like a solenoid, when it rumbles it moves three gears which in turn pull the gun shell back to simulate the recoil.
Since i am only using rumble, then i should use the solenoid pin instead of the rumble pin, right?
Otherwise it won't work when shooting on screen?
I'd test this myself but i'm still waiting for the parts to arrive, so i'd like to make sure i'm doing this right.
Btw, the transistor isn't available at the moment, i can get the mosfet instead, do you think that would be an issue?
@Foxhole
I too have one like this but I gave it up for reasons of space ... it is because the engine must be powered by 9v being guncon2 compatible for ps2, instead which lightgun do you have?
Were you able to insert the IR camera into the barrel?

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #405 on: February 18, 2020, 04:48:22 pm »
This is a ems topgun2, the motor works with 5V 100ma.
As for the barrel, i will have to do some drilling to make it fit.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #406 on: February 18, 2020, 07:50:47 pm »
Kill_one, the timeout has changed to 6 seconds, and it looks like it's a problem with your setup.
Change the timeout to 3 seconds in the bat file.

It gave me error even with the version 1.75 set to 3s, I solved it using the flasher 1.70 on the second attempt ...I have no idea why :)
Foxhole is right, your board doesn't seem to like the 6 seconds timing.
Mine is quite tolerant and works with both 3 and 6 seconds, but it seems like it's a bit random.
I will modify my code to do a test at 3, and if nothing found, another one at 6.

@Foxhole no problems to connect to the solenoid pin, it works the same as the rumble pin only the timings are different (but can be modified to fit your setup).
You can of course use the mosfet for the motor too, but it's a bit overkill xD


Envoyé de mon Pixel 3 en utilisant Tapatalk


kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #407 on: February 19, 2020, 05:47:44 am »
but to use the burst (autofire) holding the trigger in the games you have to use only mamehooker?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #408 on: February 19, 2020, 07:23:48 am »
but to use the burst (autofire) holding the trigger in the games you have to use only mamehooker?
You don't need mamehooker, fullauto mode is activated when holding the trigger more than 450ms.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #409 on: February 19, 2020, 07:26:39 am »
You don't need mamehooker, fullauto mode is activated when holding the trigger more than 450ms.

So maybe it depends on the type of game? Because I had tried with Time Crisis but when I kept the trigger pressed only the solenoid was activated and in the game it didn't fire

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #410 on: February 19, 2020, 07:29:43 am »
Time crisis doesn't have burst shots.

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #411 on: February 19, 2020, 07:30:50 am »
I think he means that the solenoid doesn't react to the game itself. for that he will need mamehooker.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #412 on: February 19, 2020, 07:41:50 am »
So maybe it depends on the type of game? Because I had tried with Time Crisis but when I kept the trigger pressed only the solenoid was activated and in the game it didn't fire
Ah I see what you meant.
So by default the feedback is coming from the gun itself, and it won't care about what is happening in game.
You indeed need to use mamehooker to make the recoil react only when the game tells it to.
And it will depends of the game, some games originally don't have any feedback commands.
I haven't got time yet to prepare all the files for mamehooker yet, but I already got the one for Time Crisis, I can upload it once you got mamehooker setup and running.

Time crisis doesn't have burst shots.
Yes you're right. Good thing tho is that mamehooker works great with it, it makes it react exactly like the real arcade machine  ;D
« Last Edit: February 19, 2020, 07:45:34 am by JayBee »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #413 on: February 19, 2020, 07:48:47 am »
By the way guys, are you interested in a auto reload function?
I saw some guns often have like a 6 shots autoreload, would that be something you would be using?

Foxhole

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 287
  • Last login:March 04, 2024, 04:36:28 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #414 on: February 19, 2020, 07:51:30 am »
Personally, I'm more of a purist, if it wasn't in the game then i don't use it, but i think this deserves a poll, in case there are more people interested.

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #415 on: February 19, 2020, 07:57:58 am »
Personally, I'm more of a purist, if it wasn't in the game then i don't use it, but i think this deserves a poll, in case there are more people interested.
Agreed. Will add it to my list of polls for the upcoming features :lol

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #416 on: February 19, 2020, 09:12:15 am »
By the way guys, are you interested in a auto reload function?
I saw some guns often have like a 6 shots autoreload, would that be something you would be using?


Automatic recharge as an option that can be activated and deactivated like the other functions would not be bad to have it ...: D

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #417 on: February 19, 2020, 09:15:24 am »
I haven't got time yet to prepare all the files for mamehooker yet, but I already got the one for Time Crisis, I can upload it once you got mamehooker setup and running.
so does it take a configuration file for each game? tonight try to configure it following the guide of the official website, if you start posting the files for Time crisis or the games you have already ready it wouldn't be bad :)
thanks a lot!!!

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #418 on: February 19, 2020, 09:39:14 am »
so does it take a configuration file for each game? tonight try to configure it following the guide of the official website, if you start posting the files for Time crisis or the games you have already ready it wouldn't be bad :)
thanks a lot!!!
I have only 2 ini files fully setup so far, the 2 I have been testing mamehooker with; Time Crisis and Terminator 2 8)
Time crisis uses the solenoid recoil when firing.
Terminator 2 is using a constant fullauto mode with variable speed, which doesn't play well with the solenoid (and might burn it pretty fast).
So it uses the rumble motor instead, which works great.

I attached the files to this post, put both ini files in the ini\MAME subfolder of mamehooker (but check if it's working with mame first)
Don't forget to make your arduino port COM1 for gun1 and COM2 for gun2 (in the device manager), or else it won't work.

Note that it's an unfinished experimental feature, it works good as it is but might change in a future update.
I will provide new files when needed.
« Last Edit: February 19, 2020, 09:45:11 am by JayBee »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #419 on: February 19, 2020, 10:19:02 am »
I added a poll about the upcoming RGB led support if you are interested  ;)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #420 on: February 19, 2020, 11:09:17 am »
I added a poll about the upcoming RGB led support if you are interested  ;)

Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
« Last Edit: February 19, 2020, 11:42:19 am by kill_one »

janderclander14

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:February 08, 2024, 10:11:10 am
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #421 on: February 19, 2020, 12:13:49 pm »
I added a poll about the upcoming RGB led support if you are interested  ;)

An alternative to a standard RGB, which requires 3 PWM outputs, is to use a single Neopixel led, which only requires one digital output because it has an internal controller that interprets the digital data into colors and levels. They also operate on 5V. You may use SMD format leds or also through hole leds:

https://www.adafruit.com/product/1938
https://www.adafruit.com/product/1655

You can easly program them by using standard Arduino libraries, such as Adafruit's neopixel.

And, by the way, if you run out of pins, there is the possibility of desoldering the two RX and TX leds of the Arduino Micro board and repurpose them as digital outputs:

https://golem.hu/article/pro-micro-pinout/
https://golem.hu/guide/pro-micro-upgrade/

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #422 on: February 19, 2020, 12:20:02 pm »



Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
It means you can't have both, since they are using the same pins.
If you need those buttons you won't be able to use the led at all. Or not use those buttons at all.
The question is more about which button/pins should we sacrifice or move when using the LED.


Envoyé de mon Pixel 3 en utilisant Tapatalk


JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #423 on: February 19, 2020, 12:31:41 pm »


I added a poll about the upcoming RGB led support if you are interested  ;)

An alternative to a standard RGB, which requires 3 PWM outputs, is to use a single Neopixel led, which only requires one digital output because it has an internal controller that interprets the digital data into colors and levels. They also operate on 5V. You may use SMD format leds or also through hole leds:

https://www.adafruit.com/product/1938
https://www.adafruit.com/product/1655

You can easly program them by using standard Arduino libraries, such as Adafruit's neopixel.

And, by the way, if you run out of pins, there is the possibility of desoldering the two RX and TX leds of the Arduino Micro board and repurpose them as digital outputs:

https://golem.hu/article/pro-micro-pinout/
https://golem.hu/guide/pro-micro-upgrade/

Yeah I thought about the addressed RGB led too, it would be very convenient, but there is a problem with this option I couldn't find a solution to; I won't have space to add another library to my sketch, even with heavy optimization I'm already using 90% of the very limited Arduino space ;)

The other solution of hacking new pins is very nice too, but definitely not user friendly

Envoyé de mon Pixel 3 en utilisant Tapatalk


kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #424 on: February 19, 2020, 12:45:25 pm »



Leave the button pins as it is now, and disable the pedal, start and dpad right buttons when the RGB led is active, are the keys deactivated only when the RGB LED is active?
It means you can't have both, since they are using the same pins.
If you need those buttons you won't be able to use the led at all. Or not use those buttons at all.
The question is more about which button/pins should we sacrifice or move when using the LED.
From what I understand the only pro micro PWM pins are 3-5-6-9-10,
the only pin that can be sacrificed without losing features is only the start button since most games start by shooting, you could consider using a single-pin LED and maybe add the A + Select combo for the Start button: D

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #425 on: February 19, 2020, 12:48:02 pm »
Yeah I thought about the addressed RGB led too, it would be very convenient, but there is a problem with this option I couldn't find a solution to; I won't have space to add another library to my sketch, even with heavy optimization I'm already using 90% of the very limited Arduino space ;)
AAAAAHHHHHH...rgggghhhh!!! :D

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #426 on: February 19, 2020, 01:37:30 pm »
The other solution of hacking new pins is very nice too, but definitely not user friendly

also solder the wires to the buttons on the guncon board is not user friendly... :)

in my opinion you should evaluate if it is feasible to use the 2 additional pins of the led resistances and the Start button! : D

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #427 on: February 19, 2020, 08:13:26 pm »
Thanks for your suggestions ;D
You didn't have enough space to use Dupont wires for your Arduino?
I agree that resolder the buttons might be a pain.

But let me explain the reason why I want to do 2 different firmwares;
The GCon2 or similar guns with DPad use pretty much all the pins, so it will have a specific firmware that don't remove any button, but will not have led support.
The other more simple models of gun rarely have more than 3~4 buttons (GCon1, Virtua gun...), but still might use the pedal button, so for them I will do another firmware that has led support, and uses a different pin for the pedal.

Now for why I made this poll;
Is there any guns out there that don't have dpad but still have start/select buttons?
If so, for the second firmware I will have to change more of the pinout.
In that case the pinout for both firmwares will be quite different, which might lead to confusion/errors, and to damaged Arduino.

But if some people already fully wired a GCon2 like gun and can't change it easily, I might have to leave the pinout untouched for the 11 buttons firmware anyway
« Last Edit: February 19, 2020, 08:42:27 pm by JayBee »

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #428 on: February 19, 2020, 08:55:04 pm »
Regarding the automatic reload function, would it be possible to add an autofire function when the trigger is kept pressed? Maybe holding down unloaded the whole magazine and then the automatic reloading starts while if you do not keep it pressed it fires one shot at a time and you have to reload manually? : D

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #429 on: February 19, 2020, 09:23:42 pm »
Regarding the automatic reload function, would it be possible to add an autofire function when the trigger is kept pressed? Maybe holding down unloaded the whole magazine and then the automatic reloading starts while if you do not keep it pressed it fires one shot at a time and you have to reload manually? : D
It could be possible, but not as a default option, since it would prevent games that need trigger holding to work correctly.
But I guess I can add this to mamehooker if needed at some point?

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #430 on: February 20, 2020, 02:45:08 am »
But I guess I can add this to mamehooker if needed at some point?

I have installed mamehooker, configuring arduino com1 port, insert ini file to mamehooker ini mame directory and setting of tutorial mamehooker website, but in supported device no device is detected

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #431 on: February 20, 2020, 03:14:07 am »
I have installed mamehooker, configuring arduino com1 port, insert ini file to mamehooker ini mame directory and setting of tutorial mamehooker website, but in supported device no device is detected
It's normal, Mamehooker doesn't "recognize" anything on serial ports.
With my ini files it just sends raw data to COM1 and doesn't care about what the device is  ;)

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #432 on: February 20, 2020, 03:27:38 am »
It's normal, Mamehooker doesn't "recognize" anything on serial ports.
With my ini files it just sends raw data to COM1 and doesn't care about what the device is  ;)

so should it work already? which command should be entered to test if it works?

should something be set in mame.ini?
« Last Edit: February 20, 2020, 03:48:05 am by kill_one »

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #433 on: February 20, 2020, 03:54:26 am »
It's normal, Mamehooker doesn't "recognize" anything on serial ports.
With my ini files it just sends raw data to COM1 and doesn't care about what the device is  ;)

so should it work already? which command should be entered to test if it works?

should something be set in mame.ini?
Yeah if you configured mamehooker and mame correctly, it should work.
I would recommend you to test it without ini files first, to see if mamehooker is reacting to mame and creates ini files from it.
If it doesn't, you missed something.

kill_one

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 138
  • Last login:March 07, 2023, 01:16:21 pm
  • I want to build my own arcade controls!
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #434 on: February 20, 2020, 04:01:50 am »
Yeah if you configured mamehooker and mame correctly, it should work.
I would recommend you to test it without ini files first, to see if mamehooker is reacting to mame and creates ini files from it.
If it doesn't, you missed something.

so i run mame hooker and i run mame then i launch a game and should i create an ini of the game in mame ini dir in mame hooker?

in groovymame 0.211 I have not set anything related to the outputs is it already configured for this?

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #435 on: February 20, 2020, 04:04:53 am »
Yeah if you configured mamehooker and mame correctly, it should work.
I would recommend you to test it without ini files first, to see if mamehooker is reacting to mame and creates ini files from it.
If it doesn't, you missed something.

so i run mame hooker and i run mame then i launch a game and should i create an ini of the game in mame ini dir in mame hooker?

in groovymame 0.211 I have not set anything related to the outputs is it already configured for this?
Yeah it should work.
If not please check mamehooker and mame help.

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #436 on: February 20, 2020, 05:41:47 am »
* 2020/02/18 - 1.76
- reworked the buttons management again and fixed the remaining issues (with the calibration for instance)
- fixed the bug with the feedback when offscreen reload is disabled, now it should trigger the solenoid (the way it works remain unchanged when offscreen reload is enabled)
- modified the flashing batch file to be more compatible (detects bootloader whatever the model, and waits for 6 seconds now)

I removed the installation of avrduse, removed the audrino ide and reinstalled it.

I have put the drivers for the pro micro which is the board I have on.
The batch file appears to find it at first but then after it starts, I just get the error "Unable to start Program"
Screen shot attached

Here is the output from the batch file:
---
Flash Normal or Test firmware (N: Normal/T: Test)?n

Status for device COM11:
------------------------
    Baud:            1200
    Parity:          None
    Data Bits:       8
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     OFF
    RTS circuit:     ON


Waiting for 0 seconds, press CTRL+C to quit ...
Press any key to continue . . .
---
Which version of windows and arduino IDE do you have?
You don't have any other arduino device plugged at the same time?
What happens if you try to flash an empty sketch in arduino IDE?
If flashing an empty sketch works, try replacing the avrdude.exe and avrdude.conf of my package by the ones in your own arduino folders:
Code: [Select]
C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17Inside the bin and etc subfolders (replace the <User folder> by your own folder name)

I m using Windows 10 pro and the latest version of the Audrino IDE which is 1.8.12
This is the only Audrino plugged in.
Flashing an empty sketch works fine.
There is no avr folder under the C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\ directlry (i replaced the <user folder>) the dir structure is ther and there are other folders under that level but no avrdude folder.

https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #437 on: February 20, 2020, 10:28:32 am »
I m using Windows 10 pro and the latest version of the Audrino IDE which is 1.8.12
This is the only Audrino plugged in.
Flashing an empty sketch works fine.
There is no avr folder under the C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\ directlry (i replaced the <user folder>) the dir structure is ther and there are other folders under that level but no avrdude folder.

In this folder there should be 2 subfolders (bin and etc), one containing avrdude.exe, and the other one containing avrdude.conf
You don't have those subfolders?
Is your windows 32 or 64bits?
« Last Edit: February 20, 2020, 11:09:38 am by JayBee »

lightgungamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:September 24, 2020, 02:43:28 am
  • I love playing Light Gun Games
    • LightgunGame.com
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #438 on: February 20, 2020, 10:45:50 am »
* 2020/02/18 - 1.76
- reworked the buttons management again and fixed the remaining issues (with the calibration for instance)
- fixed the bug with the feedback when offscreen reload is disabled, now it should trigger the solenoid (the way it works remain unchanged when offscreen reload is enabled)
- modified the flashing batch file to be more compatible (detects bootloader whatever the model, and waits for 6 seconds now)

I removed the installation of avrduse, removed the audrino ide and reinstalled it.

I have put the drivers for the pro micro which is the board I have on.
The batch file appears to find it at first but then after it starts, I just get the error "Unable to start Program"
Screen shot attached

Here is the output from the batch file:
---
Flash Normal or Test firmware (N: Normal/T: Test)?n

Status for device COM11:
------------------------
    Baud:            1200
    Parity:          None
    Data Bits:       8
    Stop Bits:       1
    Timeout:         OFF
    XON/XOFF:        OFF
    CTS handshaking: OFF
    DSR handshaking: OFF
    DSR sensitivity: OFF
    DTR circuit:     OFF
    RTS circuit:     ON


Waiting for 0 seconds, press CTRL+C to quit ...
Press any key to continue . . .
---
Which version of windows and arduino IDE do you have?
You don't have any other arduino device plugged at the same time?
What happens if you try to flash an empty sketch in arduino IDE?
If flashing an empty sketch works, try replacing the avrdude.exe and avrdude.conf of my package by the ones in your own arduino folders:
Code: [Select]
C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17Inside the bin and etc subfolders (replace the <User folder> by your own folder name)

I m using Windows 10 pro and the latest version of the Audrino IDE which is 1.8.12
This is the only Audrino plugged in.
Flashing an empty sketch works fine.
There is no avr folder under the C:\Users\<User folder>\AppData\Local\Arduino15\packages\arduino\tools\ directlry (i replaced the <user folder>) the dir structure is ther and there are other folders under that level but no avrdude folder.

In this folder there should be 2 subfolders (bin and etc), one containing avrdude.exe, and the other one containing avrdude.conf
You don't have those subfolders?
Is your windows 32 or 64bits?
I don’t have the avrdude folder. It’s windows 10 64 bit.


Sent from my iPhone using Tapatalk
https://LightGunGamer.com - every Lightgun game and how to play them
Dolphin Emulator

JayBee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:Yesterday at 10:09:30 am
  • Creator of the GUN4IR
Re: JayBee DIY 4 IR Led Lightgun System (no calibration needed)
« Reply #439 on: February 20, 2020, 10:48:03 am »

I don’t have the avrdude folder. It’s windows 10 64 bit.


Sent from my iPhone using Tapatalk

I never talked about any avrdude folder, but bin and etc folders. You don't have them?
« Last Edit: February 20, 2020, 10:52:23 am by JayBee »