Main > Software Forum
My official MAME output wip thread.
Howard_Casto:
I have recently made progress hooking up various outputs in mame for use with mamehooker and any other application that takes advantage of the output system. In english this means that you can hook up games that had output devices (motors, lamps, ect..) to real output devices!
For more detailed info, see this thread:
http://forum.arcadecontrols.com/index.php?topic=100880.0
Anyway, I've decided to foucs my attention to getting as many outputs as possible hooked up in mame. I'll be posting my progress below and I welcome any comments and help anyone can give.
Also I'm toying around with the idea of putting together a team just for this purpose. If you would like to help, let me know.
I'll need people to search manuals and docs to find games with outputs and give an idea of what kinds of outputs they had.
I'll also need people to help out with the mame source for hooking up outputs. You don't have to be an expert programmer or familair with the inner workings of emulation or mame. You simply need the ability to compile the mame source, install mamehooker or a similar debugging tool and understand C.
Anyway, wip is below, I'll edit this first post with any major announcements or breakthroughs.
*update* 4/28/10
Outrun Output Hookups: (File is attached below, rename to segaorun.c and compile with latest build of mame.)
=======================
segaorun.c: Hooked up Start and Brake lights as well as upright vibration motor and deluxe bank motor for all version of outrun.
Hooked up limit switches for all versions of outrun. (Required to get past motor check).
Hooked up Start lamp and vibration motor for all versions of super hangon.
=======================
New Outputs already in MAME (.137u2)
====================================
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.
=====================================
New Outputs already in MAME (.137u4)
========================================================
Output Cleanup/Hookup (Part 2) [Howard Casto]
-----------------------------------------------------
segas32.c: Hooked up all digital outputs for all games (radm, alien3, radr, f1en, arescue, f1lap, jpark, slipstrm, orunners, harddunk, scross, titlef)
Emulation needs to progress more on the analog output data before those outputs can be hooked up.
audio\mw8080bw.c: Changed output name for desertgn to something more descriptive (Player1_Gun_Recoil)
bbusters.c: Added new output handling functions and hooked up outputs for bbusters and mechatt
opwolf3.c: Added gun outputs for opwolf3 (man that game is terrible)
machine\willaims.c: Fixed existing outputs in tshoot (they needed inverted) and hooked up the rest, including the feather blower. :-D
gunbustr.c: Hooked up all outputs for gunbstr
namcos12.c: Hooked up outputs for all system 11 gun games. (ptblank2, ghlpanic, tenkomor)
segaybd.c: Hooked up all digital outputs (gloc, glocr360, gforce2, pdrift, rchase, strkfghtr), also hooked up motor/analog outputs for Power Drift and G-Loc/ Strike Fighter
The remaining games with motors could be hooked up as well assuming emulation can progress enough to get past the error messages.
namcos2.c: Hooked up gun recoils for golly ghost. Also noted that the outputs for the remaining gun games are also in that area. Someone who can find the offsets should be able to hook them up.
segas18.c: Hooked up gun recoils for lghost.
taito_z.c: Hooked up outputs for spacegun and made a few prototype functions to help in hooking up the remaining games. Someone familiar with the driver should take a look.
I hooked up a few, but they don't work like they should according to the comments.
=================================================================
Howard_Casto:
Ok now that I've gotten that out of the way......
I've figured out the outputs for the segas32.c driver! This driver includes alien 3 the gun, radmobile and other favorites.
For those following along in their textbooks:
In src\drivers\segas32.c go to the function "common_io_chip_w" and after the line "case 0x06/2:" add the following two lines of code:
=============================
output_set_value("Player1_Gun_Recoil", (data & 0x4)>>2 );
output_set_value("Player2_Gun_Recoil", (data & 0x8)>>3 );
=============================
Looks a little too easy doesn't it? Well unfortunately it is. Sega gameboards have a VERY generic output implementation. So generic in fact, that every single solitary game in the driver uses that function (thus the "common" in the title) and every single solitary game that has outputs in the driver routes those outputs through the x06/2 offset.
In english this means that while the above code will add working outputs for alien 3, thsoe outputs will also show up for all the other games. What's more, those outputs will actually WORK on many of the other games, only they have a different function.
This leads to an interesting question. Should I just hook up each bit in that section to generic outputs like "sega_out_1" and keep the uber-efficient mame functions in tact, or should I split out the data into seperate functions for each game?
Thoughts would be appreciated on that one.
In the mean time, I'm going to hook up each and every bit in that section and try to determine the function for each game and list it here. Hopefully this will lead to answers regarding how to proceeed.
Howard_Casto:
ok I went through every single game in the driver (UGH) and this is what I came up with:
==================================================================
*edit*
Notes removed to save space!
===============================================================
The numbers indicate the bit (in decimal) that is toggled for the data
As you can see nearly every game with outputs uses one or both of the outputs i hooked up for alien3, usually as start lamps.
Also it's apparent that another offest is also used for aditional data as I could get a response from some outputs. My guess would be it's offset x05/2 because on the dual screen games the found outputs are always binded to the second screen.
There are two offsets that I've found so far... offset 06 is the "main" offset and it usually used for the start lamps. Offset 0c is the second offset and it's a tad peculiar. While it works just fine for games like rad mobile on some games a few outputs are still missing and on outrunners 0c shoots out data so fast that mame hooker can't keep up.
Also with one notable exception, the feedback motors/pistons aren't going to work because the output board isn't emulated/hooked up right.
That exception is out runners. The game used a simple rumble motor attached to the steering wheel, similar to the rumble pack on the old n64. I've already found the ouput for player 2 and sure enough, if you run off the road it blinks like mad!
So there you have it... most of the outputs for segas32.c .... now I need to go about sorting it into outputs
EDIT: I updated the list and the description of what's going on to reflect the new things I've figured out.
Xiaou2:
Congrats on the work so far. :cheers:
Have been looking forwards to this forever.
You may already know this, but I thought Id mention:
Original Outrun had come differences:
1) Standup = Single direction motor output (like a rumble motor).
(motor drives a piston, which slides the steering wheel assembly maybe 1cm
in each direction... which makes for a violently awesome effect. I REALLY want
to build this)
2) Sitdown Simulator = Dual Direction Motor turns a worm driveshaft. The main
body is attached to the shaft, and as the drive turns, it pushes the body to the
left or right.
Other Sega Feedback info:
Super Hangon Standup: A single direction rumble motor is inside the handlebar assembly, and creates vibrational effect. I believe it is always on during gameplay. I do not believe the speed is regulated... but I could be wrong.
Afterburner II:
a) Standup: Flightstick has motors. I do not recall what configuration.
b) Motion Cockpit: 2 bi-directional motors. One for each axis.
SubRoc-3D:
Dual Lens LCD Shutterglasses
I think you will find the most information in the actual manuals, scoping
out the actual controller diagrams. I used to work on some of these, which is
why I know certain games feedback setups. KLOV has many manuals, but others
can be scoped out in other places too.
Some feedback listed in games may be simply Lights.
For example, The viewpoint switches on Virtua Racing. Or the cockpit lights
on Afterburner II, when a missile was heading your way. I think Outruns
start button also blinked. Tho, its been some time, and memory fails me.
Also, Im curious if you have the ability and or plans to separate sound channels.
For example, Sega Turbo has 3 speakers. The 3rd is a woofer, which plays
an engine sound. Daytona USA, and similar games, have a subwoofer stuffed
under the seats.
Surround sound would be great... but heck, Id install a 2nd soundcard for
4 independent sound channels.
Howard_Casto:
Yeah, most of the games your are mentioning are on the sega x/y/z boards. I have a lot of info on them, it's just the data is "funny" I have the opposite problem with segas32, namely the data is fairly easy to get to but I have no idea what it's going to aside from some rather cryptic debug menu labels. If I can find the lost outputs in the list above though, I should be able to get everything but the motors and pistons working. Unfortunately for the segas32 board, the "extra" output card doesn't seem to be emulated, or at least it's error switches aren't hooked up I haven't had a chance to check extensively.
subroc's a new one on me though... see this is why I asked for help... I would have missed that one. :D
Also I don't know if you are aware, but the lamps at least, on many of the games you've mentioned, including afterburner II are already hooked up and have been virtually since the output system was added to mame. They are used for the artwork files. The motor data is in the same general area, but it has to be processed which is a pain in the butt on those drivers.
As for speakers... that might be a bit beyond my capabilities, but I can tell you it is absolutely possible. Surround sound is probably out as it can't be done on the fly afaik. By far the easiest option, as you mentioned is to route channels to seperate sound cards. Mame already splits individual sound channels up before merging them for output so the hard work is already done. This is easily done in windows, you simply shoot the data to a specific sound card instead of the "default sound device". I don't have a clue how hard it would be to do something like that in a multi-platform sense though.
The sound area of mame definately needs some work as there are some interesting implementations on some games. Dragon Gun comes to mind, where each gun controller has a built in speaker and your "dragon" talks to you as you play. I think virtually every atari racing game used the "butt thumper" method you described as well.
Navigation
[0] Message Index
[#] Next page
Go to full version