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: Demonstration: Dynamic Control Panel Background Image Generation  (Read 10504 times)

0 Members and 1 Guest are viewing this topic.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Hello,

I have been experimenting with a way to generate control panel background images on the fly. I've written a program which will take image pieces and compose them into an image for use either as input into a control panel viewer (johnny5, cpviewer) or directly into MAME to be displayed there via my control panel display patch.

If there's any interest in this, I can flesh this out into an application that will take a game name and create an image with the unused controls dimmed.

Hopefully this demo image will display.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Goz

  • KOTA
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3421
  • Last login:June 25, 2024, 10:06:41 pm
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #1 on: August 30, 2004, 01:30:05 pm »
Damn.... looks good


visciouslymamed

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 68
  • Last login:December 02, 2011, 08:38:46 pm
  • I want to Build My Own Arcade Controls!!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #2 on: August 30, 2004, 06:29:40 pm »
Quote
If there's any interest in this, I can flesh this out into an application that will take a game name and create an image with the unused controls dimmed.

Interested! 8) ;D 8)

walls83

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:July 10, 2017, 02:58:45 pm
  • beer is good
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #3 on: August 30, 2004, 06:34:31 pm »
Yes Yes Yes.  Is there anyway to get it to come up when you hit pause.?  So when people are playing they can just hit pause to see what buttons are being used?
"A true warrior enters the arena with all his powers at the ready." ~ Gouki

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #4 on: August 30, 2004, 07:36:09 pm »
Looks very good :)

Haven't had chance to check out your patch yet...must do so...

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #5 on: August 30, 2004, 11:41:30 pm »
Yes Yes Yes.  Is there anyway to get it to come up when you hit pause.?  So when people are playing they can just hit pause to see what buttons are being used?

Yep.

See the "proof of concept of Howard's idea" thread. Howard's idea was to make his Johnny 5 viewer into a batch process, which MAME could then call to generate an image which would be displayed on pause. Long story short, skip to the end of the thread and you can download my patches.

This application, if I create it, would go in front of Johnny. I would create the background image, Johnny would put the labels on it, then MAME would display it.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

walls83

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1146
  • Last login:July 10, 2017, 02:58:45 pm
  • beer is good
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #6 on: August 30, 2004, 11:55:17 pm »
Very Nice work.  Thanks so much for doing this.   ;D
"A true warrior enters the arena with all his powers at the ready." ~ Gouki

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #7 on: August 31, 2004, 09:23:16 am »
I really like it, but it won't work the way you want it to. Johnny5 dynamically remaps buttons according to ctrlr files, so button 5 isn't always in the same place, or what have you.  

Example:  Mortal kombat II

It has five buttons, but it is totally unplayable unless you remap the buttons.  The way you remap it is a sf2 conversion layout as described in the mk2 manual.  The bottom row is low punch, block, low kick.  The top row is high punch, block (a double binding), high kick.

Anyway, my point is without the dynamic reading of the ctrlr files, your viewer is simply going to activate the bottom row and two buttons on the top, which will just look odd.  This will happen quite often for anyone who remaps their buttons for anything.  :(

Now proper dynamic generation can be done, but only on my end.  Atm, however, I need to concentrate on improving accuracy and speed.  Dynamic generation may be added in the future, however.  

Btw I hope to credited frosty for the images.  ;)

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #8 on: August 31, 2004, 12:13:26 pm »
Cool, I know this is a demo but a couple of suggestions.

First, what HowardC said.  Physically each button on your control panel is mapped as sometype of keypress (or joystick button press, etc..).  It could be wired to more than one input, I have seen people do that.  There can be duplicates, like duplicate KEYCODE_A because someone setup a 7 button layout.  SO what you have to do, like the johnny5 viewer, is associate a keycode to the buttons on screen.  THEN use the ctrlr files (and now possibly the XML cfg files which parse exactly the same as the ctrlr files :) ) to display the correct control.  

After that it is taking the idea to the next step, allowing for rotating panels, swappable panels (esentially the same thing as rotating panels for this project), and modular panels.  Modular would be extremely hard as there are different modular sysstems/ideas though a person using a modular system would probably figure something out on how to make this idea work with what they use.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #9 on: August 31, 2004, 02:00:30 pm »
Exactly.... which is why I say it'll be far easier to do on my end as johnny 5 is already setup to do most of that.  I'll have have to wait until i can get a break from the big part of the code and see what i can do.  

