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: Problem with ctrlr files....  (Read 2217 times)

0 Members and 1 Guest are viewing this topic.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Problem with ctrlr files....
« on: March 10, 2003, 09:17:08 pm »
I'm trying to set up lightgun support for my lightgun games.  Theoretically, I should be able to add the -gn option to a ctrlr file.

I know there are ctrlr files for specific control types, but only these are listed:

dial_ini              
paddle_ini          
pedal_ini            
trackball_ini        
ad_stick_ini        

Since there's no lightgun_ini, I added the -gun parameter to area51.ini.  When I start MAME, though, I get:

-----------------------------------------------------------
Exception at EIP=0079AA9E: ACCESS VIOLATION
While attempting to read memory at FFFFFFFF
-----------------------------------------------------------

If instead of -gun I put in:

lightgun 1

it doesn't crash, but I don't get lightgun support, either.  I also tried this with maxforce and sshooter.  Once I remove the offending INI file it works fine....

Should I be able to do what I'm trying to do?

--Chris

--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

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:Problem with ctrlr files....
« Reply #1 on: March 10, 2003, 11:36:24 pm »
I'm trying to set up lightgun support for my lightgun games.  Theoretically, I should be able to add the -gun (sic) option to a ctrlr file.

I know there are ctrlr files for specific control types, but only these are listed:

dial_ini              
paddle_ini          
pedal_ini            
trackball_ini        
ad_stick_ini

There is lightgun_ini.  This file is looked at if ctrlr in the mame.ini file (or ini/gamename.ini) is set to somthing (example: ctrlr abcde) and this file is ctrlr/abcde/lightgun.ini (assuming default settings).

Quote
Since there's no lightgun_ini, I added the -gun parameter to area51.ini.  When I start MAME, though, I get:

-----------------------------------------------------------
Exception at EIP=0079AA9E: ACCESS VIOLATION
While attempting to read memory at FFFFFFFF
-----------------------------------------------------------

If instead of -gun I put in:

lightgun 1

it doesn't crash, but I don't get lightgun support, either.  I also tried this with maxforce and sshooter.  Once I remove the offending INI file it works fine....

You do things a little different inside mame.ini files and on the commandline; "lightgun 1" in the ini/ini file is the same as "-lightgun" or "-gun" on the commandline.  "lightgun 0" in the ini/ini file is the same as "-nolightgun" or "-nogun".

Notice these ini files are not the ctrlr/ini files, but ini/ini files.  Ctrlr/ini files are just for mapping keyboard & joystick inputs to game inputs.  Ini/ini are for game setting like "lightgun 1"; mame.ini is what the ini/ini files can/should like.
Robin
Knowledge is Power

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Problem with ctrlr files....
« Reply #2 on: March 11, 2003, 09:57:46 am »
What he said, except they are ctrlr/ini files....

Regular ini files are applied universally, regardless of what ctrlr scheme you use.  Ctrlr files are kept in a ctrlr folder and thus only are activated when you use that ctrlr scheme.  Also, you can add "ini style commands" and button remapping in a ctrlr ini.  As a matter of fact you can mix and match.  I first turn on the mouse and then remap the mouse buttons in my mouse.ini, for example.  

Sorry but I had to correct you on that one. ;)

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Problem with ctrlr files....
« Reply #3 on: March 11, 2003, 10:00:06 am »
Well, I couldn't get a lightgun.ini to work no matter where I put it.  I ended up creating an INI folder and putting a .ini for each lightgun game in it that contains:

mouse 0
lightgun 1

This worked, but it's a pain to have one for each game...

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Problem with ctrlr files....
« Reply #4 on: March 11, 2003, 10:06:22 am »
You do know that as of this time, I'm not sure if there is a "lightgun.ini" only a "mouse.ini."  But for the record you can have both turned on at once and they shouldn't interfere with each other.  

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Problem with ctrlr files....
« Reply #5 on: March 11, 2003, 10:13:59 am »
As a quick test, I threw mame.exe into a hex editor and there is a reference to LIGHTGUN_INI in the code, but since it's not in the docs maybe it doesn't work yet...

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

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:Problem with ctrlr files....
« Reply #6 on: March 11, 2003, 04:58:36 pm »
As a quick test, I threw mame.exe into a hex editor and there is a reference to LIGHTGUN_INI in the code, but since it's not in the docs maybe it doesn't work yet...

