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: SirPoongas ctrl file hacks in new mame  (Read 3788 times)

0 Members and 1 Guest are viewing this topic.

DaemonCollector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 443
  • Last login:December 26, 2009, 07:02:16 pm
  • All your base are belong to us.
SirPoongas ctrl file hacks in new mame
« on: September 27, 2004, 07:25:33 pm »
How can you implement the ctrl file hacks for #buttons etc in the new XML mame? The functions listed on your site no longer exist in input.c

TheGatesofBill

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 581
  • Last login:August 22, 2018, 09:07:04 am
Re:SirPoongas ctrl file hacks in new mame
« Reply #1 on: September 27, 2004, 08:58:52 pm »
It's on my todo list, I'd be glad if someone beats me to it though.

DaemonCollector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 443
  • Last login:December 26, 2009, 07:02:16 pm
  • All your base are belong to us.
Re:SirPoongas ctrl file hacks in new mame
« Reply #2 on: September 27, 2004, 09:10:54 pm »
I'll go keep diggin through the code, was just seein if someone else knew yet. Have you picked apart the new cntrl file system at all?

TheGatesofBill

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 581
  • Last login:August 22, 2018, 09:07:04 am
Re:SirPoongas ctrl file hacks in new mame
« Reply #3 on: September 27, 2004, 09:53:50 pm »
I really haven't had a chance yet, school and such has been keeping me pretty busy.

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:SirPoongas ctrl file hacks in new mame
« Reply #4 on: September 27, 2004, 11:20:16 pm »
How can you implement the ctrl file hacks for #buttons etc in the new XML mame? The functions listed on your site no longer exist in input.c

What are those, and what do they accomplish? I might be able to help you out.

Regards,
Buddabing
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!

DaemonCollector

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 443
  • Last login:December 26, 2009, 07:02:16 pm
  • All your base are belong to us.
Re:SirPoongas ctrl file hacks in new mame
« Reply #5 on: September 27, 2004, 11:23:38 pm »

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8183
  • Last login:April 12, 2023, 09:22:35 pm
  • The Bears Still Suck!
Re:SirPoongas ctrl file hacks in new mame
« Reply #6 on: September 28, 2004, 01:00:44 am »
Yeah, I bet alot of my hacks are broke now since many of them dealt with the ctrlr files.

Budda, I made two ctrlr hacks.
One you could define a button#.ini , replace # with a number.  button6.ini would activate on a 6 button game.

I also wrote vertical.ini and horizont.ini so you could define controls based on orientation.  This is helpful to cocktail cab owners that have controls on more than just two sides.

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:SirPoongas ctrl file hacks in new mame
« Reply #7 on: September 28, 2004, 09:19:11 am »
Yeah, I bet alot of my hacks are broke now since many of them dealt with the ctrlr files.

Budda, I made two ctrlr hacks.
One you could define a button#.ini , replace # with a number.  button6.ini would activate on a 6 button game.

I also wrote vertical.ini and horizont.ini so you could define controls based on orientation.  This is helpful to cocktail cab owners that have controls on more than just two sides.

This hack can be done in the new controller system. What the user will have to do is convert all his or her .ini files over to XML using Howard's converter program. Then make sure the system entries are in the order you want, for example, game specific system entries need to be after the playerx, buttonx, vertical, and horizontal entries. On the source code end, the XML reading code needs to know when to use the new system types. That shouldn't be difficult.
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!

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:SirPoongas ctrl file hacks in new mame
« Reply #8 on: September 28, 2004, 12:55:54 pm »
Okay, here's the code to the new controller hack. I used "horizontal" instead of "horizont" but that can be easily changed.

The code in the attachment should be added to config.c.

Before the beginning of the new code, the code reads:
case FILE_TYPE_CONTROLLER:
{
   const char *srcfile = strrchr(Machine->gamedrv->source_file, '/');
   if (!srcfile) srcfile = strrchr(Machine->gamedrv->source_file, '\\');
   if (!srcfile) srcfile = strrchr(Machine->gamedrv->source_file, ':');
   if (!srcfile) srcfile = Machine->gamedrv->source_file;
   else srcfile++;
   
   curfile.data.ignore_game =
                     (strcmp(attributes[attr + 1], "default") != 0 &&
                      strcmp(attributes[attr + 1], Machine->gamedrv->name) != 0 &&
                      strcmp(attributes[attr + 1], srcfile) != 0 &&
                      (Machine->gamedrv->clone_of == NULL || strcmp(attributes[attr + 1], Machine->gamedrv->clone_of->name) != 0) &&
                      (Machine->gamedrv->clone_of == NULL || Machine->gamedrv->clone_of->clone_of == NULL || strcmp(attributes[attr + 1], Machine->gamedrv->clone_of->clone_of->name) != 0));


After the end of the new code, the code should read:

   if (DEBUG_CONFIG && !curfile.data.ignore_game)
      printf("Entry: %s -- processing\n", attributes[attr + 1]);
   break;
}


The code in this attachment includes both these edge pieces, so some cut and paste is necessary.

I'm sure it will not be difficult to construct a patch.

Regards,
Buddabing
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!

TheGatesofBill

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 581
  • Last login:August 22, 2018, 09:07:04 am
Re:SirPoongas ctrl file hacks in new mame
« Reply #9 on: September 28, 2004, 04:06:02 pm »
Code is enough for me to work with. I'll add this in now. (Currently has No Name MAME 0.87.00 on his hard disk  :P ).

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8183
  • Last login:April 12, 2023, 09:22:35 pm
  • The Bears Still Suck!
Re:SirPoongas ctrl file hacks in new mame
« Reply #10 on: September 28, 2004, 05:16:17 pm »
when I get a chance I will update my website.

IncrdblHulk7

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 71
  • Last login:February 21, 2024, 09:26:53 pm
Re: SirPoongas ctrl file hacks in new mame
« Reply #11 on: June 12, 2006, 05:54:05 pm »
Was there ever any progress made with adapting the buttonX.ini hack to the latest version of Mame?

I have a 7-button layout and therefore have to remap the buttons for any 5+ button games.  (Ex: SF series).  Having the buttonX.ini option would make things so much easier!


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: SirPoongas ctrl file hacks in new mame
« Reply #12 on: June 12, 2006, 07:36:42 pm »
This thread is pretty old. I suggest posting a request in the PowerMAME section with a link to this thread.
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!