I think it's cool, I'm just not sure about the functionality.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #10 on: August 31, 2004, 05:40:03 pm »
I think the functionality is great.  Being visually able to see hwich buttons are used, even if the labels are added.

PedroSilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:August 01, 2018, 08:37:57 am
  • Grettings !
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #11 on: September 02, 2004, 05:34:48 am »
Forgive my ignorance but ... isn't it more simple to display the "actual" Control Panel image ?

<<---

or am I missing something ?

hunky_artist

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 179
  • Last login:April 15, 2006, 06:39:21 pm
  • I want my own arcade controls!
    • www.pennylanepictures.com
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #12 on: September 02, 2004, 07:05:08 am »
you're missing something my friend :)

most people don't have a replica of an actual CP... they have one with maybe 2 joysticks... and 6 buttons per joystick.

so for newcomers to the machine, and for people playing a new game, they will know what buttons to use  ;D
www.pennylanepictures.com

(my art website) :)

PedroSilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:August 01, 2018, 08:37:57 am
  • Grettings !
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #13 on: September 02, 2004, 07:29:28 am »
you're missing something my friend :)

most people don't have a replica of an actual CP... they have one with maybe 2 joysticks... and 6 buttons per joystick.

so for newcomers to the machine, and for people playing a new game, they will know what buttons to use  ;D

So the project isn't only for showing the controls, but to associate de ones we have on our machines to the originals ? Is that it ?
If so ... there must also exist a config file per machine with the cp config for that machine, right ?

Yap ... like that ... I thing it's most useful  :)

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #14 on: September 02, 2004, 10:11:17 am »
Also the control panel images are of poor quality, have fun reading them.  Also many of the control panel pics can be generic setups or conversion kits so they aren't the right controls anyway :(  yeah, it's crazy to figure this all out :)
« Last Edit: September 02, 2004, 10:12:48 am by SirPoonga »

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #15 on: September 02, 2004, 08:13:44 pm »
After that it is taking the idea to the next step, allowing for rotating panels, swappable panels (esentially the same thing as rotating panels for this project), and modular panels.  Modular would be extremely hard as there are different modular sysstems/ideas though a person using a modular system would probably figure something out on how to make this idea work with what they use.
I have some ideas on how to handle swappable or rotating panels. Modular can be done, but will be a big headache.

I shamelessly thieved the controls artwork from Frosty.  ;D
I resized Frosty's collage so that his buttons would be the same size as the buttons on my template image. Should have done it the other way. I cut out and saved each little piece (the black button, joystick, etc) from Frosty's collage that I would use. To create the dim pieces, I used gimp and changed the opacity. Very simple, once I found the right menu. I also used gimp to remove all artwork from the picture of the HotRod SE that I'm using.

The purpose of this project is to educate myself on gimp and on the use of the ImageMagick graphics libraries, not to "one up" the cpviewer guy or Howard. I had not originally intended to put labels on the image, but there's a whole bunch of interesting API functions to draw text, so I will probably do so.

Getting the correct pieces to dim has certainly been an adventure.  :)

I think the next iteration of this program will blow your socks off.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #16 on: September 03, 2004, 12:26:11 am »
I had not originally intended to put labels on the image, but there's a whole bunch of interesting API functions to draw text, so I will probably do so.

Generated text fed from the controls.dat would be awesome!

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #17 on: September 03, 2004, 12:47:38 am »
Out of curiosity, why gimp?  I'm a hardcore linux fan.  But I hate gimp.  It is not as easy to use as photoshop.  Ok, soi it is free, but you have to jump through hoops sometimes to get things done in it.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #18 on: September 03, 2004, 03:03:23 am »
Agreed.... you get what you pay for when it comes to design software and gimp is free.... enough said.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #19 on: September 03, 2004, 09:48:25 am »
Out of curiosity, why gimp?  I'm a hardcore linux fan.  But I hate gimp.  It is not as easy to use as photoshop.  Ok, soi it is free, but you have to jump through hoops sometimes to get things done in it.
Gimp certainly can be awkward. But I have two reasons to use it.

1. It's free.
2. Adobe screwed me in a business deal ten years ago and I vowed never to spend another dime on their software.

