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. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Bk,

I just wanted you to know that I have started making the CFGs. I decided to do all working games (including clones), so around 5900 CFGs. It looks like it doing about 150 per hour (It will vary depending on how many controls there are per game), so it will be about 40 hours before it's done!

I will rework my script tomorrow, to work from the CFGs that I supply, instead of the ones in the Mame folder. I only have it looking at P1B1-6, and P2B1-6, so I will change it to use Players 1-4, buttons 1-8. I can't imagine that anybody needs anything more (What else is there?) but if you need something special, let me know.

It's pretty cool seeing them being done automatically... That kind of stuff always interests me for some reason... :rolleyes:

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Can you post a sample so I can see what you are talking about. Say for instance sf.cfg? I'm just wondering how I will change them to what I need (still haven't had time to look at the guts of the script :ph34r: )

Posted
I read this far, and broke out laughing. I didn't know it until now, but you are funnier than GreatFlash! ME, take a look at the source code...that's a good one! :lol:

Who's funnier than Flash...?

That's it, I resign!

;)

(yes, I know it was ages ago, Im not the fastest - but I get there in the end)

Posted
Can you post a sample so I can see what you are talking about. Say for instance sf.cfg? I'm just wondering how I will change them to what I need (still haven't had time to look at the guts of the script :ph34r: )

Well, no, I can't right now, not really...

Right now I have my Game Cab running the script to build the empty CFGs. It is going through every input, in every game, and setting them to "NONE". Then I will run the CFGmaker script to take out all of the input's that are not buttons. I can't see anyone remapping joysticks, trackballs, etc on a per game basis. (I'll keep a copy of all the CFGs, so I'll have them if we need them). You have to remember That the only reason I'm building all of these "Empty" CFGs, is to get the mask information so that later they can be run through the CFGmaker Script to remap to what you want them to be. Your just going to have to trust me, it will be easy! :)

I updated the Link above with a newer version of the CFGMaker script. Go ahead and try it on your existing CFG's, it won't delete your existing CFGs, it only makes a new copy into the script folder.

Posted

Ok, that's what I was wondering...what exactly are these files going to look like. They will be a HUGE set of useless cfg's ;)

So then your source will basically have a mapping of what you want to use for each button for a set of games and it will modify the config and save it to an output folder, correct? That sounds really useful!

Posted

They are only useful once you get them working in the script! I've had plenty of projects that had components that took a lot of time but ended up set aside. Anyway, good stuff!!!

Posted
They are only useful once you get them working in the script! I've had plenty of projects that had components that took a lot of time but ended up set aside. Anyway, good stuff!!!

Hey BK? The CFGS are done! I'm not sure exactly when they finished, but it was closer to 48 hours than 40. Guess how big the Mame\cfg folder is..... Come on, Guess.... 21Mb! Do you think I got carried away, by doing them all? :P

I ran them through my script, All Games, No Clones, and it took it down to 2.88Mb. You have to remember that I remapped every control for every game (including clones). When I say every control, I mean EVERYTHING (p1/p2 start, coin1-4, service mode, etc.) There was no way to determine where the controls I needed for each game was in the tab menu, so for unattended convenience, I did them all... When I ran them throught the script, it removes everthing but button controls, that's why the file size is so different.

I'm thinking that you are only interested in the 5 & 6 button games (no clones), if that's the case I'll pare it down even further so I can upload them here. If you want them all (no clones) I will do a megaupload. There's no way I can upload the whole 21Mb, my connection is too slow, but I know your a no-intro guy, so I'm sure you don't want clones... Anways, let me know...

BTW: I checked them (well, not ALL of them) in CPWizard, and they show the mappings correctly in the preview window. Best Of all I played Aquajack, and the mappings work in the games as well! B)

Posted

You were asking about sf, heres what it looked like before the script.

<version="1.0"?>

<mameconfig version="10">
<system name="sf">
<input>
<port tag="SYSTEM" type="START1" mask="1" defvalue="1">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="SYSTEM" type="START2" mask="2" defvalue="2">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="SYSTEM" type="SERVICE1" mask="4" defvalue="4">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="COINS" type="COIN1" mask="1" defvalue="1">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="COINS" type="COIN2" mask="2" defvalue="2">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P1_JOYSTICK_RIGHT" mask="1" defvalue="1">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P1_JOYSTICK_LEFT" mask="2" defvalue="2">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P1_JOYSTICK_DOWN" mask="4" defvalue="4">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P1_JOYSTICK_UP" mask="8" defvalue="8">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P2_JOYSTICK_RIGHT" mask="256" defvalue="256">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P2_JOYSTICK_LEFT" mask="512" defvalue="512">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P2_JOYSTICK_DOWN" mask="1024" defvalue="1024">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN0" type="P2_JOYSTICK_UP" mask="2048" defvalue="2048">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON1" mask="1" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON2" mask="2" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON3" mask="4" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN2" type="P1_BUTTON4" mask="1" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN2" type="P1_BUTTON5" mask="2" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN2" type="P1_BUTTON6" mask="4" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN3" type="P2_BUTTON1" mask="1" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN3" type="P2_BUTTON2" mask="2" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN3" type="P2_BUTTON3" mask="4" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN4" type="P2_BUTTON4" mask="1" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN4" type="P2_BUTTON5" mask="2" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
<port tag="IN4" type="P2_BUTTON6" mask="4" defvalue="0">
<newseq type="standard">
NONE
</newseq>
</port>
</input>
</system>
</mameconfig>?xml

