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.ini and the GP-49  (Read 4589 times)

0 Members and 1 Guest are viewing this topic.

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Controls.ini and the GP-49
« on: April 02, 2005, 05:32:29 pm »
I wanted to start this a seperate thread because the product announcement thread is too long to address other things.

Ok, where to start. Basically, I have 2 GP-49 with Midway sticks and have switching the modes controlled via the PC via batch files that set bits on the parallel port. The next logical extension of this is to get control information from controls.ini and automatically switch modes based on the control information in controls.ini. The information would be passed to the batch file in the form of a variable i.e. relay.bat %control%

Mostly this is straight forward and most games can use the info from controls.ini directly by using the info after the + in the control definition.

Thus P1Controls=8-way Joystick+joy8way becomes the variable %control% joy8way and it is passed to the batch file and the mode is set. This works for most games as the information is there and set. There are a couple of instances in control.ini where things are not handled in the same manner though which makes passing the info a little bit more difficult. Q*Bert is one example.

Qbert uses P1Controls=Diagonal 4-way Joystick+joy4way and only passes joy4way. Compare that as to how 2 way sticks are handled and you can see that it's effectively dealt with there and only a slight modification is needed for Q*bert to works in the same manner.

Here's stargate: P1Controls=2-way Joystick (Vertical)+vjoy2way
and uniwars: P1Controls=2-way Joystick (Horizontal)+joy2way
and lastly, The End:
P1Controls=Directional Buttons(2-way left/right)+joy2way

From the above examples you can see that 2 way controls are handled properly with the vjoy2way for Vertical and joy2way for Horizontal. I included The End only because even though the first part of the control description is different it still passes te same, correct info about the controls.

My solution was to go through and add a d to joy4way making it djoy4way in the case of diagonals. My only point in bringing this up is maybe controls.ini could be standardized to account for those type of differences? Since it is technically correct already in the 4 way mode I was just thinking in terms of it being used as a control file itself rather than just display and it does make a difference there. I have not been far enough through it yet to hit every difference. I really just started because I got my GP-49 mode selection under computer control now:)

Thanks to SirPoonga and the team that maintains, adds, and updates controls.ini for the GREAT utility!

Toonces

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Controls.ini and the GP-49
« Reply #1 on: April 02, 2005, 05:39:43 pm »
I just want to take a minute to say I am really impressed with the progress you are making.  Software control of mode switching was the one thing I thought the GP-Wiz49 lacked and I'm amazed how well you've taken the project on and the progress you are making.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Tommy Boy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 113
  • Last login:April 13, 2010, 04:13:56 am
Re: Controls.ini and the GP-49
« Reply #2 on: April 02, 2005, 05:51:21 pm »
Ditto to what Tiger-Heli said.  Actually, the same goes to many others on this forum too.  As a guy who has very little design/engineering talent, I find it amazing to see how much talent there is in this community.  The creativity, quality, and speed with which new products have been developed lately is amazing and very exciting!  Thanks to all who bring so much to this community!!

MrSaLTy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:November 01, 2024, 01:26:30 pm
  • nabisco reject
Re: Controls.ini and the GP-49
« Reply #3 on: April 04, 2005, 12:23:06 am »
This is great news as far as I'm concerned.  I love the idea of the 49 way sticks and 'auto switching' from the PC via software.  Hopefully, when you get things ironed out you will provide some how to info like schematics and software etc. so everyone can enjoy this.  What I would like to do in addition to this is have led indicators that can show which mode is selected.

I am waiting with great anticipation!   ;D

jer2665

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • Last login:January 06, 2006, 04:43:34 pm
  • I want to build my own arcade controls!
    • Jeremy Halvorsen . com
Re: Controls.ini and the GP-49
« Reply #4 on: April 04, 2005, 01:10:51 am »
now that i'm thinking of going with 49 ways, this'd be fantastic.  or i'd love one mode change button with the led's to show which mode it's in. 

not to hijack this joystick thread too, but for those with experience with the 49 ways, have you also used the p360's?  if so, planning on playing fighters, are these at least pretty close to as good for those games as the p360's?

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #5 on: April 04, 2005, 12:13:05 pm »
now that i'm thinking of going with 49 ways, this'd be fantastic.  or i'd love one mode change button with the led's to show which mode it's in. 

not to hijack this joystick thread too, but for those with experience with the 49 ways, have you also used the p360's?  if so, planning on playing fighters, are these at least pretty close to as good for those games as the p360's?

I have both and the feel is different between the sticks. Not bad but different. The P360's feel a little "Crisper" due to the spring action that holds the shaft where the 49 ways feel more like a classic Wico stick which makes sense since it uses the same type of rubber bushing. Both are perfectly usable though and again, it all comes down to feel :) I don't think any amount of description would be better than going and trying out the 49 way somewhere if it's possible. Just find an NBA Jam or NFL Blitz and stand there and play a game of SF or Metal Slug in your mind and use the sticks as if you were playing. Throw in some sound effects and amuse the people around you :) You can even talk smack to the imaginary guy you're playing against for added fun. Then when they release you from the hospital mental ward you will know which stick you like.

All kidding aside, that really is the best way to know if it's going to work for you. The difference between the 49 way and the P360 while there isn't as clear cut as the difference between a P360 and a t-stick+. The feel is different but it's not as drastic as the throws are similar.

