Jump to content
LaunchBox Community Forums

Control.xml, CPWizard, and batch exports - is this the best method?


fettsvett201

Recommended Posts

Hello

 

I want to display a control panel when a game is picked in Launchbox. I have a curated list of 250ish games (MAME).

 

I was going to use CPWizard, but it appears it doesn’t work with modern versions of MAME. 

 

I can batch export the control panels as PNGs and have them display without CPWizard, but Control.xml is nowhere near up to date. There are about 110 missing games from the database. 

 

My current idea is to create a template from a game already listed in control.xml, insert the necessary information of the missing games, paste it into control.xml and then export the missing control panels with CPWizard. 

 

There has to be a better way of doing this right? Any help is appreciated.

Edited by fettsvett201
Pasting text leads to unreadable post
Link to comment
Share on other sites

5 hours ago, fettsvett201 said:

My current idea is to create a template from a game already listed in control.xml, insert the necessary information of the missing games, paste it into control.xml and then export the missing control panels with CPWizard. 

I tried the Copy/Paste thing and like you, thought "There has to be a better way".  So I wrote a little stand alone program for personal use that makes it [at least] a little easier.  It needs my 2 program files (an .exe and a .dll) and "[LIST_MAME_MINI].xml" and "controls.xml" located in ../CPWizard/Data/

Create a new folder (call it whatever and put it where ever) and copy these 4 files into it.  (this way we don't accidentally screw up the 2 existing xml's [just in case]) You'll probably need to UnBlock my 2 files for Windows to let you run it.

image.thumb.png.2f1bddbe72bf0604cb4e2a9f3a4c12e4.png

Start typing the rom filename (no extension) in the search box and it'll populate a list based off what's in your existing controls.xml (I used this mainly to edit existing control 'values').  Once typed, press Enter.  Here you should see the info (right grid box) that's in LIST_MAME_MINI.  Below that, click Add to controls.xml and it'll add it.  This may take a few (several?) seconds. When the wait cursor stops 'waiting', click Search and it should now populate the grid box on the left.

image.thumb.png.a315dbd61d2f82c6bea7b9bc1c85ec7f.png

At this point, you can edit the Values to your liking (i.e. change "1" to "Gas Pedal") and then click Update controls.xml.  

If for some reason (using hotwhl2p as an example) say it actually has 2 buttons, you can add P1_BUTTON2 by double clicking it. Then to make it organized, click Up to put it below BUTTON1.  

image.thumb.png.416fcf823eb31cc71cf6a742d987acba.png

Don't forget to click Update controls.xml when you're done editing.

If you have "portname" installed with MAME, you can sometimes get controller information from it.   https://github.com/cracyc/mame-portnames  It's not required, but can be helpful.  (example for "1942" showing the "Fire" and "Loop" Values)

image.png.f2a5be0f84a1a7fdedeec1e8e49a9ff3.png

Again, this was a personal project and works "for me".  Results may vary.  Not initially intended for public use.  So it's probably as "pretty" as it's going to get. But hey, if it works... Great!   

MAMEcontrollers.7z

Link to comment
Share on other sites

Woah. thank you! I will give it a try. 

 

Edit: This is great! Thank you so much. This defiantly makes life easier. A few quirks here and there, but it does what it needs to do. Thanks again.

Edited by fettsvett201
Compliments to the chef
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...