Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: CPWizard v2.63 Released  (Read 223044 times)

0 Members and 2 Guests are viewing this topic.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #200 on: June 07, 2008, 12:13:11 pm »
If you take a look at a bezel file generated by CPWizard it's a zip file containing two files. A [ROM].lay and CP.png. So I thought if we swap around the 640/480 values in the lay file then resize the CP.png to be vertically stretched, that it might work. Attached is a bezel for Street Fighter where I've swapped these values around.

Cool. I have looked at the lay files before, but I forgot that they have that info in them. I'll give sf a try when I get an opportunity (hopefully today).
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #201 on: June 08, 2008, 01:45:25 am »
I believe it worked as you expected. It mostly looked good but it looked squished horizontally. If I understand you right, you took a 640x480 image, squished it horizontally, and stretched it vertically. Right? If so, then I think we have a winner. So you say CPW just needs a 480x640 option then? I'll look for it in the next version. (I don't imagine those dimensions are retrieved from a text file that I could just modify in the meantime)

Thanks Headkaze!
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.78 Released
« Reply #202 on: June 08, 2008, 04:48:04 am »
I believe it worked as you expected. It mostly looked good but it looked squished horizontally. If I understand you right, you took a 640x480 image, squished it horizontally, and stretched it vertically. Right? If so, then I think we have a winner. So you say CPW just needs a 480x640 option then? I'll look for it in the next version. (I don't imagine those dimensions are retrieved from a text file that I could just modify in the meantime)

Thanks Headkaze!

Okay, that's good to know so I'll just need to add 480x640 option in the next version. To stop the stretching you will have to use a background for your CP layout that is 768x1024. That way when it stretches to 480x640 for the bezels it won't look so stretched.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #203 on: June 15, 2008, 11:58:53 am »
Hey headkaze, I noticed that my simpsons panel wasn't "enabling" some of the buttons so I did some investigation this morning, and it appears that any of the "pad" keys (e.g. keycode_0_pad) aren't enabling in CPW, and I'm using 1.78. Can you confirm? I've spent a good deal of time investigating my mappings within mame, looking at the cfg files themselves, and examining my layout in CPW and I can't come up with any explanation other than a bug in CPW. Here is my default.cfg and simpsons.cfg files. I'm running mameui .125.

Also, I'm still holding out hope that at some point we can figure out that pause problem I'm having. I don't blame you if you don't want to expend more energy on it, but I don't suppose there is ANY more debug logging that could be added to help track it down? I got to thinking about it more last night because I was playing around with saving and loading states in mame, and whenever you hit save state, it simultaneously pauses mame. In that case, CPW came up EVERY time, yet it doesn't when I pause with "P" (except for the very 1st time). So that made me think maybe it's caused by my ipac using P as the shift key. I disabled that but it made no difference with CPW. What do you think? Does that save state pausing spark any ideas for you? I would still prefer live CPW over bezels, so I won't let my hope for that die. :)
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

Miller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:June 19, 2008, 01:47:39 pm
Re: CPWizard v1.78 Released
« Reply #204 on: June 15, 2008, 01:16:39 pm »
Hi all did anybody get round to finishing a guide for CPWizard? thanks.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #205 on: June 16, 2008, 09:09:28 am »
Doh! I forgot the attachment.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.78 Released
« Reply #206 on: June 16, 2008, 10:31:44 am »
Hey headkaze, I noticed that my simpsons panel wasn't "enabling" some of the buttons so I did some investigation this morning, and it appears that any of the "pad" keys (e.g. keycode_0_pad) aren't enabling in CPW, and I'm using 1.78. Can you confirm? I've spent a good deal of time investigating my mappings within mame, looking at the cfg files themselves, and examining my layout in CPW and I can't come up with any explanation other than a bug in CPW. Here is my default.cfg and simpsons.cfg files. I'm running mameui .125.

Also, I'm still holding out hope that at some point we can figure out that pause problem I'm having. I don't blame you if you don't want to expend more energy on it, but I don't suppose there is ANY more debug logging that could be added to help track it down? I got to thinking about it more last night because I was playing around with saving and loading states in mame, and whenever you hit save state, it simultaneously pauses mame. In that case, CPW came up EVERY time, yet it doesn't when I pause with "P" (except for the very 1st time). So that made me think maybe it's caused by my ipac using P as the shift key. I disabled that but it made no difference with CPW. What do you think? Does that save state pausing spark any ideas for you? I would still prefer live CPW over bezels, so I won't let my hope for that die. :)

