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 46069 times)

0 Members and 1 Guest are viewing this topic.

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 807
  • Last login:March 18, 2024, 02:38:32 am
  • I'm a llama!
Re: My official MAME output wip thread.
« Reply #120 on: October 03, 2011, 07:41:01 pm »
Seems Howard hasn't poste since late June, but Howard in case you read this and are still looking for users with ffb wheels I will be more than happy to test out a beta version for ya :)

Any new progress with the Sega driver lately?

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 #121 on: October 23, 2011, 09:46:43 pm »
I'll take my turn to bump this thread.  Any word on ffb progress?  It's obvious the code I submitted to MAME wasn't accepted.  Rather than ask about it I figure I'll wait until the next full release and base another code submission of that.  However, it'd be great to be able to use mamehooker to test the outputs more directly with working ffb.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #122 on: October 24, 2011, 02:22:27 am »
Sorry guys... the real world has kept me busy lately.  I haven't had time to program for anything as of late.  Right now I'm in "halloween mode" and won't be cure till sometime this november.  I'll see if I can at least get a new version of mamehooker out by then.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 09:47:02 pm
  • ...
Re: My official MAME output wip thread.
« Reply #123 on: October 24, 2011, 10:54:37 am »
I'll take my turn to bump this thread.  Any word on ffb progress?  It's obvious the code I submitted to MAME wasn't accepted.  Rather than ask about it I figure I'll wait until the next full release and base another code submission of that.  However, it'd be great to be able to use mamehooker to test the outputs more directly with working ffb.

I'm glad to hear that you're still working on it.

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 #124 on: October 25, 2011, 03:41:32 am »
Right now I'm in "halloween mode"

I remember last year you were making stuff to scare people. Got anything you're working on this year?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #125 on: October 27, 2011, 01:42:19 am »
Right now I'm in "halloween mode"

I remember last year you were making stuff to scare people. Got anything you're working on this year?

Unfortunately, since I posted that there has been a death in the family.  My great Aunt passed away and she lived right next door.  I decided not to put up a lot of my stuff, including two caskets, one that shook like crazy and another with a pop-up corpse. 

