Main > Software Forum

My official MAME output wip thread.

<< < (3/31) > >>

Howard_Casto:
Gunbuster had a prototype output function (general address was known, but nothing else) so I went ahead and hooked it up!

Again, see the first post for more info.

Howard_Casto:
Namcos system 11/12 driver also had an incomplete prototype function for the gun recoils, so I hooked that up as well.  That gives us support for ghoul panic and point blank 2!!!

Again, look up top.

bdam:
First, congrats on your progress and thanks for taking up this proverbial torch.  In the 8 or so years I've been following MAME, the setup you've been working on (MAME does the outputs, something else interprets them) has been suggested many times as the only way to get force feedback and the like.  However, without the second part (Mamehooker) existing in the standard build, few devs seemed interested in setting up the outputs.

>You don't have to be an expert programmer or familair with the inner workings of emulation or mame.
You might be well served by writing a simple tutorial of sorts on how to do this.  Just some guidance of what to look for in the driver, how to hook it up to an output, and how to test it with mamehooker.  For instance, I'd be interested in setting up Atari's Drivin' series of games but the driver (src/mame/drivers/harddriv.c) doesn't have any outputs that I can recognize.

Howard_Casto:
Well, first off, you'd be suprised how many drivers already have the outputs completely or partially figured out, they just aren't hooked up to anything.  The two or three I did today already had the addresses figured out for the outputs... one of them even had each individual output bit address commented in the driver, it's just a matter of hooking them up.

As for the others... so long as the memory addresses we need are being parsed by something then it's realitively easy to hook up. 

Basically you look for any functions or handlers in the driver with a "_w" (for write) extension, particularly ones with comments like "unknown output" or "misc i/o data".  Then in each one you install a generic output call like:

output_set_value("debug", data);

And that's it in terms of coding... that last line is LITERALLY all the code you need to start looking.  The only key is if you are installing multiple outputs at once, each one needs a different name (like "debug", "debug1", "debug2") ect...

Then you compile, fire up mamehooker, open it's debug window and fire up the game in windowed mode and put it in it's service menu.  Generally if the game contains outputs it'll have some method of testing them in the service menu.  You run that test and watch all your installed outputs on mamehooker.  If one of them changes when an output is supposed to fire then you've found it.  Then it's simply a matter of recording the values you get and turning them into individual outputs.  Generally this means checking a bit in the byte (the "data" variable) and using that to set the value. 

for example

output_set_value("output_1", (data & 4)>>3);
output_set_value("output_2", (data & 8)>>4);

will "bind" output_1 to the value 4 and output_2 to to the value 8.  So when "data" has a 4 or an 8 in it, these outputs will fire, otherwise they have a value of 0.

But I can help with the part (it can get hairy sometimes).  The important thing is finding that function that the output data goes though.  After that it's all gravy.

Howard_Casto:
Well... rail chase is the next gun game to hook up, so I'm working on the dreaded sega yboard driver  (gloc galaxy force 2 ect..)

I've found several of the digital outputs like start lamps, but  this might take a while.....

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version