I think I found the problem with the key pad not working. In your simpsons config you have KEYCODE_0PAD, KEYCODE_1PAD, KEYCODE_2PAD etc. But in CPWizard I have them defined as KEYCODE_0_PAD, KEYCODE_1_PAD and KEYCODE_2_PAD. I've changed the keycodes in CPWizard so that should be fixed for next version. For now you could edit your layout file in a text editor changing the keycodes should fix it.

I'm still interested in your pause problem, but can you try using my bezel patch from the website and compile a new version? Since you created your own patch manually it might be a problem related to that. So if you can confirm using my bezel patch if the problem still occurs at least we can rule that out.

I'm looking at adding some extra debugging that will output which window is foreground (kinda like the foreground plugin you wrote for MaLa).

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #207 on: June 16, 2008, 12:55:30 pm »
I'm still interested in your pause problem, but can you try using my bezel patch from the website and compile a new version? Since you created your own patch manually it might be a problem related to that. So if you can confirm using my bezel patch if the problem still occurs at least we can rule that out.

I'd be glad to, but what do you mean "created your own patch manually"? I use the hiscore patch and your bezel patch, but I use Mame Compiler to apply them and build mame. I am using mameui32, so if you think that could be a factor I will build straight command line mame.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

ddrtist

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 49
  • Last login:October 03, 2008, 12:51:08 pm
Re: CPWizard v1.78 Released
« Reply #208 on: June 16, 2008, 04:28:12 pm »
Sorry if I sound like a complete noob, but I have not seen this question asked in this thread.

CPWizard looks awesome for all of it's features, but does it support GUI MAMEs?  I use MAMEPlus .122 currently with it's accompanying romset.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: CPWizard v1.78 Released
« Reply #209 on: June 17, 2008, 12:04:22 pm »
I think I found the problem with the key pad not working. In your simpsons config you have KEYCODE_0PAD, KEYCODE_1PAD, KEYCODE_2PAD etc. But in CPWizard I have them defined as KEYCODE_0_PAD, KEYCODE_1_PAD and KEYCODE_2_PAD. I've changed the keycodes in CPWizard so that should be fixed for next version. For now you could edit your layout file in a text editor changing the keycodes should fix it.

Note that this change was made in 0.117u3, so for older versions of mame, the two '_' is the way to go.  (I don't know how backward compatible you want CPWizard to be, headkaze.)  Reason for change, now the '_' marks which keyboard (if more than one is mapped), the the number had to be moved next to the 'pad'.
Robin
Knowledge is Power

Miller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:June 19, 2008, 01:47:39 pm
Re: CPWizard v1.78 Released
« Reply #210 on: June 17, 2008, 04:38:05 pm »
Please can somebody direct me to a decent guide thanks  ;D

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.78 Released
« Reply #211 on: June 18, 2008, 03:26:21 am »
TheShanMan: I just remember you had problems applying the original bezel patch so you manually applied it. I thought there could have been a problem then. The bezel patch works okay for me. But your right about some things like save state will pause Mame. It looks like I need to update the patch so it wont show during these types of pauses.

Miller: CPWizard has help included in the software if you select the Help menu. It's not complete but should give a decent rundown on how it works. It hasn't been updated in a while though.

u_rebelscum: Thanks for your input! Looks like I'm going to have to add some code to deal with the '_' in keycodes.

Miller

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:June 19, 2008, 01:47:39 pm
Re: CPWizard v1.78 Released
« Reply #212 on: June 18, 2008, 04:47:49 am »
TheShanMan: I just remember you had problems applying the original bezel patch so you manually applied it. I thought there could have been a problem then. The bezel patch works okay for me. But your right about some things like save state will pause Mame. It looks like I need to update the patch so it wont show during these types of pauses.

Miller: CPWizard has help included in the software if you select the Help menu. It's not complete but should give a decent rundown on how it works. It hasn't been updated in a while though.

u_rebelscum: Thanks for your input! Looks like I'm going to have to add some code to deal with the '_' in keycodes.

Ok thanks It was just I remembered a while back someone saying they were going to write a complete guide so wanted to see if it was available first before i started.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #213 on: June 18, 2008, 09:06:54 am »
TheShanMan: I just remember you had problems applying the original bezel patch so you manually applied it. I thought there could have been a problem then. The bezel patch works okay for me. But your right about some things like save state will pause Mame. It looks like I need to update the patch so it wont show during these types of pauses.

IIRC there was a problem with the patch when you first released it, which is why I manually did it (maybe I'm remembering wrong but I know it wouldn't apply automatically). That was when I was on 0.123. I've since moved up to 0.125 and didn't have to manually apply it. So it sounds like you're not waiting on me for anything at this point, but as always, if there is anything I can try for you while I wait for a new version that hopefully helps us narrow in on the problem, I'd be glad to do it.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #214 on: June 19, 2008, 09:28:21 pm »
One other idea: you may be reluctant to hand out your source code, but I could debug my problem if you want and let you know what the problem is. I've got whichever Visual Studio I'd need. And of course I'll sign an NDA. ;)

Think of it this way: I won't bug you so much with bug reports for you to investigate if I can do the investigating myself and simply report the fix. ;D
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

Marak

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:September 05, 2010, 11:45:05 pm
  • "Look, she's smiling"
Re: CPWizard v1.78 Released
« Reply #215 on: June 20, 2008, 02:39:51 am »
headkaze,

Since CPWizard has multiple monitor support,
would it be possible to keep a panel layout displayed all the time,
Instead of having to pause Mame?

I would like to include a small color LCD (1024x768 or 800x600) on my next cab,
and it would be awesome if it would show layouts while playing Mame.

I bet other people would like to do this too.

Thanks for all your hard work!  :cheers:

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.78 Released
« Reply #216 on: June 26, 2008, 12:02:03 pm »
Marak: That feature is definately on the cards :)