#2 more important than #1. :)
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #20 on: September 03, 2004, 09:52:36 am »
Gimp certainly can be awkward. But I have two reasons to use it.

1. It's free.
2. Adobe screwed me in a business deal ten years ago and I vowed never to spend another dime on their software.

#2 more important than #1. :)

Good reasons, but screw Adobe and get on Kazaa/similar  ;) ::)

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
More than just a demo....
« Reply #21 on: September 03, 2004, 07:04:59 pm »
Hello,

I thought I would get a preliminary version of the dynamic control panel background image generator posted. I call it CPMaker.

There are some bugs. Most notably, only the default controller configuration works, special entries in the ctrlr files don't work. Also, the program may wrongly object if any of the optional files are not used.

Installation of this program is a bit cumbersome.

[EDIT: Remove dead links and installation instructions]

I'll try to iron out the known bugs soon.

Regards,
Buddabing

EDIT: removed the environment variables and changed the font link.

« Last Edit: September 10, 2004, 10:53:55 pm by Buddabing »
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #22 on: September 09, 2004, 03:23:59 pm »
I thought I would post a screen shot of the next version of this program. There will be new features, including multi-panel support.

This image was generated for the game mk. Notice that the controls for player 2 are in weird positions and that there is only one block button, compared to two on player 1. That is because I have ctrlr file entries that remap the player 1 buttons and not the player 2 buttons.
« Last Edit: September 09, 2004, 03:27:23 pm by Buddabing »
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #23 on: September 09, 2004, 04:56:52 pm »
That's pretty nice Buddabing.  I've been using Howard's viewer and can't wait for his new release.  It seems this upcoming release of your's may be pretty functional, would that be a fair assesment?

Really great work with all of your controls work.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #24 on: September 09, 2004, 11:13:55 pm »
Cool, Now, I just want to make sure you are reading the ctrlr files correctly.  you have the heirarchy down, right?  Also which version of the ctrlr files are you currently using?

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #25 on: September 09, 2004, 11:29:39 pm »
Cool, Now, I just want to make sure you are reading the ctrlr files correctly.  you have the heirarchy down, right?  Also which version of the ctrlr files are you currently using?

Uh, there's a hierarchy to ctrlr files? Please explain. All I'm doing is reading the default and overriding it if there is a game-specific "system" section.

For debugging purposes, it would be nice if you send me some more complex examples and what the result should be. My email is buddabing at houston dot rr dot com.

The XML-style ctrlr files will be required.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 pm
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #26 on: September 10, 2004, 04:45:26 am »
Budda, where are you getting the "High Kick" "Low Kick" and stuff from?  Is that in the MK ctrl file?  Or are you extracting that from controls.dat?

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #27 on: September 10, 2004, 09:10:24 am »
Budda, where are you getting the "High Kick" "Low Kick" and stuff from?  Is that in the MK ctrl file?  Or are you extracting that from controls.dat?

From controls.xml. The new XML version will be required in order for labels to show. Hopefully it'll be an incentive for people to submit their favorite games to the database.

Required files will be:
cpmaker.ini (my own comma-delimited file which tells what controls each panel has)

Optional files:
.lof file (Johnny 5 format, to tell where to put the labels)
controls.xml (new XML format, to tell what the labels are and which controls are to be dimmed)
ctrlr file (new XML format, to tell how to map the controls to keycodes)
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #28 on: September 10, 2004, 09:47:35 am »
I'm sure SirPoonga or HowardC will elaborate, but besides games specific settings and the default you can have controls by system.  I.E.  you could have controls labeled neogeo and all neogeo games would be set up for that control.  There's a few more settings besides system too, but I forget off hand. SirPoonga and HowardC have the whole heirachy thing down, It's been posted a few times before, but forget which post.  As for controls, you should try some of the default ones.  I know slikslik and a few of the others have a few different control files already setup.

Found a link, where Howard describes it:
http://www.arcadecontrols.org/yabbse/index.php?board=3;action=display;threadid=24089;start=msg197877#msg197877

« Last Edit: September 10, 2004, 10:17:20 am by 2600 »

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #29 on: September 10, 2004, 11:21:00 am »
I'm sure SirPoonga or HowardC will elaborate, but besides games specific settings and the default you can have controls by system.  I.E.  you could have controls labeled neogeo and all neogeo games would be set up for that control.  