After running the script (I set the keycodes to BKBKBKBKBKBKBKBKBKB)

<?xml version="1.0"?>

<mameconfig version="10">
<system name="sf">
<input>
<port tag="IN1" type="P1_BUTTON1" mask="1" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON2" mask="2" defvalue="0">
<newseq type="standard">
KEYCODE_K
</newseq>
</port>
<port tag="IN1" type="P1_BUTTON3" mask="4" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="IN2" type="P1_BUTTON4" mask="1" defvalue="0">
<newseq type="standard">
KEYCODE_K
</newseq>
</port>
<port tag="IN2" type="P1_BUTTON5" mask="2" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="IN2" type="P1_BUTTON6" mask="4" defvalue="0">
<newseq type="standard">
KEYCODE_K
</newseq>
</port>
<port tag="IN3" type="P2_BUTTON1" mask="1" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="IN3" type="P2_BUTTON2" mask="2" defvalue="0">
<newseq type="standard">
KEYCODE_K
</newseq>
</port>
<port tag="IN3" type="P2_BUTTON3" mask="4" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="IN4" type="P2_BUTTON4" mask="1" defvalue="0">
<newseq type="standard">
KEYCODE_K
</newseq>
</port>
<port tag="IN4" type="P2_BUTTON5" mask="2" defvalue="0">
<newseq type="standard">
KEYCODE_B
</newseq>
</port>
<port tag="IN4" type="P2_BUTTON6" mask="4" defvalue="0">
<newseq type="standard">
KEYCODE_K
</newseq>
</port>
</input>
</system>
</mameconfig>

Here's the latest version of the script, I included some .csv files (gamelists). Remember, you can make your own .csv files with romlister. You have to have the alternatinggames.csv that I included to map P2 buttons to P1 on alternating games, the others are not needed, and can be replaced with whatever gamelists from Romlister that you make. I will have to upload the CFGs somewhere else, because they are too big. I'll PM you with the location. Again, if you already have the cfgs that you want to change, just put a copy in the CFGmaker\cfg folder, the converted CFGs will be put in CFGmaker\New CFG.

Posted

Here are the CFG files, it was 3Mb, but compressed down to 86Kb, so I guess I can upload it here. I should also tell you that when the script is done, it creates a list called Roms Skipped.csv, if some roms weren't done. At first I thought I missed some of the cfg's somehow, but after closer inspection, the games that are skipped do not have any button controls. So games like crazy climber, and blackwidow are skipped. If you find something missing that does have buttons listed as a control, let me know.

This only has no clone cfgs...

Posted

I just noticed that this script will only accept keyboard input for defining the controls for remapping. Since I use a game pad encoder, I'll have to add some code to either hard code the correct controls or create an input file to do it. It's no biggie, just thought I would let you know. It looks like this is a good framework and it will be a REALLY easy thing to do!

Posted

Yeah, I don't use a gamepad, so it never crossed my mind. That's part of the reason I have a hard time helping people, it's difficult enough remembering how I did it, more or less thinking of the ten other ways it could be done. Modify it to your hearts content, and post the updated code when your done, I'd like to see it! The bottom line is that I hope you find it useful, I know you've been putting off re-mapping your games for a long time... And no, I never did hook up my light guns! <_<

Posted

Light guns are fun, but they are very frustrating IMO. They work, then stop working even though nothing changed, then you try again and what you did before doesn't work, then you figure it out and they work...for a while until something changes that you didn't change. Maybe that's the fun part. My wife doesn't seem to think so though. <_<

I'll put something together for the gamepad stuff. It shouldn't be too tough. I'm thinking I could just add a toggle button to switch between keyboard and gamepad input. If it's keyboard, it detects what button you pressed. If it's gamepad, it just asks for a number that you manually enter. I might need to put something for gamepad number as well though. Like I said, no biggie.

Thanks for the script. It will make this much easier! :D

Posted
Light guns are fun, but they are very frustrating IMO. They work, then stop working even though nothing changed, then you try again and what you did before doesn't work, then you figure it out and they work...for a while until something changes that you didn't change. Maybe that's the fun part. My wife doesn't seem to think so though. <_<

Just lightguns? Hell, my whole system is like that! :P If they are that finicky, I may not even try...

I'll put something together for the gamepad stuff. It shouldn't be too tough. I'm thinking I could just add a toggle button to switch between keyboard and gamepad input. If it's keyboard, it detects what button you pressed. If it's gamepad, it just asks for a number that you manually enter. I might need to put something for gamepad number as well though. Like I said, no biggie.