TheShanMan: I've put together an exe that outputs extra logging info during the showing and hiding of Mame. Can you give this a try and post the CPWizard.log file. It should help us alot in figuring out where it's going wrong. Don't forget to turn on verbose logging in Options.
« Last Edit: July 03, 2008, 05:52:24 am by headkaze »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.78 Released
« Reply #217 on: June 27, 2008, 12:50:36 am »
Well here is the log file. I'm not sure you'll find anything helpful here (it doesn't look like it to me). There are 3 pauses total in this file. The first 2 are successful (as evidenced by the delay of several seconds between pause and unpause), and the 3rd is unsuccessful (as evidenced by no delay between pause and unpause). Have a look though - maybe your expert eyes will see something that I don't.

I'd like to know what you think of the log entries, as well as what you think the next steps are for me and/or you.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.79 Released
« Reply #218 on: June 30, 2008, 10:17:37 pm »
Version 1.79 Release

- Fixed Mame.dll memory leak.

TheShanMan: I haven't had a chance to do anything with your issue in this release, sorry about that, just haven't had the time. Looked at the log file and can't see anything that jumps out at me unfortunately.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #219 on: July 11, 2008, 09:34:05 am »
Tried out 1.80. Was able to create bezels using 480x640, but with problems. First, I specified a directory that didn't exist. I assumed it would either create it for me or throw an error. It did neither. It appeared to be creating all the bezels but when it finished I couldn't find them!

Second, I'm not sure if the problem is with using bezels on a vertical monitor but it almost seems to me like CPW would have to automatically determine the correct aspect ratio (and perhaps even the correct resolution) on a game-by-game basis and create the bezel accordingly. What I found was for horizontal games, showing the CP bezel forced the game's graphic mode into a "stretch" mode. So instead of showing the game 4x3 with a black bar above and below, it stretched the video of the game itself to 3x4 to match the monitor and bezel! The only way I could get the game to display normally after that was to go to the TAB video options and pick "standard". Not even restarting the game would make it display normally. For this reason there is no way I can use the bezel feature as it stands today, which is too bad, because I was really liking it until I ran into this with a horizontal game.

Third, would it be possible to add support for custom resolutions (and is it already possible by editing an ini or something)? 480x640 is much lower than what my monitor supports and what my CPW layout is (it's 1024x1280). Consequently the bezels don't look nearly as good as when I use CPW in "on the fly" mode. Looking at http://mamedev.org/devwiki/index.php/LAY_File_Basics_-_Part_I, it appears MAME places no restrictions on resolution.

Finally, since bezels aren't currently working for me, and for all I know maybe they never will, and my first choice has always been the normal CPW "on the fly" approach, what is the status of my pause problem? Does 1.80 have anything extra for debugging that? Or did you come up with something special for me to use to debug it? Feel free to take this one to PM if you'd rather discuss it privately.

Thanks headkaze!
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #220 on: July 11, 2008, 09:46:46 am »
Glad you tested that feature for me. Okay it seems to me I will have to add an option to "Create vertical bezels for vertical games" and just swap the width and height for them. Since I do have access to a variable which tells me if a game is vertical or not it should be relatively easy to fix that.

Yeah I haven't done much about the other issue as I've been working on other projects. Will get back to you on that one, but first I think I would like to sort out the vertical bezel thing.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #221 on: July 11, 2008, 10:24:15 am »
Sounds great. I've been effectively without CPW for so long now that to get ANYTHING working will thrill me, even if it's not my first choice.

Do you think you can support either a much larger list of resolutions or allow specifying a custom resolution for the bezels too?
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #222 on: July 11, 2008, 10:47:45 am »
Do you think you can support either a much larger list of resolutions or allow specifying a custom resolution for the bezels too?

No problem I just thought noone would want to go over 640 x 480 for bezels. That will create a really massive artwork folder too even zipped lol. Yeah but easy enough to add that.

I think adding 1024 x 768, 1280 x 960 and 1280 x 1024 should do it. BTW did you know that 1280 x 1024 is not 4:3 aspect ratio? Shouldn't you be going for 1280 x 960?

EDIT: Okay mate, can you try this attached exe? It should add those resolutions as well as allow you to use the layout size. Select the "Rotate For Vertical" option which should flip the coords.
« Last Edit: July 12, 2008, 02:12:33 pm by headkaze »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #223 on: July 11, 2008, 12:38:00 pm »
I did realize that but never gave it much thought. I wonder what mame does in that case - taking a vertical game for instance I imagine it results in thin black bars on the left and right, but since they'd only be 32 pixels wide maybe I just have never noticed. I'll have to try switching to 960x1280 and see if it looks different. Of course, if there are any horizontal games that originally had a higher resolution, like 1024x768, then they wouldn't run on my vertical setup.

I will definitely try it out when I get home today (or maybe I'll do it remotely while I'm at work!). I have a friend (and family) that's coming over for dinner tomorrow, and we used to play Area 51 a lot, so he'll definitely get a kick out of my arcade machine, and getting the bezels working would certainly add to the experience!

Oh, and I thought about the size of my artwork folder with larger images. I didn't think to see how big it is with 480x640 images, so it will be interesting to see how big the folder is after I try 1024x1280!

Thanks!!!
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #224 on: July 11, 2008, 07:47:27 pm »
I just tested it out, but I'm still getting the vertical stretching of horizontal games. I'll try playing with the settings a bit unless you think I'm doing it right. My settings are:

Resolution: Layout Size (which is 1024x1280)
Include Vertical
Rotate for Vertical

It works great for vertical games (well, at least for donkey kong - didn't try anything else yet). If I can just get past these stretching issues, I think I'll be quite happy with the bezel approach. Seems like it would be much less prone to problems than running CPW resident.

And the output was only about 1.85 GB, which I can definitely live with!

EDIT: I can reproduce the stretching problem with vertical games on a horizontal monitor (my desktop system). This was using resolution size 1280x1024 rather than Layout Size. I'm starting to investigate if I can get it to work properly by editing the .lay file (I don't know much about these yet though).

EDIT 2: I figured out the problem. The screen bounds are being calculated incorrectly. Since I'm debugging this on my desktop rather than my cabinet, I'll use a vertical game on a horizontal monitor example, though obviously it should translate to horizontal games on a vertical monitor too. For centipede, it defined the screen bounds like this:
Code: [Select]
<bounds left="140" top="0" right="1140" bottom="1024" />That's not a 3:4 aspect ratio! It should be:
Code: [Select]
<bounds left="256" top="0" right="1024" bottom="1024" />That makes it 768x1024, which is 3x4. When I try the edited layout, the game works fine when showing and hiding the bezel. 8)

One extra question: If you exit a game when a bezel is up (i.e. when paused), the next time you start the game the bezel is showing even though it's not paused. Is there something that can be done about this? There doesn't appear to be a command line parameter to hide bezels other than the option for enabling/disabling bezels - maybe you can add that to your bezel diff >:D. Alternatively, do you think that's something an app could do by detecting the exit state with the output system? I think that would also require a mame patch to support telling it to hide bezels, much like your patch to support telling it to unpause. I'd like your thoughts on either one of these approaches to making sure the bezel isn't showing at startup, though a solution is certainly not critical at this point. My wife would be mad at me for saying this, but perhaps if that's not something you're interested in doing, I could work on that and give it to you as a helper app that comes with CPW or with the bezel diff.
« Last Edit: July 11, 2008, 09:51:12 pm by TheShanMan »
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #225 on: July 12, 2008, 03:27:36 am »
Doh I should have remembered to tell you. You need to turn off the "Include Vertical Bezel" option because it tries to include a vertical bezel and you don't want one.

I also wanted to ask you, how do I calculate the sizes for the screen when using a vertical bezel?

All I know is that for 640 x 480 I got the values 140 for the left border and 500 for the right border. That leaves a 140 pixel border left and right. So I've just been calculating the 140 pixel border no matter the resolution obviously it's wrong. I'd like to know what values I'm suppoed to use for the other resolutions. Appreciate any input on that.

Anyway bottom line is, take the tick off the "Use Vertical Bezel" and it wont use those values anyway.

As for hiding the bezel on exit obviously it would be best to modify the diff to do that. It would suck having to run another app. The whole beauty of running bezels is that they don't require additional software for the CP viewer. I think adding to the diff would be easy. All you need to do is add mame_pause(Machine, 0); when Mame is exiting to the diff. That should do it. If you get around to creating a new diff with that in there, please post it here and I'll host it on the CPWizard website.

Anyway can you check out the Bezel exporting again without that option, and if you can help me with those values when using the "Include Vertical Bezel" I'd much appreciate it. Sorry if I didn't make it back in time for when your mate was coming around!

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #226 on: July 12, 2008, 11:29:47 am »
That seems to mostly work. I've been working on a small set of files on my desktop (I edited the miniinfo.xml - sure would be nice if you could select which games to create bezels for in the UI!), centiped, dkong, pacman, puckman, and simpsons (simpsons being the only horiz game). What you suggested worked for all but centiped! It still is creating the lay as 140 to 1140! I deleted all the zips just to be sure I wasn't looking at an old one, and the file's timestamp also indicated it was new. Could it be that it's doing the first one wrong? Or is there more to it (maybe if I run it on all the games there will be more)?

Oh, and I forgot to report another bug that I discovered. Some of the graphics get created as just blank png's except for your "created by" watermark. For instance, that happened to the simpsons one when I ran it on the whole set of games. Perhaps after so many games something gets messed up and then stops making them properly? ???

Regarding the patch, I think ideally it would be more of a "Hide CP" call rather than an unpause call because for people that use save states, that would result in being unpaused when they start their game back up I think (unless the state gets saved before the output system notifies about exit).

Quote
Sorry if I didn't make it back in time for when your mate was coming around!

There's still time! >:D ;)
« Last Edit: July 12, 2008, 11:31:53 am by TheShanMan »
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #227 on: July 12, 2008, 02:23:06 pm »
Okay try this one. I ran a batch off myself, had a look at centipede and it looks okay to me. Not sure what was wrong with the last one as I just cleaned up some of the code.
« Last Edit: July 13, 2008, 02:57:23 pm by headkaze »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #228 on: July 12, 2008, 02:56:59 pm »
That seemed to work for my sample set of 5 games (centiped.lay looks good!), so I'll let it run on my cab and see how those turn out.

Any idea on why some of the png's are pretty much blank? Is that part of the clean up you mentioned, and maybe that's fixed now? Or (more likely) you just haven't had time to look at that as it requires a bit more digging around?
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #229 on: July 12, 2008, 03:20:09 pm »
OK, I've tried various things on the cab and can't get it to work right for all games. In order to get all png's to be 1024x1280 I have to pick resolution "Layout Size" (that's the size of my layout) with no options checked. Furthermore, I can't seem to ever get the lay files for horizontal games to set top=256 bottom=1024 (height=768, i.e. 1024x768 on a 1024x1280 screen).