Found a link, where Howard describes it:
http://www.arcadecontrols.org/yabbse/index.php?board=3;action=display;threadid=24089;start=msg197877#msg197877

That thread describes the old controller format.

Here's a snippet of code which tells MAME whether or not to ignore a "system" entry:

   curfile.data.ignore_game =
      (strcmp(attributes[attr + 1], "default") != 0
&& strcmp(attributes[attr + 1], Machine->gamedrv->name) != 0
&& strcmp(attributes[attr + 1], Machine->gamedrv->source_file) != 0
&& (Machine->gamedrv->clone_of == NULL || strcmp(attributes[attr + 1], Machine->gamedrv->clone_of->name) != 0)
&& (Machine->gamedrv->clone_of == NULL || Machine->gamedrv->clone_of->clone_of == NULL || strcmp(attributes[attr + 1], Machine->gamedrv->clone_of->clone_of->name) != 0));

This tells MAME to ignore the "system" if
1) the system name is not "default"
2) the source file is not the same as the system name. So, if you had <system name="namcos2.c"> you would have to process that system if the target game is defined anywhere in namcos2.c, even if it is not a clone.
3) the system name is not "target gamename". This will take care of <system name="mk"> for Mortal Kombat.
4) the system name is not a cloneof or romof of "gamename", so <system name="neogeo"> will be processed for mslug or other neogeo games. Mslug has "romof neogeo".
5) the system name is not a clone of a cloneof of "gamename". What a mess. Can't think of any examples.

I don't see any hierarchical structure in the loading. As far as I can tell, it applies the systems in the order it loads them.

I also don't see where MAME would acknowledge a system name of "raster" or "vector".

In order to accurately get which systems to apply in the ctrlr file, it looks like it is necessary to parse the listxml output of MAME first. What a pain.

Quote

There's a few more settings besides system too, but I forget off hand. SirPoonga and HowardC have the whole heirachy thing down, It's been posted a few times before, but forget which post.  As for controls, you should try some of the default ones.  I know slikslik and a few of the others have a few different control files already setup.

I'm testing off the HotRod SE ctrlr file. The Slikstik has a few other game-specific systems set up.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #30 on: September 10, 2004, 01:32:54 pm »
Read what 2600 said.... he's dead on.  

It's far too complicated to describe, but lets just say a good 10-15 pages of code are dedicated to getting it right in the viewer.  :)

