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. Thank you for your support. Tom Speirs

Patreon

[RELEASE] CFG Magician 1.60


Tempest

Recommended Posts

Preamble:

Problem: How to map individual mame games, without having to do it one by one in every game.

Solution: CFG Magician!

Question: "Why do I care?"

Answer: You probably don't, but you should... biggrin.gif

I have a seven button layout on my control panel:

_000

0000

Pretty standard, the six buttons on the right for fighting games, bottom row of four butttons for Neo Geo, and other four button games. I started this project because I had made a CTLR file for NeoGeo games, but that left me with 234 Non-NeoGeo, no-clone, four button games that didn't use the 4 button layout that I wanted. Another example would be that for trackball games, you could map buttons on either side of the trackball to be used in the games, so that either hand could be used for the trackball. I wanted a way to mass produce Mame Cfgs based on options that I could choose myself.

How to use CFG Magician:

  1. DownLoad a set of 'CFG Magician Data Files' from here that matches your version of Mame, and put them in the CFG Magician\Data Files folder. EG: CFG Magician\Data Files\005.cfg
  2. Browse to the list of games you want to convert. You can use one of the files provided, or you can make your own list with RomLister. The nice thing about this, is that you can create any list you want.
  3. Put a tick in the box, if you want to mirror player1 buttons to player2 for alternating games. If you do this, for games like Asteroids that normally only use the one player controls, both sets of controls will be mapped, so that two players can play without "swapping" in and out. If you want to convert all 2 player alternating games, select the "AlternatingGames.csv" in step 1.
  4. Enter the controls that you want mapped for players 1 - 4. Skip any controls that you don't want to change from the default controls. For Mouse, Joy, and Gun codes, use the right-click menu. To enter multiple inputs into a box, put a tick in the box "Enter Multiple Inputs". Use the radio buttons for Multiple Keyboards. (Keycodes for Keyboard #2 will not show up in Mame, unless the -multikeyboard switch is used.)

CFG Magician creates new cfg files with the inputs you entered, copies all existing Mame/cfg information to the newly created cfgs, and places the new cfg file into the "New Cfg" folder, over-writing any existing cfgs in the folder. For this reason, if you are working with multiple lists, do the "High Priority" list last! Once you are satisfied with the results, move the new cfgs in the CFG Magician\New CFG folder into your Mame/cfg folder. Always backup your existing cfg files!

When the program is finished, if some cfgs weren't created, CFG Magician creates a list called Roms Skipped.csv, Listing the reason a cfg was skipped.

Notes:

Save Button:

Use the "Save" button to save current input codes. I think it is important to note, that CFG Magician does not write blank inputs to the cfg file. It is advisable that you only enter the inputs that you want changed from the default.cfg, or your ctrlr.cfg, otherwise there will be many unnecessary entries in your Mame\cfg files.

Lists:

I have included two folders (Clone, No-Clone) with lists for: buttons 1-16, Trackball, Spinner, Dial, and 4 button Non-NeoGeo lists for people who have a NeoGeo entry in a ctrlr file. Examples of what could be done:

  • Map a 14 button game across a two player 7 button control panel.
  • Map Buttons on either side of the trackball/spinner for right/left hand play.

Joy Number:

The value "Joycode=0" from the CFG Magician.ini file is subtracted from the Joy Number. So if your Joy # is off, use this value to adjust it.

Dipswitch Options:

CFG Magician can set the following dipswitch options:

Language (English,Japanese,German,French,Italian,Spanish)

FreePlay (On)

CockTail (On)

Difficulty (Min,Max)

Lives (Min,Max)

Bonus Lives (Min,Max)

If you want a game to be as easy as possible, set Difficulty (Min), Lives (Max), Bonus Lives (Min)

A word about Difficulty, Lives, and Bonus Lives. All I do is set the dipswitch to the first available option for (Min), and to the last available option for (Max). This is not 100% accurate, some of the dipswitches are in Max-Min order in the drivers, instead of Min-Max. There are too many names for the different dips, and I have no desire to work it all out. sad.gif

I believe that the Language, FreePlay, and Cocktail dips are accurate.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for making the app. Looks pretty cool. After a couple quick tests of the app, here are a few comments I'd like to make, and a request.

Besides the before mentioned tilde, quote and such keys, there are the number keys vs numpad keys, and left ctrl vs right ctrl (and shift, alt) keys. In addition, the link Brian give is a little out of date, and the numpad keys are now "KEYCODE_1PAD" (the "_" was removed between the number and the "PAD").