I don't know if this matters, but I do NOT use mame rotation. My graphics card handles rotation at the driver level, so windows actually sees my resolution as 1024x1280.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #230 on: July 12, 2008, 04:04:14 pm »
OK, I've tried various things on the cab and can't get it to work right for all games. In order to get all png's to be 1024x1280 I have to pick resolution "Layout Size" (that's the size of my layout) with no options checked. Furthermore, I can't seem to ever get the lay files for horizontal games to set top=256 bottom=1024 (height=768, i.e. 1024x768 on a 1024x1280 screen).

I think your going to have to explain what you want more clearer. All the new "Rotate For Vertical" option does is swap the Width and Height values for vertical games which is what I thought you asked for. Are you saying now you have to have them all the same size?

As I mentioned previously I don't exactly know how I should be calculating the borders for bezels which I thought was only necessary when I was including a vertical bezel for vertical games on a horizontal setup. Now your saying you need Top=256 and Bottom=1024?

Also consider I try to design my software to work on all different configurations so I can't just hardcode it to work on one setup which probably means I'll have to learn how the bezel format works a bit better.

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #231 on: July 12, 2008, 04:20:58 pm »
If I didn't convey myself properly before, then I apologize. I haven't really changed what I'm asking for though. I have a vertically oriented monitor with my video driver set to rotate, such that windows looks normal, yet tall (1024x1280). Therefore, I don't need to set mame to rotate because that is already handled natively by windows. I don't think that matters to you in terms of creating bezels correctly, but I wanted to make sure you have whatever information you may need. I believe the lay files would need to be created identically for someone who has a vertical monitor without driver rotation (i.e. rotation handled by their FE and mame).

