Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Change controller mapping based on nplayer.ini


Recommended Posts

Posted

Is there a way to have game tell mame to load a different ctrlr file based on the data provided in nplayer.ini? I would like to be able to have mame use a different ctrlr file for "2P alt" games so that players don't have to move away from their joystick. The ctrlr file would have something like this:

<port type="P1_JOYSTICK_UP">

<newseq type="standard">KEYCODE_UP OR KEYCODE_R</newseq>

</port>

Is it possible today or an enhancement request?

Posted
Is there a way to have game tell mame to load a different ctrlr file based on the data provided in nplayer.ini? I would like to be able to have mame use a different ctrlr file for "2P alt" games so that players don't have to move away from their joystick. The ctrlr file would have something like this:

<port type="P1_JOYSTICK_UP">

<newseq type="standard">KEYCODE_UP OR KEYCODE_R</newseq>

</port>

Is it possible today or an enhancement request?

Im not sure the Nplayer.ini has anything to do with that.

I believe most input settings are in the default.cfg in the CFG folder.

When you make a game specific config it will create a .cfg file using the roms name.

Posted

You could use Romlister to find the 2 player alternating games, and then create a batch file to make all of the configs for you.

That's such a good idea, that I think I will do it that way myself! ;)

I think this will solve my neogeo issue as well...

As a matter of fact, I think I will do ALL of my 4 button games...

Damn! I'm excited! :P

Posted
Im not sure the Nplayer.ini has anything to do with that.

I believe most input settings are in the default.cfg in the CFG folder.

When you make a game specific config it will create a .cfg file using the roms name.

What I am looking for is when you go to launch a game...say 1942 which is a 2p alternating game and the rom zip is 1942.zip. It would look up 1942 in nplayer.ini and it would find: 1942=2P alt. It would cross reference "2P alt" to a controller configuration file 2palt.cfg (or whatever it was called) and run mame with the proper command line.

For example:

mame -ctrlr 2palt 1942.

This way I wouldn't have to have separate configuration files for each game. If this is something that could be done via a plug in then I might go ahead and write one...but I want to make sure it is possible before I put the energy into it.

Posted
What I am looking for is when you go to launch a game...say 1942 which is a 2p alternating game and the rom zip is 1942.zip. It would look up 1942 in nplayer.ini and it would find: 1942=2P alt. It would cross reference "2P alt" to a controller configuration file 2palt.cfg (or whatever it was called) and run mame with the proper command line.

For example:

mame -ctrlr 2palt 1942.

This way I wouldn't have to have separate configuration files for each game. If this is something that could be done via a plug in then I might go ahead and write one...but I want to make sure it is possible before I put the energy into it.

Something like that would be very possible and very simple to do using AHK or AI. Just need to call on the ini and whatever results it finds from the nplayer.ini it will put in the commandline for you.

Posted

I have my plugin working except for the part where it appends the -ctrl <ctrlfile> to the exec line. Is there any way to intercept the command before it executes? I tried using "Event_GameRun" but that does not contain the cmd line.

Thanks for any help.

Chris

Posted
Anyone? Anyone? Bueller?

Its not possible to change the MAME command line currently with the plugin system.

The way to do it with the curent system would be to set a default control file then:

In the plugin on Game Run, you would back up this file, then write a new version out as text file overwriting the default control file..

On Game exit restore the backup.

Posted

I read this stuff, and wonder if I'm "Out to Lunch"... Is something wrong with what the guy in post #3 said?

Wait, I see the answer... you don't want to have seperate configs for each game... I still don't get it???

Posted
Its not possible to change the MAME command line currently with the plugin system.

The way to do it with the curent system would be to set a default control file then:

In the plugin on Game Run, you would back up this file, then write a new version out as text file overwriting the default control file..

On Game exit restore the backup.

I had thought of that but it is not as clean. I would imagine that it wouldn't be hard to add the ability to change the command line before the execution the MAMEEXE. Anyways, I will implement it this way.

I read this stuff, and wonder if I'm "Out to Lunch"... Is something wrong with what the guy in post #3 said?

Wait, I see the answer... you don't want to have seperate configs for each game... I still don't get it???

I want to be able to have a few global configs that would make it cleaner and not make the ctrlr directory a complete mess. I wanted to make it easy for the people who don't want to try and figure everything out. Sure, there is more than one way to skin a cat. I just wanted to give people the easiest way.

Posted

I appreciate your response, I have a tendency to sound like a smart a$$ (probably because I am one), but I really was wondering if I was missing something...

Alot of the time I am... :blink:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...