Main > Software Forum
LED control from Mame--in over my head again?
1UP:
I believe that is how it works. However, I don't remember ever seeing this in the arcade so maybe the flash lamp fuse was prone to blow out. That output might also be hooked up to the red LEDs, since it is supposed to provide the same function. According to the manual, it comes on when the player is being targeted and shot at.
The green LED should come on when your cross hair is over a target.
No worries, I'm glad to see any progress on this game. :D
1UP:
Arrrgh! Been playing with MH 3.6 and othunder, and after trying various combinations of loop, wait, and rfs commands, I just can not find a way to get it to flash the LED while the led0 status=1. The results I get are always either: a) nothing, b) Mame Hooker crashes, c) solid LED when the trigger is pulled until ammo runs out, d) LED flashes on briefly on trigger pull, stays off while trigger held, then on briefly again when trigger released/ammo runs out. "lop #" seems to do nothing different in any of these scenarios.
With the new commands, what would be the recommended way to simply have the LED flash on/off while the led0 status is 1, then stop the flicker and turn off the LED when led0 status is 0? I thought I understood the examples in the docs...I figured something like the "whiteorred" example would do the trick, but no luck...
Thanks
Howard_Casto:
You are probably over thinking it.
here are the contents of my "360strobe.mhs" file:
-----------------------------------------------------------------
xip 1 %s%
xip 1 0
lop 200
-----------------------------------------------------------------
That's it. 200 cycles are enough to keep it going until an overheat. Also note the %s% command is used because this script will still be loaded when the value of led is 0, only it won't do anything because the state is 0. It'll work for the ledwiz as well (with different commands of course) because that's how i tested the script at first.
so your command is
led0=rfs 360strobe 1 %s%
Howard_Casto:
Btw... I think what you weren't getting about the rfs command is that once a script starts, it doesn't stop until it finishes. LFS is a little more flexible, but then again, it's an infinate loop.
1UP:
Aw snap, that works perfectly! I knew there had to be a simpler way. I was trying to have it call separate scripts based on the state. But this is awesome. It looks to be almost the perfect speed to go with the sound effects too.
Alright, I've finally got something I can test with my guns. Time to have some fun. 8)
BTW, for anyone else who wants to try this, here's what I've got:
In the ini folder, I have othunder.ini which gets called when Mame loads Operation Thunderbolt. Inside it is the following (without the -------------------------------------- ):
--------------------------------------
[General]
MameStart=lwp 1 16 49
MameStop=
MameHookerStart=
MameHookerStop=
StateChange=
Pause=
[Output]
led0=rfs lwrapidfire1 1 %s%
led1=rfs lwrapidfire2 1 %s%
led3=
led4=
--------------------------------------
Then in the scripts folder, I have two scripts that handle the rapid fire:
inside lwrapidfire1.mhs
--------------------------------------
lws 1 01 %s%
lws 1 01 0
lop 200
--------------------------------------
inside lwrapidfire2.mhs
--------------------------------------
lws 1 02 %s%
lws 1 02 0
lop 200
--------------------------------------
Now when each gun fires, the corresponding output flickers on the LED-Wiz until the trigger is released or the ammo clip runs out.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version