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: FrontEnds vs Controls.dat  (Read 2612 times)

0 Members and 1 Guest are viewing this topic.

Crazy Cooter

  • Senator Cooter was heard today telling the entire congressional body to STFU...
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2041
  • Last login:June 05, 2025, 12:39:19 pm
FrontEnds vs Controls.dat
« on: October 20, 2004, 10:55:27 pm »
I know the controls.dat project is still under development, but was wondering if any of the FE developers planned on incorporating it into the actual frontend?  I won't have a pause button on my cab so I won't be able to use it unless somebody writes it in.

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re:FrontEnds vs Controls.dat
« Reply #1 on: October 20, 2004, 11:15:25 pm »
It's usually not activated by a pause button. This leads me to believe you think it is called WHILE a mame game is running. Usually is is called from the FE BEFORE a game is launched. This makes is possible to probram any key (Via the FE) to launch the viewer.

John

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:FrontEnds vs Controls.dat
« Reply #2 on: October 21, 2004, 01:16:55 am »
jcrouse, slightly misinformed.

There's two ways to use the controls.dat project right now.  Either with mamewah or dragon king using a viewer or using Buddabing's mame hack which displays the information when you pause mame.

I'd love to see it incorporated directly into an FE.  When I make my own I am just going to have a couple of symbols showing what type of controls the game used and button labels.
« Last Edit: October 21, 2004, 01:18:27 am by SirPoonga »

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:FrontEnds vs Controls.dat
« Reply #3 on: October 21, 2004, 04:43:08 am »
jcrouse, slightly misinformed.

There's two ways to use the controls.dat project right now.  Either with mamewah or dragon king using a viewer or using Buddabing's mame hack which displays the information when you pause mame.

This is exactly what jcrouse was getting at (he wrote the alternative viewer CPViewer after all ;) ).

I would eventually like to incorporate the controls.dat stuff into MW, not so much for graphical displaying purposes (tho I would have the control type(s) indicated somewhere) but rather for filtering/sorting based on controls - so you could create games lists based on whatever controls you actually have on your control panel(s).

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:April 16, 2025, 04:09:53 pm
  • Cunning like the Fox.
    • Mods'n'Mods
Re:FrontEnds vs Controls.dat
« Reply #4 on: October 21, 2004, 07:38:38 am »
sorting by more accurate controls would definately be a 'good thing' in an FE.  Would go hand-in-hand with pre-game or during game controls information.

It's not too hard to implement - 1 more (small) xml to pass along with mames listinfo, then supercede the info from listinfo with the info from controls.dat. Its what I do for creating info to send to an LCD screen.  (And if I can make it work in VB, trust me - the FE authors can!)





2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:FrontEnds vs Controls.dat
« Reply #5 on: October 21, 2004, 08:51:59 am »
Actually, I'm going to have to support SirPoonga on this one.  jcrouse did slightly misinform.  Using Buddabings patch, you can view controls.dat while the game is running when you press Pause.  

Speaking of it's been mentioned before it would be great if CPViewer supported this.  jcrouse, Are you still looking into it?

That being said and to answer Crazy Cooter mamewah and dragon king, maybe one other, support calling a seperate viewer application for the controls.dat.  

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re:FrontEnds vs Controls.dat
« Reply #6 on: October 21, 2004, 09:16:00 am »
Yes, I agree, I did slightly misinform. Sorry for that. As far as me supporting this, I'm not sure how. My program has no control it's simply a called program. I think the support needs to be in the FE. Maybe I'm misunderstanding (agan). Am I missing something here.

John

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:FrontEnds vs Controls.dat
« Reply #7 on: October 21, 2004, 09:34:10 am »
jcrouse, I don't think you are too far off.  Been a while since I looked at you program and I'm tired, but I think all you need is the ability to save the output to a png file instead of displaying the output.

It's easy to describe how it works, but easier for you to understand if you try it out.  Try compiling mame with Buddabing's patch and using one of the other CP viewer applications, johnny5 or CPMaker.  You'll then see how it's done.

Ok, decided to describe it anyways.  Really tired so others can correct me if I'm wrong, but basically with Buddabing's patch when Mame starts a bat file is called.  This bat file would call your cpviewer pass you the parent and clone rom info.  You would just need to save the cp layout to a png file.  Then when you press Pause the png is displayed.  So CPViewer needs some way to know to save the layout to a png file instead of displaying the layout, i.e command line argument, ini file, whatever you want.
« Last Edit: October 21, 2004, 09:35:42 am by 2600 »

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:FrontEnds vs Controls.dat
« Reply #8 on: October 21, 2004, 10:34:12 am »
It's not too hard to implement - 1 more (small) xml to pass along with mames listinfo, then supercede the info from listinfo with the info from controls.dat. Its what I do for creating info to send to an LCD screen.  (And if I can make it work in VB, trust me - the FE authors can!)