As far as using LEDs to display the mode, the relay board I use has them and I used them while hooking up my setup but they are only on momentarily while the mode is actually switched so they're not very good for that. I am thinking of a couple of different options. The easiest for me is to remove the LEDs from the relay board and add a latch chip to drive the LEDS. That would give a simple mode display using a single LED for each mode.

My second idea and the one I am going to try first is using a mini led sign that hopefully I can program with the 7 different modes and trigger off of the switching event. The signs are available http://web-tronics.com/prmiledmosis.html and even though it says available 4/10 I was told on Friday that they were arriving today and it should ship right away. If I can program it to do what I want, I plan on integrating it into one of the 2 instruction card areas on my cabinet. It also fits in well with the design of my cab since it has an LED marquee.

jer2665

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 62
  • Last login:January 06, 2006, 04:43:34 pm
  • I want to build my own arcade controls!
    • Jeremy Halvorsen . com
Re: Controls.ini and the GP-49
« Reply #6 on: April 04, 2005, 12:25:07 pm »
that'd be pretty cool, and easy enough to add as part of the look of the cab.  keep up the great work man, i think im gonna go with the 49-ways, so hopefully by the time i get everything ready you'll be setting up yours and have the info up on the web somewhere :)

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #7 on: April 04, 2005, 12:46:50 pm »
that'd be pretty cool, and easy enough to add as part of the look of the cab.  keep up the great work man, i think im gonna go with the 49-ways, so hopefully by the time i get everything ready you'll be setting up yours and have the info up on the web somewhere :)

Mine is all setup and working :) I already have the files with the info mostly ready to go. The good news is that you can do it for the cost of a parallel port cable or even cheaper, the cost of a DB25 male connector and some Ethernet cable. The relay board is not required just for mode switching and it works on Win9X through XP. It could also work on DOS but since the GP-49 doesn't work under DOS there's really no point :)

Toonces

Hoagie_one

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3062
  • Last login:September 04, 2020, 12:36:28 pm
  • Um....whats a cabinet
Re: Controls.ini and the GP-49
« Reply #8 on: April 04, 2005, 02:21:00 pm »
are you gonna post a walk through on how to get it working?

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #9 on: April 04, 2005, 02:29:22 pm »
are you gonna post a walk through on how to get it working?

Yes. I need to finish up with the write up. I should have it complete in a few days.

Toonces

Todd H

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 658
  • Last login:August 26, 2024, 02:23:32 pm
  • It's Gameday!
Re: Controls.ini and the GP-49
« Reply #10 on: April 04, 2005, 03:09:14 pm »
Finally, finally, FINALLY!  4-8 way switching in software!  You're going to be a very popular man Toonces.   ;)

Hoagie_one

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3062
  • Last login:September 04, 2020, 12:36:28 pm
  • Um....whats a cabinet
Re: Controls.ini and the GP-49
« Reply #11 on: April 04, 2005, 03:11:23 pm »

Flinkly

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1244
  • Last login:March 14, 2017, 01:14:21 pm
Re: Controls.ini and the GP-49
« Reply #12 on: April 04, 2005, 03:15:55 pm »
now i know some fe builders might jump into this one to solve all our problems, but what about till them?
« Last Edit: April 04, 2005, 03:23:13 pm by Flinkly »

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Controls.ini and the GP-49
« Reply #13 on: April 04, 2005, 03:25:58 pm »
This is Toonces baby, so he can correct me if I said anything wrong!
now i know some fe builders might jump into this one to solve all our problems, but what about till them?
My guess would be batch files.
Quote
do you click on an icon on your desktop to switch it?
You could, if you put the command to switch it in the batch file and made a desktop shortcut to it, but then you wouldn't be using controls.ini.
Quote
  and what about overiding it, like if controls.dat is wrong, or wanting to use something different?
You can always manually edit controls.dat, or create a different file with the same name and format.  The problem will be maintaining your changes when an updated controls.dat is released.
Quote
  how about mutliple 49-ways?  could you just send info for the first player and connect it to both/all gp-wiz49s and then change all the 49-ways?
It would depend how they are wired to the relay board, but I would certainly hope this would be possible.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #14 on: April 04, 2005, 05:41:50 pm »
Finally, finally, FINALLY!  4-8 way switching in software!  You're going to be a very popular man Toonces.   ;)

*Rich arabian accent*
Yes. Toonces, you shall have pick of any one of my 700 wives for your work.


Thanks, I hope my wife doesn't mind :)

now i know some fe builders might jump into this one to solve all our problems, but what about till them?  do you click on an icon on your desktop to switch it?  and what about overiding it, like if controls.dat is wrong, or wanting to use something different?  how about mutliple 49-ways?  could you just send info for the first player and connect it to both/all gp-wiz49s and then change all the 49-ways?

now that we have a joystick that does almost everything, someone should come up with the best control panel layout to cover most games. joystick games that is...

Support from one of the FE's is already in the works. See http://www.gameex.info/forums/index.php?showtopic=155 for how the author plans to support it.

As far as how I switch modes now, I added my Application to the main menu of the FE and select the desired mode before entering the game I want to play. The drawback is that I can't yet select 2 way horizontal mode since it would keep me from navigating the FE menus. I expect that will change very soon.

