Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: My official MAME output wip thread.  (Read 47210 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #80 on: May 05, 2010, 02:26:42 am »
137u4 was released and it contains a big bunch of my updates.... I'll update the first page accordingly. :)

I had taken a break from submitting to give mame a chance to catch up.  Now that the latest are in I'll clean up those two drivers I'v been working on and revisit the ones I've already did to try to fix their limit switches and get games like galaxy force 2 working.

Huggybaby

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 43
  • Last login:November 22, 2012, 12:55:33 pm
Re: My official MAME output wip thread.
« Reply #81 on: May 05, 2010, 04:33:20 pm »
Cool! Did OutRun make it, I can't see it on the list, maybe I'm overlooking it. And are there any games you want rumble/Force Feedback tested on?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #82 on: May 16, 2010, 06:28:22 pm »
Just a quick heads up.... Mame version 138 is out so all of the things listed on the first post except outrun and a few others I haven't submitted yet are included in a stock build of mame.  So no compiling necessary!  Go play!

I'm still "out" though so it'll be a while before I can get those later bits of code submitted and out the door.  I also intend to add examples of some of the additions to my homepage, but again, not right now.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: My official MAME output wip thread.
« Reply #83 on: May 16, 2010, 08:17:29 pm »
Great work HC  :cheers:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #84 on: May 16, 2010, 08:23:13 pm »
Thanks....

I found this while searching ebay for parts, and it seriously puts into question my understanding of how the "standard" sega racing cabs do force feedback.

http://cgi.ebay.com/SEGA-OUT-RUN-SOLENOID-FORCE-FEED-BACK-CONTROL-PANEL-/120486275850?cmd=ViewItem&pt=LH_DefaultDomain_0&hash=item1c0d8aab0a

Solenoids are digital, so this HAS to be for the standard version, but I'm curious as to how it would work.  My guess based on the mounting bracket and teh kind of data I get on the standard version output is that this thing rapidly gets turned off and on "clamping" it to to shaft of the wheel momentarily to make it hard to turn.  It's an interesting yet strange technique. 

I had erroniously assumed that a dc motor was used in a similar manner to achieve the same effect.

I would buy it for testing, but in all likely hood it would only work well on an outrun wheel and the solenoid alone is nearing 50 bucks already, so I'll pass.  ;)

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4098
  • Last login:November 12, 2023, 05:41:19 pm
  • NOM NOM NOM
Re: My official MAME output wip thread.
« Reply #85 on: May 17, 2010, 09:35:24 am »

 I can assure you the the standard OutRun wheel is NOT digital. Its a
one way motor.  I Have one, and can send a pic later.

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4098
  • Last login:November 12, 2023, 05:41:19 pm
  • NOM NOM NOM
Re: My official MAME output wip thread.
« Reply #86 on: May 17, 2010, 09:40:02 pm »
Camera batteries are dead for now.  Heres the next best thing:

http://cgi.ebay.com/Out-Run-Sega-Game-Control-Panel-Steering-shaft-Assembly-/350330943929?cmd=ViewItem&pt=LH_DefaultDomain_0&hash=item519159f9b9

 This is the wheel without the motor.  You can see clearly on the 4th pic down,
on the right side, is a bar with bushings on it.  This is what the motor hooks on to.

 You can also see the oval holes in the metal base.  The complete assembly
you see here, will slide back and forth.  The mounting pins go through those oval
holes, and mount to the main control panel.  The oval allows the inch of travel back
and forth.

 http://cgi.ebay.com/outrun-steering-shaker-motor-and-gear-box-shaft-/290436129132?cmd=ViewItem&pt=LH_DefaultDomain_0&hash=item439f57a16c

 There is the motor, with its crank drive on the shaft.  The crank fits into the
wheel assembly's bushing.  The motor itself mounts to the main control panel.


 I have no idea where that vibration thing came from.  Ive Never seen a vibration
device on a sega game.  Ive seen plenty of arcade machines.  At one time, I was
trying to get an outrun upright to work, but after several bad boardsets, I gave up
and sold the game as is. I still have the extra wheel assy.


Endaar

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 152
  • Last login:November 11, 2015, 07:18:45 am
Re: My official MAME output wip thread.
« Reply #87 on: September 08, 2010, 08:01:56 pm »
Awesome work Howard! Thanks for all your efforts.

Endaar

Popcorrin

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 858
  • Last login:March 06, 2022, 11:11:43 am
Re: My official MAME output wip thread.
« Reply #88 on: October 04, 2010, 12:58:11 pm »
I haven't checked to see how mamehooker was coming along in quite awhile and it looks like there are number of cool additions.  Nice work Howard.
 I'm guessing the force feedback on the newer driving games is going to be fairly complex to hook up?

sslakkerr

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:November 13, 2016, 05:40:23 pm
Outrun cab working
« Reply #89 on: October 25, 2010, 10:49:30 am »
Thanks for the Outrun work Howard_Casto!

Quick vid of Outrun MAME cabinet with blinking Start and steering feedback:


Compiled your segaorun.c with mame0137 (0138+ wouldn't compile)
using parallel port output control with mamehooker

Awesome work, much thanks!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #90 on: October 28, 2010, 09:53:01 am »
Ah it lives! 

Looks great man! 

I've taken the summer/winter off from software projects to work on a hardware one.  (No I'm not telling yet. ;)

Once I'm locked in for the winter I'm sure I'll get back to this though. 

popcorrin:  well it depends on what you mean by "newer" driving games.  Most still use real simple ff outputs like outrun but atari driving games in particular have a complexity similar to force feedback, so those will be a long shot to get working.

Popcorrin

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 858
  • Last login:March 06, 2022, 11:11:43 am
Re: My official MAME output wip thread.
« Reply #91 on: October 29, 2010, 11:24:54 am »
Yea, I was referring to the driving games on the seattle.c driver and games like crusn usa. 

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 807
  • Last login:April 14, 2024, 08:15:07 pm
  • I'm a llama!
Re: My official MAME output wip thread.
« Reply #92 on: November 25, 2010, 03:21:55 am »
WOW!!!!

MAME finally gets forec feedback HOLY ---steaming pile of meadow muffin---!!!!

Howard you rock!!! :afro: :afro: :afro:

OK so a lot of the technical talk in the previous posts about compiling all that went right over my head. So basically what I want to know in a nutshell is....

1)Can I use my PC force feedback wheel that is just a typical Windows 7 DirectInput device, with these games now? Or is this meant only for the actual arcade cabinet wheels like the one on the OR cab?

