Jump to content
LaunchBox Community Forums

Mame general crosshair switch off/on?


floodie

Recommended Posts

hi guys - i have 2 machines.. 1 with Sindens, the other just sticks... Same build on both however i want to hide the cross hair on the sinden cabinet (i keep it showing for obvious reasons on the stick cabinet so at least they are playable-ish using joysticks and moving the cross hair around).

I dont want to go through every single mame gun game and turn off the cross hair so was wondering if the setting resides somewhere in the mame.ini or a CFG file?. I had a look and couldnt see it.

thanks 
Dave

Link to comment
Share on other sites

hi Dos - i thought it was also but no unfortunately. 

Sounds interesting about the lightgun.ini.. how would i point only the lightgun games to use this ini?... If it is an .ini then surely couldnt i just change the setting in the Mame.ini, OR is that not possible?

Link to comment
Share on other sites

On 1/4/2021 at 7:23 AM, floodie said:

go through every single mame gun game and turn off the cross hair

If you start a game and do this [turn it off], exit the game... restart it and it stays off, MAME is saving 'that setting' somewhere.  Given that, I'd think you'd be able to say, do that then look through your MAME folder(s) for the most recently change file.  And would thing it'll be an ini or cfg file. 

But if to do this this [turn off the cross hairs] you have to go into the machines settings (vs MAME's setting) [many games it's by pressing F6 when the game is loading] then it probably saves it to the nvram file for the game.  If that's the case, then you're back to 'going through every game'.  Hopefully not.

I've never even fathomed [nor looked at how to] turning off the crosshairs so have no idea of the process.  When in-game, is it somewhere in MAME's tab menu?

Link to comment
Share on other sites

Thank you Joe that was very helpful. I am suprised this hasnt come up more often with the Aimtrack guns, and sure it will more so with the advent of Sinden. Perhaps people are ok with the mame crosshairs overlaid... OR.. they just do it game by game and dont moan like a little girl about it :)

Link to comment
Share on other sites

Curiosity got to me, and here's what I found...

It is indeed in the cfg file for the game(s).  For your cab that you want to have NO crosshairs shown in MAME, edit the "default.cfg", save and set it to read only.

<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
    <system name="default">
        <crosshairs>
            <crosshair player="0" mode="0" />
        </crosshairs>
    </system>
</mameconfig>

If by chance your "default.cfg" has other 'stuff' in there, leave that there and just add the 3 "crosshairs" lines right above "</system>" (2nd to last line), leaving the rest of the 'stuff' above that point.

If you already have cfg files for each game(s) (which you may or may not), you can either edit each of those [ugh], or simply delete them.  Now when you launch a game, MAME will read the default.cfg file (if a game specific one doesn't exist) and the crosshairs will be set to Off.    ...I think... ;) 

Link to comment
Share on other sites

AHHH so it is in the Default.cfg file!.. Brilliant i will get this done, thats wonderful you have been a real help.

It reminds me however, on a similar vein.. .Can i ask your thoughts on this

I have always read-only'd the Default.cfg. Mainly because since using pad 1 and pad 2 as player 3 and 4 on Mame games mame / windows would scramble the IDs all the time.. This seemed to work for a while. but the other day, it all messed up even though it was Read only. I am confident i never randomly gave it write privilages. I did notice that it was after a Windows update. So perhaps windows itself changed xinput to be seen as Joycode 3 instead of it being joycode1. I dont know.. it was all a little strange...  im rambling, but what i did was make a CTRLR file and make the Sinden guns stable plus the Pad device IDs stable so now it should never happen again.

Do you know the hierarchy mame takes when loading a game? for instance, i assume it looks for a Games.cfg file first - implements that - THEN applies the Default.cfg THEN applies any CTRLR configs?.. Just wondering what over rides what when a game is loaded. Because if some games have a separate CFG and the cross hair is in that then the Default.cfg would make no difference...... right?

Link to comment
Share on other sites

4 hours ago, floodie said:

Do you know the hierarchy mame takes when loading a game?

See here: https://docs.mamedev.org/advanced/multiconfig.html

Though it doesn't address the cfg files.  So we'll use our noodles to make up some logic.

The main purpose of the cfg file under ../ctrlr/ is to tell MAME what "mapdevice" to look for and use.  And ya, basic mappings per your liking.  So it kinda has to load when MAME loads.  [otherwise you (possibly) wouldn't be able to use your controller to maneuver around its' UI]

When a game-specific cfg file is created, it copies the default.cfg (and anything we added to that 'read-only' file) and then adds any subsequent game specific config changes you make, to it.  So [in my mind] it stands to reason that if a game-specific cfg file exists, MAME has no need to look at the default.cfg.  Thus won't.

..which brings us full-circle to

22 hours ago, JoeViking245 said:

If you already have cfg files for each game(s) (which you may or may not), you can either edit each of those [ugh], or simply delete them. 

;) 

Link to comment
Share on other sites

7 hours ago, JoeViking245 said:

When a game-specific cfg file is created, it copies the default.cfg (and anything we added to that 'read-only' file) and then adds any subsequent game specific config changes you make, to it.  So [in my mind] it stands to reason that if a game-specific cfg file exists, MAME has no need to look at the default.cfg. 

If you run MAME using the verbose option (-v) you can see the order that it reads ini and cfg files. It does parse default.cfg first, and than the game specific cfg after, overriding options as needed. The game specific cfg only has differences from default.cfg. Even if you had a custom entry in a game specific cfg, and later set a mame default to the same entry, it will then remove it from the game specific cfg.

The crosshair option in the default cfg or the ctlr cfg doesn't work for me. MAME ignores it, and will erase it from the default cfg if not set read-only.

  • Like 1
Link to comment
Share on other sites

15 hours ago, Headrush69 said:

The crosshair option in the default cfg or the ctlr cfg doesn't work

 

On 1/5/2021 at 8:58 AM, JoeViking245 said:

...I think...

...and as it turns out I thought wrong. ?  So back to editing each game.

Unless this [hack] works.!.!.!.!.!.....  

  1. Create a "crosshair" folder directly under MAME.   D:\Emulators\MAME\crosshair\
  2. Place in there a empty "transparent" png image and name it "cross1.png".  If you're setup for multiple players, copy it to "cross2.png", "cross3.png"....

This at least seemed to make the 'default' crosshair invisible in Big Buck Hunter without going into the tab menu.  (just remove ".txt" off the attached file)  Not sure if this messes up other things [beyond all games will now have an invisible crosshair]. 

cross1.png.txt

  • Like 1
Link to comment
Share on other sites

6 hours ago, JoeViking245 said:

Unless this [hack] works.!.!.!.!.!.....  

  1. Create a "crosshair" folder directly under MAME.   D:\Emulators\MAME\crosshair\
  2. Place in there a empty "transparent" png image and name it "cross1.png".  If you're setup for multiple players, copy it to "cross2.png", "cross3.png"....

This at least seemed to make the 'default' crosshair invisible in Big Buck Hunter without going into the tab menu.  (just remove ".txt" off the attached file)  Not sure if this messes up other things [beyond all games will now have an invisible crosshair]. 

I remember this hack from many many old version of MAME ago, but wasn't sure if it still worked.

You might want to use the -crosshairpath and point to a different folder with that transparent image. This way you can you can update MAME without worrying about over writing your transparent crosshair.

  • Like 1
Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...