If controls.ini is wrong you can simply change it. AFAIK, given the way Tom stated he wanted to support it in GameEx, it is a matter of the FE parsing controls.ini and making a map to the correct mode, 1-8 and passing that to the app to do the switching. On exit you just pass back 4,8 or 49 way mode. All of them work for navigating menus so it really doesn't matter which one you use. If there are errors in Controls.ini you can change it directly. The reason I started this thread was hopefully to get some standardized definitions to the controls.ini in order to make it easy to create a map of control type to joystick mode. It's nearly that way now. I just noticed that while H & V 2 way modes are differentiated in the file already, 4 & 4 Diagonal were not. The rest of the definitions should be fairly easy to figure out. Analog = 49 way, Stick = 49 way, etc...

My cab has 2 49's and I connected them both to the relay board. Both switch modes at the same time. You could easily do the same with 4 sticks. The difficult part is going to be when someone here decides they want player 1 & 2 at 8 way, player 3 at 2 way vert and player 4 at 2 way horiz. Just wait, someone will want to do that  ;) They're on their own for that one.

For those interested, I posted some pics of the relay board and my cab as it is right now (there are also a couple of pics from Feb when I had just got my T-Stick+ installed). You can browse them here: http://www.pachislofun.com/cyberlead/

The files I put together to support this have the info and programs to support either the relay board or a straight connection to the GP-Wiz49. The parts are easily found at Radio Shack and cost about $10 for everything assuming you have to buy an ethernet cable to hack up. For the relay board hookup I bought 2 DB25 connectors, 1 M and 1F and used an other piece of CAT5 wire I had lying around. The DB25 connectors wer $1.79 and the hoods were $2.39. With a direct connection you only need 1 DB25 connector. I would reccomend the hood but it's up to you.


When I finish writing up the instructions on making the cables and how to use the programs, I will release them and everyone can join in the fun.

Toonces

MrSaLTy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:November 01, 2024, 01:26:30 pm
  • nabisco reject
Re: Controls.ini and the GP-49
« Reply #15 on: April 04, 2005, 06:39:25 pm »
Awsome, I can't wait.  ;D

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: Controls.ini and the GP-49
« Reply #16 on: April 04, 2005, 08:04:07 pm »
My solution was to go through and add a d to joy4way making it djoy4way in the case of diagonals. My only point in bringing this up is maybe controls.ini could be standardized to account for those type of differences? Since it is technically correct already in the 4 way mode I was just thinking in terms of it being used as a control file itself rather than just display and it does make a difference there. I have not been far enough through it yet to hit every difference. I really just started because I got my GP-49 mode selection under computer control now:)

First, thanks.

Ok, why those are labelled as such.  I needed a way to relate the description of the control (4 way joystick, 2 way joystick, trackball) to the ctrlr constants mame uses.  I originally used the constants built into mame.  However this causes issues with 2 way joys to know if I need to use up/down or left/right.  Hence why I added vjoy4way.  Now diagonal joysticks are normal joysticks and in mame use up/down/left/right, no need to uniquely identify to figure out what ctrlr constants are needed.

You know, a better method than switching the appropiate diagonal 4-ways so you can map controls dynamically than going through and changing them is in code just search for diagonal in the control description and have the code output the exception.  That way it changes with new versions of the dat file.

Flinkly

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1244
  • Last login:March 14, 2017, 01:14:21 pm
Re: Controls.ini and the GP-49
« Reply #17 on: April 04, 2005, 08:09:35 pm »
not to sound bossy, but is minwah back from his vacation yet?  cause i know one fe that should jump on this bandwagon soon...

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #18 on: April 04, 2005, 11:46:00 pm »
My solution was to go through and add a d to joy4way making it djoy4way in the case of diagonals. My only point in bringing this up is maybe controls.ini could be standardized to account for those type of differences? Since it is technically correct already in the 4 way mode I was just thinking in terms of it being used as a control file itself rather than just display and it does make a difference there. I have not been far enough through it yet to hit every difference. I really just started because I got my GP-49 mode selection under computer control now:)

First, thanks.

Ok, why those are labelled as such.  I needed a way to relate the description of the control (4 way joystick, 2 way joystick, trackball) to the ctrlr constants mame uses.  I originally used the constants built into mame.  However this causes issues with 2 way joys to know if I need to use up/down or left/right.  Hence why I added vjoy4way.  Now diagonal joysticks are normal joysticks and in mame use up/down/left/right, no need to uniquely identify to figure out what ctrlr constants are needed.

You know, a better method than switching the appropiate diagonal 4-ways so you can map controls dynamically than going through and changing them is in code just search for diagonal in the control description and have the code output the exception.  That way it changes with new versions of the dat file.

No, Thank You! Without Controls.ini we'd have to rely on MAME info for controls data and it isn't exactly accurate :)

I like the way you differentiated 2 way. I think in the case of diagonals, it should be the same. After all, what's the difference between 2 way H and 2 way V, they're both the same control just rotated.

