Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Minwah on May 24, 2004, 03:14:00 pm

Title: ctrlr.ini file help...
Post by: Minwah on May 24, 2004, 03:14:00 pm
I'm tearing my hair out with something here...I must be doing something obviously wrong, can someone put me out of my misery!:

I have just installed my pedals (2x analog) which I have working fine.  In my ctrlr default.ini I have:

pedal_ini               "pedal.ini"

...and in pedal.ini I have:

P1_PEDAL                "JOYCODE_1_UP"
P1_PEDAL_EXT            "KEYCODE_Y"
P2_PEDAL                "JOYCODE_1_DOWN"
P2_PEDAL_EXT            "KEYCODE_Y"
P3_PEDAL                "CODE_NONE"
P3_PEDAL_EXT            "CODE_NONE"
P4_PEDAL                "CODE_NONE"
P4_PEDAL_EXT            "CODE_NONE"


The problem I have is in Pole Position...for some reason it doesn't automatically set the pedal(s) up, I am thinking because what ever there is in MAME to say 'this game uses a pedal' doesn't work for PolePos (I don't know enough about MAME's code to know how that works).  Not a problem I thought, I'll just make a game-specific ctrlr.ini file for PolePos (polepos.ini), but whatever I try I just cannot get it to work!  I tried the same as above, I tried 'P1_PEDAL_1'  etc - for some reason it *always* uses Left Ctrl and Left Alt keys* (even if I say P1_BUTTON1                "JOYCODE_1_UP" etc)

* I think the ctrlr stuff is being ignored since in the tab menu these inputs are highlighted

I should add that I can get it to work perfectly using the tab input menu, but I don't want to do it that way  :P

Anyone  ???
Title: Re:ctrlr.ini file help...
Post by: ErikRuud on May 24, 2004, 07:05:03 pm
The inputs setup through the tab menu will override the ctrlr files.

Delete the .cfg file for Pole Position
Title: Re:ctrlr.ini file help...
Post by: Minwah on May 24, 2004, 07:45:38 pm
The inputs setup through the tab menu will override the ctrlr files.

Delete the .cfg file for Pole Position

Already did that...polepos.cfg keeps getting generated each time I run Pole Position, but since whatever in the ctrlr file isn't working, it is always setup with the default keys...
Title: Re:ctrlr.ini file help...
Post by: Tiger-Heli on May 25, 2004, 07:34:44 am
Is pole position the only game not working, or do none of the games read your changes?

I.E. change P1Button1 to KEYCODE_A in default.ini - do all games reflect this change???
Title: Re:ctrlr.ini file help...
Post by: Minwah on May 25, 2004, 07:49:00 am
Is pole position the only game not working, or do none of the games read your changes?

I.E. change P1Button1 to KEYCODE_A in default.ini - do all games reflect this change???

Well everything seems to work fine (yes changing default.ini works for most games), except PolePos.  I expect there are others but this is the only one I've come across so far...

Oh, and I know the polepos.ini file is being read because I entered something that was not understood and mame reported it prior to launching the game.

I guess what I really want to know is: does anyone have an analog pedal working with PolePos using ctrlr files??
Title: Re:ctrlr.ini file help...
Post by: ErikRuud on May 25, 2004, 11:41:20 am
A .cfg file is created for every ROM the first time you run it.  It holds more than jsut the key mappings.

It only overides the ctrlr files if you go into the tab menu and change the keys.

Title: Re:ctrlr.ini file help...
Post by: Minwah on May 25, 2004, 11:56:39 am
A .cfg file is created for every ROM the first time you run it.  It holds more than jsut the key mappings.


I realised that part....

Quote
It only overides the ctrlr files if you go into the tab menu and change the keys.

Thanks for clarifying, I wasn't sure if it saved the inputs into the cfg, whatever they happened to be.

Any more ideas?
Title: Re:ctrlr.ini file help...
Post by: Tiger-Heli on May 25, 2004, 12:06:28 pm
A .cfg file is created for every ROM the first time you run it.  It holds more than jsut the key mappings.


I realised that part....

Quote
It only overides the ctrlr files if you go into the tab menu and change the keys.

Thanks for clarifying, I wasn't sure if it saved the inputs into the cfg, whatever they happened to be.

Any more ideas?
MAME Analog Plus or NoNameMAME might do better.  I know analog pedal support was added to Analog Plus a long time ago, but I thought official MAME picked it up.  And since it's working with the TAB menu and not the .ini files, I doubt that's the problem.

FWIW.
Title: Re:ctrlr.ini file help...
Post by: Minwah on May 25, 2004, 03:44:58 pm
MAME Analog Plus or NoNameMAME might do better.  I know analog pedal support was added to Analog Plus a long time ago, but I thought official MAME picked it up.  And since it's working with the TAB menu and not the .ini files, I doubt that's the problem.

That's what I thought (v0.6x IIRC).  I might check it out anyway to make sure...
Title: Re:ctrlr.ini file help...
Post by: Howard_Casto on May 26, 2004, 03:31:34 pm
Part of your problem is quite simple....

You have one pedal for player 1 and the second for player 2.....  Each player has two pedals. Polepos has the pedals both properly mapped to player 1.  (I updated the code myself.)  

Second issue which may or may not cause your problem.....


Taken from the polepos driver:

PORT_START /* IN1 - Brake */
   PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL2, 100, 16, 0, 0x90, KEYCODE_LALT, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )

   PORT_START /* IN2 - Accel */
   PORT_ANALOGX( 0xff, 0x00, IPT_PEDAL, 100, 16, 0, 0x90, KEYCODE_LCONTROL, IP_JOY_DEFAULT, IP_KEY_DEFAULT, IP_JOY_DEFAULT )


See where a hardcoded key is defined?  Unfotunately it's very tough to get these keys removed (devs want them in for some stupid reason).  What they do is override your mappings.  When you define a cfg file or ctrlr file it is *supposed* to override these keys, but due to a glitch in the loading order sometimes ctrlr files don't.  

If you want it fixed bug urebelscum, he was supposed to be on it.  ;)


Hope that helps,
HAC
Title: Re:ctrlr.ini file help...
Post by: Minwah on May 26, 2004, 07:34:40 pm
Part of your problem is quite simple....

You have one pedal for player 1 and the second for player 2.....  Each player has two pedals. Polepos has the pedals both properly mapped to player 1.  (I updated the code myself.)  

Second issue which may or may not cause your problem.....


Taken from the polepos driver:

PORT_START /* IN1 - Brake */
Title: Re:ctrlr.ini file help...
Post by: Minwah on May 27, 2004, 07:27:05 am
URebel kindly confirmed and gave a workaround:

http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=54713&page=0&view=collapsed&sb=5&o=&fpart=1