A rarely used mame feature: multiple keyboards. Mame, with the -multikeyboard option, supports two keyboards using the same key as separate inputs. Mame does this using the RawInput API. So if you had two keyboards, with -multikeyboard, mame could remap so player 2 uses second board & otherwise the same keys as player one. This is rarely used, so adding this to cfgmagic won't help that many people. OTOH, one of the reasons it's so rarely used because of the remapping needed, so cfgmagic could increase the use if it had multikeyboard support.

As for an analog only input game, marble madness OTTOMH. I see you don't handle the digital half of analog inputs (so for example you can use a keyboard to play MM, or unmap the analog joystick from ).

IMO, outputing to a ctrlr file is a better way to do this. Pluses for ctrlr file: smaller disk space, more forward-backward version compatibility that cfg files, one file instead of hundreds to thousands, doesn't touch the other non-input items saved in cfg files, and far more grouping inputs shortcuts than cfg files. Minuses against ctrlr file: extra step to use, must be edited by hand, sorting the hierarchy can be a pain, cfg file skips the first run okay screen, harder to code for. The first three minuses would be removed with an app like yours, but made for ctrlr file with grouping abilities (however the app will run into the last one). If you're interested in looking into supporting ctrlr files, I can help a little, can go into more details of the pluses/minuses and issues you might want to address (or ignore). If you aren't interested in looking into ctrlr files, do you mind posting your source? (I know the nut & bolts in mame's inputs, I don't know how to do GUIs.)

Again, thanks for making remapping easier. (Add sorry for the long post.)

Link to comment
Share on other sites

I looked into ctrlr files originally, but it looked like there would be hundreds of entries to cover all 6 button games for instance. While Tempest's program does create a ton of files, they are all quickly recreated if something happens and you need to start from scratch. IMO, with this script, the elegant advantages of the ctrlr file are outweighed by brute force cfg file technique that Tempest has developed. The only down side that I really see is that when new games come out, the set of blank .cfg files needs updating. This is probably something that should be investigated at some point!

Btw Tempest, I really am going to test this out! I've just been bogged down with getting all of my emulator extras straightened out at the same time I'm re-extracting and re-encoding my entire CD collection. Basically, I don't have much CPU time available on my main system(s) or time.

Link to comment
Share on other sites

Version 1.2 Released:

Notes:

Added ability to select input box with mouse

Fixed a bug - If Keyboard 2 was selected for button input, it stayed on for joystick input even though it was shown as Keyboard 1

Added information to Roms skipped.csv, indicating the reason a rom was skipped.

In addition to the mouse, you can use Previous, and Next to navigate the input boxes. Just press a key, and the text will be replaced.

Updated download, and instructions in post #1

Link to comment
Share on other sites

  • 1 month later...

Cero... if, like me, you have CPWizard loaded with GameEx at startup then you have to ensure that when you exit GameEx to use CFGMagician that you also unload CPWizard (it'll be an icon in your system tray).

CPWizard seems to read the key definitions upon loadup (unless you have dynamic data loading turned on) i.e. do you find that your remaps out of CFGMagician (once placed back into the mame/cfg file) do show up the next time you boot up?

Link to comment
Share on other sites

Version 1.5 Released:

Notes:

  1. Reduced the size of the CFG Magician\cfg folder from ~15Mb to ~5Mb
  2. Added "Joycode=0" to the ini. This value is subtracted from the Joy Number. So if your Joy # is off, use this value to adjust it.
  3. All existing Mame/cfg information will be copied to the newly created cfgs.
  4. When you click on a box to select it, the contents are deleted.
  5. New GUI - CFG Magician will now scan the games on the list, and only the input types that are needed for the games in the list are displayed. I no longer give warnings if you don't enter all of the required inputs, because if you don't fill in all of the boxes, then you didn't enter enough information.

This is a major update from 1.3, thanks to Wombat for all of the Beta testing! :)

Also, a few comments on the right-click menu:

  1. It does exist. ;)
  2. Provides extended mouse/joystick/gun codes
  3. It is the only reliable way to enter XAXIS|YAXIS|ZAXIS|RXAXIS|RYAXIS|RZAXIS|HATSWITCH information for a gamepad.

Updated the first post.

Link to comment
Share on other sites

CFG Magician1.53

Notes:

1. Added a checkbox "Enter Multiple Inputs". Put a Tick in the box, and multiple inputs can be entered into the input box. Supports all input types, Keyboard, Gamepad, and items in the right-click menu (Mouse, Joy, and Gun codes). Click on an input box to switch to that box. The Click and hold option is still available for Keyboard, and Game pad inputs.