So what I'm after is having ALL bezel png's be 1024x1280, which is what my all my layout resolutions are. I think this is what most if not all users would expect, since after all that's what you'd get if you ran CPW as a resident app. I can get that to occur my choosing "Layout Size" and unchecking the other options (it sounds from what you're saying that Rotate for Vertical may as well be removed). I still don't understand what "include vertical" does, so I don't know if that needs to come into play at all.

In terms of the .lay files, check out that link I posted a few days ago in this thread. It has details about .lay files. You may have already seen it though - it's fairly basic. For vertical games on my vertical monitor, the screen needs to be defined as left=0, right=1024, top=0, bottom=1280, since that's how a vertical game will fill the screen with no bezel. For horizontal games on my vertical monitor, the screen needs to be defined as left=0, right=1024, top=256, bottom=1024, since that's how a horizontal game will fill the screen with no bezel.

And for someone running a horizontal monitor, the screen would be l=0, r=1280, t=0, b=1024 for a horizontal game, and l=256, r=1024, t=0, b=1024 for a vertical game.

Does that make sense?
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #232 on: July 13, 2008, 02:44:20 am »
Okay that makes more sense now, so yeah I may as well remove that "Rotate For Vertical" option.

The "Include Vertical Bezel" option is for horizontal users that want to have a "Mame" logo down the sides for vertical games. It's just so there are no black strips, but the Mame logo instead (have a look at the attached image, it shows what image is included with that option).

Okay I'm going to have to recode some of this.

So far you've given me the values for a 1280x1024 vertical display, So now I need to know the values for the rest of the resolutons. I really need to support them all to implement this correctly, any ideas or is there an obvious pattern I'm missing here?

Horizontal Monitor Orientation
Code: [Select]
320x240: Horizontal Game: L=0, R=320, T=0,  B=240, Vertical Game: L=?, R=?, T=0, B=240
640x480: Horizontal Game: L=0, R=640, T=0,  B=480, Vertica Gamel: L=140, R=500, T=0, B=480
1024x768: Horizontal Game: L=0, R=1024, T=0,  B=768, Vertical Game: L=?, R=?, T=0, B=768
1024x960: Horizontal Game: L=0, R=1024, T=0,  B=960, Vertical Game: L=?, R=?, T=0, B=960
1280x1024: Horizontal Game: L=0, R=1280, T=0,  B=1024, Vertical Game: L=?, R=?, T=0, B=1024

Vertical Monitor Orientation
Code: [Select]
240x320: Vertical Game: L=0, R=240, T=0,  B=320, Horizontal Game: L=0, R=240, T=?, B=?
480x640: Vertical Game: L=0, R=480, T=0,  B=640, Horizontal Game: L=0, R=480, T=?, B=?
768x1024: Vertical Game: L=0, R=768, T=0,  B=1024, Horizontal Game: L=0, R=768, T=?, B=?
960x1024: Vertical Game: L=0, R=960, T=0,  B=1024, Horizontal Game: L=0, R=960, T=?, B=?
1024x1280: Vertical Game: L=0, R=1024, T=0,  B=1280, Horizontal Game: L=0, R=1024, T=256, B=1024

EDIT: I've put all the code in place to do this, now I just need to put in the values.
« Last Edit: July 13, 2008, 05:02:43 am by headkaze »

loadman

  • Wiki Contributor
  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4305
  • Last login:August 17, 2020, 03:23:55 am
  • Cocktail Cab owner and MaLa FE developer
    • MaLa
Re: CPWizard v1.80 Released
« Reply #233 on: July 13, 2008, 06:52:44 am »
Man...

This is turning into a slick piece of software.

Well Done HeadKaze... :applaud:

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #234 on: July 13, 2008, 11:51:13 am »
So far you've given me the values for a 1280x1024 vertical display, So now I need to know the values for the rest of the resolutons. I really need to support them all to implement this correctly, any ideas or is there an obvious pattern I'm missing here?

Yeah, that's easy. I'm just picking values to center the display. So in my case (1024x1280), I calculated t=256, b=1024 like this: The game would run as 1024x768 (width of display the limiting factor, and of course the game is 4:3, so that's where 768 comes from). So since there's more height than necessary, calculate 1280-768=512. That's how much extra vertical space there is. Divide that by 2 for top and bottom. Top equals that value (256), and bottom is 256+768=1024.

Incidentally, you can also specify the coordinates as height and width, rather than bottom and right (according to that "lay file basics" page I linked). That would probably make the resulting values look more straightforward/obvious. So with my example, it would be l=0, w=1024, t=0, h=768. If it were me, I'd create the lay files with those values.

Hope that's a straightforward explanation. And I agree with loadman. ;D I feel like a third of the posts in this thread must be mine. Hope you're not sick of seeing "Last post: TheShanMan" yet! :-\
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #235 on: July 13, 2008, 02:56:55 pm »
Lol I can't believe I didn't realise it was calculated like that for 4:3! I get it now, and it's much nicer being able to use an algorithm to calculate the sizes rather than hard coding them. Thanks for that.

So fingers crossed, this new version is what were looking for. I have tested it and the values look right to me :) Don't forget to check the "Vertical Orientation" checkbox.

I don't get sick of you posting, again you've helped me improve the exporting of bezels to support multiple resolutions and vertical orientation :)
« Last Edit: July 13, 2008, 05:27:06 pm by headkaze »

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #236 on: July 13, 2008, 04:03:56 pm »
Awesome! Thx headkaze. I have it running on my cab as we speak. My early test right after I kick it off is to check 1942 and 88games (vert and horiz). Both look good, so I'm very hopeful that you've nailed it this time. Keeping my fingers crossed that I won't end up with some blank png's this time.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #237 on: July 13, 2008, 04:09:21 pm »
Awesome! Thx headkaze. I have it running on my cab as we speak. My early test right after I kick it off is to check 1942 and 88games (vert and horiz). Both look good, so I'm very hopeful that you've nailed it this time. Keeping my fingers crossed that I won't end up with some blank png's this time.

