Tempest Posted January 12, 2009 Share Posted January 12, 2009 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... I have a seven button layout on my control panel:_0000000Pretty 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: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.cfgBrowse 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.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.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. I believe that the Language, FreePlay, and Cocktail dips are accurate. Quote Link to comment Share on other sites More sharing options...
Brian Hoffman Posted January 12, 2009 Share Posted January 12, 2009 Im going to check this out right now! Great work Tempest! Quote Link to comment Share on other sites More sharing options...
bkenobi Posted January 12, 2009 Share Posted January 12, 2009 Awesome! I'll check this out as well. Quote Link to comment Share on other sites More sharing options...
fRequEnCy Posted January 13, 2009 Share Posted January 13, 2009 Glad to see you scripting. Keep it up Tempest! Quote Link to comment Share on other sites More sharing options...
Tempest Posted January 13, 2009 Author Share Posted January 13, 2009 Thanks guys! Quote Link to comment Share on other sites More sharing options...
urebelscum Posted January 22, 2009 Share Posted January 22, 2009 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.) Quote Link to comment Share on other sites More sharing options...
bkenobi Posted January 22, 2009 Share Posted January 22, 2009 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. Quote Link to comment Share on other sites More sharing options...
Tempest Posted January 27, 2009 Author Share Posted January 27, 2009 Version 1.1 ReleasedNotes:Added all keycodes that Mame supports. (Dazz)Added support for .txt files in Romlister. (Jeff Leyda)Added support for Multiple Keyboards (urebelscum)Updated download, and instructions in post #1 Quote Link to comment Share on other sites More sharing options...
Tempest Posted February 1, 2009 Author Share Posted February 1, 2009 Version 1.2 Released:Notes:Added ability to select input box with mouseFixed a bug - If Keyboard 2 was selected for button input, it stayed on for joystick input even though it was shown as Keyboard 1Added 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 Quote Link to comment Share on other sites More sharing options...
Cero21 Posted March 11, 2009 Share Posted March 11, 2009 The remapped buttons work great but the changes aren't reflected in CPwizard? Am I supposed to make a special ctrlr file? Quote Link to comment Share on other sites More sharing options...
bkenobi Posted March 11, 2009 Share Posted March 11, 2009 As long as you move the files into the same directory that CPWizard is looking for, you should be good to go. Quote Link to comment Share on other sites More sharing options...
Wombat Posted March 12, 2009 Share Posted March 12, 2009 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? Quote Link to comment Share on other sites More sharing options...
Tempest Posted March 14, 2009 Author Share Posted March 14, 2009 Version 1.5 Released:Notes:Reduced the size of the CFG Magician\cfg folder from ~15Mb to ~5MbAdded "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.All existing Mame/cfg information will be copied to the newly created cfgs.When you click on a box to select it, the contents are deleted.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:It does exist. Provides extended mouse/joystick/gun codesIt is the only reliable way to enter XAXIS|YAXIS|ZAXIS|RXAXIS|RYAXIS|RZAXIS|HATSWITCH information for a gamepad.Updated the first post. Quote Link to comment Share on other sites More sharing options...
Tempest Posted March 16, 2009 Author Share Posted March 16, 2009 CFG Magician1.53Notes: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] Quote Link to comment Share on other sites More sharing options...
Cero21 Posted March 29, 2009 Share Posted March 29, 2009 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)? Still1234XXInstead of 12X34XAnyone else seeing this? Quote Link to comment Share on other sites More sharing options...
Tempest Posted March 29, 2009 Author Share Posted March 29, 2009 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. Quote Link to comment Share on other sites More sharing options...
Lawrence Posted April 4, 2009 Share Posted April 4, 2009 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. Quote Link to comment Share on other sites More sharing options...
Cero21 Posted April 4, 2009 Share Posted April 4, 2009 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 v130My player 1 buttons are setup like this:wertyui<?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:1234XXJust 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 Quote Link to comment Share on other sites More sharing options...
Tempest Posted April 4, 2009 Author Share Posted April 4, 2009 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? Quote Link to comment Share on other sites More sharing options...
Tempest Posted April 4, 2009 Author Share Posted April 4, 2009 Using mame v130My player 1 buttons are setup like this:wertyuiWhat the heck is going on? I'm playing tekken2 version A and it still plays like this:1234XXJust 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 geoThe 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. Quote Link to comment Share on other sites More sharing options...
Tempest Posted April 5, 2009 Author Share Posted April 5, 2009 Updated the first post to reflect the release of V1.53. Quote Link to comment Share on other sites More sharing options...
Cero21 Posted April 5, 2009 Share Posted April 5, 2009 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! Quote Link to comment Share on other sites More sharing options...
Tempest Posted May 8, 2009 Author Share Posted May 8, 2009 CFG Magician 1.58 Released1. 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 cfgs3. Optimized code, now runs twice as fast.4. Minor improvements to GUIUpdated first post. Quote Link to comment Share on other sites More sharing options...
Mayhem Posted May 9, 2009 Share Posted May 9, 2009 Ive done some some xml's for trackball and spinner and 48 way joystick gameshttp://homepage.ntlworld.com/sylvia.rungie...l/exconfigs.ziphope this are oky Quote Link to comment Share on other sites More sharing options...
Tempest Posted May 14, 2009 Author Share Posted May 14, 2009 CFG Magician 1.59 Released1. Fixed the bug I created with the new Dipswitch options2. 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.