It might be a bit more difficult when there are multiple controls of different types...I am going to have a big rest before I even think about it  ;D

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:FrontEnds vs Controls.dat
« Reply #9 on: October 21, 2004, 10:58:30 am »
Actually, I'm going to have to support SirPoonga on this one.  jcrouse did slightly misinform.  Using Buddabings patch, you can view controls.dat while the game is running when you press Pause.  

Speaking of it's been mentioned before it would be great if CPViewer supported this.  jcrouse, Are you still looking into it?

That being said and to answer Crazy Cooter mamewah and dragon king, maybe one other, support calling a seperate viewer application for the controls.dat.  

The next version of the display code will support CPViewer layout files. I like CPViewer for creating layouts; it's easy to use. There are a couple of issues with it, I'll send an email to the author later.

Also, CPMaker will (optionally) be completely compiled into MAME so that no external controls artwork generator will be necessary. Fonts and colored text will be correct as well.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:FrontEnds vs Controls.dat
« Reply #10 on: October 21, 2004, 12:09:43 pm »
Can someone point me to the hacked mame version that supports panel viewing when paused? that sounds great!
Also the only viewer I was aware of was Johnny5, what is CPViewer and how does it compare to Johnny5?
(sorry, been away from the forums for a while due to this thing called Real Life(TM) )

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re:FrontEnds vs Controls.dat
« Reply #11 on: October 21, 2004, 01:58:10 pm »
http://home.comcast.net/~cpviewer

It was written for my own use and expanded to trya nad help others. It's quite easy to use but doesn't have nearly the features of Johnny5. I simply don't understand the ctrlr files nearly as well as the author of Johnny5 and for now don't want to invest the time in figuring them out.

Later,
John

Crazy Cooter

  • Senator Cooter was heard today telling the entire congressional body to STFU...
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2041
  • Last login:June 05, 2025, 12:39:19 pm
Re:FrontEnds vs Controls.dat
« Reply #12 on: October 21, 2004, 03:57:37 pm »
I'm using mamewah now, but would love to be able to display the text from the button config on the "main" screen directly.  I'm already working on the graphical display of my modular CP by using an artwork folder.  For people using a standard CP, they could put a pic of it right into the background image and choose which text boxes (P1_BUTTON1, P1_BUTTON2, etc.) to show through the layout designer.  Waddaya say MinWAH?  Tease us with with v1.51b where we can display the button labels & miscDetails? ;)

Otherwise I'm going to try "hacking" that info into mamewah through another .ini file.  Maybe through the monitor info variable?  I have to go try something... ;)

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:FrontEnds vs Controls.dat
« Reply #13 on: October 21, 2004, 04:06:08 pm »
sorting by more accurate controls would definately be a 'good thing' in an FE.  Would go hand-in-hand with pre-game or during game controls information.

It's not too hard to implement - 1 more (small) xml to pass along with mames listinfo, then supercede the info from listinfo with the info from controls.dat. Its what I do for creating info to send to an LCD screen.  (And if I can make it work in VB, trust me - the FE authors can!)


You are using the mame heirarchy to display the controls of clones correctly, right?  I'm starting to work on the code that will allow clones to be added that have different controls, but for the most part the clones have the same controls as the parents.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:FrontEnds vs Controls.dat
« Reply #14 on: October 21, 2004, 04:54:28 pm »
I'm using mamewah now, but would love to be able to display the text from the button config on the "main" screen directly.  I'm already working on the graphical display of my modular CP by using an artwork folder.  For people using a standard CP, they could put a pic of it right into the background image and choose which text boxes (P1_BUTTON1, P1_BUTTON2, etc.) to show through the layout designer.  Waddaya say MinWAH?  Tease us with with v1.51b where we can display the button labels & miscDetails? ;)

Otherwise I'm going to try "hacking" that info into mamewah through another .ini file.  Maybe through the monitor info variable?  I have to go try something... ;)


Not sure what you're proposing here.
For a while I had an artwork piece for every game that showed the controls. The images where static ("precomputed") for each game, and I had a script using parsing controls.dat and using imagemagic to glue the pieces together to generate the images.
Then the file format changed and I wasn't happy with how tiny the pictures were so I gave up...

Crazy Cooter

  • Senator Cooter was heard today telling the entire congressional body to STFU...
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2041
  • Last login:June 05, 2025, 12:39:19 pm
Re:FrontEnds vs Controls.dat
« Reply #15 on: October 21, 2004, 05:33:51 pm »
"For a while I had an artwork piece for every game that showed the controls. The images where static ("precomputed") for each game"

