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: Controls.dat Viewer Released!!!  (Read 5428 times)

0 Members and 1 Guest are viewing this topic.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:Yesterday at 11:04:07 pm
  • The Bears Still Suck!
Re:Controls.dat Viewer Released!!!
« Reply #40 on: January 22, 2004, 06:27:50 pm »
Well, I don't believe anyone has made a toolf for that yet.  I toyed into incorportating editing the ctrlr files into the mame menus.  A couple of devs and I agree it is possible but will take time to implement.

Pretty much all you can do is start making ini files.  BTW, this is why HC and I have been suggesting to use ctrlr files over the last serveral months when control questions come up ;)

Some of my hacks that are implemented in NoNameMame could help you out.  you can create ctrlr files based on numberof players and number of buttons (at least buttons mame has mapped).

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 13, 2025, 11:38:27 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Controls.dat Viewer Released!!!
« Reply #41 on: January 22, 2004, 08:13:44 pm »
I just tried out Howard's viewer today. I really like what I am seeing.

Is there any tool out there to make creating the ctrlr files easier?

On my cab, I have buttons reassigned all over the place.  That information is stored in the roms .cfg files.  Is there a tool for reading the .cfg files? I would rather not have to go and manually build ctrlr files to match all of that customization.

As an example , In tempest I have the bottom row of player buttons assigned to Fire and the upper row is assigned to the Super Zapper.  I made a ctrlr file for Tempest so that Johhny5 displays the controls correctly, but doing that for every game will be a pain.



You do know that you can make a default.ini, mouse.ini ad_stick.ini ect..... You shouldn't need to make more than a handful of game specific ctrlr files.  Most of this junk is covered in the docs in your ctrlr folder within mame.  


Mame developers, if you are listening, the time has come to better integrate ctrlr files into the mame core.  I'm willing to help but my knowledge of mame's innermost functions is limited.  

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:Yesterday at 11:04:07 pm
  • The Bears Still Suck!
Re:Controls.dat Viewer Released!!!
« Reply #42 on: January 23, 2004, 12:06:49 am »
i am going to address the comment That some people would like the viewer to not be so command line.  

Ok, in order to do this what do we have to do?  We have to list all the mame games in the viewer.  If we did that the next thing you will ask is that you can filter that list.  Isn't this the purpose of an FE?  And that's why it is comand line.  It's not the viewer's job to list and filter the game.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 13, 2025, 11:38:27 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Controls.dat Viewer Released!!!
« Reply #43 on: January 23, 2004, 07:19:41 am »
Well to add to that wtf would you use the viewer for?  To look up a game just for curiosity?  Well that's all well and good but you'll probably wanna play it afterwards.  When you do you'll open up a fe (or a command line)  and launch mame to play it...  

Wouldn't it make a whole lot more sense to have it where you press a key on a selected game in the fe and the viewer pops up?  Then if you don't wanna play it simply exit and if you do just start the game.  Well that's why it uses the command line exclusively.  

As a stand alone app I can see the viewer as nothing less than useless.  It's more of a companion, sorta like the history.dat and mameinfo.dat.  Actually that's where we got the name for the project (even though there isn't a single "dat" file involved).  However, if anyone is interested try pressing f2 during a view.  The most relevant ctrlr file found will open up and you can modify it.  Just something I thought might be useful.  

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Controls.dat Viewer Released!!!
« Reply #44 on: January 23, 2004, 08:49:11 am »
Is there any tool out there to make creating the ctrlr files easier?

I had planned to make something like this at some point:

The way I envisaged it working would be similar to my AVGA MAME Res Tool, if anyone knows how that works...The list of native resolutions would instead be a list of all the different controller configurations used in MAME (from controls.dat).  The list of AVGA resolutions would instead contain details (ie what controllers are there) of your control panel(s).

I initially thought that the user would (manually) make some ctrlrl files for the basic stuff as HC said, dial.ini, paddle.ini etc.  The clever part is the program would then go through every type of controller used in MAME, and apply the relevant ctrlr files specific to each game, based on the controls available and even pick the most suitable control panel (if applicable).

I'm sure I overlooked something but I figured that would do as a start, and I'd go from there...unfortunately I don't see me having time to start this for a while tho :(
« Last Edit: January 23, 2004, 08:52:54 am by Minwah »

ErikRuud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1709
  • Last login:March 05, 2021, 10:20:27 am
  • I'll build a cab for only 99.99.99!!!
    • Erik's humble video game page
Re:Controls.dat Viewer Released!!!
« Reply #45 on: January 23, 2004, 09:12:55 am »
Howard,

I do have a default.ini and a few others defined but with the way I have assigned the controls in mame, I will need a lot more than a handful.  I don't like having dead buttons on my CP, if a game only uses two or three buttons, I assign unused buttons to those functions.  

I was experimenting with Johnny5 yesterday and trying to launch it from GameLauncher.  I got it working so that it When you launch a game the viewer displays the controls, and then when you hit escape, the rom gets launched.  As neat as that was, I realised that escape on my cab is a shifted IPac button.  It would be nice if the "Exit" key in Johnny5 was user definable.

I also decide to get the GameLauncher source code and see if I can incorporate it directly into GL.  I let everyone know how that goes.

Erik
Real Life.  Still a poor substitute for video games!       
American Laser Games Wrapper
O2em Rom Utility

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Controls.dat Viewer Released!!!
« Reply #46 on: January 23, 2004, 01:43:20 pm »
Finally gave the viewer a shot, looks great so far :)