2)Anything else required to use it in mame or is it straight forward?

3)Can you please make an FFB config menu that will allow us to tweak the strengths of the ffb effects and other variables(ie spring, ramp, constant, sine, etc)?

4)Are the Namco System 22 games such Ridge Racer and Rave Racer working with FFB yet? please please PLEASE make this happen I will die!!!  :duckhunt :gobama :droid :scared

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #93 on: December 10, 2010, 02:22:12 pm »
Well my first suggestion would be to read this thread, the whole thing... it will explain a lot of your problems/questions.

The main thing you need to understand is that force feedback isn't in mame nor will it ever be in mame.  I have, however, added output broadcasting (used by led blinky and the like to control lights via mame games) to the drivers of many games that have forcefeedback.

Mamehooker supports output reading and it also supports forcefeedback/xinput  so in a round-about way we have forcefeedback in mame, but not technically.

1.  Yes... but you have to use mamehooker
2.  Yes... mamehooker
3.  For some things yes... again see mamehooker.... for others, (spring ramp ect..) this is unlikely.  The forcefeedback games that are currently hooked up are simple... like on/off simple.  I don't see a need to support advanced ff effects when the games themselves can't.  At least not right now.

4.  Nope... and they won't for some time.  I'm on a mission to get all the sega games (the coolest ride-on games) hooked up because they are less complex and give back useable data.  Ridge Racer barely works in mame and it's stuff is complex.  Those types of games will be last on my list.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #94 on: December 11, 2010, 01:48:40 pm »
Just an update: 

I've enjoyed my break a lot, but I'm very afraid that if I keep putting it off, some of these "half completed" drivers will never get submitted or mame will go through yet another major source change and I'll have to start from scratch.  Starting next week I want to button up what I've already done. 

My goals are:

1.  Get the outrun driver modified and submitted (there's just some minor tweaking that needs done to get it working on the current build.)
2.  Finish up the sega y and sega x boards.
3.  Figure out where the hell I left off on the misc drivers I was working on and see if anything useable can be submitted. 


I'll have to get my build environment back up in sync with the latest version of mame, but after that I shoudl be able to get outrun submitted within the week.  #2 might take a bit longer and I don't even know if #3 is salvageable I've been away so long. 

Wish me luck!!

bdam

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:January 19, 2021, 02:06:52 pm
Re: My official MAME output wip thread.
« Reply #95 on: December 27, 2010, 09:43:39 pm »
>Wish me luck!!
Good Luck HC.  I've been waiting to see when you would pick this up again.  Hopefully it catches on and we see some other devs join in.

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 807
  • Last login:April 14, 2024, 08:15:07 pm
  • I'm a llama!
Re: My official MAME output wip thread.
« Reply #96 on: December 28, 2010, 02:41:01 am »
Well my first suggestion would be to read this thread, the whole thing... it will explain a lot of your problems/questions.

The main thing you need to understand is that force feedback isn't in mame nor will it ever be in mame.  I have, however, added output broadcasting (used by led blinky and the like to control lights via mame games) to the drivers of many games that have forcefeedback.

Mamehooker supports output reading and it also supports forcefeedback/xinput  so in a round-about way we have forcefeedback in mame, but not technically.

1.  Yes... but you have to use mamehooker
2.  Yes... mamehooker
3.  For some things yes... again see mamehooker.... for others, (spring ramp ect..) this is unlikely.  The forcefeedback games that are currently hooked up are simple... like on/off simple.  I don't see a need to support advanced ff effects when the games themselves can't.  At least not right now.

4.  Nope... and they won't for some time.  I'm on a mission to get all the sega games (the coolest ride-on games) hooked up because they are less complex and give back useable data.  Ridge Racer barely works in mame and it's stuff is complex.  Those types of games will be last on my list.

Hello Howard, Happy Holidays and thanks for the reply:

I understand....I will check out mame hooker.

Disappointed to hear the RR games are very complicated and are not working well in mame yet. I am however, extremely excited to hear that you're eager to get the OutRun drivers working properly. I am especially excited to know you will have OutRunners working soon, as that is one of my favorite OutRun games and is criminally overrated IMHO. Plus, there are other old 2D sega racing games that I'll be looking forward to playing once you have its driver working.

So yes, please keep us posted on your progress.

P.S. Regarding the Ridge Racer games...I know they don't work too well in Mame, but I'm sure you're aware of the fact that they do run quite well in VivaNonno. Would it be possible to get into the source code of Viva Nonno and add some kind of Hooker app so that it allows the RR games to deliver FFB via Xinput or DirectInput?

matsadona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 760
  • Last login:October 28, 2023, 06:00:12 am
Re: My official MAME output wip thread.
« Reply #97 on: January 06, 2011, 04:36:49 pm »
This was news to me, but it is really something I have been looking for. Just a simple thing as a blinking start-button makes the experience so much greater. And with gun recoil and FF there is so much more to get from a MAME multi-game (driving or shooting) cabinet.
Thanks a lot. I do understand how much time your efforts consume and the whole community is in debt to you. Keep up the good work.

Now I will begin with the download of MAME Hooker and see what that leads to :)
Building, collecting and playing arcade machines :)

Paul Olson

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1235
  • Last login:Yesterday at 08:53:48 pm
    • Paul's Arcade
Re: My official MAME output wip thread.
« Reply #98 on: January 06, 2011, 08:16:45 pm »
I haven't been on here much lately, but just finally found this thread. thanks for all the effort Howard! It is definitely appreciated. I will check into it more over the next few days. I haven't even fired up the MAME cab in months, but I am looking forward to messing with it again. What do you need help with the most right now? I'll try to help out a bit if I can.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #99 on: January 07, 2011, 10:59:10 pm »
Well guys, I've been a bit under the weather (caught my annual cold just after posting BAH!) so I haven't started getting things back up to speed yet, nor have I submitted anything.  I think I'll wait a bit longer to start again, mostly because I got a metric ton of games for xmas and I'm currently playing through them.  I'm about halfway through them so probably by the end of this month I'll feel much better and be bored enough to start again.


In terms of help, I just need people to play with the drivers and find output data.  It doesn't really matter if you can't make sense of the data, but rather finding the addresses is what's important.  I've had pretty good luck with sorting out garbage from the data to make it useable.  I would prefer anyone who looks to start on multi-game drivers that are known to have multiple games with outputs.  This is only because if we figure out one game it will be much simplier to get the others working so we get more bang for our buck.  Also the earlier the game the better.  Early games are easy to figure out, especially those released around or prior to the "16 bit era". 

milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Re: My official MAME output wip thread.
« Reply #100 on: March 19, 2011, 08:40:50 pm »
I'm a little confused.  I have MalaHooker up and running with my LedWiz (controlling a Q*Bert knocker).  Now I am trying to get force feedback controllers (Direct Input) working.  Do I need a separate controller to read the MameHooker output and control the motors?  Or is it built-in to 142 roms?

Thanks.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #101 on: March 20, 2011, 02:48:49 am »
I think if you would read isamu's question and my reply which is literally just above what you posted, you would get your answer.  ;)

milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Re: My official MAME output wip thread.
« Reply #102 on: March 20, 2011, 12:45:51 pm »
I did, but since its not working for me, I wanted to make sure I had everything I needed.  Thanks.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #103 on: March 20, 2011, 06:47:04 pm »
Well I still don't have a clue what you are asking. 

Obviously for force feedback to work you must have a controller (gamepad, joystick ect...) that supports force feedback.  The "show supported devices" option in the mamehooker menu will let you know if it's supported. I have no clue what you mean about "142 roms".  The mame driver must have feedback hooked up to an output and the ones that do are prety much the ones listed in this wip. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #104 on: March 24, 2011, 01:02:03 am »
I'm having bouts with insomnia again, so my loss of sleep is your gain!

I'm looking at the outrun driver that hasn't been submitted yet.  Everything is in working order, but I have to alter it before I submit it for a couple of reasons.

1.  The outrun driver has changed since I wrote this, so I'll have to alter it slightly to get it working.
2.  The mame devs decided that we should handle the giant case statements of outputs differently, and I tend to agree. 

They altered my last submission before approving it last spring and I'm going over the changes.  What they did was create two generic callbacks, one for each byte and then make custom init functions for each game with outputs.  In their individual inits, the various games re-direct the generic callback to a specific one for each game, which transforms a giant case statement for 12 games into 12 tiny functions.

Outrun.c only had a few games in the driver so it shouldn't take long.  I just want to make sure that I fully understand what they did (memory managment is crazy to wrap your head around sometimes) before I start work.  We should get the outrun.c at least, out before the next build cycle if all goes well. 

Then I want to put up a tutorial on the mamehooker website about how to actually use this stuff.  Those of you who have sent me vids/pics of your cabs running, if you want to make a little writeup of what you did (both software-wise and hardware-wise) then please do so and I'll put it on the site. 

bdam

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:January 19, 2021, 02:06:52 pm
Re: My official MAME output wip thread.
« Reply #105 on: May 26, 2011, 01:36:39 pm »
So over the last month or so I've been working to find and decipher outputs in the MAME source.  A few questions arising out of that.

I've been working through a very old list Stiletto posted that you can find here: http://groups.google.com/group/rec.games.video.arcade.collecting/browse_thread/thread/b3067b3125c5987f/b1c20350a1a5dc9d.  It seems that early last year you were working on generating a more complete list (http://forum.arcadecontrols.com/index.php?topic=82987.40) and I'm wondering if you ever got a chance to make any headway with the CHDs.  I'm almost finished going through Stiletto's list so if there's something more complete I'll start hacking away at it.  I'm not sure how you're putting the info together but, if possible, it would be nice to have the name of the driver and the driver status.

Some of the outputs are pretty straightforward so I'll probably submit source changes directly.  To that end, had you worked out for yourself some sort of standard way to name these?  From your submissions it would seem to be name_type such as Start_lamp.  Things get a bit foggier however when there are things like a seat and steering wheel that shake or vibrate.  I'm thinking vibration_seat_motor and vibration_wheel_motor.

What have you been doing with the existing led calls?  Should they be left in for backwards compatibility or replaced with the newer output system?

The namcos22 driver has some motion cabs similar to the ones you worked on in segaorun.  You linked the motor position to the steering wheel and connected the limit switches; I'm assuming in order to pass motor tests.  I was wondering if it might be worthwhile/possible to virtually track the positions in situations like this.  Then, kick off the limit switches at the extremities of the ranges.  I just seems that if the motor outputs and limit switch inputs are implemented that it would be nice to have them interact similar to how a real machine would.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #106 on: May 26, 2011, 07:38:45 pm »
So over the last month or so I've been working to find and decipher outputs in the MAME source.  A few questions arising out of that.