2. Added "Save" button. I think it is important to note, that CFG Magician does not write blank inputs to the cfg file. It is advisable that you only enter the inputs that you want changed from the default.cfg, or your ctrlr.cfg, otherwise there will be many unnecessary entries in your Mame\cfg files.

Also, now that CFG Magician only asks for inputs for the current list of roms, if you want to save all input types, use "AllGames.csv" as your input file. Enter all of the inputs, and click on save. You can then close the window without making any cfg files.

[see post #1 to download]

Link to comment
Share on other sites

  • 2 weeks later...
As long as you move the files into the same directory that CPWizard is looking for, you should be good to go.

Seems to work for most games but Tekken doesn't seem to map properly (4 button game)?

Still

123

4XX

Instead of

12X

34X

Anyone else seeing this?

Link to comment
Share on other sites

Cero21 - I can't duplicate this... are you using an older version of Mame? They redid the input system awhile back, and the new cfg files probably wouldn't work with an older version. If want me to look into it further, please post the tekken.cfg that was created with CFG Magician.

Link to comment
Share on other sites

Great program!

Thanks a lot!

Any chance of adding support for analog sticks? I have ultrasticks in my cab, so I can't get past the joystick part of the program.

Link to comment
Share on other sites

Cero21 - I can't duplicate this... are you using an older version of Mame? They redid the input system awhile back, and the new cfg files probably wouldn't work with an older version. If want me to look into it further, please post the tekken.cfg that was created with CFG Magician.

Using mame v130

My player 1 buttons are setup like this:

wer

tyu

i

<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="tekken2">
<input>
<port tag="PLAYER1" type="P1_JOYSTICK_RIGHT" mask="256" defvalue="0">
<newseq type="standard">
KEYCODE_RIGHT
</newseq>
</port>
<port tag="PLAYER1" type="P1_JOYSTICK_LEFT" mask="512" defvalue="0">
<newseq type="standard">
KEYCODE_LEFT
</newseq>
</port>
<port tag="PLAYER1" type="P1_JOYSTICK_DOWN" mask="1024" defvalue="0">
<newseq type="standard">
KEYCODE_DOWN
</newseq>
</port>
<port tag="PLAYER1" type="P1_JOYSTICK_UP" mask="2048" defvalue="0">
<newseq type="standard">
KEYCODE_UP
</newseq>
</port>
<port tag="PLAYER1" type="P1_BUTTON1" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_W
</newseq>
</port>
<port tag="PLAYER1" type="P1_BUTTON2" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_E
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_RIGHT" mask="256" defvalue="0">
<newseq type="standard">
KEYCODE_M
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_LEFT" mask="512" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_DOWN" mask="1024" defvalue="0">
<newseq type="standard">
KEYCODE_N
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_UP" mask="2048" defvalue="0">
<newseq type="standard">
KEYCODE_V
</newseq>
</port>
<port tag="PLAYER2" type="P2_BUTTON1" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_S
</newseq>
</port>
<port tag="PLAYER2" type="P2_BUTTON2" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_D
</newseq>
</port>
<port tag="PLAYER3" type="P1_BUTTON3" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_T
</newseq>
</port>
<port tag="PLAYER3" type="P1_BUTTON4" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_Y
</newseq>
</port>
<port tag="PLAYER4" type="P2_BUTTON3" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_G
</newseq>
</port>
<port tag="PLAYER4" type="P2_BUTTON4" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_H
</newseq>
</port>
</input>
</system>
</mameconfig>

Looks ok. But look at tekken2a.cfg

<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="tekken2a">
<input>
<port tag="PLAYER1" type="P1_JOYSTICK_RIGHT" mask="256" defvalue="0">
<newseq type="standard">
KEYCODE_RIGHT
</newseq>
</port>
<port tag="PLAYER1" type="P1_JOYSTICK_LEFT" mask="512" defvalue="0">
<newseq type="standard">
KEYCODE_LEFT
</newseq>
</port>
<port tag="PLAYER1" type="P1_JOYSTICK_DOWN" mask="1024" defvalue="0">
<newseq type="standard">
KEYCODE_DOWN
</newseq>
</port>
<port tag="PLAYER1" type="P1_JOYSTICK_UP" mask="2048" defvalue="0">
<newseq type="standard">
KEYCODE_UP
</newseq>
</port>
<port tag="PLAYER1" type="P1_BUTTON1" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_W
</newseq>
</port>
<port tag="PLAYER1" type="P1_BUTTON2" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_E
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_RIGHT" mask="256" defvalue="0">
<newseq type="standard">
KEYCODE_M
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_LEFT" mask="512" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_DOWN" mask="1024" defvalue="0">
<newseq type="standard">
KEYCODE_N
</newseq>
</port>
<port tag="PLAYER2" type="P2_JOYSTICK_UP" mask="2048" defvalue="0">
<newseq type="standard">
KEYCODE_V
</newseq>
</port>
<port tag="PLAYER2" type="P2_BUTTON1" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_S
</newseq>
</port>
<port tag="PLAYER2" type="P2_BUTTON2" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_D
</newseq>
</port>
<port tag="PLAYER3" type="P1_BUTTON3" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_R
</newseq>
</port>
<port tag="PLAYER3" type="P1_BUTTON4" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_T
</newseq>
</port>
<port tag="PLAYER4" type="P2_BUTTON3" mask="4096" defvalue="0">
<newseq type="standard">
KEYCODE_F
</newseq>
</port>
<port tag="PLAYER4" type="P2_BUTTON4" mask="8192" defvalue="0">
<newseq type="standard">
KEYCODE_G
</newseq>
</port>
</input>
</system>
</mameconfig>

What the heck is going on?

I'm playing tekken2 version A and it still plays like this:

123

4XX

Just to make sure, I deleted all the cfg files and started cfg magician from scratch in this order All games - 6 button - 5 button - 4 button - neo geo

Link to comment
Share on other sites

Great program!

Thanks a lot!

Any chance of adding support for analog sticks? I have ultrasticks in my cab, so I can't get past the joystick part of the program.

Have you used the right click menu? Or are you asking for something else?

Link to comment
Share on other sites

Using mame v130

My player 1 buttons are setup like this:

wer

tyu

i

What the heck is going on?

I'm playing tekken2 version A and it still plays like this:

123

4XX

Just to make sure, I deleted all the cfg files and started cfg magician from scratch in this order All games - 6 button - 5 button - 4 button - neo geo

The list that I provided are no-clone lists, so tekken2a would not be on those lists. If you only want to add the one game, you can manually add it to the list. If you want to include all clones, then you can use RomLister to make your own lists... I did a little tutorial in the first post. If that doesn't solve it, let me know.

I did try it, and the cfg files are the same for tekken2, and tekken2a.

Edit: I also would not use CFG Magician for all games. Those will be covered in the default.cfg, no reason to have individual cfg files for them.

Link to comment
Share on other sites

The list that I provided are no-clone lists, so tekken2a would not be on those lists. If you only want to add the one game, you can manually add it to the list. If you want to include all clones, then you can use RomLister to make your own lists... I did a little tutorial in the first post. If that doesn't solve it, let me know.

I did try it, and the cfg files are the same for tekken2, and tekken2a.

Edit: I also would not use CFG Magician for all games. Those will be covered in the default.cfg, no reason to have individual cfg files for them.

Ah. Never thought of that. Plus forgot that I had clones on. Good thing too, cuz those clones just cluttered things up.

Thanks!

Link to comment
Share on other sites

  • 1 month later...

CFG Magician 1.58 Released

1. Added dipswitch options, "FreePlay" and "CockTail"

You can use CFG Magician to turn these options on for games in your list, when that option is available in Mame. I recommend that you use the "All Games" list, select the dipswitch options, and leave all of the controls blank. The dipswitch info will be added to your existing Mame\cfg files.

2. New cfg folder with ~7000 new controls, and ~400 new cfgs

3. Optimized code, now runs twice as fast.

4. Minor improvements to GUI

Updated first post.

Link to comment
Share on other sites

CFG Magician 1.59 Released

1. Fixed the bug I created with the new Dipswitch options

2. New GUI size to work with 600x 800 display (Sorry BK, that's the best I can do without a major overhaul)

3. Added DipSwitch tab, with options to set:

Language (English,Japanese,German,French,Italian,Spanish)

FreePlay (On)

CockTail (On)

Difficulty (Min,Max)

Lives (Min,Max)

Bonus Lives (Min,Max)

If you want a game to be as easy as possible, set Difficulty (Min), Lives (Max), Bonus Lives (Min)

A word about Difficulty, Lives, and Bonus Lives. All I do is set the dipswitch to the first available option for (Min), and to the last available option for (Max). This is not 100% accurate, some of the dipswitches are in Max-Min order in the drivers, instead of Min-Max. There are too many names for the different dips, and I have no desire to work it all out. :(

I believe that the Language, FreePlay, and Cocktail dips are accurate.

I also included 2 new folders (Clone, No-Clone) with lists for: buttons 1-16, Trackball, Spinner, Dial, and 4 button Non-NeoGeo lists for people who have a NeoGeo entry in a ctrlr file. It occured to me today that if a person wanted to play a 14 button game, that they could map the game across a two player 7 button control panel.

Updated the first Post.

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
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...