For some reason I can't see the button labels tho - controls.ini is being read OK as I can see the controller type and misc details, but no button/stick labels - what have I done wrong?

Couple of small bugs:

Options > Layout > (Background File) '...' > Cancel = crash,
Resizing a label too small (ie no height/width) results in either crash, or inability to make the label bigger again.

Good work HC :)

ErikRuud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1709
  • Last login:March 05, 2021, 10:20:27 am
  • I'll build a cab for only 99.99.99!!!
    • Erik's humble video game page
Re:Controls.dat Viewer Released!!!
« Reply #47 on: January 23, 2004, 02:35:15 pm »
The information for the button labels comes from your ctrlr files.

You need to tell the viewer which directory to look in for the ctrlr fils.  ie: c:\mame\ctrlr\   or c:\mame\ctrlr\SlilStik

You set it under "Options" "Viewer".
Real Life.  Still a poor substitute for video games!       
American Laser Games Wrapper
O2em Rom Utility

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Controls.dat Viewer Released!!!
« Reply #48 on: January 23, 2004, 03:00:07 pm »
The information for the button labels comes from your ctrlr files.

You need to tell the viewer which directory to look in for the ctrlr fils.  ie: c:\mame\ctrlr\   or c:\mame\ctrlr\SlilStik

You set it under "Options" "Viewer".

I've done this, my location is 'c:\emuarcade\mame\ctrlr\cabinet\'.  Also tried it with the '\hotrodse' folder with no joy :(

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:Yesterday at 11:04:07 pm
  • The Bears Still Suck!
Re:Controls.dat Viewer Released!!!
« Reply #49 on: January 23, 2004, 03:53:45 pm »
Did you modify the layour to use your keycodes?

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:Yesterday at 11:04:07 pm
  • The Bears Still Suck!
Re:Controls.dat Viewer Released!!!
« Reply #50 on: January 23, 2004, 03:55:06 pm »
Is there any tool out there to make creating the ctrlr files easier?

I had planned to make something like this at some point:

The way I envisaged it working would be similar to my AVGA MAME Res Tool, if anyone knows how that works...The list of native resolutions would instead be a list of all the different controller configurations used in MAME (from controls.dat).  The list of AVGA resolutions would instead contain details (ie what controllers are there) of your control panel(s).

I initially thought that the user would (manually) make some ctrlrl files for the basic stuff as HC said, dial.ini, paddle.ini etc.  The clever part is the program would then go through every type of controller used in MAME, and apply the relevant ctrlr files specific to each game, based on the controls available and even pick the most suitable control panel (if applicable).

I'm sure I overlooked something but I figured that would do as a start, and I'd go from there...unfortunately I don't see me having time to start this for a while tho :(