That way my initial thought also, Certainly, by looking at the entire line we can make some intelligent decisions about which control to use. BUT, we aren't really looking at it but creating a parser to categorize it much as many of the FE rom filtering implimentations do. The reason I switch to modifying joy4way to djoy4way is because the easiest thing to parse and get a consistent result is whatever is after the +.  While it is the FE authors that will do the parsing however they choose, my suggestion is to standardise those designations as much as possible, including variations.

My second reason while related to the first is for personal choice. Lets assume that all FE authors listen to me for a moment and impliment this method of parsing. If the FE authors were to include the "Standardized" list into their .ini or configuration files, the end user could then make a choice of which mode to associate with which of the control definitions instead of relying on the FE author to make the decision. Most cases are pretty cut and dry.  joy8way or doublejoy8way are 8 way, 4way is 4way, etc. However, when you get into stick, analog, and whatever else there might be, it gets a little hazy because there are 3 pseudo analog modes, 49 way, 49 way progressive and 16 way. The easy answer is make em all 49 way and be done with it. But you know people want to play and will decide they like 49 way progressive or 16 way or 49 RAW just because they can. Now, I am not saying that the way I am thinking is correct or the only way to do it. It just made sense as an easy way to let the end user change the selected control. It really boils down to how the FE authors choose to impliment support for the GP-49 and Controls.ini and how fancy they want to get. Just like with the ROM filters. It just made sense to me to use the easier to parse correctly short definition and have a standardized library.

I haven't yet databased all the info in controls.ini to find out how many different short definitions there are or gone through the file to see if they all point to the same type of control so I may be barking up the wrong tree. You're probably much more familiar with that than I am.  I used Q*Bert as an example because it was something that pointed to a definate type of control.

Thanks Again!

Toonces

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: Controls.ini and the GP-49
« Reply #19 on: April 05, 2005, 05:27:53 pm »
Download the FE dev package.

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #20 on: April 05, 2005, 08:18:40 pm »
Download the FE dev package.  There's the lists you need.
http://fe.donkeyfly.com/controls/controls_dat.php

Thank You Sir! I've just looked through the list and it looks like the only place where *I* would change anything is the diagonal 4 way and Directional Buttons(2-way up/down)|joy2way. I'va alread stated my reasoning behind the first one so I won't continue. The fact that so few games use Diagonal 4 way makes it easy enough in any case.

As far as the directional buttons, I would make it identical to 2 way joystick, using vjoy2way for Directional Directional Buttons(2-way up/down).  After all, they are the same type of control whether it's a button I push or a movement on the joystick. I'm still making a switch.

Even if you don't change it the list makes for an excellent basis and will work perfectly.

Thanks Again,

Toonces

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: Controls.ini and the GP-49
« Reply #21 on: April 05, 2005, 11:46:24 pm »
I should change the directionals up and down to vjoy2way.  Hopefully I will do that soon.

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #22 on: April 06, 2005, 12:15:22 am »
I should change the directionals up and down to vjoy2way.  Hopefully I will do that soon.

So no chance of djoy4way for Diagonals huh  ;)

Here's what I came up with for control mappings using your dev kit as a guide. If you see anything wrong with it, please let me know.

Mode Number  Mode Description               P1Controls=
3            8 Way                          No match in controls.ini
1            49 Way                         Just Buttons|button
6            2 Way Horizontal               2-way Joystick (Horizontal)|joy2way
7            2 Way Vertical                 2-way Joystick (Vertical)|vjoy2way
4            4 Way                          4-way Joystick|joy4way
5            4 Way Diagonals                Diagonal 4-way Joystick|joy4way
3            8 Way                          8-way Joystick|joy8way
6            2 Way Horizontal               Dual 2-way Joysticks (Horizontal)|doublejoy2way
7            2 Way Vertical                 Dual 2-way Joysticks (Vertical)|vdoublejoy2way
4            4 Way                          Dual 4-way Joysticks|doublejoy4way
3            8 Way                          Dual 8-way Joysticks|doublejoy8way
7            2 Way Vertical                 Dual 2-way Triggersticks (Vertical)|vdoublejoy2way
4            4 Way                          Dual 4-way Triggersticks|doublejoy4way
3            8 Way                          Dual 8-way Triggersticks|doublejoy8way
3            8 Way                          8-way Triggerstick|joy8way
3            8 Way                          8-way Top-Fire Joystick|joy8way
3            8 Way                          8-way Rotory Joystick(Optical)|joy8way
3            8 Way                          8-way Rotory Joystick(Optical)|dial
3            8 Way                          8-way Rotory Joystick(Mechanical)|joy8way
3            8 Way                          8-way Rotory Joystick(Mechanical)|dial
1            49 Way                         49-way Joystick|stick
1            49 Way                         Trackball|trackball
1            49 Way                         Spinner|dial
1            49 Way                         Up/Down Spinner|dial
1            49 Way                         Turntable|dial
6            2 Way Horizontal               Roller(Horizontal)|dial
7            2 Way Vertical                 Roller(Vertical)|vdial
1            49 Way                         360 Steering Wheel|dial
1            49 Way                         270 Steering Wheel|paddle
1            49 Way                         Analog Stick|stick
1            49 Way                         Flightstick (Analog)|stick
1            49 Way                         Lightgun|lightgun
1            49 Way                         Analog Gun|lightgun
1            49 Way                         Throttle (Paddle)|paddle
1            49 Way                         Throttle (Stick)|stickz
1            49 Way                         Pedal (Microswitch)|button
1            49 Way                         Pedal (Analog)|pedal
1            49 Way                         Pedal2 (Analog)|pedal2
1            49 Way                         High-Low Shifter|button
1            49 Way                         4 Gear Shifter|button
6            2 Way Horizontal               Paddle (Horizontal)|paddle
7            2 Way Vertical                 Paddle (Vertical)|vpaddle
1            49 Way                         Paddle (Microswitch)|button
1            49 Way                         Trivia Buttons|button
1            49 Way                         Misc Buttons|button
4            4 Way                          Directional Buttons(4-way)|joy4way
6            2 Way Horizontal               Directional Buttons(2-way left/right)|joy2way
7            2 Way Vertical                 Directional Buttons(2-way up/down)|joy2way
1            49 Way                         Batter Control|stick
1            49 Way                         Football Kicker|stick
1            49 Way                         Baseball Pitcher|stick
1            49 Way                         Yoke|stick
1            49 Way                         Handlebar|stickx
1            49 Way                         Throttle (Handlebar)|sticky
1            49 Way                         Hand Brake (Handlebar)|stickz
1            49 Way                         Misc|other
1            49 Way                         Mahjong Control Panel|other