Thanks for the script. It will make this much easier! :D

In your case it may be easier just to put the text that mame sees into the variables p1b1-p4b8, (Just delete everything between "GetKeys:", and "Gui, 2:default" and define them individually. Unless you think this will catch on, and other people will want to use it. On the other hand, your probably like me, and just want to be able to script it, to see if you can. Maybe we can get HK to promote it once we're both satisfied with it. I can't imagine anyone with CPWizard, or LedWiz not wanting to use it. Unless of course they are satisfied with a single layout for every game.

So, I know you like code, Does my approach seem reasonable? I don't know alot of the commands, and there might be easier ways to do things.

Posted

Well, I made a quick mod to the code so that I hard coded the inputs for the player buttons for 5 and 6 button games and ran through the script for each. In the end, I have 224 configs that should work with MAME and my new controller setup. This was MUCH quicker than doing it by hand. THANKS!!!

I didn't do anything that anyone else would likely need, but if someone asks I can post the full code. For Tempest, all I did was add the following code before the return statement in the GetKeys: routine:

;Hardcode gamepad buttons
;6 button Controls
;p1b1:="JOYCODE_3_BUTTON5"
;p1b2:="JOYCODE_3_BUTTON6"
;p1b3:="JOYCODE_3_BUTTON7"
;p1b4:="JOYCODE_3_BUTTON2"
;p1b5:="JOYCODE_3_BUTTON3"
;p1b6:="JOYCODE_3_BUTTON4"
;p1b7:="NONE"
;p2b1:="JOYCODE_3_BUTTON16"
;p2b2:="JOYCODE_3_BUTTON17"
;p2b3:="JOYCODE_3_BUTTON18"
;p2b4:="JOYCODE_3_BUTTON13"
;p2b5:="JOYCODE_3_BUTTON14"
;p2b6:="JOYCODE_3_BUTTON15"
;p2b7:="NONE"

;5 button Controls
p1b1:="JOYCODE_3_BUTTON5"
p1b2:="JOYCODE_3_BUTTON6"
p1b3:="JOYCODE_3_BUTTON7"
p1b4:="JOYCODE_3_BUTTON2"
p1b5:="JOYCODE_3_BUTTON6"
p1b6:="JOYCODE_3_BUTTON3"
p1b7:="NONE"
p2b1:="JOYCODE_3_BUTTON16"
p2b2:="JOYCODE_3_BUTTON17"
p2b3:="JOYCODE_3_BUTTON18"
p2b4:="JOYCODE_3_BUTTON13"
p2b5:="JOYCODE_3_BUTTON17"
p2b6:="JOYCODE_3_BUTTON14"
p2b7:="NONE"

Oh, and yes I realize that I don't need to define the extra buttons with "NONE". I thought they were needed, but after reviewing the source .cfg's, I realized they weren't.

Posted
Well, I made a quick mod to the code so that I hard coded the inputs for the player buttons for 5 and 6 button games and ran through the script for each. In the end, I have 224 configs that should work with MAME and my new controller setup. This was MUCH quicker than doing it by hand. THANKS!!!

I guess that's an endorsement. :)

I'd prefer it, for advertising purposes that you change "that should work with MAME..." to "that work with MAME..."

If you can do that, I'll drop your endorsement proceeds into the mail! :P

Posted

I gave it a try and noticed that CPWizard was still screwed up. Then I realized that I had to update my CPWizard layout to use the new JOYCODE for the appropriate joystick. DOH!

Once I did that, Street Fighter looked right on! But, I found that not all of the profiles were generated. I just took one example by trying sf2tj and it was still the original config. This is probably a non-issue since this is a clone that wouldn't be used in GameEx, so I'm going to have to actually check it that way.

Anyway, I just wanted to let you know that things appear to be working nicely!!!

Posted

I mentioned above that the CFG's I uploaded were no clones... Good thing that Pacman doesn't have any buttons!

If you want the whole set, I'll upload them...

Posted

Yeah, I realize that. The thing I don't understand is that MAME will use the parent cfg if the clone doesn't have a cfg. Does this mean that CPWizard does not do that as well? I mean, I thought HK had it set up to do:

controller file -> rom.cfg -> parent rom.cfg -> default.cfg -> MAME default settings

It appears that it doesn't check the parent rom.cfg. I haven't done extensive testing, so I could have missed something.

  • 1 month later...
Posted

BK,

I was fooling around with the CFGMaker script to add support for joysticks. Should I add support for multiple Joysticks? It seems like I should, but I don't want to do it if it's not necessary. What do you think?

Posted

Once again, I was not very clear with my question. I wasn't planning on remapping joysticks within the configs at all, I can't see (Maybe I'm blind) why someone would want to change those on a per game basis.

I was changing the program to allow input from Joystick (Gamepad) encoders, so that you press button 1 on the joystick, it enters "JOYCODE_1_BUTTON1" as an input code. I'm assuming I should allow input for multiple joysticks for players1-4.

IE: JOYCODE_2_BUTTON1... Is that right?

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