If there are some blanks you can just delete them then use the "Skip Existing" so it will only create the missing ones. I find it funny your two games for testing are 1942 and 88games. Mine were 1942 and 2020bb :)

TheShanMan

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1911
  • Last login:October 16, 2023, 03:35:12 pm
    • My Arcade (updated 1/30/13)
Re: CPWizard v1.80 Released
« Reply #238 on: July 13, 2008, 05:12:57 pm »
Well, the last 964 have blank images (well, blank except for the watermark). Last good one was kof97. From kof97a on, they were blank and the zip files were 3KB as a result.

The "skip existing" option seems to be busted. It's starting over from the beginning if it's checked. I've canceled it and tried again a couple of extra times just to be sure. Needless to say I'm not going to bother letting it run again, because it's going to spit out bad png's after a while anyway.

So if you could kindly fix the broken "skip existing" first (so I can finish creating my set), and then later have a look at why it might be dying on those last 964, that would be great. I'm using 0.126, btw.
My Collection: Mame cab, 38 dedicated vids, pin, skeeball, coin op air hockey table, Ice Cold Beer, Megatouch, 2 token machines, and payphone (VAPS, pics at Arcade Crusade)

Add Ambience to your mame cab setup

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: CPWizard v1.80 Released
« Reply #239 on: July 13, 2008, 05:38:21 pm »
To be sure your right again, it was only checking for png's not zip files. Okay here is the fix for that.

Also can you check your CPWizard.log for any errors next time you get the blanks. Perhaps it might give me a clue as to what's happening when it's failing. I'm usually quite careful about cleaning up resources but obviously something is not getting free'd properly.
« Last Edit: July 13, 2008, 06:59:24 pm by headkaze »