The list assumes 49 way will be default control mode where the joysticks are not used (i.e. Control Type is Buttons).

Currently Unused Modes
2            49 Way Progressive
8            16 Way


Thanks again!

Toonces.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Controls.ini and the GP-49
« Reply #23 on: April 06, 2005, 08:15:50 am »
I should change the directionals up and down to vjoy2way.  Hopefully I will do that soon.
So no chance of djoy4way for Diagonals huh  ;)
Not that I really have a dog in this fight, but I agree with Toonces on changing the description to djoy4way for Diagonals.

Looking at the inputs Toonces listed:

2-way Joystick (Horizontal)|joy2way
2-way Joystick (Vertical)|vjoy2way
4-way Joystick|joy4way
Diagonal 4-way Joystick|joy4way

The only difference between the first and second items above is the orientation, yet we call one joy2way and the second vjoy2way.  The same logic applies to the third and fourth items, so why shouldn't one be joy4way and the last one djoy4way.

And in reality, we are only talking about less than a dozen games - Qbert, sqbert, qbertqub, congo-bongo, and maybe a couple more.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Controls.ini and the GP-49
« Reply #24 on: April 06, 2005, 04:30:53 pm »
So no chance of djoy4way for Diagonals huh  ;)
Not that I really have a dog in this fight, but I agree with Toonces on changing the description to djoy4way for Diagonals.

Looking at the inputs Toonces listed:

2-way Joystick (Horizontal)|joy2way
2-way Joystick (Vertical)|vjoy2way
4-way Joystick|joy4way
Diagonal 4-way Joystick|joy4way

The only difference between the first and second items above is the orientation, yet we call one joy2way and the second vjoy2way.  The same logic applies to the third and fourth items, so why shouldn't one be joy4way and the last one djoy4way.

I'm on the don't add the "d" side if I had a vote.  Because...

There IS a (IMO) major difference between h vs v 2-ways and norm vs diag 4-ways.  Coming from mame's view of input ports,  joy2way = left - right, vjoy2way = up - down.  While both joy4way & (d)joy4way are left - right - up - down.  So as far as mame tab input menu, ctrlr/cfg, ctrlr/ini, & cfg/cfg are concerned: joy2way is different from vjoy2way (in addition to the hardware orientation), while joy4way and (d)joy4way are the same (unlike the orientation).

And AFAIU, the "joy2way" names have a one-to-one relation to the mame equivelents, and the "2-way Joystick (Horizontal)" parts are for describing shape, orientation, etc.

Not that it's hard for an app to group djoy4way as a joy4way as needed, but neither is it hard for an app to parse the orientation from the discription. [shrug]  my 2 cents.
Robin
Knowledge is Power

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #25 on: April 07, 2005, 03:52:30 am »
So no chance of djoy4way for Diagonals huh  ;)
Not that I really have a dog in this fight, but I agree with Toonces on changing the description to djoy4way for Diagonals.

Looking at the inputs Toonces listed:

2-way Joystick (Horizontal)|joy2way
2-way Joystick (Vertical)|vjoy2way
4-way Joystick|joy4way
Diagonal 4-way Joystick|joy4way

The only difference between the first and second items above is the orientation, yet we call one joy2way and the second vjoy2way.  The same logic applies to the third and fourth items, so why shouldn't one be joy4way and the last one djoy4way.

I'm on the don't add the "d" side if I had a vote.  Because...

There IS a (IMO) major difference between h vs v 2-ways and norm vs diag 4-ways.  Coming from mame's view of input ports,  joy2way = left - right, vjoy2way = up - down.  While both joy4way & (d)joy4way are left - right - up - down.  So as far as mame tab input menu, ctrlr/cfg, ctrlr/ini, & cfg/cfg are concerned: joy2way is different from vjoy2way (in addition to the hardware orientation), while joy4way and (d)joy4way are the same (unlike the orientation).