Sounds like what I'm doing.  Each game will have it's own control "pic" of how the modules need to be put together.  I've got that part all figured out.  The next part I want is to display is the text associated with "P1_Button" (and the rest) in mamewah itself.  I just tried editing the catver.ini, but it seems that it only takes one line of information into mamewah.  I'd be happy if I could even list them off to the side.

Kind of like this quick&poor pic but with what each button does from controls.dat.

i.e. P1_Button1 would say "jump"
      P2_Button2 would say "shoot"
      etc.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:FrontEnds vs Controls.dat
« Reply #16 on: October 21, 2004, 05:42:11 pm »
I'm using mamewah now, but would love to be able to display the text from the button config on the "main" screen directly.  I'm already working on the graphical display of my modular CP by using an artwork folder.  For people using a standard CP, they could put a pic of it right into the background image and choose which text boxes (P1_BUTTON1, P1_BUTTON2, etc.) to show through the layout designer.  Waddaya say MinWAH?  Tease us with with v1.51b where we can display the button labels & miscDetails? ;)

Otherwise I'm going to try "hacking" that info into mamewah through another .ini file.  Maybe through the monitor info variable?  I have to go try something... ;)

Do you mean on the screen as you are scrolling through the list of games?  I'd like to see that too.  Now, the problem with that is controls.dat is designed for mame.  If the FE is multi-console the FE dev will have to figure out how to handle other emus.  Probably wouldn;t be too hard to do though.

In mamewah you can press a button to use a viewer to see the controls.  Johnny5, and I think cpmaker, allow you associate a keypress to a label to display the correct info.  Johnny5 goes a step further in that it can scan the old ini ctrlr file format and correctly display the buttons labels based on your ctrlr config.  I believe HowardC is not going to support the new xml format, I think he will just tell you to use a convertor which he made or is making to convert the new format to the old format.  

Most of us know it is easier to make the ctrlr files in the old ini file format anyway, then use HowardC's convertor to convert to xml.

Crazy Cooter

  • Senator Cooter was heard today telling the entire congressional body to STFU...
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2041
  • Last login:June 05, 2025, 12:39:19 pm
Re:FrontEnds vs Controls.dat
« Reply #17 on: October 21, 2004, 06:42:17 pm »
"Do you mean on the screen as you are scrolling through the list of games?"

