The NEW Build Your Own Arcade Controls

Software Support => controls.dat => Topic started by: Howard_Casto on January 30, 2011, 05:27:03 am

Title: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: Howard_Casto on January 30, 2011, 05:27:03 am
As much as it pains me to say it, I'm not fond of controls.dat viewers.  Most of them are pretty useless when it comes to a single screen setup due to the complexity of getting something to display overtop of mame.  There are certainly ways to do it, but not without a significant amount of hackery involved. 

I think mame's artwork system is the key to removing this issue.  It has grown enough and is now integrated into mame's ui enough that I think the best way to show controls is to generate artwork files with an overlayed control panel image.

I think for it to be practical, however, official mame would need to accept at least two additions:  UIShowArt  and UICycleView

UIShowArt would be a button binding that simply turns on/off artwork on the fly.  The ui menu already lets you do this, so it would simply be a matter of binding a key.  UICycleView would simply cycle the different defined views in the artwork menu.  This would allow for multiple "pages" of controls info.

There are complications to this though.  Firstly, the artwork view system is integrated with the different aspects and such.  That means that in additon to the different views we would generate, cocktail view and actual pixel aspect would also be mixed in there.  Also if you currently had it on cocktail view and you displayed artwork it wouldn't automatically display the controls images in a cocktail style.  Secondly, we would have to deal with real artwork as well.  Do we ignore it?  Modify it to include an image overlay?  Finally there is the problem of game aspects.  You can create mame artwork files with either hard-coded pixel dimensions or percentages.  The problem is mame's artwork system doesn't preserve aspect ratios, so simply setting our images to 100% would merely distort it beyond recognition.  While it's quite easy to get the pixel resolution of any game (comes out of listxml) it's sometimes hard to determine the aspect ratio, especially on odd-ball dual monitor games. 

I'm just reluctant to suggest adding such options to the mame team.  Afterall, they removed infodat support some time ago claiming that it was too far away from mame's purpose. 

Thoughts?
Title: Re: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: SirPoonga on January 31, 2011, 12:00:34 pm
I don't see it happening.  It would be cool but it would add more work to the mame project.  Every time they change how controls are handled that bit of code would have to change.
Title: Re: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: Howard_Casto on February 01, 2011, 10:22:44 am
I don't see it happening.  It would be cool but it would add more work to the mame project.  Every time they change how controls are handled that bit of code would have to change.

No I think you are misunderstanding.  The dat itself wouldn't be integrated.... mame would be given the ability to switch artwork layouts via a binded button.  Artwork layouts that contain control panel images (generated from your favorite viewer) would be generated.
Title: Re: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: SirPoonga on February 01, 2011, 12:01:28 pm
ahhhh.  hmmmm
Title: Re: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: headkaze on March 07, 2011, 07:51:12 pm
Had this type of thing working years ago with CPWizard. It can export to MAME's bezel format and with a patch you can assign a button to show / hide your CP. But it would be nice if MAME developers allowed you to assign keys to toggle bezel layers without a patch.
Title: Re: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: drventure on March 07, 2011, 08:31:54 pm
Interesting. I did not know about that patch. Will have to check it out. I just recompiled mame to add in the custom 16x9 default layout (as per Mr DO's site), so I was planning on customizing the bezel in a bit.

But is it possible to have a key mapped in mame that toggles between the various layouts that are defined (including any custom layout for the current game)?

Just wondering. Maybe that Bezel patch would be enough for me to figure it out...

Title: Re: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: Howard_Casto on March 08, 2011, 12:20:23 pm
Had this type of thing working years ago with CPWizard. It can export to MAME's bezel format and with a patch you can assign a button to show / hide your CP. But it would be nice if MAME developers allowed you to assign keys to toggle bezel layers without a patch.

Yeah I remember... I used that build for a while myself but as you said, it was a custom patch and it's a pain in the butt to keep things updated. 

DrVenture:  It isn't a question of if it's possible, it's fairly easy to implement, it's the question of if they would accept it.  If you are wanting to make a submission, I can help you if you need it.  Aside from what I was suggesting, I think a default bezel and perhaps a default vertical bezel option in mame is long over-due.  It wouldn't even take much code.
Title: Re: Controls.dat "support" in mame, perhaps we need to make a submission?
Post by: drventure on March 08, 2011, 08:29:32 pm
Yeah, I'm not sure I'd want to have to deal with that sort of change as a patch either.