I've been working through a very old list Stiletto posted that you can find here: http://groups.google.com/group/rec.games.video.arcade.collecting/browse_thread/thread/b3067b3125c5987f/b1c20350a1a5dc9d.  It seems that early last year you were working on generating a more complete list (http://forum.arcadecontrols.com/index.php?topic=82987.40) and I'm wondering if you ever got a chance to make any headway with the CHDs.  I'm almost finished going through Stiletto's list so if there's something more complete I'll start hacking away at it.  I'm not sure how you're putting the info together but, if possible, it would be nice to have the name of the driver and the driver status.

Some of the outputs are pretty straightforward so I'll probably submit source changes directly.  To that end, had you worked out for yourself some sort of standard way to name these?  From your submissions it would seem to be name_type such as Start_lamp.  Things get a bit foggier however when there are things like a seat and steering wheel that shake or vibrate.  I'm thinking vibration_seat_motor and vibration_wheel_motor.

What have you been doing with the existing led calls?  Should they be left in for backwards compatibility or replaced with the newer output system?

The namcos22 driver has some motion cabs similar to the ones you worked on in segaorun.  You linked the motor position to the steering wheel and connected the limit switches; I'm assuming in order to pass motor tests.  I was wondering if it might be worthwhile/possible to virtually track the positions in situations like this.  Then, kick off the limit switches at the extremities of the ranges.  I just seems that if the motor outputs and limit switch inputs are implemented that it would be nice to have them interact similar to how a real machine would.

The names I use are quite similar to those.... check out some of my previous drivers to get an idea of how I name them.  For the gun games I used terminator 2's outputs (which have actual, clear, names in the test menu) as a base and modified them as needed.  I try to use descriptive names when possible.... for example, I rarely use lamp0, lamp1, ect... I would rather use Brake_Lamp, Start_Lamp, ect....

Generally speaking, if a driver only needs to be touched to change the actual names of the outputs I ignore it.  The only exception would be if the name doesn't make sense..... for example if it's galaga and led0 and led1 are hooked up to the start lamps I leave it alone... that's close enough for now.  It's not that they don't need changed, it's just that the devs might get kind of pissy (and rightly so) if we submit 30 some odd driver changes that are nothing more than renames.... once we get a good standardization going we can go back and change all the "legacy" inputs in one fell swoop.  If on the other hand it's operation wolf and the solenoids are hooked up to led0 and led1... I need to go ahead and change it.  Also, if I'm hooking up a motor input and the lights are already hooked up but have a generic name like led0 I go ahead and give them a proper descriptive name.... the driver is being re-submitted anyway, so we might as well and get it 100% up-to-date.

I'm pretty sure I worked on the namcos22 driver... you might want to check...
It's been over a year though, so my memory is a little fuzzy. 

The good news is that the new mamehooker comes out this weekend, which means I can help with this again.... really need to get that outrun driver sent off as well as afterburner and a few others. 


bdam

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:January 19, 2021, 02:06:52 pm
Re: My official MAME output wip thread.
« Reply #107 on: May 26, 2011, 08:05:22 pm »
Quote from: Howard_Casto
I'm pretty sure I worked on the namcos22 driver... you might want to check...It's been over a year though, so my memory is a little fuzzy.  
You did some work to the namcos2 and namcos12 drivers but not namcos22 ... at least nothing that I found in the current MAME source.  It's a heck of a driver with no less than 16 games with outputs although not all of them boot and some of them have input problems that make the test menus unnavigable.

Quote from: Howard_Casto
The good news is that the new mamehooker comes out this weekend, which means I can help with this again....
That is indeed good news; when you get that far let me know.  I hope to wrap up work on Stiletto's list in the next week or so and have a whole whack of relevant memory addresses, offsets, and bits documented.



bdam

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:January 19, 2021, 02:06:52 pm
Re: My official MAME output wip thread.
« Reply #108 on: June 02, 2011, 11:27:50 pm »
I've made my initial run through the original list Stiletto came up with about a decade ago to try and find the outputs.  I marked those that have already been implemented as done.  Those that are done which aren't mentioned already in this thread are based on my submission for which the diff (142u4) is attached.
https://docs.google.com/document/d/1k5GSS9l264KzBuYguQwt3PWY5spPAk6tFjsr_R46nvE/edit?hl=en_US&authkey=CJe-tdUG

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #109 on: June 03, 2011, 05:00:53 am »
Great Job! 

