SeongGino / ir-light-gun-plus

Arduino powered IR light gun - with force-feedback additions, MAMEHOOKER support, quality of life changes, and (possibly) dubious code quality!
GNU Lesser General Public License v2.1
27 stars 3 forks source link

MAMEHOOKER support (& misc feature requests) #1

Closed cmjdbb closed 8 months ago

cmjdbb commented 10 months ago

I'm glad to see that you're continuing with this project, and hope to add some of the following features so that you can possibly surpass GUN4IR, 1: Add COM to PC communication so that you can use mamehook to synchronize the game's vibration. 2: Add RP2040 save Settings 。 MAMEHOOKER.docx

SeongGino commented 10 months ago

Seriously?

EDIT: Assuming my patch was bad, I uploaded a new version:

https://github.com/SeongGino/arduino-pico/releases/download/3.6.1-fix/package_rp2040_fix_index.json

Uninstall the core labeled "(TRI)", install the one labeled "Fix", and make sure you're selecting the device in the boards list under the "Raspberry Pi Pico/RP2040 (Fix)" category.

If that doesn't work... Well, can't do much else, other than wait on resolution from upstream (of the Arduino core).

It might be possible to use the Pico USB stack, but it would also necessitate another minor refactoring of the input libraries to make it compatible.

cmjdbb commented 9 months ago

Compile error with 3.6.1-fix.

SeongGino commented 9 months ago

Can't reproduce, please clarify the error you're receiving. Remember that we're still using TinyUSB so you'll have to re-set that setting.

cmjdbb commented 9 months ago

3.6.1 can be used to compile normally. If 3.6.1-fix is used, error exec: "/bin/arm-none-eabi-g++": file does not exist

cmjdbb commented 9 months ago

It can be compiled now, but testing still results in crashes.

SeongGino commented 9 months ago

If so, then what I said before still stands and it's beyond my control, unfortunately.

How long does it take for the board to lock up for you? And what exactly are you testing it with...?

cmjdbb commented 9 months ago

I tested Transformers: Human Alliance using Win10 and DemuShooter, and it crashes within two to three minutes.

SeongGino commented 9 months ago

This might be a long shot, but have you tried playing with the serial baud rate any? We've been trying 9600 baud, but would say 4800 (~2ms) or 2400 (~4ms) baud be more stable?

I wouldn't prefer doing this as a definitive fix, but it's one way to mitigate potential crashes for the moment.

You would have to tweak the setting for the gun side on the sketch here: https://github.com/SeongGino/ir-light-gun-plus/blob/80240ec88113a0b72c580c2897628e401460a30d/SamcoEnhanced/SamcoEnhanced.ino#L699 And likewise in your MameStart commands on the mamehook side.

SeongGino commented 8 months ago

Since the feature (or at least the main one of this issue) has been formally added and the only part of concern left is stability, I'll be closing this in favor of #3 wrt stability