But on the bright side they will be ready to go next year... just have to put them out. 

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 #126 on: October 27, 2011, 04:13:52 am »
Sorry to hear that Howard :(

sslakkerr

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:November 13, 2016, 05:40:23 pm
Re: My official MAME output wip thread.
« Reply #127 on: October 28, 2011, 06:01:58 pm »
Very sorry to hear about your loss Howard

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #128 on: November 01, 2011, 04:30:16 am »
I appreciate it.  She was old and had a lot of medical problems though so it wasn't completely devistating or anything. 


I did manage to get the yard setup fairly good this year though.  I'll see if I can put up some pics later this week. 

Dudeman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 229
  • Last login:December 30, 2023, 06:30:25 pm
  • Ecky ecky ecky ecky P'Tang! Zoop-boing mmmzoesm...
Re: My official MAME output wip thread.
« Reply #129 on: November 03, 2011, 03:02:51 pm »
I'm a little late to the party, so sorry if I'm asking a question which has probably been asked before, but I guess my search skills suck because I can't find it.

What version of mame started implementing outputs? I've got .106 and MameHooker shows nothing for DigDug or Q*Bert (my main goal). Or i might be that I"m just a brick shy of a full load.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #130 on: November 05, 2011, 02:15:44 am »
I'm a little late to the party, so sorry if I'm asking a question which has probably been asked before, but I guess my search skills suck because I can't find it.

What version of mame started implementing outputs? I've got .106 and MameHooker shows nothing for DigDug or Q*Bert (my main goal). Or i might be that I"m just a brick shy of a full load.

The tutorials on the site are based around digdug.  Qbert is similar.

I'm not sure what version of mame started implementing outputs, but if you are on 106 you might as well upgrade to the most recent version, there shouldn't be any noticable speed hit. 

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 #131 on: January 19, 2012, 06:07:49 pm »
New year bump!

 :cheers:
My arcade racing setup:
My Youtube Channel: http://www.youtube.com/user/RetroRepair
My Twitter: http://twitter.com/retrorepair

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 #132 on: February 25, 2012, 11:00:21 pm »
Howard, wondering if you could weigh on something I'm working on.  I wrote a quick vb app to implement FFB just so I could continue working on implementing outputs in MAME.  The first major driver (namcos22) I'm working on has an interesting quirk that I'd like your input on.  The wheel vibration magnitude is based on 6 bits of a 32 bit integer.  However those bits first need to be flipped (001111 to 110000) and then reversed (110000 > 000011) in order to get a meaningful value.  The flipping is straight forward enough but reversing the bit order takes a loop and I'm wondering if the MAME devs are going to accept that.  If they don't then Mamehooker would have to handle that somehow.  Any thoughts on how to hanlde this ... which is to say ... how feasible it would be to support bit reversal in Mamehooker?
   

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #133 on: February 26, 2012, 12:59:28 am »
I think I would have to understand, the actual values you are getting a little more.

Could you show me the minimum and maximum values unaltered? 

Btw... mame might have a LSB (least significant bit) function because it's often necessary to reverse data. 


Adding bit reversal would be trivial, I can add it to the math functions.....  but let's see if we can fix the data in mame first.

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 807
  • Last login:March 18, 2024, 02:38:32 am
  • I'm a llama!
Re: My official MAME output wip thread.
« Reply #134 on: February 26, 2012, 05:25:38 am »
The first major driver (namcos22) I'm working on

 :blowup: :gobama :droid :blowup: :gobama :droid  :notworthy:

Thank you bdam you ROCK!! Good luck and keep us posted  :notworthy:

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 #135 on: February 26, 2012, 10:38:49 am »
Here's the data unaltered except for me zeroing out the bits we're not interested in and surrounding the values with pipe symbols.  The Min and Max values aren't particularly useful to show the reversal that's needed so I added a more descriptive example.
Min(0): 00000000|111111|000000000000000000
Max(63): 00000000|000000|000000000000000000
Other (5): 00000000|101000|000000000000000000

Good idea, I'll look around and see if I can find an existing function in MAME.

demeth

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:July 01, 2014, 09:16:05 pm
Re: My official MAME output wip thread.
« Reply #136 on: February 26, 2012, 11:59:20 am »
http://graphics.stanford.edu/~seander/bithacks.html -- Study until you know them all by heart ;-)

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 #137 on: February 26, 2012, 01:23:17 pm »
Yep, that's where I got my solution.  To be clear, the 'problem' is easily solved; it's just a matter of where we solve it.  In MAME or in the program that reads the output from MAME.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #138 on: February 26, 2012, 01:34:05 pm »
http://graphics.stanford.edu/~seander/bithacks.html -- Study until you know them all by heart ;-)


Yeah, like bdam said, the "problem" here isn't that we don't know how to fix it... it's that fixing it could slow down the mame driver and/or introduce sloppy code.  Mind you the speed decrease would almost definately be unnoticable, but he system 22 drivers aren't exactly speedy to begin with.

Personally I think that so long as it's only being reversed when the value is changing it should be ok. 

demeth

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:July 01, 2014, 09:16:05 pm
Re: My official MAME output wip thread.
« Reply #139 on: February 26, 2012, 02:31:37 pm »
Ah, that wasn't obvious (to me) from reading the related posts.

Looking at the driver in question, that kindof operation we're talking about shouldn't even register on the scale considering all the other things that's done in there indicative on the cleanup need for mame-3d overall,
heck, even just restrict keywording the A / B in matrix3d_Multiply should save that driver a whooole lot more (not considering the ~20-25ish% gain on using SIMD- intrisics..) than you could purposefully waste :P

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 #140 on: February 26, 2012, 02:44:24 pm »
This is less about performance and more about what  the MAME devs will accept.  They will just ignore submissions without feedback so I'm trying to come up with what they would 'want'.  I found an existing but not universal reversal routine in SSEM so I'm going to just ape that.
« Last Edit: February 26, 2012, 03:57:50 pm by bdam »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #141 on: February 26, 2012, 02:52:47 pm »
Yeah those guys are just picky.

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 #142 on: February 27, 2012, 12:33:09 am »
Indeed.  I went with another routine that's just a one-liner ... we'll see what happens.  

I've attached a diff for 145u1 which implements outputs for acedrvrw.  In my quick 'n dirty ffb app it works but the fast magnitude updates for the steering wheel cause the feedback to be significantly delayed and really jerky.  It could be a whole factor of things but I thought I'd post this so you'd have a test case for Mamehooker.  Maybe you already have something setup with wheel forces beyond just rumble but just to be safe, there you go.
« Last Edit: February 27, 2012, 10:46:26 pm by bdam »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #143 on: February 27, 2012, 12:54:30 am »
I'll look at it thanks. 

Without getting into it too much: 

It turns out that "true"  ff devices like wheels often have this deal where the effects are physically loaded inside a chip on the device.  This takes a while and there is a significant delay.  The solution I found is to always have a generic effect active within the device and to simply tweak the magnitude/direction/whatever values instead.  It's one of the reasons I've kind of put off the next release.... to give you guys full control I've basically got to make an ini system that lets you bind a output value to 1 of the 80 or so potential variables in a ff effect.  It's tedious and time-consuming work. 

isamu

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 807
  • Last login:March 18, 2024, 02:38:32 am
  • I'm a llama!
Re: My official MAME output wip thread.
« Reply #144 on: February 27, 2012, 03:52:27 am »
I'll look at it thanks. 

Without getting into it too much: 

It turns out that "true"  ff devices like wheels often have this deal where the effects are physically loaded inside a chip on the device.  This takes a while and there is a significant delay.  The solution I found is to always have a generic effect active within the device and to simply tweak the magnitude/direction/whatever values instead.  It's one of the reasons I've kind of put off the next release.... to give you guys full control I've basically got to make an ini system that lets you bind a output value to 1 of the 80 or so potential variables in a ff effect.  It's tedious and time-consuming work. 

Very interesting bit of info there Howard. That feature sounds awesome and I'm hoping you'll be successful in implementing it properly!

True force feedback for Namco's System 22 driver would be....*sigh*...a dream come true!!! bdam you don't know how I happy I am to hear the progress you're making on that! Thanks so much to you and Howard for doing this.

I can't wait to play Ridge Racer and Rave Racer with proper and TRUE ffb on my wheel! That is going be just AWESOME!!!!!

Keep up the fantastic work guys, your work is greatly appreciated!  :cheers:


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 #145 on: February 27, 2012, 06:30:50 pm »
I just played with it some more and part of the problem seems to be that MAME attempts to get exclusive access to the device.  From what I can tell, that means any other program that needs exclusive access, which you need for FFB, will need to un-acquire, acquire exclusively again, and re-download the effect anytime it wants to make start or change an effect on the device.  That three step process created stuttering; at least for me.  If I change src\osd\windows\input.c so that MAME acquires non-exclusive access this problem goes away, you don't need to reacquire, and things work well.  Except for one thing; MAME start complaining that it is 'Unable to create the Direct3D device (88760868)'.  Everything seemed to work fine ... it just complained.

Maybe this is all piss in the wind, you know this, and have a solution.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:Yesterday at 05:29:33 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: My official MAME output wip thread.
« Reply #146 on: February 27, 2012, 07:23:17 pm »
We'll just have to see.  I know that outrun was pretty responsive, but then again the resolution of the ff in outrun is pretty low.  Like I said... the trick is you never start/stop the effect.... you leave it running.  A ff effect with a magnitude of 0 doesn't do anything, so it's essentially the same as turning it off.

Mame shouldn't be aquiring in exclusive mode.... at least it didn't before because I specifically complained that there's no reason for mame to need exclusive mode and it causes issues for other apps.  I haven't looked it it in quite some time though.

But enough shop talk. I've got a pinball wrapper to finish and the next thing on the agenda is mamehooker.     


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 #147 on: February 27, 2012, 07:53:04 pm »
Yep, it works smoothly as long as it doesn't loose exclusive access which is most definitely is:
http://mamedev.org/source/src/osd/windows/input.c.html - line 1510
Code: [Select]
DWORD cooperative_level = DISCL_FOREGROUND | DISCL_EXCLUSIVE;
MAME gets non-exclusive access to the mouse and keyboard but the joysticks are exclusive.  I'll mention it on mameworld and see if anyone speaks up.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 805
  • Last login:Today at 04:22:23 pm
Re: My official MAME output wip thread.
« Reply #148 on: February 09, 2014, 11:36:35 am »
EDIT: just seen that the code i was asking for is (bdam work) is still attached :timebomb: :)

« Last Edit: February 10, 2014, 05:27:10 am by baritonomarchetto »

yellowmustard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • Last login:September 28, 2020, 08:30:54 pm
  • I want to build my own arcade controls!
Re: My official MAME output wip thread.
« Reply #149 on: July 28, 2020, 08:07:34 pm »
interesting!