It's nice to finally get some help.  ;)

Assuming the source changes are accepted, I would like you to let me know which drivers have been changed and I'll add them to the front page.  Generally speaking unless it's a lamp or led, any outputs added to mame are done by me, so if we add yours as well then people will have easy reference to which drivers are beign worked on. 

bdam

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:January 19, 2021, 02:06:52 pm
Re: My official MAME output wip thread.
« Reply #110 on: June 03, 2011, 08:21:41 am »
Below is a list of what I submitted.  It was primarily binary stuff that I was certain of.  I'll probably take a break for a bit and then see if MAMEdev will accept a submission where the motor outputs change the state of the machine which in turn will trigger limit switches.  In certain machines this is a matter of manipulating an existing input (if that's even possible) that tracks position and in other cases it will mean simulating a position value since the machine didn't track it.

(cischeat) Lamps and wheel vibration, bigrun, cischeat, f1gpstar, and f1gpstr2.  Seat vibration for f1gpstr and f1gpstr2.
(megatech) Lamps
(taito_z) Wheel vibration for sci and clones.
(undrfire) Lamps, gun recoil, and wheel vibration for undrfire and cbombers
(weclemans) Lamps, wheel vibration, and tentative cabinet motions for weclemans and hotchase.  DIP switches for hotchase based on manual.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:April 22, 2024, 09:54:06 am
  • ...
Re: My official MAME output wip thread.
« Reply #111 on: June 03, 2011, 10:59:38 am »
bdam, thanks for helping howard out!  (especially on the driving games  ;D )

Wild Pilot had vibrating guns (I have a gun from one).  It's just has a single motor with a lopsided weight on the end.
There was also a deluxe sit-down version that had motion base.  
The flyer mentions three safety sensors and an emergency button that stop the movement.
Looking at the flyer it's hard to tell if it was full motion or just pivoted up and down.
I've never been able to find a manual, but if I do I will buy it and pass it along.


Howard, I bought a cheap wheel off fleabay to hack, but the one I received is not the one that was pictured or described.  It's not worth sending back and losing out on shipping both ways.  I haven't tested it out yet, but if it works, it's yours if you want it.  PM me your address.

I'm just a dumb end user and am assuming directx wheel feedback works the same on all wheels, but the fact that some newer wheels have 2 or 3 motors has me wondering if that is the case?

I'll be reading your tutorials at work today.  :laugh:

EDIT: Howard, the links to tutorial 2 and 3 both take me to tutorial 2.
« Last Edit: June 03, 2011, 01:42:09 pm by BadMouth »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #112 on: June 04, 2011, 01:46:38 am »
Below is a list of what I submitted.  It was primarily binary stuff that I was certain of.  I'll probably take a break for a bit and then see if MAMEdev will accept a submission where the motor outputs change the state of the machine which in turn will trigger limit switches.  

If this is what you are doing then even if it's accepted we need to change it.  The mame's goal is to be a drop-in replacement for a pcb, you are hacking the lsw inputs to work better with a directx ff device.  We shouldn't do that.  

I have all the limit switches in the sega boards hooked up to inputs.

You hook limit switches up as regular old inputs.  If you are concerned about a ff device not working because of this let me assure you that limit switches have next to nothing to do with operation (except the bootup test) and regardless I will write and app and/or device that will read the joystick data and send keystrokes when needed.  

If nothing else, the easiest solution is to just crack open the wheel you are using and add some physical limit switches.  ;)
« Last Edit: June 04, 2011, 01:48:32 am by Howard_Casto »

bdam

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:January 19, 2021, 02:06:52 pm
Re: My official MAME output wip thread.
« Reply #113 on: June 04, 2011, 10:46:20 am »
>you are hacking the lsw inputs to work better with a directx ff device
Not quite, this doesn't have anything to do with the output from MH or my input device but rather simulating how the limit switches and motors interact on the actual machine.  The cabinet motors would move something and at certain positions that something would trigger certain limit switches.  DirectX doesn't come into play; my input device doesn't come into play; I was thinking of handling this all within MAME.

>You hook limit switches up as regular old inputs ... read the joystick data and send keystrokes when needed
Agreed, but how do you trigger those outputs in a manner similar to the actual machine?  If I understand you correctly you suggest triggering the limit switches based on the value of an input device such as a joystick or wheel.  I don't think that would work either; the limit switches on the machine aren't tied to the limits of their input devices but rather the positions of something the motors were moving.