Yep, that's exactly what I'd want.  I don't *think* it would be too hard to put in, but it's beyond my capabilities.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:FrontEnds vs Controls.dat
« Reply #18 on: October 21, 2004, 06:45:47 pm »
Got it backwards.... in the future I will only support the new format, but as I have the converter, a person using the old format can just convert their folder periodically (the converter doesn't effect your old files) and have it there just for the viewer.  

About static images in a fe.... while they are good, they aren't as accurate as checking the file every time.  In the future, however j5 will support a batch generation of these files.  Ive found that on an arcade monitor or tv, the layouts are completely unreadable unless they are fullscreen.  This is why I don't concentrate on that feature too much.  

For any developers that are interested, to support j5 you simply need to give the user a button to push.  Upon pushing it, you launch the viewer like you would a mame game while passing the rom name and clone name.  It's as simple as that.  I beleive the other viewers out there work very similarly.  


About using the format to add filters to a fe.....  If you wanted to do simple filtering no problem, but more advanced stuff could be tricky.  Remember, we "build" real life controls out of mame's virtual controls, which is non-sensical if you aren't familiar with the format.  

One of things the upcoming release of dk might add is the parsing of the controls.ini  but it'll be a simple dump of the data to the pre-existing mame "controls" slot though, nothing fancy.  


papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:FrontEnds vs Controls.dat
« Reply #19 on: October 22, 2004, 12:19:33 pm »
Ive found that on an arcade monitor or tv, the layouts are completely unreadable unless they are fullscreen.

yes, that was my experience too, which is why I want to give Johnny5 a try again.

I also agree that going through the file rather than static images is better, otherwise you have to redo your static images when the controls.dat changes/gets corrected. Even though I have a script to do that, it's still oretty messy.

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:April 16, 2025, 04:09:53 pm
  • Cunning like the Fox.
    • Mods'n'Mods
Re:FrontEnds vs Controls.dat
« Reply #20 on: October 22, 2004, 12:40:17 pm »
sorting by more accurate controls would definately be a 'good thing' in an FE.  Would go hand-in-hand with pre-game or during game controls information.

It's not too hard to implement - 1 more (small) xml to pass along with mames listinfo, then supercede the info from listinfo with the info from controls.dat. Its what I do for creating info to send to an LCD screen.  (And if I can make it work in VB, trust me - the FE authors can!)


You are using the mame heirarchy to display the controls of clones correctly, right?  I'm starting to work on the code that will allow clones to be added that have different controls, but for the most part the clones have the same controls as the parents.

Yes -  I assume that a clone will have the controls of its parent. So I check to see if a game has a parent, and if it does I use the parents info from controls.dat

Crazy Cooter

  • Senator Cooter was heard today telling the entire congressional body to STFU...
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2041
  • Last login:June 05, 2025, 12:39:19 pm
Re:FrontEnds vs Controls.dat
« Reply #21 on: October 22, 2004, 04:54:35 pm »
Ahhh, things are clearer now.  I'm on a slightly different page then some of you guys.

Correct me if I'm wrong, but it seems like some of you want to use controls.dat to generate a dynamic graphic based on the controller identification.  Then apply labels to the buttons/directions.

I simply want to label buttons.  Rather than "dynamically" generating a control panel graphic, I want to label my controls.  Any "notes" I need could be edited into the miscDetails entry.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:FrontEnds vs Controls.dat
« Reply #22 on: October 22, 2004, 09:13:13 pm »
I simply want to label buttons.  Rather than "dynamically" generating a control panel graphic, I want to label my controls.  Any "notes" I need could be edited into the miscDetails entry.
Could you explain in more detail?

Crazy Cooter

  • Senator Cooter was heard today telling the entire congressional body to STFU...
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2041
  • Last login:June 05, 2025, 12:39:19 pm
Re:FrontEnds vs Controls.dat
« Reply #23 on: October 22, 2004, 10:50:52 pm »
Sure, we'll use MameWAH as an example FE since I'm familiar with it, but I'm sure they are all similar.

In MameWAH, you could put a graphic of your control panel right into the background image.  MameWAH allows you to position text boxes that contain information read from the catver.ini file (and other info).  If MameWAH could read the controls.dat for the P1_Button1 "variable", I could position that text box near or on top of that button.  It would then display "jump" when Donkey Kong was highlighted just like it displays the monitor info from the catver.ini file.  Then when I select the next game (say Street Fighter just for discussion), it would display "punch" "kick" etc. for each button.  You would know what each button was configured to do prior to launching the game because it would read the info as your highlighted selection changed.  The miscDetail text could be displayed right beneath the CP graphic.  That's what I'd like to see.  I can't think of an example where the Player 2 controls would be different, so I'd just display the text on half of my CP graphic.

Now with modular controls (me) or a rotating control panel, you could have a new control panel show up if you fake the control panel graphic as an artwork file.  Better yet would be to create a new layout and use filters to generate the game list and pretend each CP layout was a new emulator.  That way you could keep the actual CP grahic as part of the background image (That idea would work perfect with MameWAH.)

I just don't know how to make it happen.  Could a FE read directly from the controls.dat or would it need to pass the info through a controller configuration to accurately display which button did what?  If it can read it directly, it *sounds* relatively easy to do.  I *think* it could read it directly and just display the info, but I can't code anything other than html.  And I use WYSIWYG progs for that. ;)

For "normal" CP's this would be great.  For frankenpanels one might need duplicate text boxes to cover the P3 & P4 button arrangements.  Unless you labeled the buttons on the real life control panel as A,B,C,D,E,F and refer to them like I showed in the pic from my post above.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:FrontEnds vs Controls.dat
« Reply #24 on: October 24, 2004, 02:28:55 am »
Sure, we'll use MameWAH as an example FE since I'm familiar with it, but I'm sure they are all similar.

In MameWAH, you could put a graphic of your control panel right into the background image.  MameWAH allows you to position text boxes that contain information read from the catver.ini file (and other info).  If MameWAH could read the controls.dat for the P1_Button1 "variable", I could position that text box near or on top of that button.  It would then display "jump" when Donkey Kong was highlighted just like it displays the monitor info from the catver.ini file.  Then when I select the next game (say Street Fighter just for discussion), it would display "punch" "kick" etc. for each button.  You would know what each button was configured to do prior to launching the game because it would read the info as your highlighted selection changed.  The miscDetail text could be displayed right beneath the CP graphic.  That's what I'd like to see.  I can't think of an example where the Player 2 controls would be different, so I'd just display the text on half of my CP graphic.


Read what I said above.... unless the layout is fullscreen, it's impossible to read the labels.  For a layout your talking about to be viewable, it'd have to be the entrie skin.  Also keep in mind that as complicated, coding-wise as the dragon king is, the johnny 5 viewer is just as complicated, and dk is probably 3 times more complicated than mamewah, so directly interfacing to the controls.dat isn't practical unless someone were to write a brand new fe based around the format.
 
About the rotating panels bit.... although not properly implemented yet, the j5 viewer supports such things.