It is indeed loaded in a heirarcy.  For example....  all keys are first remapped using default remappings (std.ini, which isn't actually read, but those are the mame defaults), then any changes made in the default entry are added, then any at the driver level then any at the clone and finally the parent.  Lets say you remap p1_button 1 in the default entry and p1_button 2 at the game level.... BOTH will get remapped because the game level entry didn't explicitly remap button 1 and it's already been set when the default entry was loaded.

Btw.... ini files have vector and raster not ctrlr files.  This is confusing as the old ctrlr files had the ini extension as well.  What's holding up the new viewer is due to changes the only way to accurately determine controls is to load and parse both.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #31 on: September 10, 2004, 04:26:03 pm »
Buddabing.

I have to look to see if my ctrlr file hacks are current with the new ctrlr stuff.  But I put my hacks in the correct location in the heirarchy.

Basically mame's heirarchy is it loads the most general ctrlr file first (default.cfg).
Then display type (raster, vector, horizontal, vertical, but this is my hacks)
Then I believe it goes to control type (like mouse, lightgun, etc...)
Then driver (neogeo, cps1, etc...)
then parent,
then game

So as it goes down the line the it overwrites the more general controls as needed.

For example, if I have a default.cfg that maps keys A,S,D,Z to buttons 1, 2, 3, 4.  Then have a neogeo.cfg that maps Z,X,C,V to buttons 1,2,3,4, then a mslug.cfg that maps A,S,D,F to 1,2,3,4 when it reads in the ctrlr files for mslug it is going to first load default.cfg, so our button configuration will look like
A=1, S=2, D=3, F=, Z=4, X=, C=, V=.  Then it will readin in neogeo.cfg and overwrite creating A=1, S=2, D=3, F=, Z=1, X=2, C=3, V=4.   Then it will read in mslug.cfg and we will end up with A=1, S=2, D=3, F=4, Z=1, X=2, C=3, V=4.

BTW, you can see this heirachy if you turn verbose on in the mame.ini file, it tells you which files it loads if they exist when loading the game

I don't think this heiarchy changed for the new xml system but I haven't been able to look at the code and see if my hacks still work..

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #32 on: September 10, 2004, 05:27:08 pm »
The hierarchy did change.... since analog axis can now be dynamically changed, they removed the paddle.ini and ect... so that layer is dead.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #33 on: September 10, 2004, 06:59:13 pm »
It is indeed loaded in a heirarcy.  For example....  all keys are first remapped using default remappings (std.ini, which isn't actually read, but those are the mame defaults), then any changes made in the default entry are added, then any at the driver level then any at the clone and finally the parent.  Lets say you remap p1_button 1 in the default entry and p1_button 2 at the game level.... BOTH will get remapped because the game level entry didn't explicitly remap button 1 and it's already been set when the default entry was loaded.

As of MAME version 0.84, your statement is true and the ctrlr files are loaded in a hierarchy. I checked the source and the order is just like what 2600 said.

As of MAME version 0.85, your statement is false. Here's how I proved it and you can confirm this if you like.

Consider the HotRod SE. It has a joystick and seven buttons for each player. There are three buttons on the top row and four buttons on the bottom row. The keys for the bottom row of player one are C, left-control, left-alt, and space. In the ctrlr file for the SE, the player one button one in the "default" system is left-control. In the "neogeo" system, player one button one is C. Start up MAME v0.86 with ctrlr hotrodse in your mame.ini file and try a neogeo game to confirm that player one button one is indeed C. You don't need an actual HotRod, just press C on the keyboard. Now edit the hotrodse.cfg and cut and paste all the lines of the "default" system to come -after- the "neogeo" system. Then start the same game again. You'll find that the player one button one is now left-control!

The source code snippet that I posted earlier tells the whole story. The systems are loaded in the order in which they occur in the ctrlr file, not in any hierarchy.

Long story short, make sure your ini-to-xml converter converts the various ctrlr .ini files in the correct order. And, for anyone who writes their own ctrlr files, make sure that your systems are in the correct order, default first, then system-specific, then the parents, then the game, or else your controls will behave differently than you may expect.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #34 on: September 10, 2004, 11:07:53 pm »
It's time for a new release of this application. The old release was so cumbersome to install, I don't think anyone even downloaded it.

There are just two zips you have to download.

Here is the link to cpmaker.zip. Unzip it into c:\cpmaker.

Here is the link to the Ghostscript fonts. Pick a mirror (I like University of Minnesota), download it, and unzip it into c:\cpmaker also. I would have combined the two but there is a 5 megabyte download limit on my web page.

The application includes controls.xml, sample layout files, and sample ctrlr files. The new XML format files are required for the controls and ctrlrs. It should work out of the box.

Not bad for 2200 lines of source code.  ;D

Regards,
Buddabing

[EDIT: changed links, GeoCities sucks]
« Last Edit: September 12, 2004, 11:39:55 am by Buddabing »
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #35 on: September 10, 2004, 11:19:02 pm »
I heard in one of the whatsnew there's a fix for that hotrod issue.

goofy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 143
  • Last login:January 03, 2005, 01:11:10 am
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #36 on: September 12, 2004, 12:04:07 am »
hmmm, the links don't seem to be working. The app looks cool though.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #37 on: September 12, 2004, 11:42:27 am »
hmmm, the links don't seem to be working. The app looks cool though.

I've changed the links, for some reason GeoCities didn't allow access to the files.

I'm now working on integrating this with my MAME artwork display code, which will display these control panel images when pause is pressed.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #38 on: September 12, 2004, 06:01:32 pm »
I downloaded mame 86 to verify the heirarchy.  The heirarchy is working.  They changed how it reacts though.  The old version did what I said.  The new version doesn't "add on" the keycoded to a button.  So if you look at my attached file when you play mslug P1_BUTTON1 is only Q, not A, Z, and Q like the old ctrlr files would have done.  So basically it overwrites nd doesn't add.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #39 on: September 12, 2004, 07:17:14 pm »
Buddabing,
Trying out your app.  I can't seem to get the controls to generate correctly.  I thought you had said it was set up with some defaults so I type in the example like in the install.txt, but I get a controls.png that looks like robotron is starting up.  Everything is installed like in the install.txt, turned on verbose in cpmaker.ini, but nothing popped out as an error.

Can you point out what I'm doing wrong or where I should look?

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #40 on: September 12, 2004, 08:42:32 pm »
Buddabing,
Trying out your app.  I can't seem to get the controls to generate correctly.  I thought you had said it was set up with some defaults so I type in the example like in the install.txt, but I get a controls.png that looks like robotron is starting up.  Everything is installed like in the install.txt, turned on verbose in cpmaker.ini, but nothing popped out as an error.

Can you point out what I'm doing wrong or where I should look?


Out of the box, I've got it set up with three panels. The first panel looks like a HotRod SE, with two players, seven buttons each. The second panel has a 4/8 way switchable, three buttons in a row, and a trackball. The third panel has a spinner, four buttons, and a flight stick.

For games that can be played on more than one panel, the program either picks what you choose for it in the .ini file, or it uses the "majority" panel from the ini file, or it picks a panel which may not be the panel you want. Out of the box, the "majority" panel is the trackball panel.

I'm working on a simpler example that uses pictures of a keyboard with the different control keys highlighted.

What game are you attempting to generate an image for?

I tried Robotron, and it doesn't use the correct panel because I didn't have the control type "doublejoy8way" as a possible control type. So that's a bug.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #41 on: September 12, 2004, 08:56:14 pm »
I tried pacman,  just like in install.txt.  Also, tried mslug cause Sirpoonga mentioned it.  Didn't actually try robotron just mentioned that because the image looks like those games when they first start, the video is all crazy.  Here's a pic.
« Last Edit: September 12, 2004, 08:56:43 pm by 2600 »

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #42 on: September 12, 2004, 11:02:39 pm »
I tried pacman,  just like in install.txt.  Also, tried mslug cause Sirpoonga mentioned it.  Didn't actually try robotron just mentioned that because the image looks like those games when they first start, the video is all crazy.  Here's a pic.

Okay, thanks. There's probably an exception in the underlying graphics library that isn't being caught. What OS are you running, and how much memory do you have?

You should be getting something like below:
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #43 on: September 13, 2004, 08:50:59 am »
I'm using Xp with a GB of memory.  Tried it on another PC with win2000 and got the controls to generate.

Anything you want me to try to help debug the first system?


Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #44 on: September 13, 2004, 11:09:02 am »
I'm using Xp with a GB of memory.  Tried it on another PC with win2000 and got the controls to generate.

Anything you want me to try to help debug the first system?



I reproduced your problem. I believe that the .png files produced by this application are not compatible with some .png readers. I generated a .png file, then opened the file with Internet Explorer. Junk. Then I opened it with Gimp. Good image. Then I regenerated the file as .jpg and displayed it with IE. Good image.

Since I'm not intimately familiar with the inner workings of PNG files, I can't elaborate on why this error occurs. However, the files do display correctly within my MAME artwork code.

How are you viewing the generated images? Do you still get an error when you generate a JPG image instead of PNG?

Regards,
Buddabing
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #45 on: September 13, 2004, 11:14:27 am »
I'll try a few different viewers later tonight, can't remember which one's I used.  Let me know how to generate jpg's and I'll try those as well.


Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #46 on: September 13, 2004, 11:35:54 am »
I'll try a few different viewers later tonight, can't remember which one's I used.  Let me know how to generate jpg's and I'll try those as well.



To generate .jpg, just change the filename extension to .jpg.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #47 on: September 13, 2004, 07:22:28 pm »
Well feeling kinda dumb.  It's exactly like you said some .png readers can't read it, my default was the windows pictue and fax viewer.

Thanks for the help.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #48 on: September 14, 2004, 12:37:04 am »
[I tried Robotron, and it doesn't use the correct panel because I didn't have the control type "doublejoy8way" as a possible control type. So that's a bug.

Download the FE dev package and use the files in it as lookup tables.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #49 on: September 15, 2004, 05:39:08 pm »
New version available here.

9-15-04
=======
- Added font control
- added red boxes which display the layout slots when verbose is turned on
- Fit text to size of layout slots
- added keyboard example (incomplete)
- Added 2 games to controls.xml (Star Trek and Red Baron)
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

EndTwist

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 480
  • Last login:May 26, 2022, 05:04:49 pm
  • Arg.
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #50 on: September 15, 2004, 06:05:04 pm »
Great work, very cool!

Only thing I have to say is that, couldn't this be done in PHP more easily/efficiently? ??? Its got built in image functions (more/less) and build in XML reading/writing stuff. Plus, you could "compile" PHP in to an exe (along with some php-related DLLs) using "PriadoBlender" (http://priadoblender.com/).

Makes more sense to me...

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #51 on: September 15, 2004, 06:20:42 pm »
Great work, very cool!

Only thing I have to say is that, couldn't this be done in PHP more easily/efficiently? ??? Its got built in image functions (more/less) and build in XML reading/writing stuff. Plus, you could "compile" PHP in to an exe (along with some php-related DLLs) using "PriadoBlender" (http://priadoblender.com/).

Makes more sense to me...

It probably could be done in PHP. It certainly would be more difficult for me personally to develop in PHP, since I don't work with it. I might try rewriting this application in PHP as an exercise.....
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

EndTwist

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 480
  • Last login:May 26, 2022, 05:04:49 pm
  • Arg.
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #52 on: September 15, 2004, 07:07:12 pm »
Essentially, from my standpoint (pretty good php programmer), it would be easier due to the built-in image and XML functions. There is also the possibility of it running faster than the current cpmaker.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #53 on: September 15, 2004, 07:56:49 pm »
Well, the built in functions for php are slow.  You;d have to run with the PEAR utilities.

I'd do something like this in c++ with all the libs out there.  For xml there expat, bison, etc..  for png there's libpng, for jpg there's libjpg.

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #54 on: September 16, 2004, 02:01:28 am »
- Added 2 games to controls.xml (Star Trek and Red Baron)

I see you finally registered onto fe.donkeyfly.com.  You can submit these if you have resources (IE control panel pics, manuls, other references.)  I know MrArcade had a Captains Chair so I can easily confer the star trek controls.  Red Barron was just a yoke and some buttons, right?  It was popular though so you should be able to find references for that.

2600

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1630
  • Last login:June 05, 2017, 10:20:56 am
  • I want my own arcade controls!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #55 on: September 16, 2004, 12:04:56 pm »
Am I correct in saying clones aren't supported yet or is it a bug?

Ex.  "cpmaker pacman puckman" doesn't generate labels
"cpmaker puckman" or "cpmaker puckman puckman" does generate labels

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #56 on: September 16, 2004, 01:37:28 pm »
Am I correct in saying clones aren't supported yet or is it a bug?

Ex.  "cpmaker pacman puckman" doesn't generate labels
"cpmaker puckman" or "cpmaker puckman puckman" does generate labels

Bug.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #57 on: September 16, 2004, 05:26:02 pm »
I finally got to download and try this out (stupid modem!).

pretty cool stuff.

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #58 on: September 16, 2004, 05:36:10 pm »
Am I correct in saying clones aren't supported yet or is it a bug?

Ex.  "cpmaker pacman puckman" doesn't generate labels
"cpmaker puckman" or "cpmaker puckman puckman" does generate labels

Bug.

Should be fixed now. I also found a couple other small bugs and cleaned up the verbose output a bit.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #59 on: September 18, 2004, 02:38:13 pm »
Essentially, from my standpoint (pretty good php programmer), it would be easier due to the built-in image and XML functions. There is also the possibility of it running faster than the current cpmaker.

Just for the record, I agree and I'm not particularly good in either language.  I know xml is the hot new thing now, but imho it totally blows.  Excuse me for using the technical term there.  ;)

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #60 on: September 22, 2004, 06:02:08 pm »
Essentially, from my standpoint (pretty good php programmer), it would be easier due to the built-in image and XML functions. There is also the possibility of it running faster than the current cpmaker.
Just for the record, I agree and I'm not particularly good in either language.  I know xml is the hot new thing now, but imho it totally blows.  Excuse me for using the technical term there.  ;)

I'm working on a PHP version of the control panel image generator. It blew my mind how easy it is! Right now the code is barely 1000 lines as opposed to the C version which is more than 2200 lines. Right now I can't tell the speed due to all the debugging code I have in it, but it does not appear to be any slower than the C version. And that's interpreted PHP, not compiled.

Howard, I don't disagree with you that XML "blows". But it's so darn easy to parse! I wish you would consider making your Johnny 5 layout files use XML. There are plenty of resources out there to use XML with VB, such as the Macrosoft MSXML SAX library. You have to use XML to read the .85 and newer ctrlr files anyway, why not use XML for the layout file as well?
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #61 on: September 23, 2004, 12:44:49 am »
If you need php advise you may have noticed the controls.dat project is all php.  I have found a couple of decent IDEs too.


EndTwist

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 480
  • Last login:May 26, 2022, 05:04:49 pm
  • Arg.
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #62 on: September 23, 2004, 07:07:27 am »
Hehe, what'd I tell ya? And once its complete, you can "compile" it using PriadoBlender (www.priadoblender.com).
« Last Edit: September 23, 2004, 07:08:16 am by EndTwist »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #63 on: September 23, 2004, 05:58:03 pm »
I downloaded mame 86 to verify the heirarchy.  The heirarchy is working.  They changed how it reacts though.  The old version did what I said.  The new version doesn't "add on" the keycoded to a button.  So if you look at my attached file when you play mslug P1_BUTTON1 is only Q, not A, Z, and Q like the old ctrlr files would have done.  So basically it overwrites nd doesn't add.

That's how the old hierachy worked man...  If it didn't overwrite then you would have a ton of cross-input related errors and the hierarchy would be pointless.  It adds different inputs when they haven't be defined yet it overwrites the same inputs in a heirarchy.  Got it?

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #64 on: September 23, 2004, 08:23:42 pm »
I downloaded mame 86 to verify the heirarchy.  The heirarchy is working.  They changed how it reacts though.  The old version did what I said.  The new version doesn't "add on" the keycoded to a button.  So if you look at my attached file when you play mslug P1_BUTTON1 is only Q, not A, Z, and Q like the old ctrlr files would have done.  So basically it overwrites nd doesn't add.

That's how the old hierachy worked man...  If it didn't overwrite then you would have a ton of cross-input related errors and the hierarchy would be pointless.  It adds different inputs when they haven't be defined yet it overwrites the same inputs in a heirarchy.  Got it?


Right, what I said is what happened when I tested it out in .86

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #65 on: September 25, 2004, 01:18:04 pm »
Hehe, what'd I tell ya? And once its complete, you can "compile" it using PriadoBlender (www.priadoblender.com).
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #66 on: September 25, 2004, 01:22:41 pm »
The previous reply to this post has a sample of the output of the PHP image generator. There are two problems I want to correct.

1. There are magenta rings around the buttons. PHP doesn't do alpha blending the same way. So I defined a pure magenta color to be alpha. I created a blank pure magenta image in Gimp and overlaid the existing black button image on it. What do I need to do to not have Gimp blend the button image with the magenta background?

2. The text is not anti-aliased, but I don't have antialiasing turned off. What do I need to do to keep antialiasing?

TIA,
Buddabing
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

Buddabing

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1845
  • Last login:February 12, 2015, 02:51:45 pm
  • I'm a llama!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #67 on: October 04, 2004, 12:47:00 pm »
Here is Aaron Giles confirming what I said about the load order of control definitions:

Quote

(sirp)
> why is it when I put a definition for mslug before neogeo in the ctrlr cfg file
> that I end up with neogeo? Should it not matter what order you put the entries
> in?

(aaron)
Yes, the order matters. The file is scanned top-to-bottom, and anything that matches the current game will get applied in the order it is encountered. A match consists of any of the following:

the game name
the game's parent name
the game's driver file.c
default

It is done this way for simplicity.

Aaron

The PHP version of CPMaker is complete. I solved the magenta rings but changing what GIMP calls the "alpha threshold" of the piece images. However, this causes a bit of aliasing between the control image and the background image. The PHP version only requires one image per control instead of two. The program itself does the dimming instead of blending a separate pre-dimmed control like the C version does.  

The C version looks better due to antialiased text and better blending than the PHP version.
I have changed my nickname to "Cakemeister". Please do not PM the Buddabing account because I do not check it anymore.

Please read the wiki!

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 17, 2025, 11:04:07 pm
  • The Bears Still Suck!
Re:Demonstration: Dynamic Control Panel Background Image Generation
« Reply #68 on: October 04, 2004, 01:02:07 pm »
Buddabing, have you tried searching google groups for an answer to the antialiasing thing?  Or post a message there.

The quick search I did it seems you need a 3rd party image package.