Here's another idea.  In MAME, add outputs for the position of whatever the motors are moving; that something.  Output its position left to right, front to back, up and down.  Then use MH to read those positions and at certain points trigger a key that MAME has tied to that input.  The only problem I could see is that people who don't have it all set up will now get warnings on initialization.  Sure, it's more accurate to the machine but it sounds like a support nightmare for MAMEdev.  Also, some machines don't seem to track an exact position so how do we simulate that?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #114 on: June 04, 2011, 02:11:27 pm »
How every single solitary arcade ff device that I've ever looked at works is this.  Limit switches are just that, switches.  i.e. either an optical gate or plain old cherry switch that gets tripped when the motor/wheel, ect goes to far and physically passes through it.  In other words, it's just an input, like a pushbutton or anything else.  It isn't built into the motor/piston or anything, it is a stand-alone switch.  If youa re doing anything other than hooking up the limits switch bits to inputs then you are hacking it. 

Your problem is you are trying to equate directx force feedback and how it operates with how the arcade hardware operates.  They don't operate in the same way at all, so somewhere there has to be a hack.  It can't be in mame, so we do it on our end.  Directx ff devices don't have the same kind of limit switches.  They have fail safe switches in case something goes crazy wrong, but in general the limit is determined in software by the pot value. 

I think you are confused about limit switches.  There is the limit (holy crap we are at the end, turn it off!) and there is a motor/ram position.  Motor/ram positions are inputs as well, we hook those up to an analog input port.  We don't bind them to the wheel position though, it is a seperate input.  This gives the user the freedom to do any kind of force feedback arrangment possible and more importantly, hook up the original arcade hardware as intended. 

For an end user to use a ff wheel (which let's face it, is a gross hack) they would do the following:

Bind the steering wheel's axis to the wheel axis in mame. 
Also bind the steering wheel's axis to the motor position value in mame. 
Allow some middleware app (probably mamehooker) to trigger any limit switches via code whenever the wheel's axis is at it's limit OR when the pot hooked up to track the motor is at it's limit OR skip all of it and simply have physical limit switches already binded inside mame. 

I don't need the position of the motors vai outputs in mamehooker because on a dx ff wheel, the position of the motor is the position of the wheel.  And if it's the arcade hardware or some sort of custom rig, the motor will be hooke up to a pot to track position, and I simply read that value instead.  Also you are forgetting, The motor position in mame is the virtual one.  Since I read the joystick anyway (how do you think I make it rumble? ;) )  I can simply read any analog value there. 

bdam

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:January 19, 2021, 02:06:52 pm
Re: My official MAME output wip thread.
« Reply #115 on: June 04, 2011, 03:35:40 pm »
>I think you are confused about limit switches.
Nope, I have always understood them exactly as you describe.

>Motor/ram positions are inputs as well
Ah, that's it, that's where our lines of thinking are different.  I have been thinking of these as a machine state, not an input.  That the position is a state which changes based on motor output and causes limit switches to trigger.  When you put it that way however, I'll agree, they can be thought of as inputs and treated like any other.

That being said, they are not user inputs.  So how would the MAME team like them handled?  You suggest MAME's goal is to be a 'drop-in replacement for a pcb'.  I'm not quite certain that's the case.  If you're right then I find it odd that the developers don't already have the limit switches and motor positions set up as inputs.  My look through various drivers makes it clear that they knew where most of them were and that setting them up as such would have been trivial to do.  They didn't; which makes me wonder why not.



« Last Edit: June 04, 2011, 06:48:32 pm by bdam »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #116 on: June 12, 2011, 08:19:50 am »
>I think you are confused about limit switches.
Nope, I have always understood them exactly as you describe.

>Motor/ram positions are inputs as well
Ah, that's it, that's where our lines of thinking are different.  I have been thinking of these as a machine state, not an input.  That the position is a state which changes based on motor output and causes limit switches to trigger.  When you put it that way however, I'll agree, they can be thought of as inputs and treated like any other.

That being said, they are not user inputs.  So how would the MAME team like them handled?  You suggest MAME's goal is to be a 'drop-in replacement for a pcb'.  I'm not quite certain that's the case.  If you're right then I find it odd that the developers don't already have the limit switches and motor positions set up as inputs.  My look through various drivers makes it clear that they knew where most of them were and that setting them up as such would have been trivial to do.  They didn't; which makes me wonder why not.