As I said I was thinking of incorpating this directly into mame.  uRebel and I had a nice discussion aobut this on the old mame dev forum.  But when they changed software they lost that discussion.  So I don;t have my notes anymore :(

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Controls.dat Viewer Released!!!
« Reply #51 on: January 24, 2004, 08:02:14 am »
As I said I was thinking of incorpating this directly into mame.  uRebel and I had a nice discussion aobut this on the old mame dev forum.  But when they changed software they lost that discussion.  So I don;t have my notes anymore :(

Presumably that would be either general of game specific like the current CFG settings?  My prog would be able to create INI's for every game in one hit.  What you talk about would of course be great, seems like the only way to go since the ctrlr ini files were introduced...

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Controls.dat Viewer Released!!!
« Reply #52 on: January 24, 2004, 08:12:11 am »
Did you modify the layour to use your keycodes?

Well I'm using default (more or less) keys.  Here's whats in my default.ini:

P1_JOYSTICK_UP          "KEYCODE_UP"
P1_JOYSTICK_DOWN        "KEYCODE_DOWN"
P1_JOYSTICK_LEFT        "KEYCODE_LEFT"
P1_JOYSTICK_RIGHT       "KEYCODE_RIGHT"

Seems to match the labels...what does the viewer do, read [ctrlrpath]\default.ini and compare to the keycodes set in the layout editor?  Almost seems like it isn't reading the ini file...here's what I get:

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 13, 2025, 11:38:27 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Controls.dat Viewer Released!!!
« Reply #53 on: January 24, 2004, 08:28:58 am »
What about your std.ini... Is it in your ctrlr root folder?  The viewer needs this or it crashes and burns.  

All of your ctrlr files are read, in a hierarchy, overwriting each other.  Exactly like mame does it.  This is why the std.ini has to be there.... it's read first for mame's defaults.  


One more thing...... The mame devs made the ctrlr syntax very very wierd and thus it's hard to parse.  Mame might be a bit more forgiving about improper formatting than the viewer is..... You can't have any extra spaces, no tab can be out of place ect..... This is no problem if you copy and paste entries from the std.ini like I do.  :)


Btw I'm aware of the font resizing bug, it's just not a bug I can't fix...... vb can't handle very very small fonts or very very small labels. (as you know)  I can restrict the size but I don't right now for debugging purposes.  Also all fonts you use must be true type or they won't show up.  It has to do with the dynamic scaling I use.  

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Controls.dat Viewer Released!!!
« Reply #54 on: January 24, 2004, 08:55:32 am »
What about your std.ini... Is it in your ctrlr root folder?  The viewer needs this or it crashes and burns.  

All of your ctrlr files are read, in a hierarchy, overwriting each other.  Exactly like mame does it.  This is why the std.ini has to be there.... it's read first for mame's defaults.  


One more thing...... The mame devs made the ctrlr syntax very very wierd and thus it's hard to parse.  Mame might be a bit more forgiving about improper formatting than the viewer is..... You can't have any extra spaces, no tab can be out of place ect..... This is no problem if you copy and paste entries from the std.ini like I do.  :)


Btw I'm aware of the font resizing bug, it's just not a bug I can't fix...... vb can't handle very very small fonts or very very small labels. (as you know)  I can restrict the size but I don't right now for debugging purposes.  Also all fonts you use must be true type or they won't show up.  It has to do with the dynamic scaling I use.  

std.ini is in \mame\ctrlr\.  I think the format should be OK, I also tried the standard hotrodse and slikstik ctrlrs instead of the one I made myself...no joy :(

I must have done something wrong somewhere...does the .cfg look ok:?

1
 0
c:\emuarcade\mame\
mame.exe
c:\emuarcade\mame\ctrlr\cabinet\
 1
 1
 0
 0
 0
 0

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 13, 2025, 11:38:27 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Controls.dat Viewer Released!!!
« Reply #55 on: January 24, 2004, 09:30:24 am »
There is your problem right there..... It just needs the folder name, not the path to it.  So a simple "cabinet" will do.  :)  That's why I had the default value set to "ragingdragon" that way people wouldn't get confused.  

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:July 13, 2025, 11:38:27 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Controls.dat Viewer Released!!!
« Reply #56 on: January 24, 2004, 09:36:43 am »
Update: FOR USERS AND DEVELOPERS ALIKE


I just put up a external communication writeup for dk in it's online documentation.  At the bottom is an example which shows how to use this mode to launch the controls viewer from within dk.  

For developers, there is a note at the bottom which shows the most basic command line you can send to the viewer and notes about the type of data you need to send.  It's all standard data which should be readily available in most fe's databases.  (read any fe that keeps track of clone names and rom names)

There are also several "advanced" things you can send to the viewer but they are very beta.  If any of the developers are interested in these features and helping to finish their formats (still undecided about how some stuff should be sent) then please pm me.  

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Controls.dat Viewer Released!!!
« Reply #57 on: January 24, 2004, 11:21:29 am »
There is your problem right there..... It just needs the folder name, not the path to it.  So a simple "cabinet" will do.  :)  That's why I had the default value set to "ragingdragon" that way people wouldn't get confused.  

I guess I managed to ignore that somehow, sorry  :-[

Works a treat now :)