MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

7n004
MAME Fan
Reged: 01/11/19
Posts: 30
Send PM


Can't make the cfg's to work right
#382583 - 05/28/19 12:38 PM


I was reading the mame docs but couldn't find anything, the best I could find was the chapter about multi configuration files but nothing on cfg's.
https://docs.mamedev.org/advanced/multiconfig.html

Lets say I want to apply some settings to all neogeo games, this one was generated from kof99:
https://pastebin.com/reyvavmm

I've set this way to get a black screen so I know it's working. If I save this as neogeo.cfg, delete kog99.cfg and change the "system name" from "kof99" to "neogeo" or "default", mame doesn't read the my settings although mame show messages saying it is reading neogeo.cfg when it doesn't?

Code:

Attempting to parse: neogeo.cfg
Attempting to parse: default.cfg
Attempting to parse: kof99.cfg



Does this cfg files have to be saved/moved to a directory named source/neogeo.cfg or something similar like ini files?

Is there an option like cfgfile that we can use inside an ini file so mame can read the cfg the user want?



BIOS-D
MAME Fan
Reged: 08/07/06
Posts: 1688
Send PM


Re: Can't make the cfg's to work right new [Re: 7n004]
#382587 - 05/28/19 05:56 PM


> I was reading the mame docs but couldn't find anything, the best I could find was the
> chapter about multi configuration files but nothing on cfg's.
> https://docs.mamedev.org/advanced/multiconfig.html
>
> Lets say I want to apply some settings to all neogeo games, this one was generated
> from kof99:
> https://pastebin.com/reyvavmm
>
> I've set this way to get a black screen so I know it's working. If I save this as
> neogeo.cfg, delete kog99.cfg and change the "system name" from "kof99" to "neogeo" or
> "default", mame doesn't read the my settings although mame show messages saying it is
> reading neogeo.cfg when it doesn't?
> Attempting to parse: neogeo.cfg
> Attempting to parse: default.cfg
> Attempting to parse: kof99.cfg
>
> Does this cfg files have to be saved/moved to a directory named source/neogeo.cfg or
> something similar like ini files?
>
> Is there an option like cfgfile that we can use inside an ini file so mame can read
> the cfg the user want?

Why are you using XML files? It clearly states they are .ini files and they're plain text files not in XML format.

If you don't know how an INI file looks like use "mame64.exe -cc" parameter to generate a full mame.ini file, then move it to "ini" directory and rename it to your liking. Personally I choose to abuse this system so I only keep the lines I change and let MAME use its default options to fill in the blanks.

My mame.ini:

Code:

#
# CORE SEARCH PATH OPTIONS
#
rompath E:\Emus\MAME\romset;E:\Emus\MAME\softlist;roms

#
# CORE SCREEN OPTIONS
#
pause_brightness 1.0

#
# CORE MISC OPTIONS
#
cheat 1

#
# OSD VIDEO OPTIONS
#
video d3d
window 1

#
# OSD ACCELERATED VIDEO OPTIONS
#
filter 0



I keep the line comments to know where to look for, you can ignore them. In your example your config files would look like this:

Inside neogeo.ini:

Code:

#
# CORE MISC OPTIONS
#
bios unibios33



Into kof99.ini:

Code:

#
# CORE SCREEN OPTIONS
#
brightness 0.5
contrast 0.5
gamma 0.5



EDIT: Just tried the same with cfg files and you can't. It will erase anything that isn't recognized by the parser. Best you could do is say, grab your kof99.cfg, copy it to kof95.cfg and edit the "system name" value. Useful for mapping the same inputs for every neogeo game, but also you would need to do the same procedure for every one of them.

Edited by BIOS-D (05/28/19 06:51 PM)



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4464
Loc: Melbourne, Australia
Send PM


Re: Can't make the cfg's to work right new [Re: BIOS-D]
#382588 - 05/28/19 07:09 PM


You can map inputs for all NeoGeo games by making a controller file with the input mappings you want, then using the ctrlr setting in neogeo.ini to point to it. Controller files have a lot in common with .cfg files, and there are some examples in the ctrlr folder distributed with MAME.



7n004
MAME Fan
Reged: 01/11/19
Posts: 30
Send PM


Re: Can't make the cfg's to work right new [Re: BIOS-D]
#382589 - 05/28/19 11:39 PM


Hi BIOS-D!

This is how I use my mame, I have a ini file under ini\source\neogeo.ini to setup all my neogeo games at once with:

Code:

bios                      unibios33
samplerate 22050
keepaspect 1
video d3d
window 1
resolution native
ctrlr snk



It doesn't matter what neogeo game I start, I'll have my control settings and everything else I like setup for all my neogeo games.

> Why are you using XML files?
Because there are some controls missing, or not available in the ini file like independent volume levels for each YM2610 channels, this settings are saved in cfg (xml) format only under "mixer". If this settings are available in the mame.ini or any description of it in the mame documentation, I wasn't able to find it.

I'm using neogeo as an example but it could be any other driver, like the new k573dio/k573fpga. Some games have more than 4 channels to adjust and would be impractical to adjust volume levels to each and every game available.

It could be much more easy if this settings could be set only once from an ini file.



BIOS-D
MAME Fan
Reged: 08/07/06
Posts: 1688
Send PM


Re: Can't make the cfg's to work right new [Re: 7n004]
#382603 - 05/29/19 09:14 PM


> Because there are some controls missing, or not available in the ini file like
> independent volume levels for each YM2610 channels, this settings are saved in cfg
> (xml) format only under "mixer". If this settings are available in the mame.ini or
> any description of it in the mame documentation, I wasn't able to find it.
>
> I'm using neogeo as an example but it could be any other driver, like the new
> k573dio/k573fpga. Some games have more than 4 channels to adjust and would be
> impractical to adjust volume levels to each and every game available.
>
> It could be much more easy if this settings could be set only once from an ini file.

Well, unless I get proved wrong (again), it looks like your best option would be to config one game then copy, rename and edit it to a game from the same system for every one of them. It looks like cfg files are always remade based on ini files only when the game runs and I am not sure if it keeps volume values stored permanently either.



7n004
MAME Fan
Reged: 01/11/19
Posts: 30
Send PM


Re: Can't make the cfg's to work right new [Re: BIOS-D]
#382613 - 05/29/19 11:32 PM


> Well, unless I get proved wrong (again), it looks like your best option would be to
> config one game then copy, rename and edit it to a game from the same system for
> every one of them. It looks like cfg files are always remade based on ini files only
> when the game runs and I am not sure if it keeps volume values stored permanently
> either.

This is not a matter of right or wrong, it is just mame acting crazy (peanut butter jelly time).

It is possible to create a base cfg and copy it to every single game available for a system like genesis that has like 6 channels to play with if I can remember correctly, but it is very unpractical to do this way. I rather use one source\"driver".cfg to populate the settings or make them available in ini files and use the structure mame already have.

I don't know how cfg's works, looks like they are volatile, I don't know for sure, what I know it comes from trial and error.


Pages: 1

MAMEWorld >> EmuChat
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 315 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 649