Well considering Nicola Salmoria, the founder of mame, recently put an article on his website describing how to use mame as a drop in replacement for a pcb and how this is one of mame's goals and primary uses considering many pcbs are tricky to repair I"m fairly sure that it's a goal of mame.  ;)  Also  I talked to Aaron Giles about this when he was implementing the output system and that is along the lines of how the output system was setup. 


Limit switches were hacked/turned off to get the games running... it's as simple as that.  The mame team got sick and tired of people complaining that afterburner didn't work when all the user had to do was set the dip to upright....ect.  At the time it didn't make a lot of sense to hook them up considering there wasn't any sort of output system in place to use them for anything.  You'll also remember that in some points in mame's history hack were included for inputs to make some games easier to play on a joystick... and those have been removed over time as well.  Long story short, mame evolves.

Also because mame is such a huge project, submissions are given a decent amount of leeway.  So long as it doesn't break the game, they might allow a bit of hackery as long as it's understood that it will be removed later. 

In terms of handling these sorts of input seperately, the only examples we have to go buy are the very few games in which the output positions are already hooked up (g-loc and a few others) in those they are treated just like any other input, but are hooked up with the labeling macro so that the user knows what they are.  This is the method I use.  If they have a problem with that then we can use the special "driver configuration" setup used by 720.  It allows mutiple control schemes to be used for a single game.  We could have one scheme where the limit switches and pots are hidden (and hacked to be on, so that they pass the startup tests) and one where they are exposed.

I'm sorry that I didn't reply sooner, but I'm busy with real-life stuff at the moment.  I'm also in a holding pattern atm.  BadMouth was nice enough to send me out a wheel and once it comes in I want to get a ff wheel game up and running with mamehooker and see how everything is going to work.  Then it should be easier to determine how to go about this.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:April 21, 2024, 11:59:54 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #117 on: June 28, 2011, 03:46:08 pm »
Ok working on the outrun driver again now that I have some actual hardware to play with. 

It looks like I need to do a driver configuration for maximum compatability and that goes for all sega games with limit switches, not just outrun....

Let me explain:

If all the switches are forced to be "ON" (how it is in mame now) then the game errors out of the test sequence quickly, BUT it disables the force feedback signals on the pcb.  Obviously they can't be left as-is, but for those not interested in FF, this would be a nice OPTION to leave in. 

If all the switches are forced to be "OFF" then the game displays an error BUT if the game can successfully move the wheel/joystick (which if you are using mamehooker it can) it will accept the motor as working anyway and send force feedback signals.  This is the best setup for official force-feedback enabled controllers in windows. 

If all the switches are hooked up to inputs, and you have all the necessary hardware (e.g. a real outrun deluxe cab and all the driver boards for the motor) the game should run error free.  In the case of the actual hardware the limit switches DO serve an important purpose as the motor driver hardware doesn't have any limiting circuitry to stop the motor from going past it's limit.  Those switches keep the pcb from shaking the motor to bits!

So I don't really see any other option than to implement all three methods.

I'm looking at how it's done in 720 right now and once I get a handle on how they are manually processing the inputs, it should be fairly easy to do.  MAME has made adding menu items and turning on/off items fairly easy, it's just a matter of actually doing something with the settings. 

Things in the real world have slowed down for the time being... I'll try to make a new test driver this weekend.  I'll also try to release a new version of mamehooker that plays nice with wheels so you guys can help me test. 

retrorepair

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 252
  • Last login:April 14, 2023, 04:49:58 pm
Re: My official MAME output wip thread.
« Reply #118 on: September 04, 2011, 04:20:36 am »
I'm tidying up my sega sit down racer at the moment so I can help with any testing you need done.

Any plans to hook up lamp outputs for Virtua Racing? Feedback is probably a bit too complicated for the moment but lamps would be great. Are lamp outputs currently possibly with model 2 emulator?

Also, outrun outputs seem to be missing in the latest mame version?
My arcade racing setup:
My Youtube Channel: http://www.youtube.com/user/RetroRepair
My Twitter: http://twitter.com/retrorepair

jurulz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 27
  • Last login:February 21, 2020, 04:18:28 pm
Re: My official MAME output wip thread.
« Reply #119 on: September 25, 2011, 10:37:23 am »
Do you have any plan for Arm champs 2 ???