And AFAIU, the "joy2way" names have a one-to-one relation to the mame equivelents, and the "2-way Joystick (Horizontal)" parts are for describing shape, orientation, etc.

Not that it's hard for an app to group djoy4way as a joy4way as needed, but neither is it hard for an app to parse the orientation from the discription. [shrug]  my 2 cents.

Actually, SirPoonga mentioned above that he added the v to joy2way because MAME did not differentiate between them. MAME also does not differentiate between diagonal and non-diagonal directions. The designation of vjoy2way is unique to controls.ini. If you look at the FE Dev kit for Controls.ini you will see that 2 button H & V are still shown as joy2way, something SirPoonga said he will be fixing using the same logic he used on 2 way joysticks. If you look at the Tab menu for any of the 2 way games, they have all 4 directions defined. Up, Down, Left, Right, just as they do for every game. Orientation of the controls are not taken into account at all in MAME. I just think if you are going to account for orientation of some controls in the document you should use the same logic for others as well. It's just being consistent.

 As far as actually parsing them, you're right, it's no harder to match the entire line than it is to match the short designation and the time differences would not even be noticable.

Now I don't know about the other 4 way diagonal games, but on my q*bert, you can't push up. You have to go diagonals. Since MAME does not differentiate orientation, the driver author used the next best thing which was a straight 4 way. It also happens to be technically correct as it is just a 4 way stick. The GP-Wiz49 even takes those same 4 directionals and rotates them logically in the controller rather than defining new controls using diagonals so no changes are needed to the Tab menu anyways. RandyT's implementation of diagonals in the GP-Wiz49 actually feels better to me than when I set diagonals as the settings for q*bert in MAME and used a regular 8 way stick. I certainly noticed I seemed to do better.

Anyways, it's SirPoonga's project (and a great one too!) and he is the one who makes the decisions. I was only making a suggestion for consistency in the way the short designations were used. It is a perfectly usable document without any changes at all.

Toonces

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Controls.ini and the GP-49
« Reply #26 on: April 07, 2005, 07:22:34 am »
Actually, Urebel's explanation makes a lot of sense to me, but I can see both sides of the issue.
Actually, SirPoonga mentioned above that he added the v to joy2way because MAME did not differentiate between them.
I think what you may be missing is that MAME's purpose is to document the HARDWARE.  Controls.dat's purpose is to document the settings used in MAME.  (Primary purposes).  Thus Controls.dat has to differentiate between the settings for joystick games, just so people who have never played it know whether they should be using the left-right buttons or the Up-down buttons, because MAME won't tell them.  (I guess the same could be said for diagonal joystick games, so I'm having a hard time deciding which side of this issue to support).
Quote
If you look at the Tab menu for any of the 2 way games, they have all 4 directions defined. Up, Down, Left, Right, just as they do for every game.
Sloppy coding on the MAME dev's part.  The unused directions should be removed (except in the case that the actual PCB had inputs for these directions that were simply unused and unconnected).  (Don't mean to offend any Dev's - I'd rather have them get the games working properly and work on new and interesting stuff than clean up unused inputs, if that's their preference).
Quote
Now I don't know about the other 4 way diagonal games, but on my q*bert, you can't push up. You have to go diagonals. Since MAME does not differentiate orientation, the driver author used the next best thing which was a straight 4 way.
Not sure what you mean here.  You can push up.  If you use a standard 4-way and map Up to UP Arrow, etc., you certainly can push up and Q-bert will jump off the platform to the upper left, I believe.  BTW, I suspect that the actual Q-bert PCB is probably labelled UP, Down, Left, and Right, and the entire rotation thing only occurs at the CP.
Quote
The GP-Wiz49 even takes those same 4 directionals and rotates them logically in the controller rather than defining new controls using diagonals so no changes are needed to the Tab menu anyways. RandyT's implementation of diagonals in the GP-Wiz49 actually feels better to me than when I set diagonals as the settings for q*bert in MAME and used a regular 8 way stick. I certainly noticed I seemed to do better.
Cool, I didn't realize that the GP-Wiz49 did that.
Quote
Anyways, it's SirPoonga's project (and a great one too!) and he is the one who makes the decisions. I was only making a suggestion for consistency in the way the short designations were used. It is a perfectly usable document without any changes at all.
Toonces
Toonces, again thanks for being understanding of others and agreeing to work within the limitations if things are changed for your convenience.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #27 on: April 07, 2005, 10:39:01 am »
Actually, Urebel's explanation makes a lot of sense to me, but I can see both sides of the issue.
Actually, SirPoonga mentioned above that he added the v to joy2way because MAME did not differentiate between them.
I think what you may be missing is that MAME's purpose is to document the HARDWARE.  Controls.dat's purpose is to document the settings used in MAME.  (Primary purposes).  Thus Controls.dat has to differentiate between the settings for joystick games, just so people who have never played it know whether they should be using the left-right buttons or the Up-down buttons, because MAME won't tell them.  (I guess the same could be said for diagonal joystick games, so I'm having a hard time deciding which side of this issue to support).
Quote
If you look at the Tab menu for any of the 2 way games, they have all 4 directions defined. Up, Down, Left, Right, just as they do for every game.
Sloppy coding on the MAME dev's part.  The unused directions should be removed (except in the case that the actual PCB had inputs for these directions that were simply unused and unconnected).  (Don't mean to offend any Dev's - I'd rather have them get the games working properly and work on new and interesting stuff than clean up unused inputs, if that's their preference).
Quote
Now I don't know about the other 4 way diagonal games, but on my q*bert, you can't push up. You have to go diagonals. Since MAME does not differentiate orientation, the driver author used the next best thing which was a straight 4 way.
Not sure what you mean here.  You can push up.  If you use a standard 4-way and map Up to UP Arrow, etc., you certainly can push up and Q-bert will jump off the platform to the upper left, I believe.  BTW, I suspect that the actual Q-bert PCB is probably labelled UP, Down, Left, and Right, and the entire rotation thing only occurs at the CP.
Quote
The GP-Wiz49 even takes those same 4 directionals and rotates them logically in the controller rather than defining new controls using diagonals so no changes are needed to the Tab menu anyways. RandyT's implementation of diagonals in the GP-Wiz49 actually feels better to me than when I set diagonals as the settings for q*bert in MAME and used a regular 8 way stick. I certainly noticed I seemed to do better.
Cool, I didn't realize that the GP-Wiz49 did that.
Quote
Anyways, it's SirPoonga's project (and a great one too!) and he is the one who makes the decisions. I was only making a suggestion for consistency in the way the short designations were used. It is a perfectly usable document without any changes at all.
Toonces
Toonces, again thanks for being understanding of others and agreeing to work within the limitations if things are changed for your convenience.


