Main > Software Forum
LED control from Mame--in over my head again?
Howard_Casto:
Thanks... my bad, I think it was the operation wolf service manual I couldn't find. Regardless, this tells me what I needed to know, mainly the firing order for the outputs when you go into the service menu. I might be able to hook them up the "right" way with this info as there are already some "unknown" ports defined in mame for terminator 2. It could be a simple matter of hooking them up and manipulating the data.
Howard_Casto:
That is a really nice manual site, thanks. I was looking at the operation wolf manuals which they actually have, and noticed that those guns seem to use a different recoil. It looks like they have a motor controlling a piston as opposed to t2's solenoid that turns on and off rapidly.
Interesting.....
So for the midway games I'm probably looking for a pulse signal and on the taito ones I'm looking for a simple "on" switch.
You've owned about all of the guns 1up, can you confirm?
1UP:
Hmm...I've only ever had the T2 guns, which were solenoid based. Don't know about the Taito ones.
Howard_Casto:
I've got great news to report!
Took the day off from mamehooker to experiment with the source code and see what I could do in terms of hooking up outputs from positional gun games. I started with operation wolf because it is the "simpliest" game to experiment with. After two or three hours of studying the mame source, I FINALLY understood that the variable I needed to access was being routed to the video driver for operation wolf, which is in rastan.c Anyway the comments said "0x04 normally, changes when you fire" over in the main driver so it was a no-brainer what was contained in the file. Setup a simple function that checks in the video function if the varible = 4 and sets the output accordingly.
Apparently this is correct because the output now behaves EXACTLY like the outputs in operation thunderbolt.... ie the value is zero unless you fire the gun AND it hasn't overheated AND you are playing an actual game.
I'll submit it to the mame devs after I've made a collection of changes, but for those impatient fellows:
In src\mame\video\rastan.c
Find the function called "WRITE16_HANDLER( opwolf_spritectrl_w )" and after the line "pc090oj_set_sprite_ctrl(state->pc090oj, (data & 0xe0) >> 5);"
add the following bit of code:
------------------------------------------------------------
if (data == 4)
{
output_set_value("Motor0", 0);
}
else
{
output_set_value("Motor0", 1);
}
--------------------------------------------------------------
This took me much longer than it should have because, quite frankly I don't know what I'm doing in regards to navigating the mame source, but since nobody else is looking into old games and hooking up outputs I guess I'll have to do. If anyone wants to help me I sure would be grateful.
Also note that "motor0" is just a placeholder name for the output... I'm not sure what to call gun recoils in mame, but once we all decide on something I intend to go into the drivers and change them all to the same value.
Anyway, as it pertains to terminator 2 and the midway gun games, this should be helpful as well. You see, this is basically the bit of the driver that tells the game when to draw bullets (there's more than that, but I'm simplifying). Since all these games draw bullets when the solenoid goes off we should be golden.
1UP:
Wow, nice discovery! So if you patch the code as you said, would you get an LED-Wiz output from this by doing "motor0=lws 1 01 %s%" in MH? If so, I'm going to have to try it out in the next couple nights...
This is getting exciting!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version