--Chris

Howard's right; the lightgun.ini file is a ctrlr/ini file, not a ini/ini file.  You were trying to use it as a ini/ini file.  You can't put "lightgun 1" in ctrlr/ini files.  Lightgun.ini does work, but only as a ctrlr/ini file.

Your solution is about the only way to do what you wanted to do without editing the source.
Robin
Knowledge is Power

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re:Problem with ctrlr files....
« Reply #7 on: March 11, 2003, 05:10:24 pm »
As a quick test, I threw mame.exe into a hex editor and there is a reference to LIGHTGUN_INI in the code, but since it's not in the docs maybe it doesn't work yet...

--Chris

Howard's right; the lightgun.ini file is a ctrlr/ini file, not a ini/ini file.  You were trying to use it as a ini/ini file.  You can't put "lightgun 1" in ctrlr/ini files.  Lightgun.ini does work, but only as a ctrlr/ini file.

Your solution is about the only way to do what you wanted to do without editing the source.
I see.  The docs are confusing on this point; they say "All of the options that can be specified on the command-line or in the
main mame.ini file can be specified in the controller-specific ini files", and I thought lightgun.ini was a controller-specific ini file, and thus I should have been able to do it.  

Thanks for your help!

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

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:Problem with ctrlr files....
« Reply #8 on: March 12, 2003, 02:59:32 am »
The docs are confusing on this point; they say [snip]
(quote from docs/ctrlr.txt file)
Quote
All of the options that can be specified on the command-line or in the
main mame.ini file can be specified in the controller-specific ini files,
though because of when these files are parsed, the specified options may
have no effect.  The only two general options guaranteed to be supported
are mouse and joystick.  Note that command-line specification of these
options takes precedence.  Since most front-ends, including MAME32,
specify these options through the command-line, the mouse and/or joystick
options specified in the .ini files will be ignored.

Thanks for reminding me, I forgot about this part.  Note it does say the options may have no effect.  I never had any success using any ini/ini type options in the ctrlr/ini files (tested a few versions back, though), so I forgot about this paragraph.

Just tested now, and the mouse and joystick options ("mouse 1", "joystick 0") work inside ctrlr/ini files, but the lightgun option does not have an effect.  Not too surprised that the lightgun option doesn't work, because there is a pretty major difference in mame startup between having lightgun enabled and disabled, while very little difference with joystick or mouse enabled or disabled.  I guess mame is reading the ctrlr files after it sets up the inputs.  :-\

Chris, you probably already did this, but for others thinking about it...
to use the lightgun_ini, trackball_ini, ect, ctrlr/ini files, you need to add to default.ini file lines such as:

lightgun_ini            "lightgun"
trackball_ini           "trackball"

where the quoted word is the filename without the .ini ending.  But as said in last paragraph, only options I found to work in ctrlr/ini files are the mouse and joystick ones.
Robin
Knowledge is Power

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Problem with ctrlr files....
« Reply #9 on: March 12, 2003, 06:04:00 pm »
Somebody already reminded you of this rebel but you ignored him and thus he kept his mouth shut.  

:P :P :P :P :P :P

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:Problem with ctrlr files....
« Reply #10 on: March 13, 2003, 02:15:02 am »
Somebody already reminded you of this rebel but you ignored him and thus he kept his mouth shut.  

:P :P :P :P :P :P
:-[  I mis-understood your post when I first (and second and third) read it.  Rereading it now, I don't see why I missed it.  Sorry :-[

Anyways, what we learned in this theard:
the lightgun_ini ctrlr/ini file exists,
any ini/ini can be placed in ctrlr/ini files (but),
the lightgun ini/ini setting does not change the game's settings if placed in ctrlr/ini files,
mouse and joystick are the only ini/ini settings guaranteed to work in ctrlr/ini files,
ctrlr/ini settings don't work in ini/ini files, and
the command-line format of options does not work in ctrlr/ini files.

Did I miss anything else, Howard? :)
Robin
Knowledge is Power

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Problem with ctrlr files....
« Reply #11 on: March 13, 2003, 03:11:23 am »
what about the outi/outi files?