All it is for me is a consistency thing. MAME is consistent. It does not document orientation at all. Controls.ini's purpose is to accurately document the game's actual controls, something it already does. The inconsistency for me is that in 1 case, a modifier is used to specify orientation and in the other it is not. That is all.

As for Q*Bert, I have one. Real Thing. Nice Condition. It is physically impossible to push the joystick to the UP position. You can push UP-RIGHT or UP-LEFT but not UP. That's all I was saying.

The fact is, the controls ARE acurately documented in controls.ini. I only brought this up as a suggestion for consistency in how the short designation is used. Nothing more and there's nothing wrong if he doesn't change it.

Toonces

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: Controls.ini and the GP-49
« Reply #28 on: April 07, 2005, 10:42:43 am »
As for Q*Bert, I have one. Real Thing. Nice Condition. It is physically impossible to push the joystick to the UP position. You can push UP-RIGHT or UP-LEFT but not UP. That's all I was saying.
Aha, I understand now.  A good 4-way will never hit the diagonals, so it makes sense that when you rotate it 45-degrees it won't hit the primaries any more.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Controls.ini and the GP-49
« Reply #29 on: April 07, 2005, 07:48:30 pm »
Most was addressed by Tiger-Heli, but here's my views:

Actually, SirPoonga mentioned above that he added the v to joy2way because MAME did not differentiate between them.

You're taking it a little out of context.  Mame has a single 2way flag (which the controls.ini flag is based on) that does not differentiate.  However, mame does differentiate in reading the inputs.  Mame reads the up and down inputs for vertical 2ways, not the same inputs as horizontal 2-ways; otherwise you would push sideways on vertical 2-way games in mame.  Which is why controls.ini had to add the 'v'.

Quote
MAME also does not differentiate between diagonal and non-diagonal directions.
( Strikeout added by me.)

