Main > Software Forum

LED control from Mame--in over my head again?

<< < (20/24) > >>

Howard_Casto:
I am on a roll tonight!  got zombie Raid's outputs working!

in src\drivers\seta.c  in the function "static WRITE16_HANDLER( zombraid_gun_w )"  after the line:

"default:"

and the following code:
----------------------------------------------------------------------------------
output_set_value("Player1_Gun_Recoil", (data & 0x10)>>4 );
output_set_value("Player2_Gun_Recoil", (data & 0x8)>>3 );
----------------------------------------------------------------------------------


I was simply going down the list of gun games in mame and after I determined that the i/o system in alien 3 is "f'n nuts" I went on to this one.  Embarrassingly easy to figure out, so I don't have a clue why it wasn't at least commented on in the driver.

Howard_Casto:
Ok, I've submitted a diff to mamedev based on the .137 source!

In case anyone wanted to get a head start, or by some stroke of bad luck the submissions wouldn't be accepted, I included the diff file below.  You can use it to patch your build just like any "u" diff file. 

In case this thread was too hard to follow:

Gun Output Cleanup/Hookup (Part 1) [Howard Casto]
-----------------------------------------------------
drivers\othunder.c:  Changed Operation Thunderbolt output names to something more appropriate. (They were routed to leds.)
video\rastan.c:  Hooked up output for Operation Wolf.
machine\midwunit.c:  Hooked up outputs for Revolution X.
machine\midyunit.c:  Hooked up outputs for Terminator 2.
drivers\seta.c:  Hooked up outputs for Zombie Raid.

1UP:
You are awesome.   :notworthy:

Man this is killing me.  I really want to stay up late testing this but I keep getting in late when I mess with arcade stuff at night.  Looks like I'll have to learn how to use a diff file this weekend.  I need to pad the kicker anyway before any more testing.

Alien3 would be another cool one though... :)

Howard_Casto:
Assuming you have your compile environment setup, diff files are easy.

http://mamedev.org/updates.html


Don't get your hopes up on Alien 3.  I looked at it and immediately the "nothankyou.gif" popped up in my head.  Believe it or not the problem with that driver is it's too clean.  In all the other drivers I've looked at the outputs were pretty straight forward because the i/o for each individual game was handled seperately.  The sega 32 driver is so perfect that every single game has the same functions, no deviations.  That means even if I were to find the outputs, hooking them up would create several "ghost" outputs in the other games in the driver.  The proper thing to do, of course would be to make a new function for alien3, but that's a lot of actual coding work, and as hk has pointed out, straight C is not my strongest programming language.

1UP:
This brings up something I've been wondering.  Is it possible to have MH consider a specific button press as an output?  This would be a useful way for users to add a sort of output on their own.  So for games that never had a recoil, you could add an event that happens when "fire" is pressed.  This could be an led, solenoid or whatever.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version