Main > Lightguns

QMamehook - The Cross-platform MAMEHOOKER-compatible alternative for PCLightguns

(1/7) > >>

ThatOneSeong:
Coming off of the recent GUI release for my GUN4ALL system, since I was learning QT at the time, I had a passing thought--or, really, an impatient desire for something I'd wanted ever since I initially implemented MAMEHOOKER support.
Something along the lines of...
How easy could I make that, but for MAME's newer network output standard so I can use it on my Linux system?

The answer: in one day.
Meet QMamehook:
the most "we have MAMEHOOKER at home" thing you'll ever witness.

The whole purpose of this app is to do one thing, and one thing semi-cromulently: route MAME's network feedback output to light guns.

The perks are that QMamehook is:
* Cross-platform: Works just as well on Linux as it does on Windows.
* Modern: Made in C++ and built with the modern QT framework, supporting both QT5 & QT6.

* Simple: Connect your guns, launch QMamehook, load up MAME (or anything using the MAME network-compatible standard), and annoy your neighbors with game-controlled force feedback. No admin privileges or COM port configuration needed.
* (More or less) a Drop-in Replacement: Mainly useful for Linux users who can't use MAMEHOOKER with their native emulators (yes, there's Wine, but... it's complicated lol), QMamehook uses MAMEHOOKER config files directly - no need to change anything, other than dragging them into a different folder!That being said, don't go expecting to replace MAMEHOOKER for everything:
* It's only made for light guns: it only looks for and supports the "cmo/e/w #"-type commands, and it only outputs to serial devices.
* Only works with the MAME Network Output standard: this means MAME (standalone and RetroArch cores), Flycast (standalone) and Windows games/emulators hooked with DemulShooter v12.0+ are compatible. TeknoParrot is not supported until they also follow MAME's network output standard.
* You will have to change one thing: QMamehook indexes COM devices based on how many are detected at start time, not based on physical COM address like what you may be used to in MAMEHOOKER (i.e: all port writes start at Port 1, up to Port 4). So any com port commands will need to be adjusted so the number correlates directly to its intended player slot.
* It's simple to a fault: no app-specific configuration of any kind.
* It's made by an idiot: seriously, I did this as a challenge to myself as a complete newbie to QT--the whole thing is one C++ class rn and the final output is ~50kb. It's really that simple.Video demonstration of (a somewhat earlier edition of) the program running on my Linux desktop here (shamelessly pulled from my social): https://mstdn.games/@ThatOneSeong/111979386248741717

So, yeah! If you have any comments or suggestions, or would like to contribute to this alternative, uh... leave a comment here or post on the repo? I primarily made this for myself for my own personal use, but I appreciate any feedback regardless!
And for any comments about how bad the code is: be kind, this is literally the first of two things I ever made from scratch for desktops.

argonlefou:
Oh, this is a great news.
I had this in mind also (cross platform, network output to replace old windows messaging....) but the main stop for me was the non-access to all led/hardware materials supported by other software

A lot of people have leds on top of lihtguns, so it may be a no-go for them to switch software
Or they'll need to run both at the same time, if COM port are differents.

As for DemulShooter, I'll add network output like MAME....this was also on my mind for some time ;)

I'll report back once I'll be able to test  :applaud:

kim_sama_999:
Will my previous Mamehooker ini's work with this? And will newer emulated Mame games will work with it?

bandicoot:
a LEDWIZ support should be cool .
Thnaks for your works

ThatOneSeong:

--- Quote from: kim_sama_999 on February 26, 2024, 02:56:57 am ---Will my previous Mamehooker ini's work with this? And will newer emulated Mame games will work with it?

--- End quote ---
Yep! I've made sure to test with mamehooker inis I've found floating around on the forums here. It just so happened that Mamehooker's config syntax fit perfectly with QT's settings framework. %s% and | syntax behaves the same.

On the technical side, the only thing that should be changed are the port designations for the com port write/open/end - with this program, the com ports map always starts from 1 for the first serial/gun device detected, and goes up linearly based on number of players, regardless of physical number on Windows. I made sure that it looks for and filters specifically my gun system and GUN4IR's based on the vendor ID (which I believe in JB's case is hexadecimal 0x2341?), though that could be wrong as I uh, don't personally use them.
EDIT: to clarify, though I didn't check this, I believe the devices are still indexed based on COM device number, from lowest to highest, so I guess you'd still have to tinker with fixed COM port settings if you want to reserve a fixed relative order for multiple guns. But there will always be at least a port 1 for the first valid gun device.


--- Quote from: bandicoot on February 26, 2024, 05:25:00 am ---a LEDWIZ support should be cool .
Thnaks for your works

--- End quote ---
I don't personally have or am aware of an LEDWiz, which would make that difficult for me to implement. Aside from that, LEDWiz looks to be hardware designed for actual arcade cabinets, which is also something I couldn't personally take advantage of!
Hence the disclaimers, that MAMEHOOKER would still be a better fit if you have a more elaborate setup - this is mostly for home users or normies who want force feedback sync without much other frills.


--- Quote from: argonlefou on February 26, 2024, 02:19:15 am ---Oh, this is a great news.
I had this in mind also (cross platform, network output to replace old windows messaging....) but the main stop for me was the non-access to all led/hardware materials supported by other software

A lot of people have leds on top of lihtguns, so it may be a no-go for them to switch software
Or they'll need to run both at the same time, if COM port are differents.

As for DemulShooter, I'll add network output like MAME....this was also on my mind for some time ;)

I'll report back once I'll be able to test  :applaud:
--- End quote ---
Aaah, that's one heck of an endorsement to get, really! (^^;

But yeah, having DemulShooter support the network output would be wonderful! And I also just checked to be sure--using the native version of this tool on Linux for the Windows build of MAME through Wine works the same as the native version, which means it would make DS work much easier for the supported Windows/Tekno/JConf games running on Linux through e.g. Proton or Wine.

Though, like I said, I'm not making this necessarily to replace Mamehooker in all aspects--other devices support outside of pure lightguns would be tricky, given I really don't own any of the other devices. It might be possible to support them in the future, and I would be open to that, assuming that communicating with those other devices aren't too difficult (I'd definitely have to clean the reading method up a bit to accommodate more than just Lightgun devices, or the code will be even more of a mess than it is ahaha).
But hey, never say never, right? Still, thank you for the kind words! It should work with Wendies machines and multiple guns.

Navigation

[0] Message Index

[#] Next page

Go to full version