Main > Software Forum
LED control from Mame--in over my head again?
Howard_Casto:
I've thought about it before. I'm not sure if it'd be the best idea to put it into mamehooker itself. Because some games send data so quickly, I've made a note to make sure that, at idle at least, mh is doing as little as possible. This ensures that mh is always ready, at least, when data comes in.
Direct-X controllers, at least, are easy enough to add. Generally speaking you can setup a passive polling system that send "fire events" whenever data changes.
Keyboards, however, require active polling. It doesn't take THAT much time to do it, but it is some.
It isn't difficult, I already do it for the keyboard led function, but I only poll the current keyboard state when I'm about to toggle the leds (to make sure they aren't already on).
It would require a significant amount of code to make it nice and neat like the outputs are though. I'd have to make a whole new section in the ini files and somehow kludge it into the current output state function so that key pressing would behave as an output.
But I'm rambling.....
My point is, I'm looking into it, but don't expect it anytime soon. It'd take a solid week of coding for me to come up with a system that I like.
Howard_Casto:
Bah! 137u1 came out this morning! I sure picked the right time to submit that stuff! I'll wait another u release, but I may have to re-submit it. :badmood:
1UP:
--- Quote ---Direct-X controllers, at least, are easy enough to add. Generally speaking you can setup a passive polling system that send "fire events" whenever data changes.
--- End quote ---
Does this mean that something already exists in MH to do this, or are you talking about adding code? Aimtrak buttons can be made to register as joystick buttons....
Howard_Casto:
--- Quote from: 1UP on March 26, 2010, 02:16:32 am ---
--- Quote ---Direct-X controllers, at least, are easy enough to add. Generally speaking you can setup a passive polling system that send "fire events" whenever data changes.
--- End quote ---
Does this mean that something already exists in MH to do this, or are you talking about adding code? Aimtrak buttons can be made to register as joystick buttons....
--- End quote ---
No, I would have to edit the code.
Howard_Casto:
Good news for you. I vaguely remembered doing something similar in the past, so I looked at my old projects. I had to do exactly the same thing for my zinc config utility. So I just copy/pasted the code. Mame hooker can now detect keyboard keys. Not in the crazy raw mode like mame supports, but for most it should be enough.
I only added it because it seemed like it could be useful though. No offense but I'm not doing all this to cater to you 1up. ;)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version