Whether mame should differentiate or not is a different point, related to: if a cardinal direction is always one switch and diagonals are combos of two cardinal switches (which mame is basing it's qbert view), or not always.

Quote
The designation of vjoy2way is unique to controls.ini.

Sort of:
"vjoy2way" means mame's up & down with mame's 2way flag. 
"joy2way" means mame's left & right with mame's 2way flag. 

Controls.ini needed an extra flag that mame didn't have because mame seperates the directions from each other and the flags, while controls.ini doesn't.  So the flag is unique compared to mame's flags, but not unique against mame's inputs. 

Quote
If you look at the Tab menu for any of the 2 way games, they have all 4 directions defined. Up, Down, Left, Right, just as they do for every game.

 ???  I searched mame's source, and 90% of the drivers had either left/right or up/down 2-ways, but not both.  When I looked at vindicators, it had up/down 2-way and no left/right 2-way, but it had up/down/left/right 8-way inputs as fake inputs (that I thought were removed).  But the left/right were not 2ways, but 8ways (not that you can tell in the binary or through TAB).

Can you name a few other games that have all directions so I can test?

Quote
Orientation of the controls are not taken into account at all in MAME [in 2way].

Except that mame reads the inputs set to left/right for joy2way games, and those set to up/down for vjoy2way.  In my books that is taking orientation completely into account.

Quote
I just think if you are going to account for orientation of some controls in the document you should use the same logic for others as well. It's just being consistent.

IMO, the way control.ini is set up now is the most consistent way in relation to mame and the physical world.  Because the same logic is being used for both.

As other examples, take a look at all the other input types in controls.ini.  "Batter Control|stick" and "Baseball Pitcher|stick" are the same thing except for orientation, but use mame's "stick" type.  "Spinner|dial" and "Roller(Horizontal)|dial" both have different orientations but both have mame's "dial" input type.  "Lightgun|lightgun" and "Analog Gun|lightgun" are totally different data packets, but both have mame's input "lightgun" even though "analog guns" are not "lightguns".  Then compare with joy2way ==> mame's left & right & vjoy2way ==> mame's up & down, with dial & vdial, paddle & vpaddle, and "Throttle (Paddle)|paddle", "Throttle (Stick)|stickz", "Throttle (Handlebar)|sticky", & "Hand Brake (Handlebar)|stickz"

In all cases above and the rest of control.ini, the part after the "|" relates to mame's inputs.  The differences (and similarities) compared to mame's inputs are noted in the part before the "|".  I say keep it that way.

Quote
Anyways, it's SirPoonga's project (and a great one too!) and he is the one who makes the decisions. I was only making a suggestion for consistency in the way the short designations were used. It is a perfectly usable document without any changes at all.

Toonces

I'm glad controls.ini is here too, and suggest to keep it the same as it is AFA diagonal 4-ways, also for consistency in the way the short designations are used. ;) 

If the uses are changed, [shrug], I don't mind your change as long as other changes are also made to keep things consistent.
Robin
Knowledge is Power

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: Controls.ini and the GP-49
« Reply #30 on: April 07, 2005, 08:57:24 pm »
No, there will be no djoy4way because it produced redundant data.  Ever normalize a database?

Look at BOTH FEDEV_descriptions_to_controls.txt (d2c) and FEDEV_controls_to_labels.txt (c2l).  Dump them directly into a database, each get their own table.  Setup a relationship between the second field of d2c with the first field of c2l.  You will see it is a 3rd degree N normalized database.

With that said let's look at the examples.

First the2way joys.

From d2c:
2-way Joystick (Horizontal)|joy2way
2-way Joystick (Vertical)|vjoy2way

From c2l:
joy2way|JOYSTICK_LEFT|Left|
joy2way|JOYSTICK_RIGHT|Right|
vjoy2way|JOYSTICK_UP|Up|
vjoy2way|JOYSTICK_DOWN|Down|

Hey look, they ARE different.  BTW, if you see in 2way games that you need to define every direction (and urebel, if you don't they must have changed it) it is because, unless they changed it recently, there is no joy2way constant defined in mame.  They use joy8way for those, check listxml and listinfo on older version, you will see.  I haven't looked into recent ersions, maybe they finally fixed it when they overhauled the input system.  I should see what they did then.

Now, pacman vs qbert

d2c:
4-way Joystick|joy4way
Diagonal 4-way Joystick|joy4way

c2l:
joy4way|JOYSTICK_UP|Up|
joy4way|JOYSTICK_DOWN|Down|
joy4way|JOYSTICK_LEFT|Left|
joy4way|JOYSTICK_RIGHT|Right|

This is because by defauly mame (and real arcade) just rotate the hardware, not the software.  So if you push up/right in qbert you are actually pushing up on the hardware and in mame by default.  Plus the second field there is the ctrlr file constants so FE devs can read your ctrlr file and relate teh data correctly if everything is left at defaults.

So if I added this to c2l:

djoy4way|JOYSTICK_UP|Up|
djoy4way|JOYSTICK_DOWN|Down|
djoy4way|JOYSTICK_LEFT|Left|
djoy4way|JOYSTICK_RIGHT|Right|

Is that how I would do it?  Why then since it is redundant data.

So putting your 49way in diagonal mode is a hack by the 49way since you don't rotate the joystick.  Actually, isn't it send the cardinal directions anyway??

BTW, the third column is default label, this is so when you go through the wizards on the website to add a game something is entered into the label by default.

Anyway, don't get caught up in what that relational field is vs mame's constants.  I used mame's constants as a guide for that.  The purpose of that field is to relate the two tables so when one comes across the description they can get the ctrlr file constants used by that control.  And since a normal 4way and a diagonal use the same constants there is no need to duplicate data.

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #31 on: April 07, 2005, 10:48:57 pm »
No, there will be no djoy4way because it produced redundant data.

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: Controls.ini and the GP-49
« Reply #32 on: April 09, 2005, 01:42:13 am »
Yeah.  I need to update constrols.dat now.  Unfortunately my computer died.  Ordered an athlon 64 today though :)

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #33 on: April 09, 2005, 01:53:57 am »
Yeah.  I need to update constrols.dat now.  Unfortunately my computer died.  Ordered an athlon 64 today though :)

Sweet! It's always unfortuante when your computer dies but it at least provides you with an excuse to get something really nice as a replacement :)


Since GameEx released the new version, I have been trying out all kinds of games and it is really cool to have the joystick reconfigure itself for the games I choose. He is using a csv file for the mapping (same thing posted earlier here) and it works very well. Even Q*Bert :)


MrSaLTy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:November 01, 2024, 01:26:30 pm
  • nabisco reject
Re: Controls.ini and the GP-49
« Reply #34 on: April 09, 2005, 02:10:29 am »
Man thats sweet.  Got my sticks and wiz49's today and I'm gunna start tinkering.  I just hope that Mamewah will be able to have this as a feature also.  I just really dig this idea. 

Toonces

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 227
  • Last login:March 04, 2024, 11:25:24 pm
  • I want to build my own arcade controls!
Re: Controls.ini and the GP-49
« Reply #35 on: April 09, 2005, 11:37:26 pm »